fun_with_json_api 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/Rakefile +28 -0
- data/config/locales/fun_with_json_api.en.yml +13 -0
- data/lib/fun_with_json_api/attribute.rb +38 -0
- data/lib/fun_with_json_api/attributes/boolean_attribute.rb +24 -0
- data/lib/fun_with_json_api/attributes/date_attribute.rb +22 -0
- data/lib/fun_with_json_api/attributes/datetime_attribute.rb +20 -0
- data/lib/fun_with_json_api/attributes/decimal_attribute.rb +23 -0
- data/lib/fun_with_json_api/attributes/float_attribute.rb +20 -0
- data/lib/fun_with_json_api/attributes/integer_attribute.rb +20 -0
- data/lib/fun_with_json_api/attributes/relationship.rb +73 -0
- data/lib/fun_with_json_api/attributes/relationship_collection.rb +99 -0
- data/lib/fun_with_json_api/attributes/string_attribute.rb +9 -0
- data/lib/fun_with_json_api/controller_methods.rb +12 -0
- data/lib/fun_with_json_api/deserializer.rb +70 -0
- data/lib/fun_with_json_api/deserializer_class_methods.rb +83 -0
- data/lib/fun_with_json_api/deserializer_config_builder.rb +48 -0
- data/lib/fun_with_json_api/exception.rb +27 -0
- data/lib/fun_with_json_api/exception_payload.rb +29 -0
- data/lib/fun_with_json_api/exception_payload_serializer.rb +17 -0
- data/lib/fun_with_json_api/exception_serializer.rb +15 -0
- data/lib/fun_with_json_api/exceptions/invalid_attribute.rb +13 -0
- data/lib/fun_with_json_api/exceptions/invalid_document.rb +12 -0
- data/lib/fun_with_json_api/exceptions/invalid_relationship.rb +13 -0
- data/lib/fun_with_json_api/exceptions/missing_relationship.rb +15 -0
- data/lib/fun_with_json_api/pre_deserializer.rb +61 -0
- data/lib/fun_with_json_api/railtie.rb +11 -0
- data/lib/fun_with_json_api/version.rb +3 -0
- data/lib/fun_with_json_api.rb +24 -0
- data/lib/tasks/fun_with_json_api_tasks.rake +4 -0
- data/spec/dummy/README.rdoc +28 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/assets/javascripts/application.js +13 -0
- data/spec/dummy/app/assets/stylesheets/application.css +15 -0
- data/spec/dummy/app/controllers/application_controller.rb +5 -0
- data/spec/dummy/app/helpers/application_helper.rb +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/bin/setup +29 -0
- data/spec/dummy/config/application.rb +25 -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 +41 -0
- data/spec/dummy/config/environments/production.rb +80 -0
- data/spec/dummy/config/environments/test.rb +42 -0
- data/spec/dummy/config/initializers/assets.rb +11 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +9 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/inflections.rb +16 -0
- data/spec/dummy/config/initializers/mime_types.rb +4 -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 +56 -0
- data/spec/dummy/config/secrets.yml +22 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/log/test.log +37839 -0
- data/spec/dummy/public/404.html +67 -0
- data/spec/dummy/public/422.html +67 -0
- data/spec/dummy/public/500.html +66 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/example_spec.rb +64 -0
- data/spec/fixtures/active_record.rb +65 -0
- data/spec/fun_with_json_api/controller_methods_spec.rb +123 -0
- data/spec/fun_with_json_api/deserializer_class_methods_spec.rb +52 -0
- data/spec/fun_with_json_api/deserializer_spec.rb +450 -0
- data/spec/fun_with_json_api/exception_spec.rb +77 -0
- data/spec/fun_with_json_api/pre_deserializer_spec.rb +287 -0
- data/spec/fun_with_json_api_spec.rb +55 -0
- data/spec/spec_helper.rb +33 -0
- metadata +275 -0
metadata
ADDED
@@ -0,0 +1,275 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: fun_with_json_api
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Ben Morrall
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-03-24 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rails
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 4.2.6
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 4.2.6
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: active_model_serializers
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.10.0.rc4
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.10.0.rc4
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: sqlite3
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
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: rspec-rails
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: faker
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
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: factory_girl_rails
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
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: rubocop
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 0.38.0
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 0.38.0
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: simplecov
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
description: Adds various modules and libraries for handing the tricky parts of a
|
126
|
+
JSON API implementation.
|
127
|
+
email:
|
128
|
+
- bemo56@hotmail.com
|
129
|
+
executables: []
|
130
|
+
extensions: []
|
131
|
+
extra_rdoc_files: []
|
132
|
+
files:
|
133
|
+
- MIT-LICENSE
|
134
|
+
- Rakefile
|
135
|
+
- config/locales/fun_with_json_api.en.yml
|
136
|
+
- lib/fun_with_json_api.rb
|
137
|
+
- lib/fun_with_json_api/attribute.rb
|
138
|
+
- lib/fun_with_json_api/attributes/boolean_attribute.rb
|
139
|
+
- lib/fun_with_json_api/attributes/date_attribute.rb
|
140
|
+
- lib/fun_with_json_api/attributes/datetime_attribute.rb
|
141
|
+
- lib/fun_with_json_api/attributes/decimal_attribute.rb
|
142
|
+
- lib/fun_with_json_api/attributes/float_attribute.rb
|
143
|
+
- lib/fun_with_json_api/attributes/integer_attribute.rb
|
144
|
+
- lib/fun_with_json_api/attributes/relationship.rb
|
145
|
+
- lib/fun_with_json_api/attributes/relationship_collection.rb
|
146
|
+
- lib/fun_with_json_api/attributes/string_attribute.rb
|
147
|
+
- lib/fun_with_json_api/controller_methods.rb
|
148
|
+
- lib/fun_with_json_api/deserializer.rb
|
149
|
+
- lib/fun_with_json_api/deserializer_class_methods.rb
|
150
|
+
- lib/fun_with_json_api/deserializer_config_builder.rb
|
151
|
+
- lib/fun_with_json_api/exception.rb
|
152
|
+
- lib/fun_with_json_api/exception_payload.rb
|
153
|
+
- lib/fun_with_json_api/exception_payload_serializer.rb
|
154
|
+
- lib/fun_with_json_api/exception_serializer.rb
|
155
|
+
- lib/fun_with_json_api/exceptions/invalid_attribute.rb
|
156
|
+
- lib/fun_with_json_api/exceptions/invalid_document.rb
|
157
|
+
- lib/fun_with_json_api/exceptions/invalid_relationship.rb
|
158
|
+
- lib/fun_with_json_api/exceptions/missing_relationship.rb
|
159
|
+
- lib/fun_with_json_api/pre_deserializer.rb
|
160
|
+
- lib/fun_with_json_api/railtie.rb
|
161
|
+
- lib/fun_with_json_api/version.rb
|
162
|
+
- lib/tasks/fun_with_json_api_tasks.rake
|
163
|
+
- spec/dummy/README.rdoc
|
164
|
+
- spec/dummy/Rakefile
|
165
|
+
- spec/dummy/app/assets/javascripts/application.js
|
166
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
167
|
+
- spec/dummy/app/controllers/application_controller.rb
|
168
|
+
- spec/dummy/app/helpers/application_helper.rb
|
169
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
170
|
+
- spec/dummy/bin/bundle
|
171
|
+
- spec/dummy/bin/rails
|
172
|
+
- spec/dummy/bin/rake
|
173
|
+
- spec/dummy/bin/setup
|
174
|
+
- spec/dummy/config.ru
|
175
|
+
- spec/dummy/config/application.rb
|
176
|
+
- spec/dummy/config/boot.rb
|
177
|
+
- spec/dummy/config/database.yml
|
178
|
+
- spec/dummy/config/environment.rb
|
179
|
+
- spec/dummy/config/environments/development.rb
|
180
|
+
- spec/dummy/config/environments/production.rb
|
181
|
+
- spec/dummy/config/environments/test.rb
|
182
|
+
- spec/dummy/config/initializers/assets.rb
|
183
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
184
|
+
- spec/dummy/config/initializers/cookies_serializer.rb
|
185
|
+
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
186
|
+
- spec/dummy/config/initializers/inflections.rb
|
187
|
+
- spec/dummy/config/initializers/mime_types.rb
|
188
|
+
- spec/dummy/config/initializers/session_store.rb
|
189
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
190
|
+
- spec/dummy/config/locales/en.yml
|
191
|
+
- spec/dummy/config/routes.rb
|
192
|
+
- spec/dummy/config/secrets.yml
|
193
|
+
- spec/dummy/log/test.log
|
194
|
+
- spec/dummy/public/404.html
|
195
|
+
- spec/dummy/public/422.html
|
196
|
+
- spec/dummy/public/500.html
|
197
|
+
- spec/dummy/public/favicon.ico
|
198
|
+
- spec/example_spec.rb
|
199
|
+
- spec/fixtures/active_record.rb
|
200
|
+
- spec/fun_with_json_api/controller_methods_spec.rb
|
201
|
+
- spec/fun_with_json_api/deserializer_class_methods_spec.rb
|
202
|
+
- spec/fun_with_json_api/deserializer_spec.rb
|
203
|
+
- spec/fun_with_json_api/exception_spec.rb
|
204
|
+
- spec/fun_with_json_api/pre_deserializer_spec.rb
|
205
|
+
- spec/fun_with_json_api_spec.rb
|
206
|
+
- spec/spec_helper.rb
|
207
|
+
homepage: https://github.com/bmorrall/fun_with_json_api
|
208
|
+
licenses:
|
209
|
+
- MIT
|
210
|
+
metadata: {}
|
211
|
+
post_install_message:
|
212
|
+
rdoc_options: []
|
213
|
+
require_paths:
|
214
|
+
- lib
|
215
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
216
|
+
requirements:
|
217
|
+
- - ">="
|
218
|
+
- !ruby/object:Gem::Version
|
219
|
+
version: '0'
|
220
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
221
|
+
requirements:
|
222
|
+
- - ">="
|
223
|
+
- !ruby/object:Gem::Version
|
224
|
+
version: '0'
|
225
|
+
requirements: []
|
226
|
+
rubyforge_project:
|
227
|
+
rubygems_version: 2.5.2
|
228
|
+
signing_key:
|
229
|
+
specification_version: 4
|
230
|
+
summary: Provides JSON API-compliant Controller integration
|
231
|
+
test_files:
|
232
|
+
- spec/dummy/app/assets/javascripts/application.js
|
233
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
234
|
+
- spec/dummy/app/controllers/application_controller.rb
|
235
|
+
- spec/dummy/app/helpers/application_helper.rb
|
236
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
237
|
+
- spec/dummy/bin/bundle
|
238
|
+
- spec/dummy/bin/rails
|
239
|
+
- spec/dummy/bin/rake
|
240
|
+
- spec/dummy/bin/setup
|
241
|
+
- spec/dummy/config/application.rb
|
242
|
+
- spec/dummy/config/boot.rb
|
243
|
+
- spec/dummy/config/database.yml
|
244
|
+
- spec/dummy/config/environment.rb
|
245
|
+
- spec/dummy/config/environments/development.rb
|
246
|
+
- spec/dummy/config/environments/production.rb
|
247
|
+
- spec/dummy/config/environments/test.rb
|
248
|
+
- spec/dummy/config/initializers/assets.rb
|
249
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
250
|
+
- spec/dummy/config/initializers/cookies_serializer.rb
|
251
|
+
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
252
|
+
- spec/dummy/config/initializers/inflections.rb
|
253
|
+
- spec/dummy/config/initializers/mime_types.rb
|
254
|
+
- spec/dummy/config/initializers/session_store.rb
|
255
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
256
|
+
- spec/dummy/config/locales/en.yml
|
257
|
+
- spec/dummy/config/routes.rb
|
258
|
+
- spec/dummy/config/secrets.yml
|
259
|
+
- spec/dummy/config.ru
|
260
|
+
- spec/dummy/log/test.log
|
261
|
+
- spec/dummy/public/404.html
|
262
|
+
- spec/dummy/public/422.html
|
263
|
+
- spec/dummy/public/500.html
|
264
|
+
- spec/dummy/public/favicon.ico
|
265
|
+
- spec/dummy/Rakefile
|
266
|
+
- spec/dummy/README.rdoc
|
267
|
+
- spec/example_spec.rb
|
268
|
+
- spec/fixtures/active_record.rb
|
269
|
+
- spec/fun_with_json_api/controller_methods_spec.rb
|
270
|
+
- spec/fun_with_json_api/deserializer_class_methods_spec.rb
|
271
|
+
- spec/fun_with_json_api/deserializer_spec.rb
|
272
|
+
- spec/fun_with_json_api/exception_spec.rb
|
273
|
+
- spec/fun_with_json_api/pre_deserializer_spec.rb
|
274
|
+
- spec/fun_with_json_api_spec.rb
|
275
|
+
- spec/spec_helper.rb
|