From a0e14657f088686c88a01e149a4a0bb1760eb37d Mon Sep 17 00:00:00 2001 From: Cyril Mougel Date: Sun, 19 May 2013 14:32:43 +0200 Subject: [PATCH] Update some gem in their patch-level version --- Gemfile | 3 --- Gemfile.lock | 145 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------------------------------------------- app/controllers/api/v1/notices_controller.rb | 10 +++++----- spec/controllers/api/v1/notices_controller_spec.rb | 2 +- spec/controllers/api/v1/problems_controller_spec.rb | 2 +- 5 files changed, 77 insertions(+), 85 deletions(-) diff --git a/Gemfile b/Gemfile index 52a930f..5c3bf89 100644 --- a/Gemfile +++ b/Gemfile @@ -8,9 +8,6 @@ gem 'haml' gem 'htmlentities', "~> 4.3.0" gem 'rack-ssl', :require => 'rack/ssl' # force SSL -# Remove this when tilt 1.3.7 is released. -gem 'tilt', :git => 'https://github.com/rtomayko/tilt.git' - gem 'useragent', '~> 0.4.16' gem 'inherited_resources' gem 'SystemTimer', :platform => :ruby_18 diff --git a/Gemfile.lock b/Gemfile.lock index 9b1501d..776a9dc 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -5,12 +5,6 @@ GIT gitlab (2.2.0) httparty -GIT - remote: https://github.com/rtomayko/tilt.git - revision: 74618967fbed3e206453516b92b47cd9aa922903 - specs: - tilt (1.4.0) - GEM remote: http://rubygems.org/ specs: @@ -46,32 +40,33 @@ GEM activesupport (3.2.13) i18n (= 0.6.1) multi_json (~> 1.0) - addressable (2.3.2) + addressable (2.3.4) airbrake (3.1.12) activesupport builder json arel (3.0.2) bcrypt-ruby (3.0.1) - better_errors (0.7.0) + better_errors (0.8.0) coderay (>= 1.0.0) erubis (>= 2.6.6) binding_of_caller (0.7.1) debug_inspector (>= 0.0.1) - bitbucket_rest_api (0.1.1) + bitbucket_rest_api (0.1.2) faraday (~> 0.8.1) faraday_middleware (~> 0.8.1) hashie (~> 1.2.0) multi_json (~> 1.3) nokogiri (~> 1.5.2) simple_oauth - bson (1.8.5) - bson_ext (1.8.5) - bson (~> 1.8.5) + bson (1.8.6) + bson_ext (1.8.6) + bson (~> 1.8.6) builder (3.0.4) + callsite (0.0.11) campy (0.1.3) multi_json (~> 1.0) - capistrano (2.13.5) + capistrano (2.15.4) highline net-scp (>= 1.0.0) net-sftp (>= 2.0.0) @@ -86,12 +81,12 @@ GEM xpath (~> 0.1.4) childprocess (0.3.5) ffi (~> 1.0, >= 1.0.6) - coderay (1.0.6) + coderay (1.0.9) colorize (0.5.8) columnize (0.3.6) - coveralls (0.5.7) + coveralls (0.6.7) colorize - json + multi_json (~> 1.3) rest-client simplecov (>= 0.7) thor @@ -99,42 +94,43 @@ GEM css_parser (1.2.6) addressable rdoc - daemons (1.1.8) + daemons (1.1.9) database_cleaner (0.6.7) debug_inspector (0.0.2) - debugger (1.3.0) + debugger (1.6.0) columnize (>= 0.3.1) - debugger-linecache (~> 1.1.1) - debugger-ruby_core_source (~> 1.1.7) - debugger-linecache (1.1.2) - debugger-ruby_core_source (>= 1.1.1) - debugger-ruby_core_source (1.1.7) + debugger-linecache (~> 1.2.0) + debugger-ruby_core_source (~> 1.2.1) + debugger-linecache (1.2.0) + debugger-ruby_core_source (1.2.2) devise (1.5.4) bcrypt-ruby (~> 3.0) orm_adapter (~> 0.0.3) warden (~> 1.1) diff-lcs (1.2.4) - email_spec (1.2.1) + dotenv (0.7.0) + email_spec (1.4.0) + launchy (~> 2.1) mail (~> 2.2) - rspec (~> 2.0) erubis (2.7.0) eventmachine (1.0.3) execjs (1.4.0) multi_json (~> 1.0) fabrication (1.3.2) - faraday (0.8.4) + faraday (0.8.7) multipart-post (~> 1.1) faraday_middleware (0.8.8) faraday (>= 0.7.4, < 0.9) ffi (1.1.4) - foreman (0.60.2) + foreman (0.63.0) + dotenv (>= 0.7) thor (>= 0.13.6) haml (3.1.7) happymapper (0.4.0) libxml-ruby (~> 2.0) has_scope (0.5.1) hashie (1.2.0) - highline (1.6.15) + highline (1.6.19) hike (1.2.2) hipchat (0.4.1) httparty @@ -154,35 +150,35 @@ GEM has_scope (~> 0.5.0) responders (~> 0.6) journey (1.0.4) - json (1.7.7) + json (1.8.0) jwt (0.1.5) multi_json (>= 1.0) kaminari (0.14.1) actionpack (>= 3.0.0) activesupport (>= 3.0.0) kgio (2.7.4) - launchy (2.1.2) + launchy (2.3.0) addressable (~> 2.3) - libv8 (3.11.8.13) + libv8 (3.11.8.17) libwebsocket (0.1.5) addressable - libxml-ruby (2.3.3) + libxml-ruby (2.6.0) lighthouse-api (2.0) activeresource (>= 3.0.0) activesupport (>= 3.0.0) linecache (0.46) rbx-require-relative (> 0.0.4) - mail (2.5.3) - i18n (>= 0.4.0) + mail (2.5.4) mime-types (~> 1.16) treetop (~> 1.4.8) - meta_request (0.2.2) + meta_request (0.2.5) + callsite rack-contrib railties - method_source (0.7.1) - mime-types (1.21) - mongo (1.8.5) - bson (~> 1.8.5) + method_source (0.8.1) + mime-types (1.23) + mongo (1.8.6) + bson (~> 1.8.6) mongoid (2.7.1) activemodel (~> 3.1) mongo (~> 1.8) @@ -193,16 +189,18 @@ GEM rails (>= 3.0.0) railties (>= 3.0.0) multi_json (1.7.3) - multi_xml (0.5.2) - multipart-post (1.1.5) - net-scp (1.0.4) - net-ssh (>= 1.99.1) - net-sftp (2.0.5) - net-ssh (>= 2.0.9) - net-ssh (2.6.1) - net-ssh-gateway (1.1.0) - net-ssh (>= 1.99.1) - nokogiri (1.5.5) + multi_xml (0.5.3) + multipart-post (1.2.0) + net-scp (1.1.1) + net-ssh (>= 2.6.5) + net-sftp (2.1.2) + net-ssh (>= 2.6.5) + net-ssh (2.6.7) + net-ssh-gateway (1.2.0) + net-ssh (>= 2.6.5) + nokogiri (1.5.9) + nokogiri-happymapper (0.5.7) + nokogiri (~> 1.5) oauth2 (0.8.0) faraday (~> 0.8) httpauth (~> 0.1) @@ -215,8 +213,8 @@ GEM faraday_middleware (~> 0.8) hashie (~> 1.2) multi_json (~> 1.3) - omniauth (1.1.1) - hashie (~> 1.2) + omniauth (1.1.4) + hashie (>= 1.2, < 3) rack omniauth-github (1.0.2) omniauth (~> 1.0) @@ -227,25 +225,26 @@ GEM orm_adapter (0.0.7) oruen_redmine_client (0.0.1) activeresource (>= 2.3.0) - pivotal-tracker (0.5.4) - builder + pivotal-tracker (0.5.10) builder - happymapper (>= 0.3.2) + crack happymapper (>= 0.3.2) nokogiri (>= 1.4.3) - nokogiri (~> 1.4) - rest-client (~> 1.6.0) + nokogiri (>= 1.5.5) + nokogiri-happymapper (>= 0.5.4) rest-client (~> 1.6.0) polyglot (0.3.3) premailer (1.7.3) css_parser (>= 1.1.9) htmlentities (>= 4.0.0) - pry (0.9.9.6) + pry (0.9.12.2) coderay (~> 1.0.5) - method_source (~> 0.7.1) - slop (>= 2.4.4, < 3) - pry-rails (0.2.0) - pry + method_source (~> 0.8) + slop (~> 3.4) + pry-rails (0.3.0) + pry (>= 0.9.10) + puma (2.0.1) + rack (>= 1.1, < 2.0) rack (1.4.5) rack-cache (1.2) rack (>= 0.4) @@ -253,7 +252,7 @@ GEM rack (>= 0.9.1) rack-ssl (1.3.3) rack - rack-ssl-enforcer (0.2.4) + rack-ssl-enforcer (0.2.5) rack-test (0.6.2) rack (>= 1.0) rails (3.2.13) @@ -278,21 +277,17 @@ GEM rbx-require-relative (0.0.9) rdoc (3.12.2) json (~> 1.4) - ref (1.0.2) + ref (1.0.4) responders (0.9.2) railties (~> 3.1) rest-client (1.6.7) mime-types (>= 1.16) ri_cal (0.8.8) - rspec (2.13.0) - rspec-core (~> 2.13.0) - rspec-expectations (~> 2.13.0) - rspec-mocks (~> 2.13.0) rspec-core (2.13.1) rspec-expectations (2.13.0) diff-lcs (>= 1.1.3, < 2.0) rspec-mocks (2.13.1) - rspec-rails (2.13.1) + rspec-rails (2.13.2) actionpack (>= 3.0) activesupport (>= 3.0) railties (>= 3.0) @@ -315,12 +310,12 @@ GEM libwebsocket (~> 0.1.3) multi_json (~> 1.0) rubyzip - simple_oauth (0.1.9) + simple_oauth (0.2.0) simplecov (0.7.1) multi_json (~> 1.0) simplecov-html (~> 0.7.1) simplecov-html (0.7.1) - slop (2.4.4) + slop (3.4.5) sprockets (2.2.2) hike (~> 1.2) multi_json (~> 1.0) @@ -329,12 +324,13 @@ GEM therubyracer (0.11.4) libv8 (~> 3.11.8.12) ref - thin (1.4.1) + thin (1.5.1) daemons (>= 1.0.9) eventmachine (>= 0.12.6) rack (>= 1.0.0) thor (0.18.1) - timecop (0.3.5) + tilt (1.4.1) + timecop (0.6.1) treetop (1.4.12) polyglot polyglot (>= 0.3.1) @@ -353,9 +349,9 @@ GEM useragent (0.4.16) warden (1.2.1) rack (>= 1.0) - webmock (1.8.7) + webmock (1.11.0) addressable (>= 2.2.7) - crack (>= 0.1.7) + crack (>= 0.3.2) xmpp4r (0.5) xpath (0.1.4) nokogiri (~> 1.3) @@ -415,7 +411,6 @@ DEPENDENCIES rushover therubyracer thin - tilt! timecop turbo-sprockets-rails3 uglifier (>= 1.0.3) diff --git a/app/controllers/api/v1/notices_controller.rb b/app/controllers/api/v1/notices_controller.rb index 6c819ab..d86865d 100644 --- a/app/controllers/api/v1/notices_controller.rb +++ b/app/controllers/api/v1/notices_controller.rb @@ -1,23 +1,23 @@ class Api::V1::NoticesController < ApplicationController respond_to :json, :xml - + def index query = {} fields = %w{created_at message error_class} - + if params.key?(:start_date) && params.key?(:end_date) start_date = Time.parse(params[:start_date]).utc end_date = Time.parse(params[:end_date]).utc query = {:created_at => {"$lte" => end_date, "$gte" => start_date}} end - + results = benchmark("[api/v1/notices_controller] query time") { Mongoid.master["notices"].find(query, :fields => fields).to_a } - + respond_to do |format| format.html { render :json => Yajl.dump(results) } # render JSON if no extension specified on path format.json { render :json => Yajl.dump(results) } format.xml { render :xml => results } end end - + end diff --git a/spec/controllers/api/v1/notices_controller_spec.rb b/spec/controllers/api/v1/notices_controller_spec.rb index 3931362..338d5db 100644 --- a/spec/controllers/api/v1/notices_controller_spec.rb +++ b/spec/controllers/api/v1/notices_controller_spec.rb @@ -22,7 +22,7 @@ describe Api::V1::NoticesController do it "should return XML if XML is requested" do get :index, :auth_token => @user.authentication_token, :format => "xml" - lambda { XML::Parser.string(response.body).parse }.should_not raise_error + Nokogiri::XML(response.body).errors.should be_empty end it "should return JSON by default" do diff --git a/spec/controllers/api/v1/problems_controller_spec.rb b/spec/controllers/api/v1/problems_controller_spec.rb index aa53575..f3e5e10 100644 --- a/spec/controllers/api/v1/problems_controller_spec.rb +++ b/spec/controllers/api/v1/problems_controller_spec.rb @@ -24,7 +24,7 @@ describe Api::V1::ProblemsController do it "should return XML if XML is requested" do get :index, :auth_token => @user.authentication_token, :format => "xml" - lambda { XML::Parser.string(response.body).parse }.should_not raise_error + Nokogiri::XML(response.body).errors.should be_empty end it "should return JSON by default" do -- libgit2 0.21.2