hal-client 4.1.2 → 4.1.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: e35bbc839271dd6c58624f02e0d3e8ba6126e900
4
- data.tar.gz: e0731f68ed1616da3569694637a0fbc2887b251d
3
+ metadata.gz: c0c0e1539630f8980093f15aadd3b1fcbc14d25c
4
+ data.tar.gz: 214d31c02a626d1f26423ebd1445436790ce189e
5
5
  SHA512:
6
- metadata.gz: 9ca7accadc31b32d271c61a8f7f1e4722a6f835915333a8e0359e505b1260b7ae52337ce601a37e7cb938a6226c3557fc22a6d54b63148bf22871c9261aad38a
7
- data.tar.gz: cf46764e494987d3d74917ba34af66a772f219481139f0e30c8e86006565f34ac3dab27237174d7a8a82601aea21a0ecfc03346c150cc4d9165744bfdfec1be1
6
+ metadata.gz: 58c7cdcc017d440025ac1d4f8553789a7ffefc4ca0276a6e00bf314eff12361cd34f29e9d1ee302642e411c86b10710babcd137cdd805d681d39debbc3320a2c
7
+ data.tar.gz: b7371c8a8cb56e71b58c40b6aff6d35f02629379461e92115a8ee2966371b8caa9b261967432001396fd51f46979923865e27e2f38d4d22d8e159267be4656c7
@@ -116,7 +116,7 @@ class HalClient
116
116
  end
117
117
 
118
118
  def target(vars = {})
119
- hal_client.get(target_url(vars))
119
+ Representation.new(href: target_url(vars), hal_client: hal_client)
120
120
  end
121
121
 
122
122
  # Differing Representations or Addressable::Templates with matching hrefs
@@ -1,3 +1,3 @@
1
1
  class HalClient
2
- VERSION = "4.1.2"
2
+ VERSION = "4.1.3"
3
3
  end
@@ -54,9 +54,9 @@ RSpec.describe HalClient::RepresentationSet do
54
54
 
55
55
  context "templated" do
56
56
  subject(:returned_val) { repr_set.related("cousin", distance: "first") }
57
- it { is_expected.to include_representation_of "http://example.com/foo-first-cousin" }
58
- it { is_expected.to include_representation_of "http://example.com/bar-paternal-first-cousin" }
59
- it { is_expected.to include_representation_of "http://example.com/bar-maternal-first-cousin" }
57
+ specify { expect(subject.map{ |s| s.href.to_s }).to include("http://example.com/foo-first-cousin") }
58
+ specify { expect(subject.map{ |s| s.href.to_s }).to include("http://example.com/bar-paternal-first-cousin") }
59
+ specify { expect(subject.map{ |s| s.href.to_s }).to include("http://example.com/bar-maternal-first-cousin") }
60
60
  it { is_expected.to have(3).items }
61
61
  end
62
62
  end
@@ -254,7 +254,8 @@ HAL
254
254
  context "for existent templated link" do
255
255
  subject { repr.related "templated", name: "bob" }
256
256
  it { is_expected.to have(1).item }
257
- it { is_expected.to include_representation_of "http://example.com/people?name=bob" }
257
+ specify { expect(subject.first.href.to_s).to eq(
258
+ "http://example.com/people?name=bob") }
258
259
  end
259
260
 
260
261
  context "for existent embedded" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hal-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.2
4
+ version: 4.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-23 00:00:00.000000000 Z
11
+ date: 2017-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http