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 +4 -4
- data/lib/hal_interpretation/version.rb +1 -1
- data/lib/hal_interpretation.rb +2 -0
- data/spec/hal_interpretation_spec.rb +16 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a2e12f276257a0cbc1b66f5777f5dee67570f6e7
|
4
|
+
data.tar.gz: 1fd1c93f8399581deb75ac6b2c8566b7179b9c20
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41c74b5b41ae43af541941fab2ef38a02b5d9905551d95b1b303a2cfdd0b23946ea689448c59c77ba36e5e72f45d0f8a12650703a49042ce23803a2d466b26f2
|
7
|
+
data.tar.gz: 576ff03799bbeaaf6939eb649848a990085ae86df21e14cace8af6ad75a0cc0ef89ab83583b26c07b959f17de31548c8198771658f8ca6f6b517a8571a41090d
|
data/lib/hal_interpretation.rb
CHANGED
@@ -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
|
-
|
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
|