her 1.0.2 → 1.0.3
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e484ba1a9e290f7fd1d8f64feed7b6ceb0a4e6b0
|
|
4
|
+
data.tar.gz: fc62b8ba7f6de6a75fe121debb564fffd7e0773d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 87b66eb01fd1376323334646ce77d8ea114ab5d2947215a7b5bc66a3bbcd895ec38df0bce59d28bbd92e11b818394dc52136607f141024dc20263edf6a42a123
|
|
7
|
+
data.tar.gz: 79629aa61a794ff563838665953051fb03a07784820a87fc649b9247379461cb537df9b5cd2c8ab4615df63c0029f7df8a8bf7f3f2fe24531aa231c7fd08a187
|
|
@@ -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 -> { @klass.build_request_path(path_params) }
|
|
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
|
@@ -662,8 +662,7 @@ describe Her::Model::Associations do
|
|
|
662
662
|
builder.adapter :test do |stub|
|
|
663
663
|
stub.get("/users/1") { [200, {}, { id: 1, name: "Tobias Fünke", organization: { id: 1, name: "Bluth Company Inc." }, organization_id: 1 }.to_json] }
|
|
664
664
|
stub.get("/users/4") { [200, {}, { id: 1, name: "Tobias Fünke", organization: { id: 1, name: "Bluth Company Inc." } }.to_json] }
|
|
665
|
-
stub.get("/users/3") { [200, {}, { id: 2, name: "Lindsay Fünke",
|
|
666
|
-
stub.get("/companies/1") { [200, {}, { id: 1, name: "Bluth Company" }.to_json] }
|
|
665
|
+
stub.get("/users/3") { [200, {}, { id: 2, name: "Lindsay Fünke", organization: nil }.to_json] }
|
|
667
666
|
end
|
|
668
667
|
end
|
|
669
668
|
end
|
|
@@ -700,7 +699,7 @@ describe Her::Model::Associations do
|
|
|
700
699
|
builder.use Faraday::Request::UrlEncoded
|
|
701
700
|
builder.adapter :test do |stub|
|
|
702
701
|
stub.get("/users/2") { [200, {}, { id: 2, name: "Lindsay Fünke", organization_id: 1 }.to_json] }
|
|
703
|
-
stub.get("/
|
|
702
|
+
stub.get("/organizations/1") { [200, {}, { id: 1, name: "Bluth Company" }.to_json] }
|
|
704
703
|
end
|
|
705
704
|
end
|
|
706
705
|
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: 1.0.
|
|
4
|
+
version: 1.0.3
|
|
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: json
|