json_spec 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +0 -3
- data/Rakefile +0 -1
- data/json_spec.gemspec +1 -2
- data/lib/json_spec/helpers.rb +2 -6
- metadata +2 -21
- data/Appraisals +0 -7
- data/gemfiles/multi_json_1_0.gemfile +0 -7
- data/gemfiles/multi_json_1_3.gemfile +0 -7
data/.travis.yml
CHANGED
data/Rakefile
CHANGED
data/json_spec.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |gem|
|
4
4
|
gem.name = "json_spec"
|
5
|
-
gem.version = "1.0.
|
5
|
+
gem.version = "1.0.3"
|
6
6
|
|
7
7
|
gem.authors = ["Steve Richert"]
|
8
8
|
gem.email = ["steve.richert@gmail.com"]
|
@@ -13,7 +13,6 @@ Gem::Specification.new do |gem|
|
|
13
13
|
gem.add_dependency "multi_json", "~> 1.0"
|
14
14
|
gem.add_dependency "rspec", "~> 2.0"
|
15
15
|
|
16
|
-
gem.add_development_dependency "appraisal", "~> 0.4"
|
17
16
|
gem.add_development_dependency "cucumber", "~> 1.1", ">= 1.1.1"
|
18
17
|
gem.add_development_dependency "rake", "~> 0.9"
|
19
18
|
|
data/lib/json_spec/helpers.rb
CHANGED
@@ -5,10 +5,10 @@ module JsonSpec
|
|
5
5
|
extend self
|
6
6
|
|
7
7
|
def parse_json(json, path = nil)
|
8
|
-
ruby =
|
8
|
+
ruby = MultiJson.decode("[#{json}]").first
|
9
9
|
value_at_json_path(ruby, path)
|
10
10
|
rescue MultiJson::DecodeError
|
11
|
-
|
11
|
+
MultiJson.decode(json)
|
12
12
|
end
|
13
13
|
|
14
14
|
def normalize_json(json, path = nil)
|
@@ -31,10 +31,6 @@ module JsonSpec
|
|
31
31
|
end
|
32
32
|
|
33
33
|
private
|
34
|
-
def multi_json_load(json)
|
35
|
-
MultiJson.respond_to?(:load) ? MultiJson.load(json) : MultiJson.decode(json)
|
36
|
-
end
|
37
|
-
|
38
34
|
def value_at_json_path(ruby, path)
|
39
35
|
return ruby unless path
|
40
36
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: json_spec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-04-
|
12
|
+
date: 2012-04-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: multi_json
|
@@ -43,22 +43,6 @@ dependencies:
|
|
43
43
|
- - ~>
|
44
44
|
- !ruby/object:Gem::Version
|
45
45
|
version: '2.0'
|
46
|
-
- !ruby/object:Gem::Dependency
|
47
|
-
name: appraisal
|
48
|
-
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
|
-
requirements:
|
51
|
-
- - ~>
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: '0.4'
|
54
|
-
type: :development
|
55
|
-
prerelease: false
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
|
-
requirements:
|
59
|
-
- - ~>
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0.4'
|
62
46
|
- !ruby/object:Gem::Dependency
|
63
47
|
name: cucumber
|
64
48
|
requirement: !ruby/object:Gem::Requirement
|
@@ -106,7 +90,6 @@ extra_rdoc_files: []
|
|
106
90
|
files:
|
107
91
|
- .gitignore
|
108
92
|
- .travis.yml
|
109
|
-
- Appraisals
|
110
93
|
- Gemfile
|
111
94
|
- LICENSE
|
112
95
|
- README.md
|
@@ -120,8 +103,6 @@ files:
|
|
120
103
|
- features/step_definitions/steps.rb
|
121
104
|
- features/support/env.rb
|
122
105
|
- features/types.feature
|
123
|
-
- gemfiles/multi_json_1_0.gemfile
|
124
|
-
- gemfiles/multi_json_1_3.gemfile
|
125
106
|
- json_spec.gemspec
|
126
107
|
- lib/json_spec.rb
|
127
108
|
- lib/json_spec/configuration.rb
|
data/Appraisals
DELETED