rack-api 0.3.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +1 -0
- data/.rspec +1 -1
- data/Gemfile.lock +8 -6
- data/README.rdoc +1 -1
- data/Rakefile +1 -1
- data/examples/controller.rb +22 -0
- data/examples/without_version_and_prefix.rb +14 -0
- data/lib/rack/api.rb +2 -1
- data/lib/rack/api/{app.rb → controller.rb} +4 -4
- data/lib/rack/api/runner.rb +38 -5
- data/lib/rack/api/version.rb +3 -3
- data/rack-api.gemspec +1 -0
- data/spec/rack-api/controller_spec.rb +14 -0
- data/spec/rack-api/format_spec.rb +1 -1
- data/spec/rack-api/rescue_from_spec.rb +1 -1
- data/spec/rack-api/runner_spec.rb +1 -1
- data/spec/rack-api/url_for_spec.rb +5 -5
- data/spec/support/mycontroller.rb +5 -0
- metadata +97 -79
data/.gitignore
CHANGED
data/.rspec
CHANGED
@@ -1 +1 @@
|
|
1
|
-
--color --format documentation
|
1
|
+
--color --format documentation
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rack-api (0.
|
4
|
+
rack-api (1.0.0)
|
5
5
|
activesupport (>= 3.0.0)
|
6
6
|
rack (>= 1.0.0)
|
7
7
|
rack-mount (>= 0.6.0)
|
@@ -9,18 +9,19 @@ PATH
|
|
9
9
|
GEM
|
10
10
|
remote: http://rubygems.org/
|
11
11
|
specs:
|
12
|
-
activesupport (3.0.
|
12
|
+
activesupport (3.0.9)
|
13
13
|
archive-tar-minitar (0.5.2)
|
14
|
-
columnize (0.3.
|
14
|
+
columnize (0.3.4)
|
15
15
|
diff-lcs (1.1.2)
|
16
16
|
linecache19 (0.5.12)
|
17
17
|
ruby_core_source (>= 0.1.4)
|
18
|
-
rack (1.3.
|
19
|
-
rack-mount (0.
|
18
|
+
rack (1.3.2)
|
19
|
+
rack-mount (0.6.14)
|
20
20
|
rack (>= 1.0.0)
|
21
21
|
rack-test (0.5.7)
|
22
22
|
rack (>= 1.0)
|
23
|
-
|
23
|
+
rake (0.9.2)
|
24
|
+
redis (2.2.1)
|
24
25
|
rspec (2.6.0)
|
25
26
|
rspec-core (~> 2.6.0)
|
26
27
|
rspec-expectations (~> 2.6.0)
|
@@ -46,6 +47,7 @@ PLATFORMS
|
|
46
47
|
DEPENDENCIES
|
47
48
|
rack-api!
|
48
49
|
rack-test (~> 0.5.7)
|
50
|
+
rake (~> 0.9)
|
49
51
|
redis (~> 2.2.0)
|
50
52
|
rspec (~> 2.6)
|
51
53
|
ruby-debug19
|
data/README.rdoc
CHANGED
@@ -127,7 +127,7 @@ Your <tt>Helpers</tt> module may look like this:
|
|
127
127
|
== Helpers
|
128
128
|
|
129
129
|
Every Rack::API action has several helper methods available through the
|
130
|
-
Rack::API::
|
130
|
+
Rack::API::Controller class. Here's some of them:
|
131
131
|
|
132
132
|
=== logger
|
133
133
|
|
data/Rakefile
CHANGED
@@ -0,0 +1,22 @@
|
|
1
|
+
$:.push(File.dirname(__FILE__) + "/../lib")
|
2
|
+
|
3
|
+
# Just run `ruby examples/controller.rb` and then use something like
|
4
|
+
# `curl http://localhost:2345/api/v1/`.
|
5
|
+
|
6
|
+
require "rack/api"
|
7
|
+
|
8
|
+
class Hello < Rack::API::Controller
|
9
|
+
def index
|
10
|
+
{:message => "Hello, awesome API!"}
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
Rack::API.app do
|
15
|
+
prefix "api"
|
16
|
+
|
17
|
+
version :v1 do
|
18
|
+
get "/", :to => "hello#index"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
Rack::Handler::Thin.run Rack::API, :Port => 2345
|
@@ -0,0 +1,14 @@
|
|
1
|
+
$:.push(File.dirname(__FILE__) + "/../lib")
|
2
|
+
|
3
|
+
# Just run `ruby examples/without_version_and_prefix.rb` and then use something like
|
4
|
+
# `curl http://localhost:2345/`.
|
5
|
+
|
6
|
+
require "rack/api"
|
7
|
+
|
8
|
+
Rack::API.app do
|
9
|
+
get "/" do
|
10
|
+
{:message => "Hello, awesome API!"}
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
Rack::Handler::Thin.run Rack::API, :Port => 2345
|
data/lib/rack/api.rb
CHANGED
@@ -2,13 +2,14 @@ require "rack"
|
|
2
2
|
require "rack/mount"
|
3
3
|
require "active_support/hash_with_indifferent_access"
|
4
4
|
require "active_support/core_ext/object/to_query"
|
5
|
+
require "active_support/core_ext/string/inflections"
|
5
6
|
require "json"
|
6
7
|
require "logger"
|
7
8
|
require "forwardable"
|
8
9
|
|
9
10
|
module Rack
|
10
11
|
class API
|
11
|
-
autoload :
|
12
|
+
autoload :Controller , "rack/api/controller"
|
12
13
|
autoload :Formatter , "rack/api/formatter"
|
13
14
|
autoload :Middleware , "rack/api/middleware"
|
14
15
|
autoload :Runner , "rack/api/runner"
|
@@ -1,10 +1,10 @@
|
|
1
1
|
module Rack
|
2
2
|
class API
|
3
|
-
class
|
3
|
+
class Controller
|
4
4
|
# Registered content types. If you want to use
|
5
5
|
# a custom formatter that is not listed here,
|
6
6
|
# you have to manually add it. Otherwise,
|
7
|
-
# Rack::API::
|
7
|
+
# Rack::API::Controller::DEFAULT_MIME_TYPE will be used
|
8
8
|
# as the content type.
|
9
9
|
#
|
10
10
|
MIME_TYPES = {
|
@@ -19,7 +19,7 @@ module Rack
|
|
19
19
|
}
|
20
20
|
|
21
21
|
# Default content type. Will be used when a given format
|
22
|
-
# hasn't been registered on Rack::API::
|
22
|
+
# hasn't been registered on Rack::API::Controller::MIME_TYPES.
|
23
23
|
#
|
24
24
|
DEFAULT_MIME_TYPE = "application/octet-stream"
|
25
25
|
|
@@ -169,7 +169,7 @@ module Rack
|
|
169
169
|
|
170
170
|
# Return response content type based on extension.
|
171
171
|
# If you're using an unknown extension that wasn't registered on
|
172
|
-
# Rack::API::
|
172
|
+
# Rack::API::Controller::MIME_TYPES, it will return Rack::API::Controller::DEFAULT_MIME_TYPE,
|
173
173
|
# which defaults to <tt>application/octet-stream</tt>.
|
174
174
|
#
|
175
175
|
def content_type
|
data/lib/rack/api/runner.rb
CHANGED
@@ -87,7 +87,7 @@ module Rack
|
|
87
87
|
end
|
88
88
|
|
89
89
|
# Define the server endpoint. Will be used if you call the method
|
90
|
-
# Rack::API::
|
90
|
+
# Rack::API::Controller#url_for.
|
91
91
|
#
|
92
92
|
# The following options are supported:
|
93
93
|
#
|
@@ -223,9 +223,42 @@ module Rack
|
|
223
223
|
# end
|
224
224
|
# end
|
225
225
|
#
|
226
|
+
# You don't have to use +version+ or +prefix+.
|
227
|
+
#
|
228
|
+
# class MyAPI < Rack::API
|
229
|
+
# get "users(.:format)" do
|
230
|
+
# # do something
|
231
|
+
# end
|
232
|
+
# end
|
233
|
+
#
|
234
|
+
# Alternatively, you can define your routes pretty much like Rails.
|
235
|
+
#
|
236
|
+
# class MyAPI < Rack::API
|
237
|
+
# get "users(.:format)", :to => "users#index"
|
238
|
+
# end
|
239
|
+
#
|
240
|
+
# The route above will require a class +Users+ with an instance method +index+.
|
241
|
+
#
|
242
|
+
# class Users < Rack::API::Controller
|
243
|
+
# def index
|
244
|
+
# # do something
|
245
|
+
# end
|
246
|
+
# end
|
247
|
+
#
|
248
|
+
# Note that your controller <b>must</b> inherit from Rack::API::Controller. Otherwise,
|
249
|
+
# your world will explode.
|
250
|
+
#
|
226
251
|
def route(method, path, requirements = {}, &block)
|
227
252
|
path = Rack::Mount::Strexp.compile mount_path(path), requirements, %w[ / . ? ]
|
228
|
-
|
253
|
+
controller_class = Controller
|
254
|
+
|
255
|
+
if requirements[:to]
|
256
|
+
controller_name, action_name = requirements.delete(:to).split("#")
|
257
|
+
controller_class = controller_name.camelize.constantize
|
258
|
+
block = proc { __send__(action_name) }
|
259
|
+
end
|
260
|
+
|
261
|
+
route_set.add_route(build_app(controller_class, block), :path_info => path, :request_method => method)
|
229
262
|
end
|
230
263
|
|
231
264
|
HTTP_METHODS.each do |method|
|
@@ -258,8 +291,8 @@ module Rack
|
|
258
291
|
(option(:formats).first || "json").to_s
|
259
292
|
end
|
260
293
|
|
261
|
-
def build_app(handler) # :nodoc:
|
262
|
-
app =
|
294
|
+
def build_app(controller, handler) # :nodoc:
|
295
|
+
app = controller.new({
|
263
296
|
:handler => handler,
|
264
297
|
:default_format => default_format,
|
265
298
|
:version => option(:version),
|
@@ -277,7 +310,7 @@ module Rack
|
|
277
310
|
# Add middleware for format validation.
|
278
311
|
builder.use Rack::API::Middleware::Format, default_format, option(:formats)
|
279
312
|
|
280
|
-
# Add middlewares to
|
313
|
+
# Add middlewares to execution stack.
|
281
314
|
option(:middlewares, :merge).each {|middleware| builder.use(*middleware)}
|
282
315
|
|
283
316
|
# Apply helpers to app.
|
data/lib/rack/api/version.rb
CHANGED
data/rack-api.gemspec
CHANGED
@@ -23,5 +23,6 @@ Gem::Specification.new do |s|
|
|
23
23
|
s.add_development_dependency "rspec", "~> 2.6"
|
24
24
|
s.add_development_dependency "rack-test", "~> 0.5.7"
|
25
25
|
s.add_development_dependency "redis", "~> 2.2.0"
|
26
|
+
s.add_development_dependency "rake", "~> 0.9"
|
26
27
|
s.add_development_dependency "ruby-debug19" if RUBY_VERSION >= "1.9"
|
27
28
|
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Rack::API do
|
4
|
+
before do
|
5
|
+
Rack::API.app do
|
6
|
+
get("/", :to => "my_controller#index")
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
it "renders action from MyApp" do
|
11
|
+
get "/", :name => "John"
|
12
|
+
last_response.body.should == {"name" => "John"}.to_json
|
13
|
+
end
|
14
|
+
end
|
@@ -39,7 +39,7 @@ describe Rack::API, "Format" do
|
|
39
39
|
end
|
40
40
|
|
41
41
|
it "is set to the first respond_to value" do
|
42
|
-
Rack::API::
|
42
|
+
Rack::API::Controller::MIME_TYPES["fffuuu"] = "application/x-fffuuu"
|
43
43
|
|
44
44
|
Rack::API.app do
|
45
45
|
version :v2 do
|
@@ -50,7 +50,7 @@ describe Rack::API::Runner do
|
|
50
50
|
:handler => proc {}
|
51
51
|
}
|
52
52
|
|
53
|
-
Rack::API::
|
53
|
+
Rack::API::Controller.should_receive(:new).with(hash_including(expected)).once
|
54
54
|
subject.version("v1") do
|
55
55
|
respond_to :fffuuu
|
56
56
|
prefix "api"
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
|
3
|
-
describe Rack::API::
|
4
|
-
subject { Rack::API::
|
3
|
+
describe Rack::API::Controller, "#url_for" do
|
4
|
+
subject { Rack::API::Controller.new(
|
5
5
|
:version => "v1",
|
6
6
|
:url_options => {},
|
7
7
|
:env => Rack::MockRequest.env_for("/v1")
|
@@ -22,7 +22,7 @@ describe Rack::API::App, "#url_for" do
|
|
22
22
|
end
|
23
23
|
|
24
24
|
it "sets default url options hash" do
|
25
|
-
subject = Rack::API::
|
25
|
+
subject = Rack::API::Controller.new(:version => "v1", :url_options => nil, :env => Rack::MockRequest.env_for("/v1"))
|
26
26
|
|
27
27
|
expect {
|
28
28
|
subject.url_for(:things, 1)
|
@@ -59,13 +59,13 @@ describe Rack::API::App, "#url_for" do
|
|
59
59
|
|
60
60
|
it "uses host from request" do
|
61
61
|
env = Rack::MockRequest.env_for("/v1", "SERVER_NAME" => "mysite.com")
|
62
|
-
subject = Rack::API::
|
62
|
+
subject = Rack::API::Controller.new(:version => "v1", :env => env)
|
63
63
|
subject.url_for.should == "http://mysite.com/v1"
|
64
64
|
end
|
65
65
|
|
66
66
|
it "uses port from request" do
|
67
67
|
env = Rack::MockRequest.env_for("/v1", "SERVER_PORT" => "2345")
|
68
|
-
subject = Rack::API::
|
68
|
+
subject = Rack::API::Controller.new(:version => "v1", :env => env)
|
69
69
|
subject.url_for.should == "http://example.org:2345/v1"
|
70
70
|
end
|
71
71
|
end
|
metadata
CHANGED
@@ -1,104 +1,112 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-api
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
4
5
|
prerelease:
|
5
|
-
version: 0.3.1
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Nando Vieira
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2011-08-05 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
16
15
|
name: rack
|
17
|
-
|
18
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: &70155088054880 !ruby/object:Gem::Requirement
|
19
17
|
none: false
|
20
|
-
requirements:
|
21
|
-
- -
|
22
|
-
- !ruby/object:Gem::Version
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
23
21
|
version: 1.0.0
|
24
22
|
type: :runtime
|
25
|
-
version_requirements: *id001
|
26
|
-
- !ruby/object:Gem::Dependency
|
27
|
-
name: rack-mount
|
28
23
|
prerelease: false
|
29
|
-
|
24
|
+
version_requirements: *70155088054880
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: rack-mount
|
27
|
+
requirement: &70155088053900 !ruby/object:Gem::Requirement
|
30
28
|
none: false
|
31
|
-
requirements:
|
32
|
-
- -
|
33
|
-
- !ruby/object:Gem::Version
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
34
32
|
version: 0.6.0
|
35
33
|
type: :runtime
|
36
|
-
version_requirements: *id002
|
37
|
-
- !ruby/object:Gem::Dependency
|
38
|
-
name: activesupport
|
39
34
|
prerelease: false
|
40
|
-
|
35
|
+
version_requirements: *70155088053900
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: activesupport
|
38
|
+
requirement: &70155088053320 !ruby/object:Gem::Requirement
|
41
39
|
none: false
|
42
|
-
requirements:
|
43
|
-
- -
|
44
|
-
- !ruby/object:Gem::Version
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
45
43
|
version: 3.0.0
|
46
44
|
type: :runtime
|
47
|
-
version_requirements: *id003
|
48
|
-
- !ruby/object:Gem::Dependency
|
49
|
-
name: rspec
|
50
45
|
prerelease: false
|
51
|
-
|
46
|
+
version_requirements: *70155088053320
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: rspec
|
49
|
+
requirement: &70155088052440 !ruby/object:Gem::Requirement
|
52
50
|
none: false
|
53
|
-
requirements:
|
51
|
+
requirements:
|
54
52
|
- - ~>
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
version:
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '2.6'
|
57
55
|
type: :development
|
58
|
-
version_requirements: *id004
|
59
|
-
- !ruby/object:Gem::Dependency
|
60
|
-
name: rack-test
|
61
56
|
prerelease: false
|
62
|
-
|
57
|
+
version_requirements: *70155088052440
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
name: rack-test
|
60
|
+
requirement: &70155088067720 !ruby/object:Gem::Requirement
|
63
61
|
none: false
|
64
|
-
requirements:
|
62
|
+
requirements:
|
65
63
|
- - ~>
|
66
|
-
- !ruby/object:Gem::Version
|
64
|
+
- !ruby/object:Gem::Version
|
67
65
|
version: 0.5.7
|
68
66
|
type: :development
|
69
|
-
version_requirements: *id005
|
70
|
-
- !ruby/object:Gem::Dependency
|
71
|
-
name: redis
|
72
67
|
prerelease: false
|
73
|
-
|
68
|
+
version_requirements: *70155088067720
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: redis
|
71
|
+
requirement: &70155088067220 !ruby/object:Gem::Requirement
|
74
72
|
none: false
|
75
|
-
requirements:
|
73
|
+
requirements:
|
76
74
|
- - ~>
|
77
|
-
- !ruby/object:Gem::Version
|
75
|
+
- !ruby/object:Gem::Version
|
78
76
|
version: 2.2.0
|
79
77
|
type: :development
|
80
|
-
version_requirements: *id006
|
81
|
-
- !ruby/object:Gem::Dependency
|
82
|
-
name: ruby-debug19
|
83
78
|
prerelease: false
|
84
|
-
|
79
|
+
version_requirements: *70155088067220
|
80
|
+
- !ruby/object:Gem::Dependency
|
81
|
+
name: rake
|
82
|
+
requirement: &70155088066500 !ruby/object:Gem::Requirement
|
85
83
|
none: false
|
86
|
-
requirements:
|
87
|
-
- -
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version:
|
84
|
+
requirements:
|
85
|
+
- - ~>
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '0.9'
|
90
88
|
type: :development
|
91
|
-
|
92
|
-
|
93
|
-
|
89
|
+
prerelease: false
|
90
|
+
version_requirements: *70155088066500
|
91
|
+
- !ruby/object:Gem::Dependency
|
92
|
+
name: ruby-debug19
|
93
|
+
requirement: &70155088065780 !ruby/object:Gem::Requirement
|
94
|
+
none: false
|
95
|
+
requirements:
|
96
|
+
- - ! '>='
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: '0'
|
99
|
+
type: :development
|
100
|
+
prerelease: false
|
101
|
+
version_requirements: *70155088065780
|
102
|
+
description: Create web app APIs that respond to one or more formats using an elegant
|
103
|
+
DSL.
|
104
|
+
email:
|
94
105
|
- fnando.vieira@gmail.com
|
95
106
|
executables: []
|
96
|
-
|
97
107
|
extensions: []
|
98
|
-
|
99
108
|
extra_rdoc_files: []
|
100
|
-
|
101
|
-
files:
|
109
|
+
files:
|
102
110
|
- .gitignore
|
103
111
|
- .rspec
|
104
112
|
- Gemfile
|
@@ -106,6 +114,7 @@ files:
|
|
106
114
|
- README.rdoc
|
107
115
|
- Rakefile
|
108
116
|
- examples/basic_auth.rb
|
117
|
+
- examples/controller.rb
|
109
118
|
- examples/custom_class.rb
|
110
119
|
- examples/custom_format.rb
|
111
120
|
- examples/custom_headers.rb
|
@@ -116,8 +125,9 @@ files:
|
|
116
125
|
- examples/params.rb
|
117
126
|
- examples/rescue_from.rb
|
118
127
|
- examples/simple.rb
|
128
|
+
- examples/without_version_and_prefix.rb
|
119
129
|
- lib/rack/api.rb
|
120
|
-
- lib/rack/api/
|
130
|
+
- lib/rack/api/controller.rb
|
121
131
|
- lib/rack/api/formatter.rb
|
122
132
|
- lib/rack/api/formatter/base.rb
|
123
133
|
- lib/rack/api/formatter/jsonp.rb
|
@@ -131,6 +141,7 @@ files:
|
|
131
141
|
- rack-api.gemspec
|
132
142
|
- spec/rack-api/api_throttling_spec.rb
|
133
143
|
- spec/rack-api/basic_auth_spec.rb
|
144
|
+
- spec/rack-api/controller_spec.rb
|
134
145
|
- spec/rack-api/format_spec.rb
|
135
146
|
- spec/rack-api/headers_spec.rb
|
136
147
|
- spec/rack-api/helpers_spec.rb
|
@@ -151,37 +162,43 @@ files:
|
|
151
162
|
- spec/support/core_ext.rb
|
152
163
|
- spec/support/helpers.rb
|
153
164
|
- spec/support/myapp.rb
|
165
|
+
- spec/support/mycontroller.rb
|
154
166
|
- spec/support/zomg_middleware.rb
|
155
167
|
homepage: http://rubygems.org/gems/rack-api
|
156
168
|
licenses: []
|
157
|
-
|
158
169
|
post_install_message:
|
159
170
|
rdoc_options: []
|
160
|
-
|
161
|
-
require_paths:
|
171
|
+
require_paths:
|
162
172
|
- lib
|
163
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
173
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
164
174
|
none: false
|
165
|
-
requirements:
|
166
|
-
- -
|
167
|
-
- !ruby/object:Gem::Version
|
168
|
-
version:
|
169
|
-
|
175
|
+
requirements:
|
176
|
+
- - ! '>='
|
177
|
+
- !ruby/object:Gem::Version
|
178
|
+
version: '0'
|
179
|
+
segments:
|
180
|
+
- 0
|
181
|
+
hash: -3523925321348313927
|
182
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
170
183
|
none: false
|
171
|
-
requirements:
|
172
|
-
- -
|
173
|
-
- !ruby/object:Gem::Version
|
174
|
-
version:
|
184
|
+
requirements:
|
185
|
+
- - ! '>='
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '0'
|
188
|
+
segments:
|
189
|
+
- 0
|
190
|
+
hash: -3523925321348313927
|
175
191
|
requirements: []
|
176
|
-
|
177
192
|
rubyforge_project:
|
178
|
-
rubygems_version: 1.8.
|
193
|
+
rubygems_version: 1.8.6
|
179
194
|
signing_key:
|
180
195
|
specification_version: 3
|
181
|
-
summary: Create web app APIs that respond to one or more formats using an elegant
|
182
|
-
|
196
|
+
summary: Create web app APIs that respond to one or more formats using an elegant
|
197
|
+
DSL.
|
198
|
+
test_files:
|
183
199
|
- spec/rack-api/api_throttling_spec.rb
|
184
200
|
- spec/rack-api/basic_auth_spec.rb
|
201
|
+
- spec/rack-api/controller_spec.rb
|
185
202
|
- spec/rack-api/format_spec.rb
|
186
203
|
- spec/rack-api/headers_spec.rb
|
187
204
|
- spec/rack-api/helpers_spec.rb
|
@@ -202,4 +219,5 @@ test_files:
|
|
202
219
|
- spec/support/core_ext.rb
|
203
220
|
- spec/support/helpers.rb
|
204
221
|
- spec/support/myapp.rb
|
222
|
+
- spec/support/mycontroller.rb
|
205
223
|
- spec/support/zomg_middleware.rb
|