grape-entity 0.6.0 → 0.10.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +5 -5
  2. data/.coveralls.yml +1 -0
  3. data/.github/dependabot.yml +14 -0
  4. data/.github/workflows/rubocop.yml +26 -0
  5. data/.github/workflows/ruby.yml +26 -0
  6. data/.gitignore +5 -1
  7. data/.rspec +2 -1
  8. data/.rubocop.yml +82 -2
  9. data/.rubocop_todo.yml +16 -33
  10. data/CHANGELOG.md +120 -0
  11. data/Dangerfile +2 -0
  12. data/Gemfile +8 -8
  13. data/Guardfile +4 -2
  14. data/README.md +168 -7
  15. data/Rakefile +2 -2
  16. data/UPGRADING.md +19 -2
  17. data/bench/serializing.rb +7 -0
  18. data/grape-entity.gemspec +10 -8
  19. data/lib/grape-entity.rb +2 -0
  20. data/lib/grape_entity/condition/base.rb +3 -1
  21. data/lib/grape_entity/condition/block_condition.rb +3 -1
  22. data/lib/grape_entity/condition/hash_condition.rb +2 -0
  23. data/lib/grape_entity/condition/symbol_condition.rb +2 -0
  24. data/lib/grape_entity/condition.rb +20 -11
  25. data/lib/grape_entity/delegator/base.rb +7 -0
  26. data/lib/grape_entity/delegator/fetchable_object.rb +2 -0
  27. data/lib/grape_entity/delegator/hash_object.rb +4 -2
  28. data/lib/grape_entity/delegator/openstruct_object.rb +2 -0
  29. data/lib/grape_entity/delegator/plain_object.rb +2 -0
  30. data/lib/grape_entity/delegator.rb +14 -9
  31. data/lib/grape_entity/deprecated.rb +13 -0
  32. data/lib/grape_entity/entity.rb +115 -38
  33. data/lib/grape_entity/exposure/base.rb +27 -11
  34. data/lib/grape_entity/exposure/block_exposure.rb +2 -0
  35. data/lib/grape_entity/exposure/delegator_exposure.rb +2 -0
  36. data/lib/grape_entity/exposure/formatter_block_exposure.rb +2 -0
  37. data/lib/grape_entity/exposure/formatter_exposure.rb +2 -0
  38. data/lib/grape_entity/exposure/nesting_exposure/nested_exposures.rb +27 -15
  39. data/lib/grape_entity/exposure/nesting_exposure/output_builder.rb +8 -2
  40. data/lib/grape_entity/exposure/nesting_exposure.rb +36 -30
  41. data/lib/grape_entity/exposure/represent_exposure.rb +3 -1
  42. data/lib/grape_entity/exposure.rb +69 -41
  43. data/lib/grape_entity/options.rb +44 -58
  44. data/lib/grape_entity/version.rb +3 -1
  45. data/lib/grape_entity.rb +3 -0
  46. data/spec/grape_entity/entity_spec.rb +405 -48
  47. data/spec/grape_entity/exposure/nesting_exposure/nested_exposures_spec.rb +6 -4
  48. data/spec/grape_entity/exposure/represent_exposure_spec.rb +5 -3
  49. data/spec/grape_entity/exposure_spec.rb +14 -2
  50. data/spec/grape_entity/hash_spec.rb +52 -1
  51. data/spec/grape_entity/options_spec.rb +66 -0
  52. data/spec/spec_helper.rb +17 -0
  53. metadata +35 -45
  54. data/.travis.yml +0 -26
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 230adb183db517d87581a13ad117183b6ed035a0
4
- data.tar.gz: 9a7b29b6b1418f08367304c0413ebcf7a15945cf
2
+ SHA256:
3
+ metadata.gz: 9e3db71fd839585d80faac0980ec028b1204def600b6ce36101e2986e0be3cbf
4
+ data.tar.gz: 7bfcb78548991ed3ab73bfc1f23a51e1e32c2af7ccba472e87b9a767a9499c79
5
5
  SHA512:
6
- metadata.gz: 7c09517473a2401944335070e9d9d9f48ef32358c47b936627d8997f18bcefe08692d64d8e6caa88b1e4fbc4e914c5e26a7b4af76eec2e5525fe27434395b98b
7
- data.tar.gz: 034ba7079bc7dc1e5d1a42d011d92130ea83cef5f673137c1e4622eace4c614fdf4f695bb7614bd2c576df4369990af79c6f14423ef9c03129182810fb9ff0fa
6
+ metadata.gz: 1ba1bf0a642f56275e8279b34d433591a21c7849ede46d0718fd6496831d4f5b5bd676bda0af6bf435beebe5c717ace6c0b53c1c90db92fdecccb8d88cdbe044
7
+ data.tar.gz: c06a650f7c29dd918fa8b83ab62dd04b91448bcddc440a43e48d055f5499982b6c4532f18abc7429f71f464895b083f8e551748c9d9fdf0f8072c2cd1af0e438
data/.coveralls.yml ADDED
@@ -0,0 +1 @@
1
+ service_name: travis-ci
@@ -0,0 +1,14 @@
1
+ # To get started with Dependabot version updates, you'll need to specify which
2
+ # package ecosystems to update and where the package manifests are located.
3
+ # Please see the documentation for all configuration options:
4
+ # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5
+
6
+ version: 2
7
+ updates:
8
+ - package-ecosystem: "bundler" # See documentation for possible values
9
+ directory: "/" # Location of package manifests
10
+ schedule:
11
+ interval: "weekly"
12
+ day: "friday"
13
+ assignees:
14
+ - "LeFnord"
@@ -0,0 +1,26 @@
1
+ name: Rubocop
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - '*'
7
+ pull_request:
8
+ branches:
9
+ - '*'
10
+
11
+ jobs:
12
+ rubocop:
13
+ name: Rubocop
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v2
17
+ - uses: actions/setup-ruby@v1
18
+ with:
19
+ ruby-version: '3.0'
20
+ - run: gem install rubocop --no-doc
21
+ - run: rubocop --format progress --format json --out rubocop.json
22
+ id: rubocop
23
+ - uses: duderman/rubocop-annotate-action@v0.1.0
24
+ with:
25
+ path: rubocop.json
26
+ if: ${{ failure() }}
@@ -0,0 +1,26 @@
1
+ name: Ruby
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - '*'
7
+ pull_request:
8
+ branches:
9
+ - '*'
10
+
11
+ jobs:
12
+ spec:
13
+ runs-on: ubuntu-latest
14
+ strategy:
15
+ matrix:
16
+ ruby-version: ['2.6', '2.7', '3.0', head, jruby, truffleruby]
17
+
18
+ steps:
19
+ - uses: actions/checkout@v2
20
+ - name: Set up Ruby
21
+ uses: ruby/setup-ruby@v1
22
+ with:
23
+ ruby-version: ${{ matrix.ruby-version }}
24
+ bundler-cache: true
25
+ - name: Run rspec
26
+ run: bundle exec rspec
data/.gitignore CHANGED
@@ -31,9 +31,13 @@ pkg
31
31
  dist
32
32
  Gemfile.lock
33
33
  tmp
34
+ coverage/
35
+ .byebug_history
36
+ .ruby-version
37
+ .ruby-gemset
34
38
 
35
39
  ## Rubinius
36
40
  .rbx
37
41
 
38
42
  ## PROJECT::SPECIFIC
39
- .project
43
+ .project
data/.rspec CHANGED
@@ -1,2 +1,3 @@
1
1
  --color
2
- --format=progress
2
+ --profile
3
+ --format documentation
data/.rubocop.yml CHANGED
@@ -1,6 +1,86 @@
1
+ inherit_from: .rubocop_todo.yml
2
+
1
3
  AllCops:
2
4
  Exclude:
3
5
  - vendor/**/*
4
- - Guardfile
6
+ - example/**/*
7
+ NewCops: enable
8
+ TargetRubyVersion: 3.0
9
+ SuggestExtensions: false
5
10
 
6
- inherit_from: .rubocop_todo.yml
11
+ # Layout stuff
12
+ #
13
+ Layout/EmptyLinesAroundArguments:
14
+ Enabled: false
15
+
16
+ Layout/EmptyLinesAroundAttributeAccessor:
17
+ Enabled: true
18
+
19
+ Layout/FirstHashElementIndentation:
20
+ EnforcedStyle: consistent
21
+
22
+ Layout/LineLength:
23
+ Max: 120
24
+ Exclude:
25
+ - spec/**/*
26
+
27
+ Layout/SpaceAroundMethodCallOperator:
28
+ Enabled: true
29
+
30
+ # Lint stuff
31
+ #
32
+ Lint/ConstantDefinitionInBlock:
33
+ Enabled: true
34
+ Exclude:
35
+ - spec/**/*
36
+
37
+ # Metrics stuff
38
+ #
39
+ Metrics/AbcSize:
40
+ Max: 25
41
+ IgnoredMethods:
42
+ # from lib/grape_entity/exposure/nesting_exposure.rb
43
+ - 'normalized_exposures'
44
+
45
+ Metrics/BlockLength:
46
+ Exclude:
47
+ - spec/**/*
48
+
49
+ Metrics/CyclomaticComplexity:
50
+ Max: 13
51
+
52
+ Metrics/ClassLength:
53
+ Max: 300
54
+
55
+ Metrics/MethodLength:
56
+ Max: 26
57
+ Exclude:
58
+ - spec/**/*
59
+
60
+ Metrics/PerceivedComplexity:
61
+ Max: 11
62
+ IgnoredMethods:
63
+ # from lib/grape_entity/entity.rb
64
+ - 'expose'
65
+ - 'merge_options'
66
+ # from lib/grape_entity/exposure/nesting_exposure.rb
67
+ - 'normalized_exposures'
68
+
69
+ # Naming stuff
70
+ #
71
+
72
+ Naming:
73
+ Enabled: false
74
+
75
+ # Style stuff
76
+ #
77
+ Style/Documentation:
78
+ Enabled: false
79
+
80
+ Style/OptionalBooleanParameter:
81
+ AllowedMethods:
82
+ # from lib/grape_entity/condition/base.rb
83
+ - 'initialize'
84
+ # form lib/grape_entity/entity.rb
85
+ - 'entity_class'
86
+ - 'present_collection'
data/.rubocop_todo.yml CHANGED
@@ -1,45 +1,28 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2016-11-20 10:04:42 -0500 using RuboCop version 0.45.0.
3
+ # on 2020-11-07 00:01:40 UTC using RuboCop version 1.2.0.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
- # Offense count: 6
10
- Metrics/AbcSize:
11
- Max: 32
12
-
13
- # Offense count: 2
14
- # Configuration parameters: CountComments.
15
- Metrics/ClassLength:
16
- Max: 206
17
-
18
- # Offense count: 3
19
- Metrics/CyclomaticComplexity:
20
- Max: 11
21
-
22
- # Offense count: 237
23
- # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives.
24
- # URISchemes: http, https
25
- Metrics/LineLength:
26
- Max: 146
9
+ # Offense count: 1
10
+ # Configuration parameters: Include.
11
+ # Include: **/*.gemspec
12
+ Gemspec/RequiredRubyVersion:
13
+ Exclude:
14
+ - 'grape-entity.gemspec'
27
15
 
28
16
  # Offense count: 6
29
- # Configuration parameters: CountComments.
30
- Metrics/MethodLength:
31
- Max: 28
32
-
33
- # Offense count: 2
34
- Metrics/PerceivedComplexity:
35
- Max: 13
36
-
37
- # Offense count: 33
38
- Style/Documentation:
39
- Enabled: false
17
+ # Cop supports --auto-correct.
18
+ Lint/BooleanSymbol:
19
+ Exclude:
20
+ - 'spec/grape_entity/exposure_spec.rb'
40
21
 
41
22
  # Offense count: 1
42
- # Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts.
43
- Style/FileName:
23
+ # Cop supports --auto-correct.
24
+ # Configuration parameters: IgnoredMethods.
25
+ # IgnoredMethods: respond_to, define_method
26
+ Style/SymbolProc:
44
27
  Exclude:
45
- - 'lib/grape-entity.rb'
28
+ - 'spec/grape_entity/entity_spec.rb'
data/CHANGELOG.md CHANGED
@@ -1,3 +1,108 @@
1
+ ### Next
2
+
3
+ #### Features
4
+
5
+ * Your contribution here.
6
+
7
+ #### Fixes
8
+
9
+ * Your contribution here.
10
+
11
+
12
+ ### 0.10.1 (2021-10-22)
13
+
14
+ #### Fixes
15
+
16
+ * [#359](https://github.com/ruby-grape/grape-entity/pull/359): Respect `hash_access` setting when using `expose_nil: false` option - [@magni-](https://github.com/magni-).
17
+
18
+
19
+ ### 0.10.0 (2021-09-15)
20
+
21
+ #### Features
22
+
23
+ * [#352](https://github.com/ruby-grape/grape-entity/pull/352): Add Default value option - [@ahmednaguib](https://github.com/ahmednaguib).
24
+
25
+ #### Fixes
26
+
27
+ * [#355](https://github.com/ruby-grape/grape-entity/pull/355): Fix infinite loop problem with the `NameErrors` in block exposures - [@meinac](https://github.com/meinac).
28
+
29
+
30
+ ### 0.9.0 (2021-03-20)
31
+
32
+ #### Features
33
+
34
+ * [#346](https://github.com/ruby-grape/grape-entity/pull/346): Ruby 3 support - [@LeFnord](https://github.com/LeFnord).
35
+
36
+
37
+ ### 0.8.2 (2020-11-08)
38
+
39
+ #### Fixes
40
+
41
+ * [#340](https://github.com/ruby-grape/grape-entity/pull/340): Preparations for 3.0 - [@LeFnord](https://github.com/LeFnord).
42
+ * [#338](https://github.com/ruby-grape/grape-entity/pull/338): Fix ruby 2.7 deprecation warning - [@begotten63](https://github.com/begotten63).
43
+
44
+
45
+ ### 0.8.1 (2020-07-15)
46
+
47
+ #### Fixes
48
+
49
+ * [#336](https://github.com/ruby-grape/grape-entity/pull/336): Pass options to delegators when they accept it - [@dnesteryuk](https://github.com/dnesteryuk).
50
+ * [#333](https://github.com/ruby-grape/grape-entity/pull/333): Fix typo in CHANGELOG.md - [@eitoball](https://github.com/eitoball).
51
+
52
+
53
+ ### 0.8.0 (2020-02-18)
54
+
55
+ #### Features
56
+
57
+ * [#307](https://github.com/ruby-grape/grape-entity/pull/307): Allow exposures to call methods defined in modules included in an entity - [@robertoz-01](https://github.com/robertoz-01).
58
+ * [#319](https://github.com/ruby-grape/grape-entity/pull/319): Support hashes with string keys - [@mhenrixon](https://github.com/mhenrixon).
59
+ * [#300](https://github.com/ruby-grape/grape-entity/pull/300): Loosens activesupport to 3 - [@ericschultz](https://github.com/ericschultz).
60
+
61
+ #### Fixes
62
+
63
+ * [#330](https://github.com/ruby-grape/grape-entity/pull/330): CI: use Ruby 2.5.7, 2.6.5, 2.7.0 - [@budnik](https://github.com/budnik).
64
+ * [#329](https://github.com/ruby-grape/grape-entity/pull/329): Option expose_nil doesn't work when block is passed - [@serbiant](https://github.com/serbiant).
65
+ * [#320](https://github.com/ruby-grape/grape-entity/pull/320): Gemspec: drop eol'd property rubyforge_project - [@olleolleolle](https://github.com/olleolleolle).
66
+ * [#307](https://github.com/ruby-grape/grape-entity/pull/307): Allow exposures to call methods defined in modules included in an entity - [@robertoz-01](https://github.com/robertoz-01).
67
+
68
+
69
+ ### 0.7.1 (2018-01-30)
70
+
71
+ #### Features
72
+
73
+ * [#297](https://github.com/ruby-grape/grape-entity/pull/297): Introduce `override` option for expose (fixes [#286](https://github.com/ruby-grape/grape-entity/issues/296)) - [@DmitryTsepelev](https://github.com/DmitryTsepelev).
74
+
75
+
76
+ ### 0.7.0 (2018-01-25)
77
+
78
+ #### Features
79
+
80
+ * [#287](https://github.com/ruby-grape/grape-entity/pull/287): Adds ruby 2.5, drops ruby 2.2 support - [@LeFnord](https://github.com/LeFnord).
81
+ * [#277](https://github.com/ruby-grape/grape-entity/pull/277): Provide grape::entity::options#dig - [@kachick](https://github.com/kachick).
82
+ * [#265](https://github.com/ruby-grape/grape-entity/pull/265): Adds ability to provide a proc to as: - [@james2m](https://github.com/james2m).
83
+ * [#264](https://github.com/ruby-grape/grape-entity/pull/264): Adds Rubocop config and todo list - [@james2m](https://github.com/james2m).
84
+ * [#255](https://github.com/ruby-grape/grape-entity/pull/255): Adds code coverage w/ coveralls - [@LeFnord](https://github.com/LeFnord).
85
+ * [#268](https://github.com/ruby-grape/grape-entity/pull/268): Loosens the version dependency for activesupport - [@anakinj](https://github.com/anakinj).
86
+ * [#293](https://github.com/ruby-grape/grape-entity/pull/293): Adds expose_nil option - [@b-boogaard](https://github.com/b-boogaard).
87
+
88
+ #### Fixes
89
+
90
+ * [#288](https://github.com/ruby-grape/grape-entity/pull/288): Fix wrong argument exception when `&:block` passed to the expose method - [@DmitryTsepelev](https://github.com/DmitryTsepelev).
91
+ * [#291](https://github.com/ruby-grape/grape-entity/pull/291): Refactor and simplify various classes and modules - [@DmitryTsepelev](https://github.com/DmitryTsepelev).
92
+ * [#292](https://github.com/ruby-grape/grape-entity/pull/292): Allow replace non-conditional non-nesting exposures in child classes (fixes [#286](https://github.com/ruby-grape/grape-entity/issues/286)) - [@DmitryTsepelev](https://github.com/DmitryTsepelev).
93
+
94
+
95
+ ### 0.6.1 (2017-01-09)
96
+
97
+ #### Features
98
+
99
+ * [#253](https://github.com/ruby-grape/grape-entity/pull/253): Adds ruby 2.4.0 support, updates dependencies - [@LeFnord](https://github.com/LeFnord).
100
+
101
+ #### Fixes
102
+
103
+ * [#251](https://github.com/ruby-grape/grape-entity/pull/251): Avoid noise when code runs with Ruby warnings - [@cpetschnig](https://github.com/cpetschnig).
104
+
105
+
1
106
  ### 0.6.0 (2016-11-20)
2
107
 
3
108
  #### Features
@@ -9,6 +114,7 @@
9
114
  * [#249](https://github.com/ruby-grape/grape-entity/issues/249): Fix leaking of options and internals in default serialization - [@dblock](https://github.com/dblock), [@KingsleyKelly](https://github.com/KingsleyKelly).
10
115
  * [#248](https://github.com/ruby-grape/grape-entity/pull/248): Fix `nil` values causing errors when `merge` option passed - [@arempe93](https://github.com/arempe93).
11
116
 
117
+
12
118
  ### 0.5.2 (2016-11-14)
13
119
 
14
120
  #### Features
@@ -24,6 +130,7 @@
24
130
  * [#219](https://github.com/ruby-grape/grape-entity/pull/219): Double pass options in `serializable_hash` - [@sbatykov](https://github.com/sbatykov).
25
131
  * [#231](https://github.com/ruby-grape/grape-entity/pull/231), [#215](https://github.com/ruby-grape/grape-entity/issues/215): Allow `delegate_attribute` for derived entity - [@sbatykov](https://github.com/sbatykov).
26
132
 
133
+
27
134
  ### 0.5.1 (2016-4-4)
28
135
 
29
136
  #### Features
@@ -35,6 +142,7 @@
35
142
 
36
143
  * [#202](https://github.com/ruby-grape/grape-entity/pull/202): Reset `@using_class` memoization on `.setup` - [@rngtng](https://github.com/rngtng).
37
144
 
145
+
38
146
  ### 0.5.0 (2015-12-07)
39
147
 
40
148
  #### Features
@@ -55,18 +163,21 @@
55
163
  * [#151](https://github.com/ruby-grape/grape-entity/pull/151): Serializing of deeply nested presenter exposures: [#155](https://github.com/ruby-grape/grape-entity/issues/155) - [@marshall-lee](https://github.com/marshall-lee).
56
164
  * [#151](https://github.com/ruby-grape/grape-entity/pull/151): Deep projections (`:only`, `:except`) were unaware of nesting: [#156](https://github.com/ruby-grape/grape-entity/issues/156) - [@marshall-lee](https://github.com/marshall-lee).
57
165
 
166
+
58
167
  ### 0.4.8 (2015-08-10)
59
168
 
60
169
  #### Features
61
170
 
62
171
  * [#167](https://github.com/ruby-grape/grape-entity/pull/167), [#166](https://github.com/ruby-grape/grape-entity/issues/166): Regression with global settings (exposures, formatters) on `Grape::Entity` - [@marshall-lee](https://github.com/marshall-lee).
63
172
 
173
+
64
174
  ### 0.4.7 (2015-08-03)
65
175
 
66
176
  #### Features
67
177
 
68
178
  * [#164](https://github.com/ruby-grape/grape-entity/pull/164): Regression: entity instance methods were exposed with `NoMethodError`: [#163](https://github.com/ruby-grape/grape-entity/issues/163) - [@marshall-lee](https://github.com/marshall-lee).
69
179
 
180
+
70
181
  ### 0.4.6 (2015-07-27)
71
182
 
72
183
  #### Features
@@ -85,6 +196,7 @@
85
196
 
86
197
  * [#147](https://github.com/ruby-grape/grape-entity/pull/147), [#142](https://github.com/ruby-grape/grape-entity/pull/142): Private method values were not exposed with `safe` option - [@marshall-lee](https://github.com/marshall-lee).
87
198
 
199
+
88
200
  ### 0.4.5 (2015-03-10)
89
201
 
90
202
  #### Features
@@ -99,6 +211,7 @@
99
211
  * [#110](https://github.com/ruby-grape/grape-entity/pull/110): Safe exposure when using `Hash` models - [@croeck](https://github.com/croeck).
100
212
  * [#91](https://github.com/ruby-grape/grape-entity/pull/91): OpenStruct serializing - [@etehtsea](https://github.com/etehtsea).
101
213
 
214
+
102
215
  ### 0.4.4 (2014-08-17)
103
216
 
104
217
  #### Features
@@ -106,6 +219,7 @@
106
219
  * [#85](https://github.com/ruby-grape/grape-entity/pull/85): Added `present_collection` to indicate that an `Entity` presents an entire Collection - [@dspaeth-faber](https://github.com/dspaeth-faber).
107
220
  * [#85](https://github.com/ruby-grape/grape-entity/pull/85): Hashes can now be passed as object to be presented and the `Hash` keys can be referenced by expose - [@dspaeth-faber](https://github.com/dspaeth-faber).
108
221
 
222
+
109
223
  ### 0.4.3 (2014-06-12)
110
224
 
111
225
  #### Features
@@ -116,6 +230,7 @@
116
230
 
117
231
  * [#77](https://github.com/ruby-grape/grape-entity/pull/77): Compatibility with Rspec 3 - [@justfalter](https://github.com/justfalter).
118
232
 
233
+
119
234
  ### 0.4.2 (2014-04-03)
120
235
 
121
236
  #### Features
@@ -123,12 +238,14 @@
123
238
  * [#60](https://github.com/ruby-grape/grape-entity/issues/59): Performance issues introduced by nested exposures - [@AlexYankee](https://github.com/AlexYankee).
124
239
  * [#60](https://github.com/ruby-grape/grape-entity/issues/57): Nested exposure double-exposes a field - [@AlexYankee](https://github.com/AlexYankee).
125
240
 
241
+
126
242
  ### 0.4.1 (2014-02-13)
127
243
 
128
244
  #### Fixes
129
245
 
130
246
  * [#54](https://github.com/ruby-grape/grape-entity/issues/54): Fix: undefined method `to_set` - [@aj0strow](https://github.com/aj0strow).
131
247
 
248
+
132
249
  ### 0.4.0 (2014-01-27)
133
250
 
134
251
  #### Features
@@ -148,6 +265,7 @@
148
265
  * [#51](https://github.com/ruby-grape/grape-entity/pull/51): Raise `ArgumentError` if an unknown option is used with `expose` - [@aj0strow](https://github.com/aj0strow).
149
266
  * [#51](https://github.com/ruby-grape/grape-entity/pull/51): Alias `:with` to `:using`, consistently with the Grape api endpoints - [@aj0strow](https://github.com/aj0strow).
150
267
 
268
+
151
269
  ### 0.3.0 (2013-03-29)
152
270
 
153
271
  #### Features
@@ -156,12 +274,14 @@
156
274
  * The `instance.entity` method now optionally accepts `options` - [@mbleigh](https://github.com/mbleigh).
157
275
  * You can pass symbols to `:if` and `:unless` to simply check for truthiness/falsiness of the specified options key - [@mbleigh](https://github.com/mbleigh).
158
276
 
277
+
159
278
  ### 0.2.0 (2013-01-11)
160
279
 
161
280
  #### Features
162
281
 
163
282
  * Moved the namespace back to `Grape::Entity` to preserve compatibility with Grape - [@dblock](https://github.com/dblock).
164
283
 
284
+
165
285
  ### 0.1.0 (2013-01-11)
166
286
 
167
287
  * Initial public release - [@agileanimal](https://github.com/agileanimal).
data/Dangerfile CHANGED
@@ -1 +1,3 @@
1
+ # frozen_string_literal: true
2
+
1
3
  danger.import_dangerfile(gem: 'ruby-grape-danger')
data/Gemfile CHANGED
@@ -1,20 +1,20 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'http://rubygems.org'
2
4
 
3
5
  gemspec
4
6
 
5
- if RUBY_VERSION < '2.2.2'
6
- gem 'rack', '<2.0.0'
7
- gem 'activesupport', '<5.0.0'
8
- end
9
-
10
7
  group :development, :test do
11
- gem 'ruby-grape-danger', '~> 0.1.0', require: false
8
+ gem 'rubocop', '~> 1.0', require: false
12
9
  end
13
10
 
14
11
  group :test do
12
+ gem 'coveralls_reborn', require: false
13
+ gem 'growl'
15
14
  gem 'guard'
16
- gem 'guard-rspec'
17
15
  gem 'guard-bundler'
16
+ gem 'guard-rspec'
18
17
  gem 'rb-fsevent'
19
- gem 'growl'
18
+ gem 'ruby-grape-danger', '~> 0.2', require: false
19
+ gem 'simplecov', require: false
20
20
  end
data/Guardfile CHANGED
@@ -1,11 +1,13 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # A sample Guardfile
2
4
  # More info at https://github.com/guard/guard#readme
3
5
 
4
6
  guard 'rspec', version: 2 do
5
7
  watch(%r{^spec/.+_spec\.rb$})
6
- watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
8
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
7
9
  watch(%r{^spec/support/shared_versioning_examples.rb$}) { |_m| 'spec/' }
8
- watch('spec/spec_helper.rb') { 'spec/' }
10
+ watch('spec/spec_helper.rb') { 'spec/' }
9
11
  end
10
12
 
11
13
  guard 'bundler' do