lhs 21.2.1 → 21.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/lhs/concerns/record/request.rb +1 -1
- data/lib/lhs/version.rb +1 -1
- data/spec/record/includes_spec.rb +18 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 97ca91f932322b206403f8179975b5b9b82b3963518af2c914ea3dce57323ffc
|
4
|
+
data.tar.gz: 13849b65f18f9dce4748f11d693cb79ad3c4c467b3d790235de8d9b75ee410c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ab0338a4892d6ff23ea4698019d732733503d8f4c23eeff50beb7ceb6d41905d324c46d9e16e543514ec5c704c4392ce902f9c48ccf92aa4f01ef6b54833498
|
7
|
+
data.tar.gz: 401fbcaf2c25f3eca613a41bf1ca8815867c3df9a3e2ed18d3234da8b5d7c62e0499065f7d72f1d3bdde14ae1cf9dea7f017258647a9156c1c4a4d2f26b52ba7
|
@@ -176,7 +176,7 @@ class LHS::Record
|
|
176
176
|
else
|
177
177
|
handle_include(includes, data, nil, references[includes])
|
178
178
|
end
|
179
|
-
data.clear_cache! # as we just included new nested resources
|
179
|
+
data.clear_cache! if data.present? # as we just included new nested resources
|
180
180
|
end
|
181
181
|
|
182
182
|
def handle_include(included, data, sub_includes = nil, reference = nil)
|
data/lib/lhs/version.rb
CHANGED
@@ -665,4 +665,22 @@ describe LHS::Record do
|
|
665
665
|
expect(place.customer.salesforce.name).to eq 'Steve'
|
666
666
|
end
|
667
667
|
end
|
668
|
+
|
669
|
+
context 'include empty structures' do
|
670
|
+
before do
|
671
|
+
class Place < LHS::Record
|
672
|
+
endpoint 'https://places/{id}'
|
673
|
+
end
|
674
|
+
stub_request(:get, "https://places/1")
|
675
|
+
.to_return(body: {
|
676
|
+
id: '123'
|
677
|
+
}.to_json)
|
678
|
+
end
|
679
|
+
|
680
|
+
it 'skips includes when there is nothing and also does not raise an exception' do
|
681
|
+
expect(-> {
|
682
|
+
Place.includes(contracts: :product).find(1)
|
683
|
+
}).not_to raise_exception
|
684
|
+
end
|
685
|
+
end
|
668
686
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lhs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 21.2.
|
4
|
+
version: 21.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- https://github.com/local-ch/lhs/graphs/contributors
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-03-
|
11
|
+
date: 2020-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|