grape-entity 0.6.1 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.coveralls.yml +1 -0
- data/.gitignore +5 -1
- data/.rubocop.yml +82 -2
- data/.rubocop_todo.yml +16 -33
- data/.travis.yml +18 -17
- data/CHANGELOG.md +75 -0
- data/Dangerfile +2 -0
- data/Gemfile +6 -1
- data/Guardfile +4 -2
- data/README.md +101 -4
- data/Rakefile +2 -2
- data/UPGRADING.md +31 -2
- data/bench/serializing.rb +7 -0
- data/grape-entity.gemspec +10 -10
- data/lib/grape-entity.rb +2 -0
- data/lib/grape_entity.rb +3 -0
- data/lib/grape_entity/condition.rb +20 -11
- data/lib/grape_entity/condition/base.rb +3 -1
- data/lib/grape_entity/condition/block_condition.rb +3 -1
- data/lib/grape_entity/condition/hash_condition.rb +2 -0
- data/lib/grape_entity/condition/symbol_condition.rb +2 -0
- data/lib/grape_entity/delegator.rb +10 -9
- data/lib/grape_entity/delegator/base.rb +2 -0
- data/lib/grape_entity/delegator/fetchable_object.rb +2 -0
- data/lib/grape_entity/delegator/hash_object.rb +4 -2
- data/lib/grape_entity/delegator/openstruct_object.rb +2 -0
- data/lib/grape_entity/delegator/plain_object.rb +2 -0
- data/lib/grape_entity/deprecated.rb +13 -0
- data/lib/grape_entity/entity.rb +115 -36
- data/lib/grape_entity/exposure.rb +64 -41
- data/lib/grape_entity/exposure/base.rb +21 -8
- data/lib/grape_entity/exposure/block_exposure.rb +2 -0
- data/lib/grape_entity/exposure/delegator_exposure.rb +2 -0
- data/lib/grape_entity/exposure/formatter_block_exposure.rb +2 -0
- data/lib/grape_entity/exposure/formatter_exposure.rb +2 -0
- data/lib/grape_entity/exposure/nesting_exposure.rb +36 -30
- data/lib/grape_entity/exposure/nesting_exposure/nested_exposures.rb +26 -15
- data/lib/grape_entity/exposure/nesting_exposure/output_builder.rb +10 -2
- data/lib/grape_entity/exposure/represent_exposure.rb +3 -1
- data/lib/grape_entity/options.rb +44 -58
- data/lib/grape_entity/version.rb +3 -1
- data/spec/grape_entity/entity_spec.rb +270 -47
- data/spec/grape_entity/exposure/nesting_exposure/nested_exposures_spec.rb +6 -4
- data/spec/grape_entity/exposure/represent_exposure_spec.rb +5 -3
- data/spec/grape_entity/exposure_spec.rb +14 -2
- data/spec/grape_entity/hash_spec.rb +38 -1
- data/spec/grape_entity/options_spec.rb +66 -0
- data/spec/spec_helper.rb +17 -0
- metadata +32 -43
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: aa38cbc30d489d88e91c10c688c581251392a448330eca12ff79ebe22958bd9c
|
4
|
+
data.tar.gz: a96f1d0ada161d659f71aaca4e44588afc2727f4966e3f46058189483d46aa0c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12f8a447cf4f297bb4c07375d08efa41e5d1691a907ccbfdc7cef8c2f394cfc03a041318f76ab2475089b5d1b7438414cd00dca6305105bf616b3c2465b1c000
|
7
|
+
data.tar.gz: 0a7c13fec63e43adb8269d0639c1e4abfef77cba02a3a7b234716588e968116e1875e94bab08f68cdec60e656b65f159d42f308342eeac6f42846a6f5aec9b27
|
data/.coveralls.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
service_name: travis-ci
|
data/.gitignore
CHANGED
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
|
-
-
|
6
|
+
- example/**/*
|
7
|
+
TargetRubyVersion: 2.7
|
8
|
+
UseCache: true
|
9
|
+
NewCops: enable
|
5
10
|
|
6
|
-
|
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
|
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:
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
Metrics/ClassLength:
|
16
|
-
Max: 208
|
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
|
-
#
|
30
|
-
|
31
|
-
|
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
|
-
#
|
43
|
-
|
23
|
+
# Cop supports --auto-correct.
|
24
|
+
# Configuration parameters: IgnoredMethods.
|
25
|
+
# IgnoredMethods: respond_to, define_method
|
26
|
+
Style/SymbolProc:
|
44
27
|
Exclude:
|
45
|
-
- '
|
28
|
+
- 'spec/grape_entity/entity_spec.rb'
|
data/.travis.yml
CHANGED
@@ -1,25 +1,26 @@
|
|
1
|
-
sudo: false
|
2
|
-
|
3
1
|
language: ruby
|
4
2
|
|
5
|
-
|
6
|
-
|
3
|
+
before_install:
|
4
|
+
- gem install bundler
|
5
|
+
|
6
|
+
after_success:
|
7
|
+
- bundle exec danger
|
8
|
+
|
9
|
+
rvm:
|
10
|
+
- 2.5.8
|
11
|
+
- 2.6.6
|
12
|
+
- 2.7.2
|
13
|
+
- ruby-head
|
14
|
+
- jruby-head
|
15
|
+
- truffleruby-head
|
16
|
+
- 2.4.10
|
17
|
+
|
7
18
|
|
8
19
|
matrix:
|
9
|
-
|
10
|
-
- rvm: 2.4.0
|
11
|
-
script:
|
12
|
-
- bundle exec danger
|
13
|
-
- rvm: 2.4.0
|
14
|
-
- rvm: 2.3.3
|
15
|
-
- rvm: 2.2.6
|
16
|
-
- rvm: ruby-head
|
17
|
-
- rvm: jruby-9.1.6.0
|
18
|
-
- rvm: jruby-head
|
19
|
-
- rvm: rbx-2
|
20
|
+
fast_finish: true
|
20
21
|
|
21
22
|
allow_failures:
|
23
|
+
- rvm: 2.4.10
|
22
24
|
- rvm: ruby-head
|
23
|
-
- rvm: jruby-9.1.6.0
|
24
25
|
- rvm: jruby-head
|
25
|
-
- rvm:
|
26
|
+
- rvm: truffleruby-head
|
data/CHANGELOG.md
CHANGED
@@ -8,6 +8,65 @@
|
|
8
8
|
|
9
9
|
* Your contribution here.
|
10
10
|
|
11
|
+
|
12
|
+
### 0.8.2 (2020-11-08)
|
13
|
+
|
14
|
+
#### Fixes
|
15
|
+
|
16
|
+
* [#340](https://github.com/ruby-grape/grape-entity/pull/340): Preparations for 3.0 - [@LeFnord](https://github.com/LeFnord).
|
17
|
+
* [#338](https://github.com/ruby-grape/grape-entity/pull/338): Fix ruby 2.7 deprecation warning - [@begotten63](https://github.com/begotten63).
|
18
|
+
|
19
|
+
|
20
|
+
### 0.8.1 (2020-07-15)
|
21
|
+
|
22
|
+
#### Fixes
|
23
|
+
|
24
|
+
* [#336](https://github.com/ruby-grape/grape-entity/pull/336): Pass options to delegators when they accept it - [@dnesteryuk](https://github.com/dnesteryuk).
|
25
|
+
* [#333](https://github.com/ruby-grape/grape-entity/pull/333): Fix typo in CHANGELOG.md - [@eitoball](https://github.com/eitoball).
|
26
|
+
|
27
|
+
|
28
|
+
### 0.8.0 (2020-02-18)
|
29
|
+
|
30
|
+
#### Features
|
31
|
+
|
32
|
+
* [#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).
|
33
|
+
* [#319](https://github.com/ruby-grape/grape-entity/pull/319): Support hashes with string keys - [@mhenrixon](https://github.com/mhenrixon).
|
34
|
+
* [#300](https://github.com/ruby-grape/grape-entity/pull/300): Loosens activesupport to 3 - [@ericschultz](https://github.com/ericschultz).
|
35
|
+
|
36
|
+
#### Fixes
|
37
|
+
|
38
|
+
* [#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).
|
39
|
+
* [#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).
|
40
|
+
* [#320](https://github.com/ruby-grape/grape-entity/pull/320): Gemspec: drop eol'd property rubyforge_project - [@olleolleolle](https://github.com/olleolleolle).
|
41
|
+
* [#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).
|
42
|
+
|
43
|
+
|
44
|
+
### 0.7.1 (2018-01-30)
|
45
|
+
|
46
|
+
#### Features
|
47
|
+
|
48
|
+
* [#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).
|
49
|
+
|
50
|
+
|
51
|
+
### 0.7.0 (2018-01-25)
|
52
|
+
|
53
|
+
#### Features
|
54
|
+
|
55
|
+
* [#287](https://github.com/ruby-grape/grape-entity/pull/287): Adds ruby 2.5, drops ruby 2.2 support - [@LeFnord](https://github.com/LeFnord).
|
56
|
+
* [#277](https://github.com/ruby-grape/grape-entity/pull/277): Provide grape::entity::options#dig - [@kachick](https://github.com/kachick).
|
57
|
+
* [#265](https://github.com/ruby-grape/grape-entity/pull/265): Adds ability to provide a proc to as: - [@james2m](https://github.com/james2m).
|
58
|
+
* [#264](https://github.com/ruby-grape/grape-entity/pull/264): Adds Rubocop config and todo list - [@james2m](https://github.com/james2m).
|
59
|
+
* [#255](https://github.com/ruby-grape/grape-entity/pull/255): Adds code coverage w/ coveralls - [@LeFnord](https://github.com/LeFnord).
|
60
|
+
* [#268](https://github.com/ruby-grape/grape-entity/pull/268): Loosens the version dependency for activesupport - [@anakinj](https://github.com/anakinj).
|
61
|
+
* [#293](https://github.com/ruby-grape/grape-entity/pull/293): Adds expose_nil option - [@b-boogaard](https://github.com/b-boogaard).
|
62
|
+
|
63
|
+
#### Fixes
|
64
|
+
|
65
|
+
* [#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).
|
66
|
+
* [#291](https://github.com/ruby-grape/grape-entity/pull/291): Refactor and simplify various classes and modules - [@DmitryTsepelev](https://github.com/DmitryTsepelev).
|
67
|
+
* [#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).
|
68
|
+
|
69
|
+
|
11
70
|
### 0.6.1 (2017-01-09)
|
12
71
|
|
13
72
|
#### Features
|
@@ -18,6 +77,7 @@
|
|
18
77
|
|
19
78
|
* [#251](https://github.com/ruby-grape/grape-entity/pull/251): Avoid noise when code runs with Ruby warnings - [@cpetschnig](https://github.com/cpetschnig).
|
20
79
|
|
80
|
+
|
21
81
|
### 0.6.0 (2016-11-20)
|
22
82
|
|
23
83
|
#### Features
|
@@ -29,6 +89,7 @@
|
|
29
89
|
* [#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).
|
30
90
|
* [#248](https://github.com/ruby-grape/grape-entity/pull/248): Fix `nil` values causing errors when `merge` option passed - [@arempe93](https://github.com/arempe93).
|
31
91
|
|
92
|
+
|
32
93
|
### 0.5.2 (2016-11-14)
|
33
94
|
|
34
95
|
#### Features
|
@@ -44,6 +105,7 @@
|
|
44
105
|
* [#219](https://github.com/ruby-grape/grape-entity/pull/219): Double pass options in `serializable_hash` - [@sbatykov](https://github.com/sbatykov).
|
45
106
|
* [#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).
|
46
107
|
|
108
|
+
|
47
109
|
### 0.5.1 (2016-4-4)
|
48
110
|
|
49
111
|
#### Features
|
@@ -55,6 +117,7 @@
|
|
55
117
|
|
56
118
|
* [#202](https://github.com/ruby-grape/grape-entity/pull/202): Reset `@using_class` memoization on `.setup` - [@rngtng](https://github.com/rngtng).
|
57
119
|
|
120
|
+
|
58
121
|
### 0.5.0 (2015-12-07)
|
59
122
|
|
60
123
|
#### Features
|
@@ -75,18 +138,21 @@
|
|
75
138
|
* [#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).
|
76
139
|
* [#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).
|
77
140
|
|
141
|
+
|
78
142
|
### 0.4.8 (2015-08-10)
|
79
143
|
|
80
144
|
#### Features
|
81
145
|
|
82
146
|
* [#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).
|
83
147
|
|
148
|
+
|
84
149
|
### 0.4.7 (2015-08-03)
|
85
150
|
|
86
151
|
#### Features
|
87
152
|
|
88
153
|
* [#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).
|
89
154
|
|
155
|
+
|
90
156
|
### 0.4.6 (2015-07-27)
|
91
157
|
|
92
158
|
#### Features
|
@@ -105,6 +171,7 @@
|
|
105
171
|
|
106
172
|
* [#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).
|
107
173
|
|
174
|
+
|
108
175
|
### 0.4.5 (2015-03-10)
|
109
176
|
|
110
177
|
#### Features
|
@@ -119,6 +186,7 @@
|
|
119
186
|
* [#110](https://github.com/ruby-grape/grape-entity/pull/110): Safe exposure when using `Hash` models - [@croeck](https://github.com/croeck).
|
120
187
|
* [#91](https://github.com/ruby-grape/grape-entity/pull/91): OpenStruct serializing - [@etehtsea](https://github.com/etehtsea).
|
121
188
|
|
189
|
+
|
122
190
|
### 0.4.4 (2014-08-17)
|
123
191
|
|
124
192
|
#### Features
|
@@ -126,6 +194,7 @@
|
|
126
194
|
* [#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).
|
127
195
|
* [#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).
|
128
196
|
|
197
|
+
|
129
198
|
### 0.4.3 (2014-06-12)
|
130
199
|
|
131
200
|
#### Features
|
@@ -136,6 +205,7 @@
|
|
136
205
|
|
137
206
|
* [#77](https://github.com/ruby-grape/grape-entity/pull/77): Compatibility with Rspec 3 - [@justfalter](https://github.com/justfalter).
|
138
207
|
|
208
|
+
|
139
209
|
### 0.4.2 (2014-04-03)
|
140
210
|
|
141
211
|
#### Features
|
@@ -143,12 +213,14 @@
|
|
143
213
|
* [#60](https://github.com/ruby-grape/grape-entity/issues/59): Performance issues introduced by nested exposures - [@AlexYankee](https://github.com/AlexYankee).
|
144
214
|
* [#60](https://github.com/ruby-grape/grape-entity/issues/57): Nested exposure double-exposes a field - [@AlexYankee](https://github.com/AlexYankee).
|
145
215
|
|
216
|
+
|
146
217
|
### 0.4.1 (2014-02-13)
|
147
218
|
|
148
219
|
#### Fixes
|
149
220
|
|
150
221
|
* [#54](https://github.com/ruby-grape/grape-entity/issues/54): Fix: undefined method `to_set` - [@aj0strow](https://github.com/aj0strow).
|
151
222
|
|
223
|
+
|
152
224
|
### 0.4.0 (2014-01-27)
|
153
225
|
|
154
226
|
#### Features
|
@@ -168,6 +240,7 @@
|
|
168
240
|
* [#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).
|
169
241
|
* [#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).
|
170
242
|
|
243
|
+
|
171
244
|
### 0.3.0 (2013-03-29)
|
172
245
|
|
173
246
|
#### Features
|
@@ -176,12 +249,14 @@
|
|
176
249
|
* The `instance.entity` method now optionally accepts `options` - [@mbleigh](https://github.com/mbleigh).
|
177
250
|
* You can pass symbols to `:if` and `:unless` to simply check for truthiness/falsiness of the specified options key - [@mbleigh](https://github.com/mbleigh).
|
178
251
|
|
252
|
+
|
179
253
|
### 0.2.0 (2013-01-11)
|
180
254
|
|
181
255
|
#### Features
|
182
256
|
|
183
257
|
* Moved the namespace back to `Grape::Entity` to preserve compatibility with Grape - [@dblock](https://github.com/dblock).
|
184
258
|
|
259
|
+
|
185
260
|
### 0.1.0 (2013-01-11)
|
186
261
|
|
187
262
|
* Initial public release - [@agileanimal](https://github.com/agileanimal).
|
data/Dangerfile
CHANGED
data/Gemfile
CHANGED
@@ -1,15 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
source 'http://rubygems.org'
|
2
4
|
|
3
5
|
gemspec
|
4
6
|
|
5
7
|
group :development, :test do
|
6
|
-
gem '
|
8
|
+
gem 'rubocop', '~> 1.0', require: false
|
7
9
|
end
|
8
10
|
|
9
11
|
group :test do
|
12
|
+
gem 'coveralls_reborn', require: false
|
10
13
|
gem 'growl'
|
11
14
|
gem 'guard'
|
12
15
|
gem 'guard-bundler'
|
13
16
|
gem 'guard-rspec'
|
14
17
|
gem 'rb-fsevent'
|
18
|
+
gem 'ruby-grape-danger', '~> 0.1.1', require: false
|
19
|
+
gem 'simplecov', require: false
|
15
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$})
|
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')
|
10
|
+
watch('spec/spec_helper.rb') { 'spec/' }
|
9
11
|
end
|
10
12
|
|
11
13
|
guard 'bundler' do
|