diff options
author | Chris Schlaeger <chris@linux.com> | 2014-08-21 22:27:25 +0200 |
---|---|---|
committer | Chris Schlaeger <chris@linux.com> | 2014-08-21 22:27:25 +0200 |
commit | c879fd4a6e1da1996c7f05daf3979080e3d51f29 (patch) | |
tree | a17236f406ada4b5b7164156f8fd98c94a904db5 /lib | |
parent | da47178b94d6ff247c8c13c1cc6880f2f1d73bbc (diff) | |
download | postrunner-c879fd4a6e1da1996c7f05daf3979080e3d51f29.zip |
Ensure that imported files have HTML reports
Diffstat (limited to 'lib')
-rw-r--r-- | lib/postrunner/ActivitiesDB.rb | 4 | ||||
-rw-r--r-- | lib/postrunner/Activity.rb | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/postrunner/ActivitiesDB.rb b/lib/postrunner/ActivitiesDB.rb index f38ee79..fd26e13 100644 --- a/lib/postrunner/ActivitiesDB.rb +++ b/lib/postrunner/ActivitiesDB.rb @@ -56,6 +56,10 @@ module PostRunner @records = PersonalRecords.new(self) end + # Add a new FIT file to the database. + # @param fit_file [String] Name of the FIT file. + # @return [TrueClass or FalseClass] True if the file could be added. False + # otherwise. def add(fit_file) base_fit_file = File.basename(fit_file) if @activities.find { |a| a.fit_file == base_fit_file } diff --git a/lib/postrunner/Activity.rb b/lib/postrunner/Activity.rb index 23972e2..8a0b2a2 100644 --- a/lib/postrunner/Activity.rb +++ b/lib/postrunner/Activity.rb @@ -37,6 +37,8 @@ module PostRunner instance_variable_set(v_str, fit_activity.send(v)) self.class.send(:attr_reader, v.to_sym) end + # Generate HTML file for this activity. + ActivityView.new(self) end def late_init(db) |