json_schema_spec 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/json_schema_spec.gemspec +1 -1
- data/lib/json_schema_spec.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 76d53efa18053b969d4f7eb495195573e5eb4504
|
4
|
+
data.tar.gz: 2d9ddb3879a66dcacddd39672c2cae74a07e6c10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49fb85d71a57a0cc196921271eca59df25ec7ca6e98c160d34ee39a05e6cb9fc2dfdefed4f8e1d93912ea3f44edc94ad72cd79bc4a4298f89d85f9d889fc7985
|
7
|
+
data.tar.gz: b47ac138d1c08420a6fec8382697a01ad88765b48fa23e82d8052f2d24b03c9c126e2210556d327b9dd1ecd3b0e0822f4302b93b919c91986ecf71facf28b2da
|
data/README.md
CHANGED
@@ -78,13 +78,13 @@ In Rails, your schema is automatically detected at `/schema.json`.
|
|
78
78
|
|
79
79
|
The `request` hash looks like this:
|
80
80
|
|
81
|
-
{ :id =>
|
81
|
+
{ :id => 123, :token => "token" }
|
82
82
|
|
83
83
|
The `response` hash looks like this:
|
84
84
|
|
85
85
|
{ :avatar => "avatar", :name => "name" }
|
86
86
|
|
87
|
-
**Integer** values are given
|
87
|
+
**Integer** values are given the value 123.
|
88
88
|
|
89
89
|
**String** values are given the same name as the key.
|
90
90
|
|
data/json_schema_spec.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "json_schema_spec"
|
7
|
-
spec.version = "0.1.
|
7
|
+
spec.version = "0.1.5"
|
8
8
|
spec.authors = ["Winton Welsh"]
|
9
9
|
spec.email = ["mail@wintoni.us"]
|
10
10
|
spec.description = %q{Generate fixtures from JSON schemas.}
|
data/lib/json_schema_spec.rb
CHANGED
@@ -15,7 +15,7 @@ module JsonSchemaSpec
|
|
15
15
|
FileUtils.mkdir_p(File.dirname(path))
|
16
16
|
|
17
17
|
File.open(path, 'w') do |f|
|
18
|
-
json = open(url).
|
18
|
+
json = open(url).read
|
19
19
|
yaml = JSON.parse(json).to_yaml
|
20
20
|
f.write(yaml)
|
21
21
|
end
|
@@ -68,7 +68,7 @@ module JsonSchemaSpec
|
|
68
68
|
elsif value[:type] == 'boolean'
|
69
69
|
true
|
70
70
|
elsif value[:type] == 'integer'
|
71
|
-
|
71
|
+
123
|
72
72
|
elsif value[:type] == 'object'
|
73
73
|
prefix << key
|
74
74
|
json_schema_to_params(
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: json_schema_spec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Winton Welsh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|