her 0.10.3 → 0.10.4
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 98705b664b962e3d5edb1a1762bbbba49b9562d7
|
4
|
+
data.tar.gz: e96212e3b5c29c4e2af4bf4680065f8dd87d3692
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a393eb7b400fa99287eb4e1acc0a37b5858bd82ff632651458aa2b2fc8dbde102b76fba8c557f5fc4a43276628b513b27fc0a0299899a0701f8729d96e9b9bd4
|
7
|
+
data.tar.gz: ea27adf4fd43563df33b34070d7c7dc4964adb840f3a9270d3db03bd64fcb90dd8d503a70d612343305106131d9f9090fc2e0e0cb457d5e0b0e8f9af1bde3af8
|
@@ -80,7 +80,7 @@ module Her
|
|
80
80
|
return @parent.attributes[@name] unless @params.any? || @parent.attributes[@name].blank?
|
81
81
|
|
82
82
|
path_params = @parent.attributes.merge(@params.merge(@klass.primary_key => foreign_key_value))
|
83
|
-
path = build_association_path
|
83
|
+
path = build_association_path -> { @klass.build_request_path(@opts[:path], path_params) }
|
84
84
|
@klass.get_resource(path, @params).tap do |result|
|
85
85
|
@cached_result = result if @params.blank?
|
86
86
|
end
|
data/lib/her/version.rb
CHANGED
@@ -661,8 +661,7 @@ describe Her::Model::Associations do
|
|
661
661
|
builder.adapter :test do |stub|
|
662
662
|
stub.get("/users/1") { [200, {}, { id: 1, name: "Tobias Fünke", organization: { id: 1, name: "Bluth Company Inc." }, organization_id: 1 }.to_json] }
|
663
663
|
stub.get("/users/4") { [200, {}, { id: 1, name: "Tobias Fünke", organization: { id: 1, name: "Bluth Company Inc." } }.to_json] }
|
664
|
-
stub.get("/users/3") { [200, {}, { id: 2, name: "Lindsay Fünke",
|
665
|
-
stub.get("/companies/1") { [200, {}, { id: 1, name: "Bluth Company" }.to_json] }
|
664
|
+
stub.get("/users/3") { [200, {}, { id: 2, name: "Lindsay Fünke", organization: nil }.to_json] }
|
666
665
|
end
|
667
666
|
end
|
668
667
|
end
|
@@ -699,7 +698,7 @@ describe Her::Model::Associations do
|
|
699
698
|
builder.use Faraday::Request::UrlEncoded
|
700
699
|
builder.adapter :test do |stub|
|
701
700
|
stub.get("/users/2") { [200, {}, { id: 2, name: "Lindsay Fünke", organization_id: 1 }.to_json] }
|
702
|
-
stub.get("/
|
701
|
+
stub.get("/organizations/1") { [200, {}, { id: 1, name: "Bluth Company" }.to_json] }
|
703
702
|
end
|
704
703
|
end
|
705
704
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: her
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rémi Prévost
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|