sniff 0.4.3 → 0.4.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -11,10 +11,16 @@ module CucumberValueParser
11
11
  true
12
12
  elsif value == 'false'
13
13
  false
14
+ elsif value =~ /\d+.*,.*\d/
15
+ value
14
16
  elsif value =~ /\d+\.\d+/
15
17
  value.to_f
18
+ elsif value =~ /^0/
19
+ value
16
20
  elsif value =~ /^\d+$/
17
21
  value.to_i
22
+ elsif value =~ /Address:/
23
+ value.sub(/Address:\s*/,'')
18
24
  elsif value.is_a?(String) and date = Chronic.parse(value)
19
25
  date
20
26
  else
@@ -31,9 +37,13 @@ module CucumberValueParser
31
37
  elsif a.is_a? Date
32
38
  b = Date.parse b unless b.is_a?(Date)
33
39
  a.should == b
40
+ elsif b =~ /\d+.*,.*\d/
41
+ a.should == b
34
42
  elsif b =~ /\d+\.\d+/
35
43
  b = b.to_f
36
44
  a.to_f.should be_close(b, 0.00001)
45
+ elsif b =~ /^0/
46
+ a.to_s.should == b
37
47
  elsif b =~ /^\d+$/
38
48
  b = b.to_i
39
49
  a.to_i.should == b
@@ -48,8 +58,12 @@ module CucumberValueParser
48
58
  elsif a.is_a? Date or a.is_a? Time
49
59
  b = Date.parse b
50
60
  a == b
61
+ elsif b =~ /\d+.*,.*\d/
62
+ a == b
51
63
  elsif b =~ /\d+\.\d+/
52
64
  (a.to_f - b.to_f).abs <= 0.00001
65
+ elsif b =~ /^0/
66
+ a == b
53
67
  elsif b =~ /^\d+$/
54
68
  a.to_i == b.to_i
55
69
  else
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 4
8
- - 3
9
- version: 0.4.3
8
+ - 4
9
+ version: 0.4.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Derek Kastner
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-11-23 00:00:00 -05:00
17
+ date: 2010-12-14 00:00:00 -05:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -325,7 +325,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
325
325
  requirements:
326
326
  - - ">="
327
327
  - !ruby/object:Gem::Version
328
- hash: 374526035
328
+ hash: -7791839
329
329
  segments:
330
330
  - 0
331
331
  version: "0"