Skip to content
This repository has been archived by the owner on Nov 17, 2017. It is now read-only.

Commit

Permalink
Upgraded dependencies. Fixed broken tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
fnando committed Mar 30, 2012
1 parent cbed809 commit 82132d7
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 32 deletions.
52 changes: 25 additions & 27 deletions Gemfile.lock
Expand Up @@ -10,46 +10,44 @@ PATH
GEM
remote: http://rubygems.org/
specs:
activesupport (3.0.10)
archive-tar-minitar (0.5.2)
columnize (0.3.4)
activesupport (3.2.2)
i18n (~> 0.6)
multi_json (~> 1.0)
awesome_print (1.0.2)
coderay (1.0.5)
diff-lcs (1.1.3)
i18n (0.6.0)
linecache19 (0.5.12)
ruby_core_source (>= 0.1.4)
rack (1.3.2)
rack-mount (0.8.2)
method_source (0.7.1)
multi_json (1.2.0)
pry (0.9.8.4)
coderay (~> 1.0.5)
method_source (~> 0.7.1)
slop (>= 2.4.4, < 3)
rack (1.4.1)
rack-mount (0.8.3)
rack (>= 1.0.0)
rack-test (0.5.7)
rack (>= 1.0)
rake (0.9.2)
rake (0.9.2.2)
redis (2.2.2)
rspec (2.6.0)
rspec-core (~> 2.6.0)
rspec-expectations (~> 2.6.0)
rspec-mocks (~> 2.6.0)
rspec-core (2.6.4)
rspec-expectations (2.6.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.6.0)
ruby-debug-base19 (0.11.25)
columnize (>= 0.3.1)
linecache19 (>= 0.5.11)
ruby_core_source (>= 0.1.4)
ruby-debug19 (0.11.6)
columnize (>= 0.3.1)
linecache19 (>= 0.5.11)
ruby-debug-base19 (>= 0.11.19)
ruby_core_source (0.1.5)
archive-tar-minitar (>= 0.5.2)
rspec (2.9.0)
rspec-core (~> 2.9.0)
rspec-expectations (~> 2.9.0)
rspec-mocks (~> 2.9.0)
rspec-core (2.9.0)
rspec-expectations (2.9.0)
diff-lcs (~> 1.1.3)
rspec-mocks (2.9.0)
slop (2.4.4)

PLATFORMS
ruby

DEPENDENCIES
awesome_print
pry
rack-api!
rack-test (~> 0.5.7)
rake (~> 0.9)
redis (~> 2.2.0)
rspec (~> 2.6)
ruby-debug19
6 changes: 4 additions & 2 deletions lib/rack/api/runner.rb
Expand Up @@ -250,7 +250,9 @@ def route_set # :nodoc:
# your world will explode.
#
def route(method, path, requirements = {}, &block)
path = Rack::Mount::Strexp.compile mount_path(path), requirements, %w[ / . ? ]
separator = requirements.delete(:separator) { %w[ / . ? ] }

path = Rack::Mount::Strexp.compile mount_path(path), requirements, separator
controller_class = Controller

if requirements[:to]
Expand All @@ -274,7 +276,7 @@ def #{method}(*args, &block) # def get(*args, &block)
#
# rescue_from ActiveRecord::RecordNotFound, :status => 404
# rescue_from Exception, :status => 500
# rescue_from Exception do
# rescue_from Exception do |error|
# $logger.error error.inspect
# [500, {"Content-Type" => "text/plain"}, []]
# end
Expand Down
3 changes: 2 additions & 1 deletion rack-api.gemspec
Expand Up @@ -25,5 +25,6 @@ Gem::Specification.new do |s|
s.add_development_dependency "rack-test", "~> 0.5.7"
s.add_development_dependency "redis", "~> 2.2.0"
s.add_development_dependency "rake", "~> 0.9"
s.add_development_dependency "ruby-debug19" if RUBY_VERSION >= "1.9"
s.add_development_dependency "pry"
s.add_development_dependency "awesome_print"
end
6 changes: 5 additions & 1 deletion spec/rack-api/runner_spec.rb
Expand Up @@ -50,7 +50,11 @@
:handler => proc {}
}

Rack::API::Controller.should_receive(:new).with(hash_including(expected)).once
Rack::API::Controller
.should_receive(:new)
.with(hash_including(expected))
.and_return(mock.as_null_object)

subject.version("v1") do
respond_to :fffuuu
prefix "api"
Expand Down
2 changes: 1 addition & 1 deletion spec/rack-api/url_for_spec.rb
Expand Up @@ -54,7 +54,7 @@

it "adds query string" do
actual = subject.url_for(:format => :json, :filters => [:name, :age])
actual.should == "http://example.org/v1?filters[]=name&filters[]=age&format=json"
actual.should == "http://example.org/v1?filters%5B%5D=name&filters%5B%5D=age&format=json"
end

it "uses host from request" do
Expand Down

0 comments on commit 82132d7

Please sign in to comment.