summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Schlaeger <chris@linux.com>2016-03-01 19:48:42 +0100
committerChris Schlaeger <chris@linux.com>2016-03-01 19:48:42 +0100
commite0c4a3e0bdf8fd4149ece69dfe132279f95eae65 (patch)
tree633a6f474090a2ffabf489608711bbbdfdd21aab
parentfa8d419e0f5b87501061600508c6c52be84ceb30 (diff)
downloadpostrunner-e0c4a3e0bdf8fd4149ece69dfe132279f95eae65.zip
FIX: Update records pages on rename and set name commands.
-rw-r--r--lib/postrunner/FitFileStore.rb1
-rw-r--r--lib/postrunner/Main.rb8
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