postrunner 0.10.0 → 0.10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/postrunner/ActivityListView.rb +1 -1
- data/lib/postrunner/FFS_Activity.rb +4 -4
- data/lib/postrunner/Main.rb +3 -3
- data/lib/postrunner/RecordListPageView.rb +1 -1
- data/lib/postrunner/version.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 800922f3ea3d5ff42ba5e706be3e2bff5dbed0ad
|
4
|
+
data.tar.gz: 20e85ae14a306f2c662defabaa3c18b19d6bcec6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/postrunner/Main.rb
CHANGED
@@ -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'] ||=
|
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']
|
532
|
-
@db['config']['unit_system'] = args[0]
|
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
|
data/lib/postrunner/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -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'] =
|
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
|