diff --git a/lib/refrepo/gen/wiki/generators/environments.rb b/lib/refrepo/gen/wiki/generators/environments.rb index d2f7a2f70556d59fbe41ae80a992cac0d6a69700..3ac19967bbdccf11f01a9d668f112a544e9dc9c5 100644 --- a/lib/refrepo/gen/wiki/generators/environments.rb +++ b/lib/refrepo/gen/wiki/generators/environments.rb @@ -69,7 +69,7 @@ class EnvironmentsGenerator < WikiGenerator # Table construction table_options = 'class="wikitable sortable" style="text-align: center;"' @generated_content = MW.generate_table(table_options, table_columns, table_data) - @generated_content += MW.italic(MW.small(generated_date_string)) + @generated_content += MW.italic(MW.small("Last generated from the Grid'5000 API on #{Time.now.strftime("%Y-%m-%d")}")) @generated_content += MW::LINE_FEED end end diff --git a/lib/refrepo/gen/wiki/wiki_generator.rb b/lib/refrepo/gen/wiki/wiki_generator.rb index fa6c54f0c298c11284424e98feff61f9a40a71ee..28d47dce01a260af53e2087aebc437f3bd685d38 100644 --- a/lib/refrepo/gen/wiki/wiki_generator.rb +++ b/lib/refrepo/gen/wiki/wiki_generator.rb @@ -34,13 +34,13 @@ class WikiGenerator end def remove_page_creation_date(content) - return content.gsub(/''<small>Last generated from the Grid'5000 Reference API on .+<\/small>''/, '') + return content.gsub(/''<small>Last generated from the Grid'5000.+<\/small>''/, '') end def generated_date_string commit = `git show --oneline -s`.split(' ').first date = Time.now.strftime("%Y-%m-%d") - return "Last generated from the Grid'5000 Reference API on #{date} ([https://github.com/grid5000/reference-repository/commit/#{commit} commit #{commit}])" + return "Last generated from the Grid'5000 Reference API on #{date} ([https://gitlab.inria.fr/grid5000/reference-repository/commit/#{commit} commit #{commit}])" end #Actually edit the mediawiki page with the new generated content