condition 0.0.26 → 0.0.27
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -0
- data/lib/condition/param.rb +1 -0
- data/lib/condition/param_item.rb +2 -2
- data/lib/condition/version.rb +1 -1
- data/spec/condition_spec.rb +7 -0
- data/spec/files/t_user.ods +0 -0
- 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: 050b71f7bdf86ef89f20b29f0224d357ffacb789
|
4
|
+
data.tar.gz: 9375d2c0dc2a57025ef3591ba9a9139135038832
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 624c722b84ef2d2c6c145d3b6fb3474f650d43fb340b0d6ad5619a39c485fb642b3d578e1903764f78b1e1ac942fcf5ad3e7be8cefa0f1c583e194951b7e7617
|
7
|
+
data.tar.gz: 9902d2e5e09f98854e2c99eb45ee7d47bbbd5744461cd1edb10a66ff2f5f11b2c21f61bb75c983031e5dc82d277ac1c3cf818961c83a5708879d948831d70641
|
data/README.md
CHANGED
@@ -30,6 +30,11 @@ TODO: Write usage instructions here
|
|
30
30
|
|
31
31
|
## Changes
|
32
32
|
|
33
|
+
2014-01-30 0.0.27
|
34
|
+
check param.check name not found
|
35
|
+
view expected <> real
|
36
|
+
view post condition column name in error
|
37
|
+
|
33
38
|
2014-01-23 0.0.26
|
34
39
|
modify bug array size check
|
35
40
|
view unmatch hash key
|
data/lib/condition/param.rb
CHANGED
data/lib/condition/param_item.rb
CHANGED
@@ -164,7 +164,7 @@ module Condition
|
|
164
164
|
@unmatch_info = []
|
165
165
|
value.each_pair do |k, v|
|
166
166
|
match = value_match?(v, real[k])
|
167
|
-
@unmatch_info << v.to_s + " <> " + real[k].to_s if !match
|
167
|
+
@unmatch_info << "key=#{k.to_s} " + v.to_s + " <> " + real[k].to_s if !match
|
168
168
|
whereKeyFlag = nil != @options.index(k.to_s)
|
169
169
|
matchFlag = false if !match
|
170
170
|
targetFlag = false if whereKeyFlag && !match
|
@@ -175,7 +175,7 @@ module Condition
|
|
175
175
|
elsif !targetFlag
|
176
176
|
return false
|
177
177
|
else
|
178
|
-
raise "#{@name} not match " + real.to_s + "\n" + @unmatch_info.join("\n")
|
178
|
+
raise "#{@name} not match " + real.to_s + "\nexpected <> real\n" + @unmatch_info.join("\n")
|
179
179
|
end
|
180
180
|
end
|
181
181
|
|
data/lib/condition/version.rb
CHANGED
data/spec/condition_spec.rb
CHANGED
@@ -25,6 +25,8 @@ describe Condition do
|
|
25
25
|
expect { param.post(storage) }.to raise_error
|
26
26
|
param = Condition::Param.new(FILES + '/t_user.ods', 5)
|
27
27
|
expect { param.post(storage) }.to raise_error
|
28
|
+
param = Condition::Param.new(FILES + '/t_user.ods', 6)
|
29
|
+
expect { param.post(storage) }.to raise_error
|
28
30
|
end
|
29
31
|
|
30
32
|
it 'pre and params' do
|
@@ -163,4 +165,9 @@ describe Condition do
|
|
163
165
|
expect(REDIS.get("files2_param2_params")).to be_nil
|
164
166
|
end
|
165
167
|
|
168
|
+
it 'name not found' do
|
169
|
+
param = Condition::Param.new(FILES + '/t_user.ods', 2)
|
170
|
+
expect { param.check('notexistsname', [{}]) }.to raise_error("notexistsname not found in param")
|
171
|
+
end
|
172
|
+
|
166
173
|
end
|
data/spec/files/t_user.ods
CHANGED
Binary file
|
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.27
|
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-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|