postrunner 0.10.0 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0a6a1f15eac9398548829e5217b1e0fff59df30e
4
- data.tar.gz: 6a0e03028f0592f96680a24914cbd6997e072244
3
+ metadata.gz: 800922f3ea3d5ff42ba5e706be3e2bff5dbed0ad
4
+ data.tar.gz: 20e85ae14a306f2c662defabaa3c18b19d6bcec6
5
5
  SHA512:
6
- metadata.gz: 112581e21eeb8afdc533d6016cc65d4af74e7f1e32ba6fcda593fc9b96ac010471a15427dc7704f779cb408e7248165fda939398a250cf7c78e1f97f8bcb8133
7
- data.tar.gz: 8e3648ddbd3c5bde15635b6ddb03772b278b3043c7c886c9e429b96f1cf2272a5c7d81738f61f950f6fa3f9b6a2b648527b55619c8e389e2433757a69f4657ca
6
+ metadata.gz: 3e4983e623b4c575937d1b9d419b7f874532affe4ebd8e1e849f58027fa59459365b38804396c794f88649949cc78ed43fa0019ef164c4f8a0f8ef6c3409e19d
7
+ data.tar.gz: 3b35e7874e9418bc1d3cd39b1d8574ad169f69ca17b5375dee6423287697b475955126d29503e72242e0a04cfc893daf2195f45649e6c82594acf40548b06551
@@ -26,7 +26,7 @@ module PostRunner
26
26
 
27
27
  def initialize(ffs)
28
28
  @ffs = ffs
29
- @unit_system = @ffs.store['config']['unit_system']
29
+ @unit_system = @ffs.store['config']['unit_system'].to_sym
30
30
  @page_size = 20
31
31
  @page_no = -1
32
32
  @last_page = (@ffs.activities.length - 1) / @page_size
@@ -177,7 +177,7 @@ module PostRunner
177
177
 
178
178
  def events
179
179
  load_fit_file
180
- puts EventList.new(self, @store['config']['unit_system']).to_s
180
+ puts EventList.new(self, @store['config']['unit_system'].to_sym).to_s
181
181
  end
182
182
 
183
183
  def show
@@ -190,12 +190,12 @@ module PostRunner
190
190
 
191
191
  def sources
192
192
  load_fit_file
193
- puts DataSources.new(self, @store['config']['unit_system']).to_s
193
+ puts DataSources.new(self, @store['config']['unit_system'].to_sym).to_s
194
194
  end
195
195
 
196
196
  def summary
197
197
  load_fit_file
198
- puts ActivitySummary.new(self, @store['config']['unit_system'],
198
+ puts ActivitySummary.new(self, @store['config']['unit_system'].to_sym,
199
199
  { :name => @name,
200
200
  :type => activity_type,
201
201
  :sub_type => activity_sub_type }).to_s
@@ -244,7 +244,7 @@ module PostRunner
244
244
 
245
245
  def generate_html_report
246
246
  load_fit_file
247
- ActivityView.new(self, @store['config']['unit_system'])
247
+ ActivityView.new(self, @store['config']['unit_system'].to_sym)
248
248
  end
249
249
 
250
250
  def activity_type
@@ -61,7 +61,7 @@ module PostRunner
61
61
  # Create a hash to store configuration data in the store unless it
62
62
  # exists already.
63
63
  cfg = (@db['config'] ||= @db.new(PEROBS::Hash))
64
- cfg['unit_system'] ||= :metric
64
+ cfg['unit_system'] ||= 'metric'
65
65
  cfg['version'] ||= VERSION
66
66
  # First day of the week. 0 means Sunday, 1 Monday and so on.
67
67
  cfg['week_start_day'] ||= 1
@@ -528,8 +528,8 @@ EOT
528
528
  Log.error("You must specify 'metric' or 'statute' as unit system.")
529
529
  end
530
530
 
531
- if @db['config']['unit_system'].to_s != args[0]
532
- @db['config']['unit_system'] = args[0].to_sym
531
+ if @db['config']['unit_system'] != args[0]
532
+ @db['config']['unit_system'] = args[0]
533
533
  @ffs.change_unit_system
534
534
  end
535
535
  end
@@ -33,7 +33,7 @@ module PostRunner
33
33
  # @param page_count [Fixnum] Number of total pages
34
34
  # @param page_index [Fixnum] Index of the page
35
35
  def initialize(ffs, records, page_count, page_index)
36
- #@unit_system = ffs.store['config']['unit_system']
36
+ #@unit_system = ffs.store['config']['unit_system'].to_sym
37
37
  @records = records
38
38
 
39
39
  views = ffs.views
@@ -11,5 +11,5 @@
11
11
  #
12
12
 
13
13
  module PostRunner
14
- VERSION = '0.10.0'
14
+ VERSION = '0.10.1'
15
15
  end
@@ -56,7 +56,7 @@ def create_fit_file_store
56
56
  store['config'] = store.new(PEROBS::Hash)
57
57
  store['config']['data_dir'] = @work_dir
58
58
  store['config']['html_dir'] = @html_dir
59
- store['config']['unit_system'] = :metric
59
+ store['config']['unit_system'] = 'metric'
60
60
  @ffs = store['file_store'] = store.new(PostRunner::FitFileStore)
61
61
  @records = store['records'] = store.new(PostRunner::PersonalRecords)
62
62
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: postrunner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Schlaeger