rack-spec 0.1.5 → 0.1.6

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: 2d1e47b36ab6a2c071d1bd5f4f67cf0fef54d8c8
4
- data.tar.gz: add1c0cf066275c0545b8d5a02d6ea7488f05960
3
+ metadata.gz: c304274401ed571da57041c9ea518492b49b0df7
4
+ data.tar.gz: d7c185c802a0d7fd9dc68f4148e1c66211293d69
5
5
  SHA512:
6
- metadata.gz: 9ef85788ef1f068ab4175b5935687c291cebebec416f7edcde35a0bb4a9e78c8d24b0fd937d13a45873e8f014277b4cebda436068f19f22505d0c4cb345933ac
7
- data.tar.gz: adc990f29bdaaacbc531093651bdd0cc990a6230c83fdb72d0f2f4fa4fbaccec7697f87940046e2f7086ac50036aac55fd16ab7e7ac67427b757b395aa8b168d
6
+ metadata.gz: f7ca89c0bcc0659bb6127c7b6aa2e5a410c4f5347d8dbdb5ecdff04ba99bfd4aa0a2edf7aef0e9dd466b6c026b6111611c68947066b18a778db1d4222a34d0c6
7
+ data.tar.gz: c145f2e49936fdf50942f94d70c386f166aebb671aa58759f2f794698b03eae4ad0ab7effa6edf724eb720d93e1a5d1bff06132ae139a65c3d354ff072893cd8
@@ -1,3 +1,6 @@
1
+ ## 0.1.6
2
+ * Support YAML schema at `specup`
3
+
1
4
  ## 0.1.5
2
5
  * Add `specup` executable
3
6
 
data/bin/specup CHANGED
@@ -2,6 +2,7 @@
2
2
  $LOAD_PATH.unshift File.expand_path("../../lib", __FILE__)
3
3
  require "rack"
4
4
  require "rack/spec"
5
+ require "yaml"
5
6
 
6
7
  begin
7
8
  path = ARGV.shift or raise
@@ -11,7 +12,13 @@ rescue
11
12
  exit
12
13
  end
13
14
 
14
- schema = JSON.parse(str)
15
+ case File.extname(path)
16
+ when ".yml", ".yaml"
17
+ schema = YAML.load(str)
18
+ else
19
+ schema = MultiJson.decode(str)
20
+ end
21
+
15
22
  app = Rack::Builder.new do
16
23
  use Rack::Spec::ErrorHandler
17
24
  use Rack::Spec::Mock, schema: schema
@@ -1,5 +1,5 @@
1
1
  module Rack
2
2
  module Spec
3
- VERSION = "0.1.5"
3
+ VERSION = "0.1.6"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-spec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura