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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: df1f70064e27b85aa987c01e7b458026cba0e716
4
- data.tar.gz: 645d0eeb1f451cdea5e53eb613a093ccd7ab50c2
3
+ metadata.gz: 76d53efa18053b969d4f7eb495195573e5eb4504
4
+ data.tar.gz: 2d9ddb3879a66dcacddd39672c2cae74a07e6c10
5
5
  SHA512:
6
- metadata.gz: ec0ec014cc1b5a1b3759087b83e6d46699c138485fccfcd078be7356ced61fa7f5a61cbaad0e0cd5894330837f7362b5f574a0b7649d6c0e117bfec17d91959d
7
- data.tar.gz: 9ecce98bd930adddaa16b116d66cfc7985068492387ebb3595d0d4cdbaa4efdfcbe3e416bd1d46f722657beffd691cd934a72deda0e24dab7c1d7c57b2c3c7fc
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 => 72238, :token => "token" }
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 a random number.
87
+ **Integer** values are given the value 123.
88
88
 
89
89
  **String** values are given the same name as the key.
90
90
 
@@ -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.4"
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.}
@@ -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).string
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
- rand(1_000_000)
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
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-26 00:00:00.000000000 Z
11
+ date: 2014-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json