- Your contribution here.
Breaking change:
- #352: Remove
FetchableObject
behavior. - @danielvdao. - #371: Allow default exposed value to be
false
or any empty data - @norydev.
- #366: Don't suppress regular ArgumentError exceptions - splattael.
- #363: Fix typo - @OuYangJinTing.
- #361: Require 'active_support/core_ext' - @pravi.
- #352: Add Default value option - @ahmednaguib.
- #340: Preparations for 3.0 - @LeFnord.
- #338: Fix ruby 2.7 deprecation warning - @begotten63.
- #336: Pass options to delegators when they accept it - @dnesteryuk.
- #333: Fix typo in CHANGELOG.md - @eitoball.
- #307: Allow exposures to call methods defined in modules included in an entity - @robertoz-01.
- #319: Support hashes with string keys - @mhenrixon.
- #300: Loosens activesupport to 3 - @ericschultz.
- #330: CI: use Ruby 2.5.7, 2.6.5, 2.7.0 - @budnik.
- #329: Option expose_nil doesn't work when block is passed - @serbiant.
- #320: Gemspec: drop eol'd property rubyforge_project - @olleolleolle.
- #307: Allow exposures to call methods defined in modules included in an entity - @robertoz-01.
- #297: Introduce
override
option for expose (fixes #286) - @DmitryTsepelev.
- #287: Adds ruby 2.5, drops ruby 2.2 support - @LeFnord.
- #277: Provide grape::entity::options#dig - @kachick.
- #265: Adds ability to provide a proc to as: - @james2m.
- #264: Adds Rubocop config and todo list - @james2m.
- #255: Adds code coverage w/ coveralls - @LeFnord.
- #268: Loosens the version dependency for activesupport - @anakinj.
- #293: Adds expose_nil option - @b-boogaard.
- #288: Fix wrong argument exception when
&:block
passed to the expose method - @DmitryTsepelev. - #291: Refactor and simplify various classes and modules - @DmitryTsepelev.
- #292: Allow replace non-conditional non-nesting exposures in child classes (fixes #286) - @DmitryTsepelev.
- #251: Avoid noise when code runs with Ruby warnings - @cpetschnig.
- #249: Fix leaking of options and internals in default serialization - @dblock, @KingsleyKelly.
- #248: Fix
nil
values causing errors whenmerge
option passed - @arempe93.
- #226: Added
fetch
fromopts_hash
- @alanjcfs. - #232, #213: Added
#kind_of?
and#is_a?
toOutputBuilder
to get an exact class of anoutput
object - @avyy. - #234, #233: Added ruby version checking in
Gemfile
to install needed gems versions for supporting old rubies too - @avyy. - #237: Added Danger, PR linter - @dblock.
- #215:
#delegate_attribute
no longer delegates to methods included withKernel
- @maltoe. - #219: Double pass options in
serializable_hash
- @sbatykov. - #231, #215: Allow
delegate_attribute
for derived entity - @sbatykov.
- #203:
Grape::Entity::Exposure::NestingExposure::NestedExposures.delete_if
always returns exposures - @rngtng. - #204, #138: Added ability to merge fields into hashes/root (
:merge
option for.expose
) - @avyy.
- #139: Keep a track of attribute nesting path during condition check or runtime exposure - @calfzhou.
- #151:
.exposures
is removed and substituted with.root_exposures
array - @marshall-lee. - #151:
.nested_exposures
is removed too - @marshall-lee. - #151:
#should_return_attribute?
,#only_fields
and#except_fields
are moved to other classes - @marshall-lee. - #151: Nested
unexpose
now raises an exception: #152 - @marshall-lee.
- #151: Double exposures with conditions does not rewrite previously defined now: #56 - @marshall-lee.
- #151: Nested exposures were flattened in
.documentation
: #112 - @marshall-lee. - #151:
@only_fields
and@except_fields
memoization: #149 - @marshall-lee. - #151:
:unless
condition withHash
argument logic: #150 - @marshall-lee. - #151:
@documentation
memoization: #153 - @marshall-lee. - #151: Serializing of deeply nested presenter exposures: #155 - @marshall-lee.
- #151: Deep projections (
:only
,:except
) were unaware of nesting: #156 - @marshall-lee.
- #167, #166: Regression with global settings (exposures, formatters) on
Grape::Entity
- @marshall-lee.
- #164: Regression: entity instance methods were exposed with
NoMethodError
: #163 - @marshall-lee.
- #114: Added 'only' option that selects which attributes should be returned - @estevaoam.
- #115: Allowing 'root' to be inherited from parent to child entities - @guidoprincess.
- #121: Sublcassed Entity#documentation properly handles unexposed params - @dan-corneanu.
- #134: Subclasses no longer affected in all cases by
unexpose
in parent - @etehtsea. - #135: Added
except
option - @dan-corneanu. - #136: Allow for strings in
only
andexcept
options - @bswinnerton. - #147, #140: Expose
safe
attributes asnil
if they cannot be evaluated - @marshall-lee. - #147: Remove catching of
NoMethodError
because it can occur deep inside in a method call so this exception does not mean that attribute not exist - @marshall-lee. - #147: The
valid_exposures
method was removed - @marshall-lee.
- #147, #142: Private method values were not exposed with
safe
option - @marshall-lee.
- #109: Added
unexpose
method - @jonmchan. - #98: Added nested conditionals - @zbelzer.
- #105: Specify which attribute is missing in which Entity - @jhollinger.
- #111: Allow usage of attributes with name 'key' if
Hash
objects are used - @croeck. - #110: Safe exposure when using
Hash
models - @croeck. - #91: OpenStruct serializing - @etehtsea.
- #85: Added
present_collection
to indicate that anEntity
presents an entire Collection - @dspaeth-faber. - #85: Hashes can now be passed as object to be presented and the
Hash
keys can be referenced by expose - @dspaeth-faber.
- #76: Improve performance of entity serialization - @justfalter.
- #77: Compatibility with Rspec 3 - @justfalter.
- #60: Performance issues introduced by nested exposures - @AlexYankee.
- #60: Nested exposure double-exposes a field - @AlexYankee.
- Ruby 1.8.x is no longer supported - @dblock.
- #36: Enforcing Ruby style guidelines via Rubocop - @dblock.
- #7: Added
serializable
option torepresent
- @mbleigh. - #18: Added
safe
option toexpose
, will not raise error for a missing attribute - @fixme. - #16: Added
using
option toexpose SYMBOL BLOCK
- @fahchen. - #24: Return documentation with
as
param considered - @drakula2k. - #27: Properly serialize hashes - @clintonb.
- #28: Look for method on entity before calling it on the object - @MichaelXavier.
- #33: Support proper merging of nested conditionals - @wyattisimo.
- #43: Call procs in context of entity instance - @joelvh.
- #47: Support nested exposures - @wyattisimo.
- #46, #50: Added support for specifying the presenter class in
using
in string format - @larryzhao. - #51: Raise
ArgumentError
if an unknown option is used withexpose
- @aj0strow. - #51: Alias
:with
to:using
, consistently with the Grape api endpoints - @aj0strow.
- #9: Added
with_options
for block-level exposure setting - @SegFaultAX. - The
instance.entity
method now optionally acceptsoptions
- @mbleigh. - You can pass symbols to
:if
and:unless
to simply check for truthiness/falsiness of the specified options key - @mbleigh.
- Moved the namespace back to
Grape::Entity
to preserve compatibility with Grape - @dblock.
- Initial public release - @agileanimal.