draper 3.0.1 → 4.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/ci.yml +55 -0
  3. data/CHANGELOG.md +41 -0
  4. data/Gemfile +11 -2
  5. data/README.md +35 -6
  6. data/bin/bundle +114 -0
  7. data/bin/rake +29 -0
  8. data/draper.gemspec +9 -8
  9. data/lib/draper/automatic_delegation.rb +4 -2
  10. data/lib/draper/collection_decorator.rb +4 -2
  11. data/lib/draper/configuration.rb +8 -0
  12. data/lib/draper/decoratable.rb +0 -1
  13. data/lib/draper/decorated_association.rb +0 -2
  14. data/lib/draper/decorator.rb +8 -6
  15. data/lib/draper/delegation.rb +1 -1
  16. data/lib/draper/finders.rb +0 -1
  17. data/lib/draper/helper_proxy.rb +2 -2
  18. data/lib/draper/lazy_helpers.rb +1 -3
  19. data/lib/draper/query_methods/load_strategy.rb +21 -0
  20. data/lib/draper/query_methods.rb +23 -0
  21. data/lib/draper/test_case.rb +3 -3
  22. data/lib/draper/undecorate.rb +1 -1
  23. data/lib/draper/version.rb +1 -1
  24. data/lib/draper/view_context/build_strategy.rb +1 -3
  25. data/lib/draper/view_helpers.rb +5 -5
  26. data/lib/draper.rb +3 -0
  27. data/spec/draper/collection_decorator_spec.rb +5 -6
  28. data/spec/draper/configuration_spec.rb +32 -8
  29. data/spec/draper/decoratable_spec.rb +1 -3
  30. data/spec/draper/decorated_association_spec.rb +0 -2
  31. data/spec/draper/decorator_spec.rb +33 -1
  32. data/spec/draper/draper_spec.rb +1 -0
  33. data/spec/draper/factory_spec.rb +0 -4
  34. data/spec/draper/query_methods/load_strategy_spec.rb +26 -0
  35. data/spec/draper/query_methods_spec.rb +70 -0
  36. data/spec/dummy/app/assets/config/manifest.js +3 -0
  37. data/spec/dummy/app/controllers/application_controller.rb +2 -0
  38. data/spec/dummy/config/environments/development.rb +2 -0
  39. data/spec/dummy/config/environments/production.rb +2 -0
  40. data/spec/dummy/config/environments/test.rb +2 -0
  41. data/spec/dummy/config/storage.yml +7 -0
  42. data/spec/generators/controller/controller_generator_spec.rb +1 -0
  43. data/spec/generators/decorator/decorator_generator_spec.rb +1 -1
  44. data/spec/integration/integration_spec.rb +1 -0
  45. data/spec/spec_helper.rb +7 -0
  46. metadata +61 -20
  47. data/.travis.yml +0 -16
metadata CHANGED
@@ -1,86 +1,100 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: draper
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 4.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Casimir
8
8
  - Steve Klabnik
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-10-12 00:00:00.000000000 Z
12
+ date: 2021-05-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - "~>"
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
20
  version: '5.0'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - "~>"
25
+ - - ">="
26
26
  - !ruby/object:Gem::Version
27
27
  version: '5.0'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: actionpack
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - "~>"
32
+ - - ">="
33
33
  - !ruby/object:Gem::Version
34
34
  version: '5.0'
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - "~>"
39
+ - - ">="
40
40
  - !ruby/object:Gem::Version
41
41
  version: '5.0'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: request_store
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - "~>"
46
+ - - ">="
47
47
  - !ruby/object:Gem::Version
48
48
  version: '1.0'
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - "~>"
53
+ - - ">="
54
54
  - !ruby/object:Gem::Version
55
55
  version: '1.0'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: activemodel
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - "~>"
60
+ - - ">="
61
61
  - !ruby/object:Gem::Version
62
62
  version: '5.0'
63
63
  type: :runtime
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - "~>"
67
+ - - ">="
68
68
  - !ruby/object:Gem::Version
69
69
  version: '5.0'
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: activemodel-serializers-xml
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - "~>"
74
+ - - ">="
75
75
  - !ruby/object:Gem::Version
76
76
  version: '1.0'
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
+ - !ruby/object:Gem::Dependency
85
+ name: ruby2_keywords
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
91
+ type: :runtime
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ version: '0'
84
98
  - !ruby/object:Gem::Dependency
85
99
  name: ammeter
86
100
  requirement: !ruby/object:Gem::Requirement
@@ -155,14 +169,14 @@ dependencies:
155
169
  name: active_model_serializers
156
170
  requirement: !ruby/object:Gem::Requirement
157
171
  requirements:
158
- - - "~>"
172
+ - - ">="
159
173
  - !ruby/object:Gem::Version
160
174
  version: '0.10'
161
175
  type: :development
162
176
  prerelease: false
163
177
  version_requirements: !ruby/object:Gem::Requirement
164
178
  requirements:
165
- - - "~>"
179
+ - - ">="
166
180
  - !ruby/object:Gem::Version
167
181
  version: '0.10'
168
182
  - !ruby/object:Gem::Dependency
@@ -179,6 +193,20 @@ dependencies:
179
193
  - - ">="
180
194
  - !ruby/object:Gem::Version
181
195
  version: '0'
196
+ - !ruby/object:Gem::Dependency
197
+ name: simplecov
198
+ requirement: !ruby/object:Gem::Requirement
199
+ requirements:
200
+ - - '='
201
+ - !ruby/object:Gem::Version
202
+ version: 0.17.1
203
+ type: :development
204
+ prerelease: false
205
+ version_requirements: !ruby/object:Gem::Requirement
206
+ requirements:
207
+ - - '='
208
+ - !ruby/object:Gem::Version
209
+ version: 0.17.1
182
210
  description: Draper adds an object-oriented layer of presentation logic to your Rails
183
211
  apps.
184
212
  email:
@@ -190,10 +218,10 @@ extra_rdoc_files: []
190
218
  files:
191
219
  - ".codeclimate.yml"
192
220
  - ".github/PULL_REQUEST_TEMPLATE.md"
221
+ - ".github/workflows/ci.yml"
193
222
  - ".gitignore"
194
223
  - ".rspec"
195
224
  - ".rubocop.yml"
196
- - ".travis.yml"
197
225
  - ".yardopts"
198
226
  - CHANGELOG.md
199
227
  - CONTRIBUTING.md
@@ -202,6 +230,8 @@ files:
202
230
  - LICENSE
203
231
  - README.md
204
232
  - Rakefile
233
+ - bin/bundle
234
+ - bin/rake
205
235
  - draper.gemspec
206
236
  - lib/draper.rb
207
237
  - lib/draper/automatic_delegation.rb
@@ -220,6 +250,8 @@ files:
220
250
  - lib/draper/helper_proxy.rb
221
251
  - lib/draper/helper_support.rb
222
252
  - lib/draper/lazy_helpers.rb
253
+ - lib/draper/query_methods.rb
254
+ - lib/draper/query_methods/load_strategy.rb
223
255
  - lib/draper/railtie.rb
224
256
  - lib/draper/tasks/test.rake
225
257
  - lib/draper/test/devise_helper.rb
@@ -255,6 +287,8 @@ files:
255
287
  - spec/draper/finders_spec.rb
256
288
  - spec/draper/helper_proxy_spec.rb
257
289
  - spec/draper/lazy_helpers_spec.rb
290
+ - spec/draper/query_methods/load_strategy_spec.rb
291
+ - spec/draper/query_methods_spec.rb
258
292
  - spec/draper/undecorate_chain_spec.rb
259
293
  - spec/draper/undecorate_spec.rb
260
294
  - spec/draper/view_context/build_strategy_spec.rb
@@ -262,6 +296,8 @@ files:
262
296
  - spec/draper/view_helpers_spec.rb
263
297
  - spec/dummy/.rspec
264
298
  - spec/dummy/Rakefile
299
+ - spec/dummy/app/assets/config/manifest.js
300
+ - spec/dummy/app/controllers/application_controller.rb
265
301
  - spec/dummy/app/controllers/base_controller.rb
266
302
  - spec/dummy/app/controllers/localized_urls.rb
267
303
  - spec/dummy/app/controllers/posts_controller.rb
@@ -299,6 +335,7 @@ files:
299
335
  - spec/dummy/config/locales/en.yml
300
336
  - spec/dummy/config/mongoid.yml
301
337
  - spec/dummy/config/routes.rb
338
+ - spec/dummy/config/storage.yml
302
339
  - spec/dummy/db/migrate/20121019115657_create_posts.rb
303
340
  - spec/dummy/db/schema.rb
304
341
  - spec/dummy/db/seeds.rb
@@ -349,7 +386,7 @@ homepage: http://github.com/drapergem/draper
349
386
  licenses:
350
387
  - MIT
351
388
  metadata: {}
352
- post_install_message:
389
+ post_install_message:
353
390
  rdoc_options: []
354
391
  require_paths:
355
392
  - lib
@@ -364,9 +401,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
364
401
  - !ruby/object:Gem::Version
365
402
  version: '0'
366
403
  requirements: []
367
- rubyforge_project:
368
- rubygems_version: 2.6.11
369
- signing_key:
404
+ rubygems_version: 3.0.8
405
+ signing_key:
370
406
  specification_version: 4
371
407
  summary: View Models for Rails
372
408
  test_files:
@@ -382,6 +418,8 @@ test_files:
382
418
  - spec/draper/finders_spec.rb
383
419
  - spec/draper/helper_proxy_spec.rb
384
420
  - spec/draper/lazy_helpers_spec.rb
421
+ - spec/draper/query_methods/load_strategy_spec.rb
422
+ - spec/draper/query_methods_spec.rb
385
423
  - spec/draper/undecorate_chain_spec.rb
386
424
  - spec/draper/undecorate_spec.rb
387
425
  - spec/draper/view_context/build_strategy_spec.rb
@@ -389,6 +427,8 @@ test_files:
389
427
  - spec/draper/view_helpers_spec.rb
390
428
  - spec/dummy/.rspec
391
429
  - spec/dummy/Rakefile
430
+ - spec/dummy/app/assets/config/manifest.js
431
+ - spec/dummy/app/controllers/application_controller.rb
392
432
  - spec/dummy/app/controllers/base_controller.rb
393
433
  - spec/dummy/app/controllers/localized_urls.rb
394
434
  - spec/dummy/app/controllers/posts_controller.rb
@@ -426,6 +466,7 @@ test_files:
426
466
  - spec/dummy/config/locales/en.yml
427
467
  - spec/dummy/config/mongoid.yml
428
468
  - spec/dummy/config/routes.rb
469
+ - spec/dummy/config/storage.yml
429
470
  - spec/dummy/db/migrate/20121019115657_create_posts.rb
430
471
  - spec/dummy/db/schema.rb
431
472
  - spec/dummy/db/seeds.rb
data/.travis.yml DELETED
@@ -1,16 +0,0 @@
1
- language: ruby
2
- sudo: false
3
- cache: bundler
4
-
5
- services:
6
- - mongodb
7
-
8
- rvm:
9
- - 2.2.7
10
- - 2.3.4
11
- - 2.4.1
12
- - ruby-head
13
-
14
- matrix:
15
- allow_failures:
16
- - rvm: ruby-head