[ARVADOS] updated: 2a23694d15d95ab0645c12e4c50ad7dba614d188

git at public.curoverse.com git at public.curoverse.com
Thu Mar 13 00:21:34 EDT 2014


Summary of changes:
 services/api/Gemfile                               |    8 +++++++-
 services/api/Gemfile.lock                          |    2 ++
 .../api/app/controllers/application_controller.rb  |    8 +++++---
 3 files changed, 14 insertions(+), 4 deletions(-)

       via  2a23694d15d95ab0645c12e4c50ad7dba614d188 (commit)
       via  53d5329cc92c7cfb8764f46d122be885d8be8912 (commit)
      from  b58df61f4c9e0c8e6115414aa488d03b6b6ca632 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 2a23694d15d95ab0645c12e4c50ad7dba614d188
Author: Tom Clegg <tom at curoverse.com>
Date:   Thu Mar 13 00:17:06 2014 -0400

    Fix crash in render_error(not_an_exception), and use raise() rather
    than calling render_error() directly from ApplicationController#save
    and #update

diff --git a/services/api/app/controllers/application_controller.rb b/services/api/app/controllers/application_controller.rb
index 4061b7d..7c10c84 100644
--- a/services/api/app/controllers/application_controller.rb
+++ b/services/api/app/controllers/application_controller.rb
@@ -38,7 +38,7 @@ class ApplicationController < ActionController::Base
     if @object.save
       show
     else
-      render_error "Save failed"
+      raise "Save failed"
     end
   end
 
@@ -49,7 +49,7 @@ class ApplicationController < ActionController::Base
     if @object.update_attributes attrs_to_update
       show
     else
-      render_error "Update failed"
+      raise "Update failed"
     end
   end
 
@@ -87,7 +87,9 @@ class ApplicationController < ActionController::Base
 
   def render_error(e)
     logger.error e.inspect
-    logger.error e.backtrace.collect { |x| x + "\n" }.join('') if e.backtrace
+    if e.respond_to? :backtrace and e.backtrace
+      logger.error e.backtrace.collect { |x| x + "\n" }.join('')
+    end
     if @object and @object.errors and @object.errors.full_messages and not @object.errors.full_messages.empty?
       errors = @object.errors.full_messages
     else

commit 53d5329cc92c7cfb8764f46d122be885d8be8912
Author: Tom Clegg <tom at curoverse.com>
Date:   Thu Mar 13 00:04:34 2014 -0400

    Add sqlite3 to Gemfile so database.yml.sample works unmodified

diff --git a/services/api/Gemfile b/services/api/Gemfile
index 2d3a07f..ded0358 100644
--- a/services/api/Gemfile
+++ b/services/api/Gemfile
@@ -5,7 +5,13 @@ gem 'rails', '~> 3.2.0'
 # Bundle edge Rails instead:
 # gem 'rails',     :git => 'git://github.com/rails/rails.git'
 
-#gem 'sqlite3'
+group :test, :development do
+  gem 'sqlite3'
+end
+
+# This might not be needed in :test and :development, but we load it
+# anyway to make sure it always gets in Gemfile.lock and to help
+# reveal install problems sooner rather than later.
 gem 'pg'
 
 # Start using multi_json once we are on Rails 3.2;
diff --git a/services/api/Gemfile.lock b/services/api/Gemfile.lock
index d5f4e33..c734ab5 100644
--- a/services/api/Gemfile.lock
+++ b/services/api/Gemfile.lock
@@ -169,6 +169,7 @@ GEM
       multi_json (~> 1.0)
       rack (~> 1.0)
       tilt (~> 1.1, != 1.3.0)
+    sqlite3 (1.3.8)
     test_after_commit (0.2.2)
     therubyracer (0.12.0)
       libv8 (~> 3.16.14.0)
@@ -205,6 +206,7 @@ DEPENDENCIES
   redis
   rvm-capistrano
   sass-rails (>= 3.2.0)
+  sqlite3
   test_after_commit
   therubyracer
   trollop

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list