Skip to content

Commit 3393516

Browse files
danielvdaoLeFnord
andauthored
🔥 Remove FetchableObject (#369)
* Attempt fix * 🔥 remove `FetchableObject` * 🔥 Remove `FetchableObject` * 🐛 remove `require` * 📝 update docs * 📝 newline * 🚨 fix linter warning --------- Co-authored-by: peter scholz <[email protected]>
1 parent a022a6d commit 3393516

File tree

4 files changed

+6
-16
lines changed

4 files changed

+6
-16
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
* Your contribution here.
1010

11+
* [#352](https://github.com/ruby-grape/grape-entity/pull/369): Remove `FetchableObject` behavior. - [@danielvdao](https://github.com/danielvdao).
1112

1213
### 0.10.2 (2022-07-29)
1314

UPGRADING.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# Upgrading Grape Entity
22

33

4+
### Upgrading to >= 0.10.2
5+
Official support for `FetchableObject` was removed.
6+
7+
See [#352](https://github.com/ruby-grape/grape-entity/pull/369) for more information.
8+
49
### Upgrading to >= 0.8.2
510

611
Official support for ruby < 2.5 removed, ruby 2.5 only in testing mode, but no support.

lib/grape_entity/delegator.rb

-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
require 'grape_entity/delegator/base'
44
require 'grape_entity/delegator/hash_object'
55
require 'grape_entity/delegator/openstruct_object'
6-
require 'grape_entity/delegator/fetchable_object'
76
require 'grape_entity/delegator/plain_object'
87

98
module Grape
@@ -15,8 +14,6 @@ def self.new(object)
1514
HashObject
1615
elsif defined?(OpenStruct) && object.is_a?(OpenStruct)
1716
OpenStructObject
18-
elsif object.respond_to?(:fetch, true)
19-
FetchableObject
2017
else
2118
PlainObject
2219
end

lib/grape_entity/delegator/fetchable_object.rb

-13
This file was deleted.

0 commit comments

Comments
 (0)