diff_matcher 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -137,13 +137,13 @@ module DiffMatcher
137
137
  compare(right, expected_class, difference_to_s(right, left)) { |k|
138
138
  "#{"#{k.inspect}=>" if expected_class == Hash}#{right[k]}" if right[k] and left.has_key?(k)
139
139
  }
140
- end
140
+ end
141
141
 
142
142
  def missing(left, right, expected_class)
143
143
  compare(left, expected_class) { |k|
144
144
  "#{"#{k.inspect}=>" if expected_class == Hash}#{left[k].inspect}" unless right.has_key?(k)
145
145
  }
146
- end
146
+ end
147
147
 
148
148
  def additional(left, right, expected_class)
149
149
  missing(right, left, expected_class)
@@ -175,11 +175,11 @@ module DiffMatcher
175
175
 
176
176
  def match_to_s(expected, actual, match_type)
177
177
  actual = match_regexp_to_s(expected, actual) if match_type == :match_regexp
178
- markup(match_type, actual) if matches_shown.include? match_type
178
+ markup(match_type, actual) if matches_shown.include?(match_type)
179
179
  end
180
180
 
181
181
  def difference_to_s(expected, actual, reverse=false)
182
- match, match_type = match? *(reverse ? [actual, expected] : [expected, actual])
182
+ match, match_type = match?(*(reverse ? [actual, expected] : [expected, actual]))
183
183
  if match
184
184
  match_to_s(expected, actual, match_type)
185
185
  else
@@ -1,3 +1,3 @@
1
1
  module DiffMatcher
2
- VERSION = "2.0.0"
2
+ VERSION = "2.0.1"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: diff_matcher
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 2.0.0
5
+ version: 2.0.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Playup
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-11-18 00:00:00 +11:00
13
+ date: 2011-11-19 00:00:00 +11:00
14
14
  default_executable:
15
15
  dependencies: []
16
16
 
@@ -60,7 +60,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
60
60
  requirements:
61
61
  - - ">="
62
62
  - !ruby/object:Gem::Version
63
- hash: 465980701
63
+ hash: -712504035
64
64
  segments:
65
65
  - 0
66
66
  version: "0"