grape_ape_rails 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +18 -0
- data/.rspec +2 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +29 -0
- data/Rakefile +1 -0
- data/grape_ape_rails.gemspec +46 -0
- data/lib/generators/setup_generator.rb +59 -0
- data/lib/generators/templates/initializer.rb +22 -0
- data/lib/grape_ape_rails/api.rb +88 -0
- data/lib/grape_ape_rails/base.rb +27 -0
- data/lib/grape_ape_rails/handlers/formatters.rb +134 -0
- data/lib/grape_ape_rails/handlers/header_versioning.rb +27 -0
- data/lib/grape_ape_rails/handlers/locale.rb +24 -0
- data/lib/grape_ape_rails/handlers/rails_logging.rb +33 -0
- data/lib/grape_ape_rails/handlers/responses.rb +32 -0
- data/lib/grape_ape_rails/handlers.rb +22 -0
- data/lib/grape_ape_rails/railtie.rb +9 -0
- data/lib/grape_ape_rails/version.rb +3 -0
- data/lib/grape_ape_rails.rb +55 -0
- data/lib/swagger/grape_swagger_modified.rb +470 -0
- data/lib/tasks/routes.rake +13 -0
- data/spec/dummy/.rspec +1 -0
- data/spec/dummy/README.rdoc +28 -0
- data/spec/dummy/Rakefile +15 -0
- data/spec/dummy/app/assets/images/.keep +0 -0
- data/spec/dummy/app/assets/javascripts/application.js +13 -0
- data/spec/dummy/app/assets/stylesheets/application.css +13 -0
- data/spec/dummy/app/controllers/api/base.rb +18 -0
- data/spec/dummy/app/controllers/api/v1/monkeys.rb +17 -0
- data/spec/dummy/app/controllers/api/v1/widgets.rb +57 -0
- data/spec/dummy/app/controllers/api/v2/widgets.rb +18 -0
- data/spec/dummy/app/controllers/application_controller.rb +5 -0
- data/spec/dummy/app/controllers/concerns/.keep +0 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/mailers/.keep +0 -0
- data/spec/dummy/app/models/.keep +0 -0
- data/spec/dummy/app/models/concerns/.keep +0 -0
- data/spec/dummy/app/models/monkey.rb +3 -0
- data/spec/dummy/app/models/monkey_serializer.rb +7 -0
- data/spec/dummy/app/models/widget.rb +6 -0
- data/spec/dummy/app/views/api/v1/base_widget.rabl +1 -0
- data/spec/dummy/app/views/api/v1/widget.rabl +2 -0
- data/spec/dummy/app/views/api/v1/widgets.rabl +2 -0
- data/spec/dummy/app/views/api/v2/base_widget.rabl +2 -0
- data/spec/dummy/app/views/api/v2/widget.rabl +2 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/bin/bundle +3 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/config/application.rb +28 -0
- data/spec/dummy/config/boot.rb +5 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +29 -0
- data/spec/dummy/config/environments/production.rb +80 -0
- data/spec/dummy/config/environments/test.rb +36 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/grape_ape_rails.rb +23 -0
- data/spec/dummy/config/initializers/inflections.rb +16 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +12 -0
- data/spec/dummy/config/initializers/session_store.rb +3 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +23 -0
- data/spec/dummy/config/routes.rb +5 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/20140714154355_create_widgets.rb +10 -0
- data/spec/dummy/db/migrate/20140804173544_create_monkeys.rb +9 -0
- data/spec/dummy/db/schema.rb +30 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/lib/assets/.keep +0 -0
- data/spec/dummy/public/404.html +58 -0
- data/spec/dummy/public/422.html +58 -0
- data/spec/dummy/public/500.html +57 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/requests/v1/monkeys_spec.rb +22 -0
- data/spec/requests/v1/widgets_spec.rb +125 -0
- data/spec/requests/v2/widgets_spec.rb +41 -0
- data/spec/spec_helper.rb +102 -0
- metadata +524 -0
@@ -0,0 +1,41 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe API::V2::Widgets do
|
4
|
+
describe 'GET /widgets' do
|
5
|
+
before do
|
6
|
+
3.times { FactoryGirl.create(:widget) }
|
7
|
+
req :get, "/widgets", { version: 'v2' }
|
8
|
+
end
|
9
|
+
|
10
|
+
it 'returns a list of widgets' do
|
11
|
+
expect(response.status).to eql 200
|
12
|
+
expect(json_result[:widgets].size).to eql 3
|
13
|
+
expect(json_result[:widgets].map{|w| w[:id]}.uniq.size).to eql 3
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'still uses the V1 response structure' do
|
17
|
+
widget = json_result[:widgets].first
|
18
|
+
expect(widget[:radioactive]).to eql true
|
19
|
+
expect(widget[:rads]).to eql 150
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
describe "GET /widgets/:id" do
|
24
|
+
let(:widget) { FactoryGirl.create(:widget) }
|
25
|
+
before do
|
26
|
+
req :get, "/widgets/#{widget.id}", { version: 'v2' }
|
27
|
+
end
|
28
|
+
it "returns a widget by id" do
|
29
|
+
expect(response.status).to eql 200
|
30
|
+
expect(json_result[:widgets].size).to eql 1
|
31
|
+
expect(json_result[:widgets].first[:name]).to eql "Magical Widget Alpha"
|
32
|
+
end
|
33
|
+
|
34
|
+
it "includes the new V2 format for radioactive hash" do
|
35
|
+
widget = json_result[:widgets].first
|
36
|
+
expect(widget[:radioactive]).to eql({ rads: 150, per_day: 7 })
|
37
|
+
expect(widget[:rads]).to eql 150
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
41
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,102 @@
|
|
1
|
+
ENV["RAILS_ENV"] = "test"
|
2
|
+
|
3
|
+
require File.expand_path("../dummy/config/environment.rb", __FILE__)
|
4
|
+
require "rails/test_help"
|
5
|
+
require 'rspec/rails'
|
6
|
+
require 'shoulda/matchers'
|
7
|
+
require 'database_cleaner'
|
8
|
+
require 'factory_girl'
|
9
|
+
require 'timecop'
|
10
|
+
require 'pry'
|
11
|
+
require 'webmock/rspec'
|
12
|
+
WebMock.disable_net_connect!(allow_localhost: true)
|
13
|
+
|
14
|
+
Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
|
15
|
+
|
16
|
+
Rails.backtrace_cleaner.remove_silencers!
|
17
|
+
|
18
|
+
# This file was generated by the `rspec --init` command. Conventionally, all
|
19
|
+
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
20
|
+
# Require this file using `require "spec_helper"` to ensure that it is only
|
21
|
+
# loaded once.
|
22
|
+
#
|
23
|
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
24
|
+
RSpec.configure do |config|
|
25
|
+
config.run_all_when_everything_filtered = true
|
26
|
+
config.infer_spec_type_from_file_location!
|
27
|
+
config.filter_run :focus
|
28
|
+
config.include FactoryGirl::Syntax::Methods
|
29
|
+
|
30
|
+
config.before(:suite) do
|
31
|
+
FactoryGirl.lint
|
32
|
+
DatabaseCleaner.strategy = :transaction
|
33
|
+
DatabaseCleaner.clean_with :truncation
|
34
|
+
end
|
35
|
+
|
36
|
+
config.before(:each) do
|
37
|
+
# ... stubs here
|
38
|
+
end
|
39
|
+
|
40
|
+
config.around(:each) do |spec|
|
41
|
+
DatabaseCleaner.cleaning do
|
42
|
+
spec.run
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
|
47
|
+
# Run specs in random order to surface order dependencies. If you find an
|
48
|
+
# order dependency and want to debug it, you can fix the order by providing
|
49
|
+
# the seed, which is printed after each run.
|
50
|
+
# --seed 1234
|
51
|
+
config.order = 'random'
|
52
|
+
end
|
53
|
+
|
54
|
+
FactoryGirl.define do
|
55
|
+
factory :widget do
|
56
|
+
name "Magical Widget Alpha"
|
57
|
+
color "green"
|
58
|
+
radioactive true
|
59
|
+
rads 150
|
60
|
+
end
|
61
|
+
|
62
|
+
factory :monkey do
|
63
|
+
name "Frank the Monkey"
|
64
|
+
color "brown"
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
def gar_response(payload, success_or_failure = :success)
|
69
|
+
payload = [payload] unless payload.is_a? Array
|
70
|
+
hash = { result: payload }
|
71
|
+
hash = { error: { code: 'FAILURE', message: 'This is a failure.' } } if success_or_failure == :failure
|
72
|
+
MultiJson.dump hash
|
73
|
+
end
|
74
|
+
|
75
|
+
def gar_success(payload)
|
76
|
+
gar_response payload, :success
|
77
|
+
end
|
78
|
+
|
79
|
+
def gar_failure(payload)
|
80
|
+
gar_response payload, :failure
|
81
|
+
end
|
82
|
+
|
83
|
+
def req(method, path, args = {})
|
84
|
+
version = args[:version] || 'v1'
|
85
|
+
args[:params] ||= {}
|
86
|
+
headers = args[:headers] || {}
|
87
|
+
headers.merge!({ 'HTTP_ACCEPT_LANGUAGE' => args[:locale] }) if args[:locale]
|
88
|
+
headers.merge!({ 'Accept' => "application/vnd.monkeyworks.titan-#{version}+json", 'Content-Type' => 'application/json' })
|
89
|
+
headers.merge!({ 'HTTP_IF_NONE_MATCH' => args[:etag] }) if args[:etag]
|
90
|
+
send(method, path, args[:params], headers)
|
91
|
+
end
|
92
|
+
|
93
|
+
def json_result(raw=false)
|
94
|
+
json = MultiJson.load(response.body, symbolize_keys: true)
|
95
|
+
raw ? json : json[:result]
|
96
|
+
end
|
97
|
+
|
98
|
+
def json_error
|
99
|
+
MultiJson.load(response.body, symbolize_keys: true)[:error]
|
100
|
+
rescue
|
101
|
+
nil
|
102
|
+
end
|
metadata
ADDED
@@ -0,0 +1,524 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: grape_ape_rails
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.5.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Matt E. Patterson
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-08-16 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activesupport
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: multi_json
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: oj
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: grape
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.8.0
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 0.8.0
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: grape-rabl
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: grape-kaminari
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: grape-rails-cache
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: kramdown
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: grape-active_model_serializers
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :runtime
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: http_accept_language
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :runtime
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: rabl
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :runtime
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: hashie_rails
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
type: :runtime
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: rails
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - "~>"
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '4.1'
|
188
|
+
type: :development
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - "~>"
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '4.1'
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: minitest
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - ">="
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: '0'
|
202
|
+
type: :development
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - ">="
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: '0'
|
209
|
+
- !ruby/object:Gem::Dependency
|
210
|
+
name: sqlite3
|
211
|
+
requirement: !ruby/object:Gem::Requirement
|
212
|
+
requirements:
|
213
|
+
- - ">="
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: '0'
|
216
|
+
type: :development
|
217
|
+
prerelease: false
|
218
|
+
version_requirements: !ruby/object:Gem::Requirement
|
219
|
+
requirements:
|
220
|
+
- - ">="
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: '0'
|
223
|
+
- !ruby/object:Gem::Dependency
|
224
|
+
name: bundler
|
225
|
+
requirement: !ruby/object:Gem::Requirement
|
226
|
+
requirements:
|
227
|
+
- - "~>"
|
228
|
+
- !ruby/object:Gem::Version
|
229
|
+
version: '1.5'
|
230
|
+
type: :development
|
231
|
+
prerelease: false
|
232
|
+
version_requirements: !ruby/object:Gem::Requirement
|
233
|
+
requirements:
|
234
|
+
- - "~>"
|
235
|
+
- !ruby/object:Gem::Version
|
236
|
+
version: '1.5'
|
237
|
+
- !ruby/object:Gem::Dependency
|
238
|
+
name: rake
|
239
|
+
requirement: !ruby/object:Gem::Requirement
|
240
|
+
requirements:
|
241
|
+
- - ">="
|
242
|
+
- !ruby/object:Gem::Version
|
243
|
+
version: '0'
|
244
|
+
type: :development
|
245
|
+
prerelease: false
|
246
|
+
version_requirements: !ruby/object:Gem::Requirement
|
247
|
+
requirements:
|
248
|
+
- - ">="
|
249
|
+
- !ruby/object:Gem::Version
|
250
|
+
version: '0'
|
251
|
+
- !ruby/object:Gem::Dependency
|
252
|
+
name: factory_girl_rails
|
253
|
+
requirement: !ruby/object:Gem::Requirement
|
254
|
+
requirements:
|
255
|
+
- - ">="
|
256
|
+
- !ruby/object:Gem::Version
|
257
|
+
version: '0'
|
258
|
+
type: :development
|
259
|
+
prerelease: false
|
260
|
+
version_requirements: !ruby/object:Gem::Requirement
|
261
|
+
requirements:
|
262
|
+
- - ">="
|
263
|
+
- !ruby/object:Gem::Version
|
264
|
+
version: '0'
|
265
|
+
- !ruby/object:Gem::Dependency
|
266
|
+
name: rspec-rails
|
267
|
+
requirement: !ruby/object:Gem::Requirement
|
268
|
+
requirements:
|
269
|
+
- - "~>"
|
270
|
+
- !ruby/object:Gem::Version
|
271
|
+
version: 3.0.0
|
272
|
+
type: :development
|
273
|
+
prerelease: false
|
274
|
+
version_requirements: !ruby/object:Gem::Requirement
|
275
|
+
requirements:
|
276
|
+
- - "~>"
|
277
|
+
- !ruby/object:Gem::Version
|
278
|
+
version: 3.0.0
|
279
|
+
- !ruby/object:Gem::Dependency
|
280
|
+
name: shoulda-matchers
|
281
|
+
requirement: !ruby/object:Gem::Requirement
|
282
|
+
requirements:
|
283
|
+
- - ">="
|
284
|
+
- !ruby/object:Gem::Version
|
285
|
+
version: '0'
|
286
|
+
type: :development
|
287
|
+
prerelease: false
|
288
|
+
version_requirements: !ruby/object:Gem::Requirement
|
289
|
+
requirements:
|
290
|
+
- - ">="
|
291
|
+
- !ruby/object:Gem::Version
|
292
|
+
version: '0'
|
293
|
+
- !ruby/object:Gem::Dependency
|
294
|
+
name: database_cleaner
|
295
|
+
requirement: !ruby/object:Gem::Requirement
|
296
|
+
requirements:
|
297
|
+
- - ">="
|
298
|
+
- !ruby/object:Gem::Version
|
299
|
+
version: '0'
|
300
|
+
type: :development
|
301
|
+
prerelease: false
|
302
|
+
version_requirements: !ruby/object:Gem::Requirement
|
303
|
+
requirements:
|
304
|
+
- - ">="
|
305
|
+
- !ruby/object:Gem::Version
|
306
|
+
version: '0'
|
307
|
+
- !ruby/object:Gem::Dependency
|
308
|
+
name: timecop
|
309
|
+
requirement: !ruby/object:Gem::Requirement
|
310
|
+
requirements:
|
311
|
+
- - ">="
|
312
|
+
- !ruby/object:Gem::Version
|
313
|
+
version: '0'
|
314
|
+
type: :development
|
315
|
+
prerelease: false
|
316
|
+
version_requirements: !ruby/object:Gem::Requirement
|
317
|
+
requirements:
|
318
|
+
- - ">="
|
319
|
+
- !ruby/object:Gem::Version
|
320
|
+
version: '0'
|
321
|
+
- !ruby/object:Gem::Dependency
|
322
|
+
name: pry
|
323
|
+
requirement: !ruby/object:Gem::Requirement
|
324
|
+
requirements:
|
325
|
+
- - ">="
|
326
|
+
- !ruby/object:Gem::Version
|
327
|
+
version: '0'
|
328
|
+
type: :development
|
329
|
+
prerelease: false
|
330
|
+
version_requirements: !ruby/object:Gem::Requirement
|
331
|
+
requirements:
|
332
|
+
- - ">="
|
333
|
+
- !ruby/object:Gem::Version
|
334
|
+
version: '0'
|
335
|
+
- !ruby/object:Gem::Dependency
|
336
|
+
name: webmock
|
337
|
+
requirement: !ruby/object:Gem::Requirement
|
338
|
+
requirements:
|
339
|
+
- - ">="
|
340
|
+
- !ruby/object:Gem::Version
|
341
|
+
version: '0'
|
342
|
+
type: :development
|
343
|
+
prerelease: false
|
344
|
+
version_requirements: !ruby/object:Gem::Requirement
|
345
|
+
requirements:
|
346
|
+
- - ">="
|
347
|
+
- !ruby/object:Gem::Version
|
348
|
+
version: '0'
|
349
|
+
description: Provides customized Grape API functionality inside Rails
|
350
|
+
email:
|
351
|
+
- madraziel@gmail.com
|
352
|
+
executables: []
|
353
|
+
extensions: []
|
354
|
+
extra_rdoc_files: []
|
355
|
+
files:
|
356
|
+
- ".gitignore"
|
357
|
+
- ".rspec"
|
358
|
+
- ".ruby-gemset"
|
359
|
+
- ".ruby-version"
|
360
|
+
- Gemfile
|
361
|
+
- LICENSE.txt
|
362
|
+
- README.md
|
363
|
+
- Rakefile
|
364
|
+
- grape_ape_rails.gemspec
|
365
|
+
- lib/generators/setup_generator.rb
|
366
|
+
- lib/generators/templates/initializer.rb
|
367
|
+
- lib/grape_ape_rails.rb
|
368
|
+
- lib/grape_ape_rails/api.rb
|
369
|
+
- lib/grape_ape_rails/base.rb
|
370
|
+
- lib/grape_ape_rails/handlers.rb
|
371
|
+
- lib/grape_ape_rails/handlers/formatters.rb
|
372
|
+
- lib/grape_ape_rails/handlers/header_versioning.rb
|
373
|
+
- lib/grape_ape_rails/handlers/locale.rb
|
374
|
+
- lib/grape_ape_rails/handlers/rails_logging.rb
|
375
|
+
- lib/grape_ape_rails/handlers/responses.rb
|
376
|
+
- lib/grape_ape_rails/railtie.rb
|
377
|
+
- lib/grape_ape_rails/version.rb
|
378
|
+
- lib/swagger/grape_swagger_modified.rb
|
379
|
+
- lib/tasks/routes.rake
|
380
|
+
- spec/dummy/.rspec
|
381
|
+
- spec/dummy/README.rdoc
|
382
|
+
- spec/dummy/Rakefile
|
383
|
+
- spec/dummy/app/assets/images/.keep
|
384
|
+
- spec/dummy/app/assets/javascripts/application.js
|
385
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
386
|
+
- spec/dummy/app/controllers/api/base.rb
|
387
|
+
- spec/dummy/app/controllers/api/v1/monkeys.rb
|
388
|
+
- spec/dummy/app/controllers/api/v1/widgets.rb
|
389
|
+
- spec/dummy/app/controllers/api/v2/widgets.rb
|
390
|
+
- spec/dummy/app/controllers/application_controller.rb
|
391
|
+
- spec/dummy/app/controllers/concerns/.keep
|
392
|
+
- spec/dummy/app/helpers/application_helper.rb
|
393
|
+
- spec/dummy/app/mailers/.keep
|
394
|
+
- spec/dummy/app/models/.keep
|
395
|
+
- spec/dummy/app/models/concerns/.keep
|
396
|
+
- spec/dummy/app/models/monkey.rb
|
397
|
+
- spec/dummy/app/models/monkey_serializer.rb
|
398
|
+
- spec/dummy/app/models/widget.rb
|
399
|
+
- spec/dummy/app/views/api/v1/base_widget.rabl
|
400
|
+
- spec/dummy/app/views/api/v1/widget.rabl
|
401
|
+
- spec/dummy/app/views/api/v1/widgets.rabl
|
402
|
+
- spec/dummy/app/views/api/v2/base_widget.rabl
|
403
|
+
- spec/dummy/app/views/api/v2/widget.rabl
|
404
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
405
|
+
- spec/dummy/bin/bundle
|
406
|
+
- spec/dummy/bin/rails
|
407
|
+
- spec/dummy/bin/rake
|
408
|
+
- spec/dummy/config.ru
|
409
|
+
- spec/dummy/config/application.rb
|
410
|
+
- spec/dummy/config/boot.rb
|
411
|
+
- spec/dummy/config/database.yml
|
412
|
+
- spec/dummy/config/environment.rb
|
413
|
+
- spec/dummy/config/environments/development.rb
|
414
|
+
- spec/dummy/config/environments/production.rb
|
415
|
+
- spec/dummy/config/environments/test.rb
|
416
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
417
|
+
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
418
|
+
- spec/dummy/config/initializers/grape_ape_rails.rb
|
419
|
+
- spec/dummy/config/initializers/inflections.rb
|
420
|
+
- spec/dummy/config/initializers/mime_types.rb
|
421
|
+
- spec/dummy/config/initializers/secret_token.rb
|
422
|
+
- spec/dummy/config/initializers/session_store.rb
|
423
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
424
|
+
- spec/dummy/config/locales/en.yml
|
425
|
+
- spec/dummy/config/routes.rb
|
426
|
+
- spec/dummy/db/development.sqlite3
|
427
|
+
- spec/dummy/db/migrate/20140714154355_create_widgets.rb
|
428
|
+
- spec/dummy/db/migrate/20140804173544_create_monkeys.rb
|
429
|
+
- spec/dummy/db/schema.rb
|
430
|
+
- spec/dummy/db/test.sqlite3
|
431
|
+
- spec/dummy/lib/assets/.keep
|
432
|
+
- spec/dummy/public/404.html
|
433
|
+
- spec/dummy/public/422.html
|
434
|
+
- spec/dummy/public/500.html
|
435
|
+
- spec/dummy/public/favicon.ico
|
436
|
+
- spec/requests/v1/monkeys_spec.rb
|
437
|
+
- spec/requests/v1/widgets_spec.rb
|
438
|
+
- spec/requests/v2/widgets_spec.rb
|
439
|
+
- spec/spec_helper.rb
|
440
|
+
homepage: ''
|
441
|
+
licenses:
|
442
|
+
- MIT
|
443
|
+
metadata: {}
|
444
|
+
post_install_message:
|
445
|
+
rdoc_options: []
|
446
|
+
require_paths:
|
447
|
+
- lib
|
448
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
449
|
+
requirements:
|
450
|
+
- - ">="
|
451
|
+
- !ruby/object:Gem::Version
|
452
|
+
version: '0'
|
453
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
454
|
+
requirements:
|
455
|
+
- - ">="
|
456
|
+
- !ruby/object:Gem::Version
|
457
|
+
version: '0'
|
458
|
+
requirements: []
|
459
|
+
rubyforge_project:
|
460
|
+
rubygems_version: 2.2.2
|
461
|
+
signing_key:
|
462
|
+
specification_version: 4
|
463
|
+
summary: Provides customized Grape API functionality inside Rails
|
464
|
+
test_files:
|
465
|
+
- spec/dummy/.rspec
|
466
|
+
- spec/dummy/README.rdoc
|
467
|
+
- spec/dummy/Rakefile
|
468
|
+
- spec/dummy/app/assets/images/.keep
|
469
|
+
- spec/dummy/app/assets/javascripts/application.js
|
470
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
471
|
+
- spec/dummy/app/controllers/api/base.rb
|
472
|
+
- spec/dummy/app/controllers/api/v1/monkeys.rb
|
473
|
+
- spec/dummy/app/controllers/api/v1/widgets.rb
|
474
|
+
- spec/dummy/app/controllers/api/v2/widgets.rb
|
475
|
+
- spec/dummy/app/controllers/application_controller.rb
|
476
|
+
- spec/dummy/app/controllers/concerns/.keep
|
477
|
+
- spec/dummy/app/helpers/application_helper.rb
|
478
|
+
- spec/dummy/app/mailers/.keep
|
479
|
+
- spec/dummy/app/models/.keep
|
480
|
+
- spec/dummy/app/models/concerns/.keep
|
481
|
+
- spec/dummy/app/models/monkey.rb
|
482
|
+
- spec/dummy/app/models/monkey_serializer.rb
|
483
|
+
- spec/dummy/app/models/widget.rb
|
484
|
+
- spec/dummy/app/views/api/v1/base_widget.rabl
|
485
|
+
- spec/dummy/app/views/api/v1/widget.rabl
|
486
|
+
- spec/dummy/app/views/api/v1/widgets.rabl
|
487
|
+
- spec/dummy/app/views/api/v2/base_widget.rabl
|
488
|
+
- spec/dummy/app/views/api/v2/widget.rabl
|
489
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
490
|
+
- spec/dummy/bin/bundle
|
491
|
+
- spec/dummy/bin/rails
|
492
|
+
- spec/dummy/bin/rake
|
493
|
+
- spec/dummy/config.ru
|
494
|
+
- spec/dummy/config/application.rb
|
495
|
+
- spec/dummy/config/boot.rb
|
496
|
+
- spec/dummy/config/database.yml
|
497
|
+
- spec/dummy/config/environment.rb
|
498
|
+
- spec/dummy/config/environments/development.rb
|
499
|
+
- spec/dummy/config/environments/production.rb
|
500
|
+
- spec/dummy/config/environments/test.rb
|
501
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
502
|
+
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
503
|
+
- spec/dummy/config/initializers/grape_ape_rails.rb
|
504
|
+
- spec/dummy/config/initializers/inflections.rb
|
505
|
+
- spec/dummy/config/initializers/mime_types.rb
|
506
|
+
- spec/dummy/config/initializers/secret_token.rb
|
507
|
+
- spec/dummy/config/initializers/session_store.rb
|
508
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
509
|
+
- spec/dummy/config/locales/en.yml
|
510
|
+
- spec/dummy/config/routes.rb
|
511
|
+
- spec/dummy/db/development.sqlite3
|
512
|
+
- spec/dummy/db/migrate/20140714154355_create_widgets.rb
|
513
|
+
- spec/dummy/db/migrate/20140804173544_create_monkeys.rb
|
514
|
+
- spec/dummy/db/schema.rb
|
515
|
+
- spec/dummy/db/test.sqlite3
|
516
|
+
- spec/dummy/lib/assets/.keep
|
517
|
+
- spec/dummy/public/404.html
|
518
|
+
- spec/dummy/public/422.html
|
519
|
+
- spec/dummy/public/500.html
|
520
|
+
- spec/dummy/public/favicon.ico
|
521
|
+
- spec/requests/v1/monkeys_spec.rb
|
522
|
+
- spec/requests/v1/widgets_spec.rb
|
523
|
+
- spec/requests/v2/widgets_spec.rb
|
524
|
+
- spec/spec_helper.rb
|