watir_model 0.4.4 → 0.4.5

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: 16329781ea9c6e90b46758d340ad7b90287fb280
4
- data.tar.gz: 00f28db8b0f82a0e5544e019af1c1fcffcdde8dc
3
+ metadata.gz: a4e0f40be4b5cd8fb18525491d8ca33ee514bb7b
4
+ data.tar.gz: dcc96c4053178bd7e22018301c6b37d829d584ab
5
5
  SHA512:
6
- metadata.gz: d698e1bdaf21be620b9f1ae6b9ecc7b3eb30d6ea5067072803789f1048392a8b16b1645bb1f0c9971b9476ffbb3f47ec814e7e07ccacd466e900f8a62b97e86c
7
- data.tar.gz: b29636cc9bd81e36e278b0c6a4246f9ba11748c47a990c42d3d20cd757e8fc523413f1c9610e0d7ee38f22d814c533222a71a2d996f77f35a34a82da14fe821e
6
+ metadata.gz: 43cc68f124ca456e5d66b15d96950ab1f5121ead62b7ef8bf35819c5d3356d9f3f9ffe76f190ad76bfa0b82565697d2f17376c7ba28e496ec0e1d5bf2a630f00
7
+ data.tar.gz: 26d9a4b9a6b84ebb08c3d80b76e3d5e461de4d39c4f5261bf3f0437f9fa558e53f743211d03250eff8c58110f97bfb8b0dd5fb97b72a2d1c8e6aeb39a6ad91e3
data/CHANGES.md CHANGED
@@ -1,3 +1,8 @@
1
+ ### 0.4.5 (2017-12-29)
2
+
3
+ * support for `:data_type` to include `Date`
4
+ * fix bug in `#data_from_yaml` conditional
5
+
1
6
  ### 0.4.4 (2017-12-28)
2
7
 
3
8
  * fix bug for `#factory_file` dealing with namespaces
data/lib/watir_model.rb CHANGED
@@ -54,10 +54,8 @@ class WatirModel
54
54
  value = case
55
55
  when data_type == String
56
56
  value.to_s
57
- when data_type == Time
58
- Time.parse value
59
- when data_type == DateTime
60
- DateTime.parse value
57
+ when data_type == Time, Date, DateTime
58
+ data_type.parse value
61
59
  when data_type == Integer
62
60
  value.to_i
63
61
  when data_type == Float
@@ -111,7 +109,7 @@ class WatirModel
111
109
  end
112
110
 
113
111
  def data_from_yaml(file, value)
114
- return nil unless !file.nil? || value.is_a?(Symbol) || value.is_a?(String)
112
+ return nil if file.nil? || !(value.is_a?(Symbol) || value.is_a?(String))
115
113
  YAML.load_file(file)[value.to_sym]
116
114
  end
117
115
  end
data/watir_model.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "watir_model"
5
- spec.version = "0.4.4"
5
+ spec.version = "0.4.5"
6
6
  spec.authors = ["Titus Fortner"]
7
7
  spec.email = ["titusfortner@gmail.com"]
8
8
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: watir_model
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Titus Fortner
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-12-28 00:00:00.000000000 Z
11
+ date: 2017-12-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport