Class: GitFit::ConfigTemplate

Inherits:
Object
  • Object
show all
Defined in:
lib/git_fit/config_template.rb

Class Method Summary collapse

Class Method Details

.generateObject



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/git_fit/config_template.rb', line 3

def self.generate
  <<~YAML
    ---
    database:
      path: db/fit.sqlite3

    sync:
      # strava:                                    # env: GIT_FIT_STRAVA_CLIENT_ID
      #   client_id: ""                            # env: GIT_FIT_STRAVA_CLIENT_SECRET
      #   refresh_token: ""                        # env: GIT_FIT_STRAVA_REFRESH_TOKEN

      # garmin:                                    # env: GIT_FIT_GARMIN_EMAIL
      #   email: ""                                # env: GIT_FIT_GARMIN_PASSWORD
      #   password: ""

      # keep:                                      # env: GIT_FIT_KEEP_PHONE
      #   phone: ""                                # env: GIT_FIT_KEEP_PASSWORD
      #   password: ""

      # igpsport:                                  # env: GIT_FIT_IGPSPORT_PHONE
      #   phone: ""                                # env: GIT_FIT_IGPSPORT_PASSWORD
      #   password: ""

    export:
      json:
        path: site/activities.json

    privacy:
      start_end_range: 200

    system:
      units: metric
      log_level: info
      timezone: Asia/Shanghai
  YAML
end

.hashObject



40
41
42
# File 'lib/git_fit/config_template.rb', line 40

def self.hash
  YAML.safe_load(generate) || {}
end