condition 0.0.25 → 0.0.26
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -0
- data/lib/condition/param_item.rb +5 -1
- data/lib/condition/version.rb +1 -1
- data/spec/condition_spec.rb +2 -2
- 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: 51e98f4bbd8529a11baa22fe47f06f2496d45d38
|
4
|
+
data.tar.gz: 3266cdf958fd1ca38025ef74df922d3be1167d69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 48a46b7f0adf7009f6529404ebea19c59750e93c7c739405199969a20633c4a614198f09b56da37ef6ba3388a14d3380946472db52f83336af5cfa8fde3b3787
|
7
|
+
data.tar.gz: 6a2d78da0d52a248fb04bdd4c98c4c222eb25d431579a86455cfd61f04e84d4f9f1c2bfc8f9b41772d7024ec1c52cbd61d79a900318163501abaf2a55f1e0190
|
data/README.md
CHANGED
data/lib/condition/param_item.rb
CHANGED
@@ -117,7 +117,7 @@ module Condition
|
|
117
117
|
expected.each_pair do |k, v|
|
118
118
|
res = value_match?(v, real[k])
|
119
119
|
if !res
|
120
|
-
@unmatch_info << v.to_s
|
120
|
+
@unmatch_info << "key=#{k.to_s} #{v.to_s} <> #{real[k].to_s}"
|
121
121
|
result = false
|
122
122
|
end
|
123
123
|
end
|
@@ -125,11 +125,15 @@ module Condition
|
|
125
125
|
end
|
126
126
|
elsif Array === real
|
127
127
|
if !(Array === expected)
|
128
|
+
@unmatch_info << "real is Array and expected is not Array"
|
128
129
|
false
|
129
130
|
elsif real.size() == 0 && expected.size() == 0
|
130
131
|
true
|
131
132
|
elsif real == expected
|
132
133
|
true
|
134
|
+
elsif real.size() != expected.size()
|
135
|
+
@unmatch_info << "real array size=#{real.size().to_s} <> expected size=#{expected.size().to_s}"
|
136
|
+
false
|
133
137
|
else
|
134
138
|
index = 0
|
135
139
|
result = true
|
data/lib/condition/version.rb
CHANGED
data/spec/condition_spec.rb
CHANGED
@@ -141,8 +141,8 @@ describe Condition do
|
|
141
141
|
param = Condition::Param.new('files_t_user_params', reader: reader)
|
142
142
|
|
143
143
|
param.check('output_count', [{l: [{id: "1"}, {id: "2"}, {id: "3"}]}])
|
144
|
-
expect { param.check('output_count', [{id: "1"}, {id: "2"}]) }.to raise_error
|
145
|
-
expect { param.check('output_count', [{id: "1"}, {id: "2"}, {id: "3"}, {id: "4"}]) }.to raise_error
|
144
|
+
expect { param.check('output_count', [{l: [{id: "1"}, {id: "2"}]}]) }.to raise_error
|
145
|
+
expect { param.check('output_count', [{l: [{id: "1"}, {id: "2"}, {id: "3"}, {id: "4"}]}]) }.to raise_error
|
146
146
|
end
|
147
147
|
|
148
148
|
it 'options count' do
|
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.26
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- aoyagikouhei
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|