Oops, fixed another typo in README.md
authorJan Vrany <jan.vrany@fit.cvut.cz>
Thu, 22 Oct 2015 08:00:29 +0100
changeset 300 7644dc89cdad
parent 299 26fa4f7e4b8e
child 301 df951cc9a173
Oops, fixed another typo in README.md
README.md
web/app/controllers/archive_controller.rb
web/app/models/benchmark_batch.rb
web/app/views/results/index.html.erb
--- a/README.md	Mon Oct 19 11:23:47 2015 +0100
+++ b/README.md	Thu Oct 22 08:00:29 2015 +0100
@@ -10,7 +10,7 @@
 
 - Benchmarking and (especially) interpreting benchmark results is always
   a monkey business. The tool should produce raw numbers, letting the 
-  user to whichever statistics she needs to make up (desired) results. 
+  user to use whichever statistics she needs to make up (desired) results. 
 - Benchmark results should be kept and managed at a single place so one
   can view and retrieve all past benchmark results pretty much the same
   way as one can view and retrieve past versions of the software from 
--- a/web/app/controllers/archive_controller.rb	Mon Oct 19 11:23:47 2015 +0100
+++ b/web/app/controllers/archive_controller.rb	Thu Oct 22 08:00:29 2015 +0100
@@ -7,6 +7,10 @@
         format.json do
           render :json => @batch.to_json
         end
+      elsif params[:format] == 'csv' then
+        format.csv do
+          render :csv => @batch.to_csv
+        end
       end
     end
   end
--- a/web/app/models/benchmark_batch.rb	Mon Oct 19 11:23:47 2015 +0100
+++ b/web/app/models/benchmark_batch.rb	Thu Oct 22 08:00:29 2015 +0100
@@ -66,6 +66,10 @@
     JSON.parse(IO.read(archive_path))
   end
 
+  def to_csv
+    JSON.parse(IO.read(archive_path))
+  end
+
   def performed_at_ensured
     performed_at || Date.today
   end
--- a/web/app/views/results/index.html.erb	Mon Oct 19 11:23:47 2015 +0100
+++ b/web/app/views/results/index.html.erb	Thu Oct 22 08:00:29 2015 +0100
@@ -71,6 +71,7 @@
             </div>
             <div class="col-xs-2 pull-right text-right">
               <%= link_to('[json]', archive_path(batch.id, format: 'json')) %>
+              <%= link_to('[csv]', archive_path(batch.id, format: 'csv')) %>
             </div>
           </div>
         </div>