condition 0.0.13 → 0.0.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -0
- data/lib/condition/param_item.rb +8 -4
- data/lib/condition/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9912e8fdea45ff07344c66c7a7b9968c2e5528f0
|
4
|
+
data.tar.gz: cb3c7b60487f3a1f79d21d3d9cd32d3302b14fbe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e535a51008d8386707d41546ab02030ae237ee293b642c3f1c4d8d953da8177c64b28b65e66dd082a0ce01ddacc977277f23e7154488c89951a0141bb588bde0
|
7
|
+
data.tar.gz: 888b72eb5e372602e7bc67411c7735cffc67a15b5db33484dada9df457aebbccb95b6e264905899a6c8be0e16ef3a935de2c0d01aedb835ea58b8d7662da1d5d
|
data/README.md
CHANGED
data/lib/condition/param_item.rb
CHANGED
@@ -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
|
-
|
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
|
|
data/lib/condition/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2013-05-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|