strong_json 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/strong_json.rb +1 -1
- data/lib/strong_json/version.rb +1 -1
- data/spec/{spec.rb → json_spec.rb} +4 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8dd02d60911a8cb479b95b9dca2cdd78eacc4865
|
4
|
+
data.tar.gz: 92734473d82322d597c54ef94747c09af792b97f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea0b6e642d0a2565aea4ad6227b10f3a1755945e1c303a634e0815254cfb95d820623e81c21ba1cb6aebb41401b61378cb00581d3f33a36ded049e188505fd54
|
7
|
+
data.tar.gz: a2aa9419a7d3e9e26e611cf6605c017414491b5439c31fa0c7d85b211ebe3c96a9d78c5f4f3e37d34572a7189a001a577195d7f1ee2b2bc8bd9f75a455b40650
|
data/lib/strong_json.rb
CHANGED
data/lib/strong_json/version.rb
CHANGED
@@ -1,8 +1,10 @@
|
|
1
|
+
require "strong_json"
|
2
|
+
|
1
3
|
describe "StrongJSON.new" do
|
2
4
|
it "tests the structure of a JSON object" do
|
3
5
|
s = StrongJSON.new do
|
4
|
-
let :item, object(
|
5
|
-
let :checkout, object(
|
6
|
+
let :item, object(name: string, count: numeric, price: numeric)
|
7
|
+
let :checkout, object(items: array(item), change: optional(number))
|
6
8
|
end
|
7
9
|
|
8
10
|
expect(s.checkout.coerce(items: [ { name: "test", count: 1, price: "2.33", comment: "dummy" } ])).to eq(items: [ { name: "test", count: 1, price: "2.33" }])
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: strong_json
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Soutaro Matsumoto
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -72,9 +72,9 @@ files:
|
|
72
72
|
- spec/array_spec.rb
|
73
73
|
- spec/basetype_spec.rb
|
74
74
|
- spec/error_spec.rb
|
75
|
+
- spec/json_spec.rb
|
75
76
|
- spec/object_spec.rb
|
76
77
|
- spec/optional_spec.rb
|
77
|
-
- spec/spec.rb
|
78
78
|
- strong_json.gemspec
|
79
79
|
homepage: ''
|
80
80
|
licenses:
|
@@ -104,6 +104,6 @@ test_files:
|
|
104
104
|
- spec/array_spec.rb
|
105
105
|
- spec/basetype_spec.rb
|
106
106
|
- spec/error_spec.rb
|
107
|
+
- spec/json_spec.rb
|
107
108
|
- spec/object_spec.rb
|
108
109
|
- spec/optional_spec.rb
|
109
|
-
- spec/spec.rb
|