json_expressions 0.7.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -91,12 +91,12 @@ class UsersControllerTest < MiniTest::Unit::TestCase
91
91
  homepage: /\Ahttps?\:\/\/.*\z/i, # Let's get serious
92
92
  created_at: WILDCARD_MATCHER, # Don't care as long as it exists
93
93
  updated_at: WILDCARD_MATCHER,
94
- posts: [
94
+ posts: [
95
95
  {
96
96
  id: Fixnum,
97
97
  subject: 'Hello world!',
98
98
  user_id: :user_id, # Match against the captured value
99
- tags: [
99
+ tags: [
100
100
  'announcement',
101
101
  'welcome',
102
102
  'introduction'
@@ -163,7 +163,9 @@ module JsonExpressions
163
163
  return false
164
164
  end
165
165
 
166
- matcher.keys.all? { |k| match_json make_path(path,k), matcher[k] , other[k.to_s] || other[k.to_sym] }
166
+ matcher.keys.all? do |k|
167
+ match_json make_path(path,k), matcher[k], other.key?(k.to_s) ? other[k.to_s] : other[k.to_sym]
168
+ end
167
169
  end
168
170
 
169
171
  def set_last_error(path, message)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json_expressions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
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-07-11 00:00:00.000000000 Z
12
+ date: 2012-07-12 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: JSON matchmaking for all your API testing needs.
15
15
  email: