condition 0.0.13 → 0.0.14

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4657153f428cf1683db472a4eb1ab14522322d61
4
- data.tar.gz: abbef91663d43d503ed470479b7c950969e699c9
3
+ metadata.gz: 9912e8fdea45ff07344c66c7a7b9968c2e5528f0
4
+ data.tar.gz: cb3c7b60487f3a1f79d21d3d9cd32d3302b14fbe
5
5
  SHA512:
6
- metadata.gz: b8e4259b345f031e31cfe64ace8ad2a7d20d82c0aa617a7206de7d792359a266e433183cf80a2445e28afb46de8ec0add1221242e792a53c60805828e471a0c6
7
- data.tar.gz: a9b31f9911b2b43235faf4ff5505fe7cbf4f02c7f630cf8e34e8db7cc3f2a11ddf3f7a48af1a19e7f5b5c2fcad082f95328c2a82ec02dc4023ae97b0612c1203
6
+ metadata.gz: e535a51008d8386707d41546ab02030ae237ee293b642c3f1c4d8d953da8177c64b28b65e66dd082a0ce01ddacc977277f23e7154488c89951a0141bb588bde0
7
+ data.tar.gz: 888b72eb5e372602e7bc67411c7735cffc67a15b5db33484dada9df457aebbccb95b6e264905899a6c8be0e16ef3a935de2c0d01aedb835ea58b8d7662da1d5d
data/README.md CHANGED
@@ -30,6 +30,9 @@ TODO: Write usage instructions here
30
30
 
31
31
  ## Changes
32
32
 
33
+ 2013-05-22 0.0.14
34
+ modify view not match
35
+
33
36
  2013-05-22 0.0.13
34
37
  modify bug expected is null
35
38
 
@@ -95,7 +95,10 @@ module Condition
95
95
  result = true
96
96
  expected.each_pair do |k, v|
97
97
  res = value_match?(v, real[k])
98
- result = false if !res
98
+ if !res
99
+ @unmatch_info << v.to_s + " <> " + real[k].to_s
100
+ result = false
101
+ end
99
102
  end
100
103
  result
101
104
  end
@@ -113,6 +116,7 @@ module Condition
113
116
  break if index >= expected.size
114
117
  res = value_match?(expected[index], real[index])
115
118
  if !res
119
+ @unmatch_info << expected[index].to_s + " <> " + real[index].to_s
116
120
  result = false
117
121
  break
118
122
  end
@@ -128,10 +132,10 @@ module Condition
128
132
  def check_value(real, value)
129
133
  targetFlag = true
130
134
  matchFlag = true
131
- unmatch_info = []
135
+ @unmatch_info = []
132
136
  value.each_pair do |k, v|
133
137
  match = value_match?(v, real[k])
134
- unmatch_info << v.to_s + " <> " + real[k].to_s if !match
138
+ @unmatch_info << v.to_s + " <> " + real[k].to_s if !match
135
139
  whereKeyFlag = nil != @options.index(k.to_s)
136
140
  matchFlag = false if !match
137
141
  targetFlag = false if whereKeyFlag && !match
@@ -141,7 +145,7 @@ module Condition
141
145
  elsif !targetFlag
142
146
  return false
143
147
  else
144
- raise "#{@name} not match " + real.to_s + "\n" + unmatch_info.join("\n")
148
+ raise "#{@name} not match " + real.to_s + "\n" + @unmatch_info.join("\n")
145
149
  end
146
150
  end
147
151
 
@@ -1,5 +1,5 @@
1
1
  # coding: utf-8
2
2
 
3
3
  module Condition
4
- VERSION = "0.0.13"
4
+ VERSION = "0.0.14"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: condition
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.13
4
+ version: 0.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - aoyagikouhei
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-05-22 00:00:00.000000000 Z
11
+ date: 2013-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler