rocket_pants 1.9.1 → 1.9.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1258392398768b3bcc4753af9b0019fc6782c25f
|
4
|
+
data.tar.gz: 0bf635b614213ec2e6b5340d44fbec8988560575
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d7c53a3a3e384aa722f79f96a9123a917eb8dbc589a213cc467839c1d2d701250feb6dbeadbabdb6f96b7dbb3be310f2e6c3865fde645165d2278a914aaa93f
|
7
|
+
data.tar.gz: 266b894e1cb524ac3358634412d71a1ed7fdcf6c2a7bd2dad6c444fb33b8e282e3296f49fb9a72f4c2aeee6238bb4706cf845e8f2c0dc49b1e9cb3d38743cdb6
|
data/lib/rocket_pants/base.rb
CHANGED
@@ -6,13 +6,21 @@ module RocketPants
|
|
6
6
|
|
7
7
|
abstract!
|
8
8
|
|
9
|
+
record_identifier_klass = nil
|
10
|
+
begin
|
11
|
+
require 'action_view/record_identifier'
|
12
|
+
record_identifier_klass = ActionView::RecordIdentifier
|
13
|
+
rescue LoadError => e
|
14
|
+
record_identifier_klass = ActionController::RecordIdentifier
|
15
|
+
end
|
16
|
+
|
9
17
|
MODULES = [
|
10
18
|
ActionController::HideActions,
|
11
19
|
ActionController::UrlFor,
|
12
20
|
ActionController::Redirecting,
|
13
21
|
ActionController::ConditionalGet,
|
14
22
|
ActionController::RackDelegation,
|
15
|
-
|
23
|
+
record_identifier_klass,
|
16
24
|
ActionController::HttpAuthentication::Basic::ControllerMethods,
|
17
25
|
ActionController::HttpAuthentication::Digest::ControllerMethods,
|
18
26
|
ActionController::HttpAuthentication::Token::ControllerMethods,
|
@@ -109,7 +109,7 @@ module RocketPants
|
|
109
109
|
# api design.
|
110
110
|
# @param [StandardError] exception the error to render a response for.
|
111
111
|
def render_error(exception)
|
112
|
-
logger.debug "
|
112
|
+
logger.debug "Exception raised: #{exception.class.name}: #{exception.message}" if logger
|
113
113
|
# When a normalised class is present, make sure we
|
114
114
|
# convert it to a useable error class.
|
115
115
|
normalised_class = exception.class.ancestors.detect do |klass|
|
@@ -131,4 +131,4 @@ module RocketPants
|
|
131
131
|
end
|
132
132
|
|
133
133
|
end
|
134
|
-
end
|
134
|
+
end
|
@@ -12,6 +12,10 @@ module RocketPants
|
|
12
12
|
unless ActionController::TestResponse < ResponseHelper
|
13
13
|
ActionController::TestResponse.send :include, ResponseHelper
|
14
14
|
end
|
15
|
+
|
16
|
+
unless ActionDispatch::TestResponse < ResponseHelper
|
17
|
+
ActionDispatch::TestResponse.send :include, ResponseHelper
|
18
|
+
end
|
15
19
|
end
|
16
20
|
|
17
21
|
module ResponseHelper
|
metadata
CHANGED
@@ -1,233 +1,233 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rocket_pants
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.9.
|
4
|
+
version: 1.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Darcy Laycock
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '3.0'
|
20
|
-
- - <
|
20
|
+
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: '5.0'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
|
-
- -
|
27
|
+
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: '3.0'
|
30
|
-
- - <
|
30
|
+
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '5.0'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: railties
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
|
-
- -
|
37
|
+
- - ">="
|
38
38
|
- !ruby/object:Gem::Version
|
39
39
|
version: '3.0'
|
40
|
-
- - <
|
40
|
+
- - "<"
|
41
41
|
- !ruby/object:Gem::Version
|
42
42
|
version: '5.0'
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
|
-
- -
|
47
|
+
- - ">="
|
48
48
|
- !ruby/object:Gem::Version
|
49
49
|
version: '3.0'
|
50
|
-
- - <
|
50
|
+
- - "<"
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: '5.0'
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: will_paginate
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
56
56
|
requirements:
|
57
|
-
- - ~>
|
57
|
+
- - "~>"
|
58
58
|
- !ruby/object:Gem::Version
|
59
59
|
version: '3.0'
|
60
60
|
type: :runtime
|
61
61
|
prerelease: false
|
62
62
|
version_requirements: !ruby/object:Gem::Requirement
|
63
63
|
requirements:
|
64
|
-
- - ~>
|
64
|
+
- - "~>"
|
65
65
|
- !ruby/object:Gem::Version
|
66
66
|
version: '3.0'
|
67
67
|
- !ruby/object:Gem::Dependency
|
68
68
|
name: hashie
|
69
69
|
requirement: !ruby/object:Gem::Requirement
|
70
70
|
requirements:
|
71
|
-
- -
|
71
|
+
- - ">="
|
72
72
|
- !ruby/object:Gem::Version
|
73
73
|
version: '1.0'
|
74
|
-
- - <
|
74
|
+
- - "<"
|
75
75
|
- !ruby/object:Gem::Version
|
76
76
|
version: '3'
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
79
|
version_requirements: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
|
-
- -
|
81
|
+
- - ">="
|
82
82
|
- !ruby/object:Gem::Version
|
83
83
|
version: '1.0'
|
84
|
-
- - <
|
84
|
+
- - "<"
|
85
85
|
- !ruby/object:Gem::Version
|
86
86
|
version: '3'
|
87
87
|
- !ruby/object:Gem::Dependency
|
88
88
|
name: api_smith
|
89
89
|
requirement: !ruby/object:Gem::Requirement
|
90
90
|
requirements:
|
91
|
-
- -
|
91
|
+
- - ">="
|
92
92
|
- !ruby/object:Gem::Version
|
93
93
|
version: '0'
|
94
94
|
type: :runtime
|
95
95
|
prerelease: false
|
96
96
|
version_requirements: !ruby/object:Gem::Requirement
|
97
97
|
requirements:
|
98
|
-
- -
|
98
|
+
- - ">="
|
99
99
|
- !ruby/object:Gem::Version
|
100
100
|
version: '0'
|
101
101
|
- !ruby/object:Gem::Dependency
|
102
102
|
name: moneta
|
103
103
|
requirement: !ruby/object:Gem::Requirement
|
104
104
|
requirements:
|
105
|
-
- -
|
105
|
+
- - ">="
|
106
106
|
- !ruby/object:Gem::Version
|
107
107
|
version: '0'
|
108
108
|
type: :runtime
|
109
109
|
prerelease: false
|
110
110
|
version_requirements: !ruby/object:Gem::Requirement
|
111
111
|
requirements:
|
112
|
-
- -
|
112
|
+
- - ">="
|
113
113
|
- !ruby/object:Gem::Version
|
114
114
|
version: '0'
|
115
115
|
- !ruby/object:Gem::Dependency
|
116
116
|
name: rspec
|
117
117
|
requirement: !ruby/object:Gem::Requirement
|
118
118
|
requirements:
|
119
|
-
- - ~>
|
119
|
+
- - "~>"
|
120
120
|
- !ruby/object:Gem::Version
|
121
121
|
version: '2.4'
|
122
122
|
type: :development
|
123
123
|
prerelease: false
|
124
124
|
version_requirements: !ruby/object:Gem::Requirement
|
125
125
|
requirements:
|
126
|
-
- - ~>
|
126
|
+
- - "~>"
|
127
127
|
- !ruby/object:Gem::Version
|
128
128
|
version: '2.4'
|
129
129
|
- !ruby/object:Gem::Dependency
|
130
130
|
name: rspec-rails
|
131
131
|
requirement: !ruby/object:Gem::Requirement
|
132
132
|
requirements:
|
133
|
-
- - ~>
|
133
|
+
- - "~>"
|
134
134
|
- !ruby/object:Gem::Version
|
135
135
|
version: '2.4'
|
136
136
|
type: :development
|
137
137
|
prerelease: false
|
138
138
|
version_requirements: !ruby/object:Gem::Requirement
|
139
139
|
requirements:
|
140
|
-
- - ~>
|
140
|
+
- - "~>"
|
141
141
|
- !ruby/object:Gem::Version
|
142
142
|
version: '2.4'
|
143
143
|
- !ruby/object:Gem::Dependency
|
144
144
|
name: rr
|
145
145
|
requirement: !ruby/object:Gem::Requirement
|
146
146
|
requirements:
|
147
|
-
- - ~>
|
147
|
+
- - "~>"
|
148
148
|
- !ruby/object:Gem::Version
|
149
149
|
version: '1.0'
|
150
150
|
type: :development
|
151
151
|
prerelease: false
|
152
152
|
version_requirements: !ruby/object:Gem::Requirement
|
153
153
|
requirements:
|
154
|
-
- - ~>
|
154
|
+
- - "~>"
|
155
155
|
- !ruby/object:Gem::Version
|
156
156
|
version: '1.0'
|
157
157
|
- !ruby/object:Gem::Dependency
|
158
158
|
name: webmock
|
159
159
|
requirement: !ruby/object:Gem::Requirement
|
160
160
|
requirements:
|
161
|
-
- -
|
161
|
+
- - ">="
|
162
162
|
- !ruby/object:Gem::Version
|
163
163
|
version: '0'
|
164
164
|
type: :development
|
165
165
|
prerelease: false
|
166
166
|
version_requirements: !ruby/object:Gem::Requirement
|
167
167
|
requirements:
|
168
|
-
- -
|
168
|
+
- - ">="
|
169
169
|
- !ruby/object:Gem::Version
|
170
170
|
version: '0'
|
171
171
|
- !ruby/object:Gem::Dependency
|
172
172
|
name: activerecord
|
173
173
|
requirement: !ruby/object:Gem::Requirement
|
174
174
|
requirements:
|
175
|
-
- -
|
175
|
+
- - ">="
|
176
176
|
- !ruby/object:Gem::Version
|
177
177
|
version: '3.0'
|
178
|
-
- - <
|
178
|
+
- - "<"
|
179
179
|
- !ruby/object:Gem::Version
|
180
180
|
version: '5.0'
|
181
181
|
type: :development
|
182
182
|
prerelease: false
|
183
183
|
version_requirements: !ruby/object:Gem::Requirement
|
184
184
|
requirements:
|
185
|
-
- -
|
185
|
+
- - ">="
|
186
186
|
- !ruby/object:Gem::Version
|
187
187
|
version: '3.0'
|
188
|
-
- - <
|
188
|
+
- - "<"
|
189
189
|
- !ruby/object:Gem::Version
|
190
190
|
version: '5.0'
|
191
191
|
- !ruby/object:Gem::Dependency
|
192
192
|
name: sqlite3
|
193
193
|
requirement: !ruby/object:Gem::Requirement
|
194
194
|
requirements:
|
195
|
-
- -
|
195
|
+
- - ">="
|
196
196
|
- !ruby/object:Gem::Version
|
197
197
|
version: '0'
|
198
198
|
type: :development
|
199
199
|
prerelease: false
|
200
200
|
version_requirements: !ruby/object:Gem::Requirement
|
201
201
|
requirements:
|
202
|
-
- -
|
202
|
+
- - ">="
|
203
203
|
- !ruby/object:Gem::Version
|
204
204
|
version: '0'
|
205
205
|
- !ruby/object:Gem::Dependency
|
206
206
|
name: reversible_data
|
207
207
|
requirement: !ruby/object:Gem::Requirement
|
208
208
|
requirements:
|
209
|
-
- - ~>
|
209
|
+
- - "~>"
|
210
210
|
- !ruby/object:Gem::Version
|
211
211
|
version: '1.0'
|
212
212
|
type: :development
|
213
213
|
prerelease: false
|
214
214
|
version_requirements: !ruby/object:Gem::Requirement
|
215
215
|
requirements:
|
216
|
-
- - ~>
|
216
|
+
- - "~>"
|
217
217
|
- !ruby/object:Gem::Version
|
218
218
|
version: '1.0'
|
219
219
|
- !ruby/object:Gem::Dependency
|
220
220
|
name: kaminari
|
221
221
|
requirement: !ruby/object:Gem::Requirement
|
222
222
|
requirements:
|
223
|
-
- -
|
223
|
+
- - ">="
|
224
224
|
- !ruby/object:Gem::Version
|
225
225
|
version: '0'
|
226
226
|
type: :development
|
227
227
|
prerelease: false
|
228
228
|
version_requirements: !ruby/object:Gem::Requirement
|
229
229
|
requirements:
|
230
|
-
- -
|
230
|
+
- - ">="
|
231
231
|
- !ruby/object:Gem::Version
|
232
232
|
version: '0'
|
233
233
|
description: Rocket Pants adds JSON API love to Rails and ActionController, making
|
@@ -238,6 +238,7 @@ executables: []
|
|
238
238
|
extensions: []
|
239
239
|
extra_rdoc_files: []
|
240
240
|
files:
|
241
|
+
- lib/rocket_pants.rb
|
241
242
|
- lib/rocket_pants/active_record.rb
|
242
243
|
- lib/rocket_pants/base.rb
|
243
244
|
- lib/rocket_pants/cache_middleware.rb
|
@@ -263,8 +264,7 @@ files:
|
|
263
264
|
- lib/rocket_pants/rspec_matchers.rb
|
264
265
|
- lib/rocket_pants/tasks/rocket_pants.rake
|
265
266
|
- lib/rocket_pants/test_helper.rb
|
266
|
-
|
267
|
-
homepage: http://github.com/filtersquad
|
267
|
+
homepage: http://github.com/Sutto/rocket_pants
|
268
268
|
licenses: []
|
269
269
|
metadata: {}
|
270
270
|
post_install_message:
|
@@ -273,17 +273,17 @@ require_paths:
|
|
273
273
|
- lib
|
274
274
|
required_ruby_version: !ruby/object:Gem::Requirement
|
275
275
|
requirements:
|
276
|
-
- -
|
276
|
+
- - ">="
|
277
277
|
- !ruby/object:Gem::Version
|
278
278
|
version: '0'
|
279
279
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
280
280
|
requirements:
|
281
|
-
- -
|
281
|
+
- - ">="
|
282
282
|
- !ruby/object:Gem::Version
|
283
283
|
version: 1.3.6
|
284
284
|
requirements: []
|
285
285
|
rubyforge_project:
|
286
|
-
rubygems_version: 2.
|
286
|
+
rubygems_version: 2.2.2
|
287
287
|
signing_key:
|
288
288
|
specification_version: 4
|
289
289
|
summary: JSON API love for Rails and ActionController
|