grape 0.1.1 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of grape might be problematic. Click here for more details.

Files changed (115) hide show
  1. data/.gitignore +1 -1
  2. data/.yardoc/checksums +13 -0
  3. data/.yardoc/objects/Grape.dat +0 -0
  4. data/.yardoc/objects/Grape/API.dat +0 -0
  5. data/.yardoc/objects/Grape/API/auth_c.dat +0 -0
  6. data/.yardoc/objects/Grape/API/build_endpoint_c.dat +0 -0
  7. data/.yardoc/objects/Grape/API/call_c.dat +0 -0
  8. data/.yardoc/objects/Grape/API/compile_path_c.dat +0 -0
  9. data/.yardoc/objects/Grape/API/default_format_c.dat +0 -0
  10. data/.yardoc/objects/Grape/API/delete_c.dat +0 -0
  11. data/.yardoc/objects/Grape/API/get_c.dat +0 -0
  12. data/.yardoc/objects/Grape/API/group_c.dat +0 -0
  13. data/.yardoc/objects/Grape/API/head_c.dat +0 -0
  14. data/.yardoc/objects/Grape/API/helpers_c.dat +0 -0
  15. data/.yardoc/objects/Grape/API/http_basic_c.dat +0 -0
  16. data/.yardoc/objects/Grape/API/inherited_c.dat +0 -0
  17. data/.yardoc/objects/Grape/API/logger_c.dat +0 -0
  18. data/.yardoc/objects/Grape/API/namespace_c.dat +0 -0
  19. data/.yardoc/objects/Grape/API/nest_c.dat +0 -0
  20. data/.yardoc/objects/Grape/API/post_c.dat +0 -0
  21. data/.yardoc/objects/Grape/API/prefix_c.dat +0 -0
  22. data/.yardoc/objects/Grape/API/put_c.dat +0 -0
  23. data/.yardoc/objects/Grape/API/reset_21_c.dat +0 -0
  24. data/.yardoc/objects/Grape/API/resource_c.dat +0 -0
  25. data/.yardoc/objects/Grape/API/resources_c.dat +0 -0
  26. data/.yardoc/objects/Grape/API/route_c.dat +0 -0
  27. data/.yardoc/objects/Grape/API/route_set_c.dat +0 -0
  28. data/.yardoc/objects/Grape/API/scope_c.dat +0 -0
  29. data/.yardoc/objects/Grape/API/set_c.dat +0 -0
  30. data/.yardoc/objects/Grape/API/settings_c.dat +0 -0
  31. data/.yardoc/objects/Grape/API/settings_stack_c.dat +0 -0
  32. data/.yardoc/objects/Grape/API/version_c.dat +0 -0
  33. data/.yardoc/objects/Grape/Endpoint.dat +0 -0
  34. data/.yardoc/objects/Grape/Endpoint/block_3D_c.dat +0 -0
  35. data/.yardoc/objects/Grape/Endpoint/block_c.dat +0 -0
  36. data/.yardoc/objects/Grape/Endpoint/call_c.dat +0 -0
  37. data/.yardoc/objects/Grape/Endpoint/call_i.dat +0 -0
  38. data/.yardoc/objects/Grape/Endpoint/env_i.dat +0 -0
  39. data/.yardoc/objects/Grape/Endpoint/error_21_i.dat +0 -0
  40. data/.yardoc/objects/Grape/Endpoint/generate_c.dat +0 -0
  41. data/.yardoc/objects/Grape/Endpoint/header_i.dat +0 -0
  42. data/.yardoc/objects/Grape/Endpoint/params_i.dat +0 -0
  43. data/.yardoc/objects/Grape/Endpoint/request_i.dat +0 -0
  44. data/.yardoc/objects/Grape/Endpoint/status_i.dat +0 -0
  45. data/.yardoc/objects/Grape/Endpoint/version_i.dat +0 -0
  46. data/.yardoc/objects/Grape/Middleware.dat +0 -0
  47. data/.yardoc/objects/Grape/Middleware/Auth.dat +0 -0
  48. data/.yardoc/objects/Grape/Middleware/Auth/Basic.dat +0 -0
  49. data/.yardoc/objects/Grape/Middleware/Auth/Basic/authenticator_i.dat +0 -0
  50. data/.yardoc/objects/Grape/Middleware/Auth/Basic/basic_request_i.dat +0 -0
  51. data/.yardoc/objects/Grape/Middleware/Auth/Basic/before_i.dat +0 -0
  52. data/.yardoc/objects/Grape/Middleware/Auth/Basic/credentials_i.dat +0 -0
  53. data/.yardoc/objects/Grape/Middleware/Auth/Basic/initialize_i.dat +0 -0
  54. data/.yardoc/objects/Grape/Middleware/Auth/OAuth2.dat +0 -0
  55. data/.yardoc/objects/Grape/Middleware/Auth/OAuth2/before_i.dat +0 -0
  56. data/.yardoc/objects/Grape/Middleware/Auth/OAuth2/default_options_i.dat +0 -0
  57. data/.yardoc/objects/Grape/Middleware/Auth/OAuth2/error_out_i.dat +0 -0
  58. data/.yardoc/objects/Grape/Middleware/Auth/OAuth2/parse_authorization_header_i.dat +0 -0
  59. data/.yardoc/objects/Grape/Middleware/Auth/OAuth2/token_class_i.dat +0 -0
  60. data/.yardoc/objects/Grape/Middleware/Auth/OAuth2/verify_token_i.dat +0 -0
  61. data/.yardoc/objects/Grape/Middleware/Base.dat +0 -0
  62. data/.yardoc/objects/Grape/Middleware/Base/after_i.dat +0 -0
  63. data/.yardoc/objects/Grape/Middleware/Base/app_i.dat +0 -0
  64. data/.yardoc/objects/Grape/Middleware/Base/before_i.dat +0 -0
  65. data/.yardoc/objects/Grape/Middleware/Base/call_21_i.dat +0 -0
  66. data/.yardoc/objects/Grape/Middleware/Base/call_i.dat +0 -0
  67. data/.yardoc/objects/Grape/Middleware/Base/default_options_i.dat +0 -0
  68. data/.yardoc/objects/Grape/Middleware/Base/env_i.dat +0 -0
  69. data/.yardoc/objects/Grape/Middleware/Base/initialize_i.dat +0 -0
  70. data/.yardoc/objects/Grape/Middleware/Base/options_i.dat +0 -0
  71. data/.yardoc/objects/Grape/Middleware/Base/request_i.dat +0 -0
  72. data/.yardoc/objects/Grape/Middleware/Base/response_i.dat +0 -0
  73. data/.yardoc/objects/Grape/Middleware/Error.dat +0 -0
  74. data/.yardoc/objects/Grape/Middleware/Error/call_21_i.dat +0 -0
  75. data/.yardoc/objects/Grape/Middleware/Error/error_response_i.dat +0 -0
  76. data/.yardoc/objects/Grape/Middleware/Formatter.dat +0 -0
  77. data/.yardoc/objects/Grape/Middleware/Formatter/CONTENT_TYPES.dat +0 -0
  78. data/.yardoc/objects/Grape/Middleware/Formatter/after_i.dat +0 -0
  79. data/.yardoc/objects/Grape/Middleware/Formatter/before_i.dat +0 -0
  80. data/.yardoc/objects/Grape/Middleware/Formatter/content_types_i.dat +0 -0
  81. data/.yardoc/objects/Grape/Middleware/Formatter/default_options_i.dat +0 -0
  82. data/.yardoc/objects/Grape/Middleware/Formatter/encode_json_i.dat +0 -0
  83. data/.yardoc/objects/Grape/Middleware/Formatter/encode_txt_i.dat +0 -0
  84. data/.yardoc/objects/Grape/Middleware/Formatter/format_from_extension_i.dat +0 -0
  85. data/.yardoc/objects/Grape/Middleware/Formatter/format_from_header_i.dat +0 -0
  86. data/.yardoc/objects/Grape/Middleware/Formatter/headers_i.dat +0 -0
  87. data/.yardoc/objects/Grape/Middleware/Formatter/mime_array_i.dat +0 -0
  88. data/.yardoc/objects/Grape/Middleware/Formatter/mime_types_i.dat +0 -0
  89. data/.yardoc/objects/Grape/Middleware/Prefixer.dat +0 -0
  90. data/.yardoc/objects/Grape/Middleware/Prefixer/before_i.dat +0 -0
  91. data/.yardoc/objects/Grape/Middleware/Prefixer/prefix_i.dat +0 -0
  92. data/.yardoc/objects/Grape/Middleware/Versioner.dat +0 -0
  93. data/.yardoc/objects/Grape/Middleware/Versioner/before_i.dat +0 -0
  94. data/.yardoc/objects/Grape/Middleware/Versioner/default_options_i.dat +0 -0
  95. data/.yardoc/objects/Grape/MiddlewareStack.dat +0 -0
  96. data/.yardoc/objects/Grape/MiddlewareStack/initialize_i.dat +0 -0
  97. data/.yardoc/objects/Grape/MiddlewareStack/stack_i.dat +0 -0
  98. data/.yardoc/objects/Grape/MiddlewareStack/to_app_i.dat +0 -0
  99. data/.yardoc/objects/Grape/MiddlewareStack/use_i.dat +0 -0
  100. data/.yardoc/objects/root.dat +0 -0
  101. data/.yardoc/proxy_types +2 -0
  102. data/Gemfile +2 -1
  103. data/Gemfile.lock +6 -0
  104. data/README.markdown +3 -3
  105. data/VERSION +1 -1
  106. data/grape.gemspec +108 -6
  107. data/lib/grape/api.rb +59 -21
  108. data/lib/grape/middleware/base.rb +1 -1
  109. data/lib/grape/middleware/error.rb +1 -1
  110. data/spec/grape/api_spec.rb +85 -4
  111. data/spec/grape/endpoint_spec.rb +13 -1
  112. data/spec/grape/middleware/auth/basic_spec.rb +2 -2
  113. metadata +161 -49
  114. data/lib/grape/middleware_stack.rb +0 -35
  115. data/spec/grape/middleware_stack_spec.rb +0 -47
@@ -45,16 +45,28 @@ module Grape
45
45
  @settings.last[key.to_sym] = value
46
46
  end
47
47
 
48
- # Define a root prefix for your entire
49
- # API. For instance, if you had an api
50
- # that you wanted to be namespaced at
51
- # `/api/` you would do this:
52
- #
53
- # prefix '/api'
48
+ # Define a root URL prefix for your entire
49
+ # API.
54
50
  def prefix(prefix = nil)
55
51
  prefix ? set(:root_prefix, prefix) : settings[:root_prefix]
56
52
  end
57
53
 
54
+ # Specify an API version.
55
+ #
56
+ # @example API with legacy support.
57
+ # class MyAPI < Grape::API
58
+ # version 'v2'
59
+ #
60
+ # get '/main' do
61
+ # {:some => 'data'}
62
+ # end
63
+ #
64
+ # version 'v1' do
65
+ # get '/legacy' do
66
+ # {:legacy => 'data'}
67
+ # end
68
+ # end
69
+ # end
58
70
  def version(*new_versions, &block)
59
71
  new_versions.any? ? nest(block){ set(:version, new_versions) } : settings[:version]
60
72
  end
@@ -69,13 +81,14 @@ module Grape
69
81
  # Add helper methods that will be accessible from any
70
82
  # endpoint within this namespace (and child namespaces).
71
83
  #
72
- # class ExampleAPI
73
- # helpers do
74
- # def current_user
75
- # User.find_by_id(params[:token])
76
- # end
77
- # end
78
- # end
84
+ # @example Define some helpers.
85
+ # class ExampleAPI < Grape::API
86
+ # helpers do
87
+ # def current_user
88
+ # User.find_by_id(params[:token])
89
+ # end
90
+ # end
91
+ # end
79
92
  def helpers(&block)
80
93
  if block_given?
81
94
  m = settings_stack.last[:helpers] || Module.new
@@ -112,9 +125,15 @@ module Grape
112
125
  # Defines a route that will be recognized
113
126
  # by the Grape API.
114
127
  #
115
- # @param methods [HTTP Verb(s)] One or more HTTP verbs that are accepted by this route. Set to `:any` if you want any verb to be accepted.
116
- # @param paths [String(s)] One or more strings representing the URL segment(s) for this route.
117
- # @param block [Proc] The code to be executed
128
+ # @param methods [HTTP Verb] One or more HTTP verbs that are accepted by this route. Set to `:any` if you want any verb to be accepted.
129
+ # @param paths [String] One or more strings representing the URL segment(s) for this route.
130
+ #
131
+ # @example Defining a basic route.
132
+ # class MyAPI < Grape::API
133
+ # route(:any, '/hello') do
134
+ # {:hello => 'world'}
135
+ # end
136
+ # end
118
137
  def route(methods, paths, &block)
119
138
  methods = Array(methods)
120
139
  paths = ['/'] if paths == []
@@ -158,7 +177,24 @@ module Grape
158
177
  def scope(name = nil, &block)
159
178
  nest(block)
160
179
  end
161
-
180
+
181
+ # Apply a custom middleware to the API. Applies
182
+ # to the current namespace and any children, but
183
+ # not parents.
184
+ #
185
+ # @param middleware_class [Class] The class of the middleware you'd like to inject.
186
+ def use(middleware_class, *args)
187
+ settings_stack.last[:middleware] ||= []
188
+ settings_stack.last[:middleware] << [middleware_class, *args]
189
+ end
190
+
191
+ # Retrieve an array of the middleware classes
192
+ # and arguments that are currently applied to the
193
+ # application.
194
+ def middleware
195
+ settings_stack.inject([]){|a,s| a += s[:middleware] if s[:middleware]; a}
196
+ end
197
+
162
198
  protected
163
199
 
164
200
  # Execute first the provided block, then each of the
@@ -183,7 +219,8 @@ module Grape
183
219
  b.use Grape::Middleware::Prefixer, :prefix => prefix if prefix
184
220
  b.use Grape::Middleware::Versioner, :versions => (version if version.is_a?(Array)) if version
185
221
  b.use Grape::Middleware::Formatter, :default_format => default_format || :json
186
-
222
+ middleware.each{|m| b.use *m }
223
+
187
224
  endpoint = Grape::Endpoint.generate(&block)
188
225
  endpoint.send :include, helpers
189
226
  b.run endpoint
@@ -203,12 +240,13 @@ module Grape
203
240
  parts = []
204
241
  parts << prefix if prefix
205
242
  parts << ':version' if version
206
- parts << namespace if namespace
207
- parts << path
243
+ parts << namespace.to_s if namespace
244
+ parts << path.to_s if path && '/' != path
245
+ parts.last << '(.:format)'
208
246
  Rack::Mount::Utils.normalize_path(parts.join('/'))
209
247
  end
210
248
  end
211
249
 
212
250
  reset!
213
251
  end
214
- end
252
+ end
@@ -28,7 +28,7 @@ module Grape
28
28
  def before; end
29
29
  # @abstract
30
30
  # Called after the application is called in the middleware lifecycle.
31
- # @returns [Response, nil] a Rack SPEC response or nil to call the application afterwards.
31
+ # @return [Response, nil] a Rack SPEC response or nil to call the application afterwards.
32
32
  def after; end
33
33
 
34
34
  def request
@@ -18,4 +18,4 @@ module Grape
18
18
  end
19
19
  end
20
20
  end
21
- end
21
+ end
@@ -92,7 +92,7 @@ describe Grape::API do
92
92
  subject.version :v1
93
93
 
94
94
  subject.namespace :awesome do
95
- compile_path('hello').should == '/rad/:version/awesome/hello'
95
+ compile_path('hello').should == '/rad/:version/awesome/hello(.:format)'
96
96
  end
97
97
  end
98
98
 
@@ -117,9 +117,9 @@ describe Grape::API do
117
117
  it 'should be callable with nil just to push onto the stack' do
118
118
  subject.namespace do
119
119
  version 'v2'
120
- compile_path('hello').should == '/:version/hello'
120
+ compile_path('hello').should == '/:version/hello(.:format)'
121
121
  end
122
- subject.send(:compile_path, 'hello').should == '/hello'
122
+ subject.send(:compile_path, 'hello').should == '/hello(.:format)'
123
123
  end
124
124
 
125
125
  %w(group resource resources).each do |als|
@@ -159,6 +159,26 @@ describe Grape::API do
159
159
  get '/def'
160
160
  last_response.body.should == 'foo'
161
161
  end
162
+
163
+ it 'should allow for format' do
164
+ subject.get("/abc") do
165
+ "json"
166
+ end
167
+
168
+ get '/abc.json'
169
+ last_response.body.should == '"json"'
170
+ end
171
+
172
+ it 'should allow for format in namespace with no path' do
173
+ subject.namespace :abc do
174
+ get do
175
+ "json"
176
+ end
177
+ end
178
+
179
+ get '/abc.json'
180
+ last_response.body.should == '"json"'
181
+ end
162
182
 
163
183
  it 'should allow for multiple verbs' do
164
184
  subject.route([:get, :post], '/abc') do
@@ -207,6 +227,67 @@ describe Grape::API do
207
227
  end
208
228
  end
209
229
 
230
+ context 'custom middleware' do
231
+ class PhonyMiddleware
232
+ def initialize(app, *args)
233
+ @args = args
234
+ @app = app
235
+ end
236
+
237
+ def call(env)
238
+ env['phony.args'] ||= []
239
+ env['phony.args'] << @args
240
+ @app.call(env)
241
+ end
242
+ end
243
+
244
+ describe '.middleware' do
245
+ it 'should include middleware arguments from settings' do
246
+ subject.stub!(:settings_stack).and_return [{:middleware => [[PhonyMiddleware, 'abc', 123]]}]
247
+ subject.middleware.should == [[PhonyMiddleware, 'abc', 123]]
248
+ end
249
+
250
+ it 'should include all middleware from stacked settings' do
251
+ subject.stub!(:settings_stack).and_return [
252
+ {:middleware => [[PhonyMiddleware, 123],[PhonyMiddleware, 'abc']]},
253
+ {:middleware => [[PhonyMiddleware, 'foo']]}
254
+ ]
255
+
256
+ subject.middleware.should == [
257
+ [PhonyMiddleware, 123],
258
+ [PhonyMiddleware, 'abc'],
259
+ [PhonyMiddleware, 'foo']
260
+ ]
261
+ end
262
+ end
263
+
264
+ describe '.use' do
265
+ it 'should add middleware' do
266
+ subject.use PhonyMiddleware, 123
267
+ subject.middleware.should == [[PhonyMiddleware, 123]]
268
+ end
269
+
270
+ it 'should not show up outside the namespace' do
271
+ subject.use PhonyMiddleware, 123
272
+ subject.namespace :awesome do
273
+ use PhonyMiddleware, 'abc'
274
+ middleware.should == [[PhonyMiddleware, 123],[PhonyMiddleware, 'abc']]
275
+ end
276
+
277
+ subject.middleware.should == [[PhonyMiddleware, 123]]
278
+ end
279
+
280
+ it 'should actually call the middleware' do
281
+ subject.use PhonyMiddleware, 'hello'
282
+ subject.get '/' do
283
+ env['phony.args'].first.first
284
+ end
285
+
286
+ get '/'
287
+ last_response.body.should == 'hello'
288
+ end
289
+ end
290
+ end
210
291
  describe '.basic' do
211
292
  it 'should protect any resources on the same scope' do
212
293
  subject.http_basic do |u,p|
@@ -340,4 +421,4 @@ describe Grape::API do
340
421
  last_response.status.should == 200
341
422
  end
342
423
  end
343
- end
424
+ end
@@ -71,6 +71,18 @@ describe Grape::Endpoint do
71
71
  last_response.status.should == 401
72
72
  last_response.body.should == "Unauthorized."
73
73
  end
74
+
75
+ it 'should accept an object and render it in format' do
76
+ pending
77
+
78
+ subject.get '/hey' do
79
+ error!({'dude' => 'rad'}, 403)
80
+ end
81
+
82
+ get '/hey.json'
83
+ last_response.status.should == 403
84
+ last_response.body.should == '{"dude":"rad"}'
85
+ end
74
86
  end
75
87
 
76
88
  it 'should not persist params between calls' do
@@ -101,4 +113,4 @@ describe Grape::Endpoint do
101
113
  get '/hello?howdy=yo'
102
114
  last_response.body.should == 'yo'
103
115
  end
104
- end
116
+ end
@@ -9,7 +9,7 @@ describe Grape::Middleware::Auth::Basic do
9
9
  b.use(Grape::Middleware::Auth::Basic) do |u,p|
10
10
  u && p && u == p
11
11
  end
12
- b.run lambda{|env| [200, {}, "Hello there."]}
12
+ b.run lambda{|env| [200, {}, ["Hello there."]]}
13
13
  end
14
14
  end
15
15
 
@@ -28,4 +28,4 @@ describe Grape::Middleware::Auth::Basic do
28
28
  get '/whatever', {}, 'HTTP_AUTHORIZATION' => encode_basic('admin','wrong')
29
29
  last_response.status.should == 401
30
30
  end
31
- end
31
+ end
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grape
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
5
4
  prerelease: false
6
5
  segments:
7
6
  - 0
8
7
  - 1
9
- - 1
10
- version: 0.1.1
8
+ - 3
9
+ version: 0.1.3
11
10
  platform: ruby
12
11
  authors:
13
12
  - Michael Bleigh
@@ -15,123 +14,141 @@ autorequire:
15
14
  bindir: bin
16
15
  cert_chain: []
17
16
 
18
- date: 2010-11-14 00:00:00 -06:00
17
+ date: 2011-01-10 00:00:00 -06:00
19
18
  default_executable:
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
22
- prerelease: false
23
- type: :runtime
24
21
  name: rack
25
- version_requirements: &id001 !ruby/object:Gem::Requirement
22
+ requirement: &id001 !ruby/object:Gem::Requirement
26
23
  none: false
27
24
  requirements:
28
25
  - - ">="
29
26
  - !ruby/object:Gem::Version
30
- hash: 3
31
27
  segments:
32
28
  - 0
33
29
  version: "0"
34
- requirement: *id001
35
- - !ruby/object:Gem::Dependency
36
- prerelease: false
37
30
  type: :runtime
31
+ prerelease: false
32
+ version_requirements: *id001
33
+ - !ruby/object:Gem::Dependency
38
34
  name: rack-mount
39
- version_requirements: &id002 !ruby/object:Gem::Requirement
35
+ requirement: &id002 !ruby/object:Gem::Requirement
40
36
  none: false
41
37
  requirements:
42
38
  - - ~>
43
39
  - !ruby/object:Gem::Version
44
- hash: 29
45
40
  segments:
46
41
  - 0
47
42
  - 6
48
43
  - 13
49
44
  version: 0.6.13
50
- requirement: *id002
51
- - !ruby/object:Gem::Dependency
52
- prerelease: false
53
45
  type: :runtime
46
+ prerelease: false
47
+ version_requirements: *id002
48
+ - !ruby/object:Gem::Dependency
54
49
  name: rack-jsonp
55
- version_requirements: &id003 !ruby/object:Gem::Requirement
50
+ requirement: &id003 !ruby/object:Gem::Requirement
56
51
  none: false
57
52
  requirements:
58
53
  - - ">="
59
54
  - !ruby/object:Gem::Version
60
- hash: 3
61
55
  segments:
62
56
  - 0
63
57
  version: "0"
64
- requirement: *id003
65
- - !ruby/object:Gem::Dependency
66
- prerelease: false
67
58
  type: :runtime
59
+ prerelease: false
60
+ version_requirements: *id003
61
+ - !ruby/object:Gem::Dependency
68
62
  name: json
69
- version_requirements: &id004 !ruby/object:Gem::Requirement
63
+ requirement: &id004 !ruby/object:Gem::Requirement
70
64
  none: false
71
65
  requirements:
72
66
  - - ">="
73
67
  - !ruby/object:Gem::Version
74
- hash: 3
75
68
  segments:
76
69
  - 0
77
70
  version: "0"
78
- requirement: *id004
79
- - !ruby/object:Gem::Dependency
80
- prerelease: false
81
71
  type: :runtime
72
+ prerelease: false
73
+ version_requirements: *id004
74
+ - !ruby/object:Gem::Dependency
82
75
  name: multi_json
83
- version_requirements: &id005 !ruby/object:Gem::Requirement
76
+ requirement: &id005 !ruby/object:Gem::Requirement
84
77
  none: false
85
78
  requirements:
86
79
  - - ">="
87
80
  - !ruby/object:Gem::Version
88
- hash: 3
89
81
  segments:
90
82
  - 0
91
83
  version: "0"
92
- requirement: *id005
93
- - !ruby/object:Gem::Dependency
94
- prerelease: false
95
84
  type: :runtime
85
+ prerelease: false
86
+ version_requirements: *id005
87
+ - !ruby/object:Gem::Dependency
96
88
  name: multi_xml
97
- version_requirements: &id006 !ruby/object:Gem::Requirement
89
+ requirement: &id006 !ruby/object:Gem::Requirement
98
90
  none: false
99
91
  requirements:
100
92
  - - ">="
101
93
  - !ruby/object:Gem::Version
102
- hash: 3
103
94
  segments:
104
95
  - 0
105
96
  version: "0"
106
- requirement: *id006
107
- - !ruby/object:Gem::Dependency
97
+ type: :runtime
108
98
  prerelease: false
109
- type: :development
99
+ version_requirements: *id006
100
+ - !ruby/object:Gem::Dependency
110
101
  name: rake
111
- version_requirements: &id007 !ruby/object:Gem::Requirement
102
+ requirement: &id007 !ruby/object:Gem::Requirement
112
103
  none: false
113
104
  requirements:
114
105
  - - ">="
115
106
  - !ruby/object:Gem::Version
116
- hash: 3
117
107
  segments:
118
108
  - 0
119
109
  version: "0"
120
- requirement: *id007
110
+ type: :development
111
+ prerelease: false
112
+ version_requirements: *id007
121
113
  - !ruby/object:Gem::Dependency
114
+ name: jeweler
115
+ requirement: &id008 !ruby/object:Gem::Requirement
116
+ none: false
117
+ requirements:
118
+ - - ">="
119
+ - !ruby/object:Gem::Version
120
+ segments:
121
+ - 0
122
+ version: "0"
123
+ type: :development
122
124
  prerelease: false
125
+ version_requirements: *id008
126
+ - !ruby/object:Gem::Dependency
127
+ name: maruku
128
+ requirement: &id009 !ruby/object:Gem::Requirement
129
+ none: false
130
+ requirements:
131
+ - - ">="
132
+ - !ruby/object:Gem::Version
133
+ segments:
134
+ - 0
135
+ version: "0"
123
136
  type: :development
124
- name: jeweler
125
- version_requirements: &id008 !ruby/object:Gem::Requirement
137
+ prerelease: false
138
+ version_requirements: *id009
139
+ - !ruby/object:Gem::Dependency
140
+ name: yard
141
+ requirement: &id010 !ruby/object:Gem::Requirement
126
142
  none: false
127
143
  requirements:
128
144
  - - ">="
129
145
  - !ruby/object:Gem::Version
130
- hash: 3
131
146
  segments:
132
147
  - 0
133
148
  version: "0"
134
- requirement: *id008
149
+ type: :development
150
+ prerelease: false
151
+ version_requirements: *id010
135
152
  description: A Ruby framework for rapid API development with great conventions.
136
153
  email: michael@intridea.com
137
154
  executables: []
@@ -145,7 +162,106 @@ files:
145
162
  - .document
146
163
  - .gitignore
147
164
  - .rspec
148
- - .rvmrc
165
+ - .yardoc/checksums
166
+ - .yardoc/objects/Grape.dat
167
+ - .yardoc/objects/Grape/API.dat
168
+ - .yardoc/objects/Grape/API/auth_c.dat
169
+ - .yardoc/objects/Grape/API/build_endpoint_c.dat
170
+ - .yardoc/objects/Grape/API/call_c.dat
171
+ - .yardoc/objects/Grape/API/compile_path_c.dat
172
+ - .yardoc/objects/Grape/API/default_format_c.dat
173
+ - .yardoc/objects/Grape/API/delete_c.dat
174
+ - .yardoc/objects/Grape/API/get_c.dat
175
+ - .yardoc/objects/Grape/API/group_c.dat
176
+ - .yardoc/objects/Grape/API/head_c.dat
177
+ - .yardoc/objects/Grape/API/helpers_c.dat
178
+ - .yardoc/objects/Grape/API/http_basic_c.dat
179
+ - .yardoc/objects/Grape/API/inherited_c.dat
180
+ - .yardoc/objects/Grape/API/logger_c.dat
181
+ - .yardoc/objects/Grape/API/namespace_c.dat
182
+ - .yardoc/objects/Grape/API/nest_c.dat
183
+ - .yardoc/objects/Grape/API/post_c.dat
184
+ - .yardoc/objects/Grape/API/prefix_c.dat
185
+ - .yardoc/objects/Grape/API/put_c.dat
186
+ - .yardoc/objects/Grape/API/reset_21_c.dat
187
+ - .yardoc/objects/Grape/API/resource_c.dat
188
+ - .yardoc/objects/Grape/API/resources_c.dat
189
+ - .yardoc/objects/Grape/API/route_c.dat
190
+ - .yardoc/objects/Grape/API/route_set_c.dat
191
+ - .yardoc/objects/Grape/API/scope_c.dat
192
+ - .yardoc/objects/Grape/API/set_c.dat
193
+ - .yardoc/objects/Grape/API/settings_c.dat
194
+ - .yardoc/objects/Grape/API/settings_stack_c.dat
195
+ - .yardoc/objects/Grape/API/version_c.dat
196
+ - .yardoc/objects/Grape/Endpoint.dat
197
+ - .yardoc/objects/Grape/Endpoint/block_3D_c.dat
198
+ - .yardoc/objects/Grape/Endpoint/block_c.dat
199
+ - .yardoc/objects/Grape/Endpoint/call_c.dat
200
+ - .yardoc/objects/Grape/Endpoint/call_i.dat
201
+ - .yardoc/objects/Grape/Endpoint/env_i.dat
202
+ - .yardoc/objects/Grape/Endpoint/error_21_i.dat
203
+ - .yardoc/objects/Grape/Endpoint/generate_c.dat
204
+ - .yardoc/objects/Grape/Endpoint/header_i.dat
205
+ - .yardoc/objects/Grape/Endpoint/params_i.dat
206
+ - .yardoc/objects/Grape/Endpoint/request_i.dat
207
+ - .yardoc/objects/Grape/Endpoint/status_i.dat
208
+ - .yardoc/objects/Grape/Endpoint/version_i.dat
209
+ - .yardoc/objects/Grape/Middleware.dat
210
+ - .yardoc/objects/Grape/Middleware/Auth.dat
211
+ - .yardoc/objects/Grape/Middleware/Auth/Basic.dat
212
+ - .yardoc/objects/Grape/Middleware/Auth/Basic/authenticator_i.dat
213
+ - .yardoc/objects/Grape/Middleware/Auth/Basic/basic_request_i.dat
214
+ - .yardoc/objects/Grape/Middleware/Auth/Basic/before_i.dat
215
+ - .yardoc/objects/Grape/Middleware/Auth/Basic/credentials_i.dat
216
+ - .yardoc/objects/Grape/Middleware/Auth/Basic/initialize_i.dat
217
+ - .yardoc/objects/Grape/Middleware/Auth/OAuth2.dat
218
+ - .yardoc/objects/Grape/Middleware/Auth/OAuth2/before_i.dat
219
+ - .yardoc/objects/Grape/Middleware/Auth/OAuth2/default_options_i.dat
220
+ - .yardoc/objects/Grape/Middleware/Auth/OAuth2/error_out_i.dat
221
+ - .yardoc/objects/Grape/Middleware/Auth/OAuth2/parse_authorization_header_i.dat
222
+ - .yardoc/objects/Grape/Middleware/Auth/OAuth2/token_class_i.dat
223
+ - .yardoc/objects/Grape/Middleware/Auth/OAuth2/verify_token_i.dat
224
+ - .yardoc/objects/Grape/Middleware/Base.dat
225
+ - .yardoc/objects/Grape/Middleware/Base/after_i.dat
226
+ - .yardoc/objects/Grape/Middleware/Base/app_i.dat
227
+ - .yardoc/objects/Grape/Middleware/Base/before_i.dat
228
+ - .yardoc/objects/Grape/Middleware/Base/call_21_i.dat
229
+ - .yardoc/objects/Grape/Middleware/Base/call_i.dat
230
+ - .yardoc/objects/Grape/Middleware/Base/default_options_i.dat
231
+ - .yardoc/objects/Grape/Middleware/Base/env_i.dat
232
+ - .yardoc/objects/Grape/Middleware/Base/initialize_i.dat
233
+ - .yardoc/objects/Grape/Middleware/Base/options_i.dat
234
+ - .yardoc/objects/Grape/Middleware/Base/request_i.dat
235
+ - .yardoc/objects/Grape/Middleware/Base/response_i.dat
236
+ - .yardoc/objects/Grape/Middleware/Error.dat
237
+ - .yardoc/objects/Grape/Middleware/Error/call_21_i.dat
238
+ - .yardoc/objects/Grape/Middleware/Error/error_response_i.dat
239
+ - .yardoc/objects/Grape/Middleware/Formatter.dat
240
+ - .yardoc/objects/Grape/Middleware/Formatter/CONTENT_TYPES.dat
241
+ - .yardoc/objects/Grape/Middleware/Formatter/after_i.dat
242
+ - .yardoc/objects/Grape/Middleware/Formatter/before_i.dat
243
+ - .yardoc/objects/Grape/Middleware/Formatter/content_types_i.dat
244
+ - .yardoc/objects/Grape/Middleware/Formatter/default_options_i.dat
245
+ - .yardoc/objects/Grape/Middleware/Formatter/encode_json_i.dat
246
+ - .yardoc/objects/Grape/Middleware/Formatter/encode_txt_i.dat
247
+ - .yardoc/objects/Grape/Middleware/Formatter/format_from_extension_i.dat
248
+ - .yardoc/objects/Grape/Middleware/Formatter/format_from_header_i.dat
249
+ - .yardoc/objects/Grape/Middleware/Formatter/headers_i.dat
250
+ - .yardoc/objects/Grape/Middleware/Formatter/mime_array_i.dat
251
+ - .yardoc/objects/Grape/Middleware/Formatter/mime_types_i.dat
252
+ - .yardoc/objects/Grape/Middleware/Prefixer.dat
253
+ - .yardoc/objects/Grape/Middleware/Prefixer/before_i.dat
254
+ - .yardoc/objects/Grape/Middleware/Prefixer/prefix_i.dat
255
+ - .yardoc/objects/Grape/Middleware/Versioner.dat
256
+ - .yardoc/objects/Grape/Middleware/Versioner/before_i.dat
257
+ - .yardoc/objects/Grape/Middleware/Versioner/default_options_i.dat
258
+ - .yardoc/objects/Grape/MiddlewareStack.dat
259
+ - .yardoc/objects/Grape/MiddlewareStack/initialize_i.dat
260
+ - .yardoc/objects/Grape/MiddlewareStack/stack_i.dat
261
+ - .yardoc/objects/Grape/MiddlewareStack/to_app_i.dat
262
+ - .yardoc/objects/Grape/MiddlewareStack/use_i.dat
263
+ - .yardoc/objects/root.dat
264
+ - .yardoc/proxy_types
149
265
  - Gemfile
150
266
  - Gemfile.lock
151
267
  - LICENSE
@@ -164,7 +280,6 @@ files:
164
280
  - lib/grape/middleware/formatter.rb
165
281
  - lib/grape/middleware/prefixer.rb
166
282
  - lib/grape/middleware/versioner.rb
167
- - lib/grape/middleware_stack.rb
168
283
  - spec/grape/api_spec.rb
169
284
  - spec/grape/endpoint_spec.rb
170
285
  - spec/grape/middleware/auth/basic_spec.rb
@@ -174,7 +289,6 @@ files:
174
289
  - spec/grape/middleware/formatter_spec.rb
175
290
  - spec/grape/middleware/prefixer_spec.rb
176
291
  - spec/grape/middleware/versioner_spec.rb
177
- - spec/grape/middleware_stack_spec.rb
178
292
  - spec/grape_spec.rb
179
293
  - spec/spec_helper.rb
180
294
  has_rdoc: true
@@ -191,7 +305,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
191
305
  requirements:
192
306
  - - ">="
193
307
  - !ruby/object:Gem::Version
194
- hash: 3
308
+ hash: 3948769819312145241
195
309
  segments:
196
310
  - 0
197
311
  version: "0"
@@ -200,7 +314,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
200
314
  requirements:
201
315
  - - ">="
202
316
  - !ruby/object:Gem::Version
203
- hash: 3
204
317
  segments:
205
318
  - 0
206
319
  version: "0"
@@ -221,6 +334,5 @@ test_files:
221
334
  - spec/grape/middleware/formatter_spec.rb
222
335
  - spec/grape/middleware/prefixer_spec.rb
223
336
  - spec/grape/middleware/versioner_spec.rb
224
- - spec/grape/middleware_stack_spec.rb
225
337
  - spec/grape_spec.rb
226
338
  - spec/spec_helper.rb