hal-interpretation 1.4.0 → 1.4.1

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: 7c73d5eadd5be34552f2a0b5d2677410b55da858
4
- data.tar.gz: 8f612d0a43581eb0aa0293d1da2b91a0530d6db7
3
+ metadata.gz: a2e12f276257a0cbc1b66f5777f5dee67570f6e7
4
+ data.tar.gz: 1fd1c93f8399581deb75ac6b2c8566b7179b9c20
5
5
  SHA512:
6
- metadata.gz: 257068790c8689c780904f9da8762bae1706e5adc32a2458c0873155b3d15feb32afeb63cbf5712c72ff5ae00ec1ffcc21227245b1be700a52493cc316e0ebaa
7
- data.tar.gz: 991b7e1ff8582dc1341bbcdbf8821043518b3c9f3f4538f764917ed4087d56979c4bb8fc6546cb1f57d12e6e9549066ff804dad5fd2e444ca7876abcc5b54150
6
+ metadata.gz: 41c74b5b41ae43af541941fab2ef38a02b5d9905551d95b1b303a2cfdd0b23946ea689448c59c77ba36e5e72f45d0f8a12650703a49042ce23803a2d466b26f2
7
+ data.tar.gz: 576ff03799bbeaaf6939eb649848a990085ae86df21e14cace8af6ad75a0cc0ef89ab83583b26c07b959f17de31548c8198771658f8ca6f6b517a8571a41090d
@@ -1,3 +1,3 @@
1
1
  module HalInterpretation
2
- VERSION = "1.4.0"
2
+ VERSION = "1.4.1"
3
3
  end
@@ -9,6 +9,8 @@ module HalInterpretation
9
9
  # Declares that this interpreter should only update `an_item`.
10
10
  def only_update(an_item)
11
11
  @item_to_update = an_item
12
+
13
+ return self
12
14
  end
13
15
 
14
16
  # Returns array of models created from the HAL representation we are
@@ -25,6 +25,10 @@ describe HalInterpretation do
25
25
  end
26
26
  end }
27
27
 
28
+ let(:interpreter) { interpreter_class.new_from_json(json_doc) }
29
+
30
+ specify { expect(interpreter.only_update(:anything)).to eq interpreter }
31
+
28
32
  context "valid single item" do
29
33
  let(:json_doc) { <<-JSON }
30
34
  { "name": "foo"
@@ -205,7 +209,18 @@ describe HalInterpretation do
205
209
  .to raise_exception HalInterpretation::InvalidRepresentationError, /\bparse\b/i }
206
210
  end
207
211
 
208
- let(:interpreter) { interpreter_class.new_from_json(json_doc) }
212
+ # default
213
+ let(:json_doc) { <<-JSON }
214
+ { "name": "foo"
215
+ ,"bday": "2013-12-11T10:09:08Z"
216
+ ,"geo": {
217
+ "latitude": 39.1
218
+ }
219
+ ,"_links": {
220
+ "up": {"href": "/foo"}
221
+ }
222
+ }
223
+ JSON
209
224
 
210
225
  let(:test_item_class) { Class.new do
211
226
  include ActiveModel::Validations
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hal-interpretation
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Williams