her 0.10.3 → 0.10.4

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: a575dc7241f627994e25bcb4fe32019981e783ec
4
- data.tar.gz: 8ffba4904f2906b05ab7b4a176f0b0e0d2bbcfe1
3
+ metadata.gz: 98705b664b962e3d5edb1a1762bbbba49b9562d7
4
+ data.tar.gz: e96212e3b5c29c4e2af4bf4680065f8dd87d3692
5
5
  SHA512:
6
- metadata.gz: 18db7ddb5e0b2cc69f17b987d0299aa7e6b3c23721c2891af4e7bf19cf5fb5eac474a4b1594947004b4a53113ff1988c8a408f25b46b11becbdfe73bde0e9b0f
7
- data.tar.gz: 211c072f0e986c1f12ba3436ef9b9eb1001e369607f9b42f61e1bebd70b85ae0c4063b0aca8fd066c0103f324c465cfadf078f9847141593a8344e632b19e669
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 lambda { @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
@@ -1,3 +1,3 @@
1
1
  module Her
2
- VERSION = "0.10.3"
2
+ VERSION = "0.10.4"
3
3
  end
@@ -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", company: nil }.to_json] }
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("/companies/1") { [200, {}, { id: 1, name: "Bluth Company" }.to_json] }
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.3
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-07-02 00:00:00.000000000 Z
11
+ date: 2018-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake