diff options
author | Chris Schlaeger <chris@linux.com> | 2016-03-01 19:48:42 +0100 |
---|---|---|
committer | Chris Schlaeger <chris@linux.com> | 2016-03-01 19:48:42 +0100 |
commit | e0c4a3e0bdf8fd4149ece69dfe132279f95eae65 (patch) | |
tree | 633a6f474090a2ffabf489608711bbbdfdd21aab /lib | |
parent | fa8d419e0f5b87501061600508c6c52be84ceb30 (diff) | |
download | postrunner-e0c4a3e0bdf8fd4149ece69dfe132279f95eae65.zip |
FIX: Update records pages on rename and set name commands.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/postrunner/FitFileStore.rb | 1 | ||||
-rw-r--r-- | lib/postrunner/Main.rb | 8 |
2 files changed, 8 insertions, 1 deletions
diff --git a/lib/postrunner/FitFileStore.rb b/lib/postrunner/FitFileStore.rb index 0c4ff2b..b85cdfa 100644 --- a/lib/postrunner/FitFileStore.rb +++ b/lib/postrunner/FitFileStore.rb @@ -150,6 +150,7 @@ module PostRunner def rename_activity(activity, name) activity.set('name', name) generate_html_index_pages + @store['records'].generate_html_reports if activity.has_records? end # Set the specified attribute of the given activity to a new value. diff --git a/lib/postrunner/Main.rb b/lib/postrunner/Main.rb index baf6a3e..bb40df2 100644 --- a/lib/postrunner/Main.rb +++ b/lib/postrunner/Main.rb @@ -453,7 +453,13 @@ EOT when :rename @ffs.rename_activity(activity, @name) when :set - @ffs.set_activity_attribute(activity, @attribute, @value) + if @attribute == 'name' + # We have to handle the 'name' attribute as special case as we have + # to update some HTML reports as well. + @ffs.rename_activity(activity, @value) + else + @ffs.set_activity_attribute(activity, @attribute, @value) + end when :show activity.show when :sources |