her 1.0.2 → 1.0.3

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: a72cb092e9ad9719279c17ffea56818bc6776996
4
- data.tar.gz: 31e57aa89987fdcaf82e74c017827038addc7302
3
+ metadata.gz: e484ba1a9e290f7fd1d8f64feed7b6ceb0a4e6b0
4
+ data.tar.gz: fc62b8ba7f6de6a75fe121debb564fffd7e0773d
5
5
  SHA512:
6
- metadata.gz: c1b80f48494a10e96b5a410adacc1b49bac9e4736490eb4700fef4bcbedc350658a432d78ea455e9a36ff95fda87054fe71123eb2ec160b82d08cc00c6cec599
7
- data.tar.gz: 79ece2883073b3c6903165b3e9aa82f3a25f757b49924e38e0bcd36c1589895addf3aa8b18f46549d5aa20ece04a43e38adf66af30fd02feabae4781fdc3660b
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
@@ -1,3 +1,3 @@
1
1
  module Her
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
@@ -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", company: nil }.to_json] }
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("/companies/1") { [200, {}, { id: 1, name: "Bluth Company" }.to_json] }
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.2
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-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: json