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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4efc0bb2d9b80f86950bd7ebe239e260bd97ee43
4
- data.tar.gz: 73de7c70c3b57b69b0fad5a5e12a2415c285ac91
3
+ metadata.gz: 51e98f4bbd8529a11baa22fe47f06f2496d45d38
4
+ data.tar.gz: 3266cdf958fd1ca38025ef74df922d3be1167d69
5
5
  SHA512:
6
- metadata.gz: e26a2d334a4baa197679ac86c11e98fe1c23cb9501ea955d33553abdaccc1e83fff3bfc7ae2f4ab9acf91b5b8d664e3411a3fbad6475436f20b61c9cb8570049
7
- data.tar.gz: c5e7b8edda09eb46c5788124cc240da3857c1adc039b83b5c0bacc10e2132772cb2bacc7d703686c4ab44da999d6b536ecfa56d3c5e4f581c2e53c064c7ce9e2
6
+ metadata.gz: 48a46b7f0adf7009f6529404ebea19c59750e93c7c739405199969a20633c4a614198f09b56da37ef6ba3388a14d3380946472db52f83336af5cfa8fde3b3787
7
+ data.tar.gz: 6a2d78da0d52a248fb04bdd4c98c4c222eb25d431579a86455cfd61f04e84d4f9f1c2bfc8f9b41772d7024ec1c52cbd61d79a900318163501abaf2a55f1e0190
data/README.md CHANGED
@@ -30,6 +30,10 @@ TODO: Write usage instructions here
30
30
 
31
31
  ## Changes
32
32
 
33
+ 2014-01-23 0.0.26
34
+ modify bug array size check
35
+ view unmatch hash key
36
+
33
37
  2014-01-15 0.0.25
34
38
  support schema name in pre condition
35
39
 
@@ -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 + " <> " + real[k].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
@@ -1,5 +1,5 @@
1
1
  # coding: utf-8
2
2
 
3
3
  module Condition
4
- VERSION = "0.0.25"
4
+ VERSION = "0.0.26"
5
5
  end
@@ -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.25
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-14 00:00:00.000000000 Z
11
+ date: 2014-01-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler