watir_model 0.4.5 → 0.4.6

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: a4e0f40be4b5cd8fb18525491d8ca33ee514bb7b
4
- data.tar.gz: dcc96c4053178bd7e22018301c6b37d829d584ab
3
+ metadata.gz: 0fdf8505d77d7adfa4b9ede2a6c7c6cc65b83bfe
4
+ data.tar.gz: a9417429d02f0cfa2685cce6c1f7e7caaf4b158f
5
5
  SHA512:
6
- metadata.gz: 43cc68f124ca456e5d66b15d96950ab1f5121ead62b7ef8bf35819c5d3356d9f3f9ffe76f190ad76bfa0b82565697d2f17376c7ba28e496ec0e1d5bf2a630f00
7
- data.tar.gz: 26d9a4b9a6b84ebb08c3d80b76e3d5e461de4d39c4f5261bf3f0437f9fa558e53f743211d03250eff8c58110f97bfb8b0dd5fb97b72a2d1c8e6aeb39a6ad91e3
6
+ metadata.gz: e7905f553d635cbeae6ac9b3c917dbbc057d180554700086ece5ea6cc5de8dad5ec019b0c06eb2f9a11ae197a702ed8997f601568b0eef21a4d17c3d61b6ee1e
7
+ data.tar.gz: 86da4a818ee420d29891844f679a78c639d117ad7c8007fbffbd7f1d099c33755b9274ed425a2227af00b71563c0e413fec8fd8a814a38337bd019116891daa1
data/CHANGES.md CHANGED
@@ -1,3 +1,8 @@
1
+ ### 0.4.6 (2017-12-29)
2
+
3
+ * support for `#to_json`
4
+ * fix bug in `#convert_type` for Dates and Times
5
+
1
6
  ### 0.4.5 (2017-12-29)
2
7
 
3
8
  * support for `:data_type` to include `Date`
data/lib/watir_model.rb CHANGED
@@ -54,7 +54,7 @@ class WatirModel
54
54
  value = case
55
55
  when data_type == String
56
56
  value.to_s
57
- when data_type == Time, Date, DateTime
57
+ when [Time, Date, DateTime].include?(data_type)
58
58
  data_type.parse value
59
59
  when data_type == Integer
60
60
  value.to_i
@@ -177,6 +177,10 @@ class WatirModel
177
177
  end
178
178
  end
179
179
 
180
+ def to_json(*)
181
+ to_hash.to_json
182
+ end
183
+
180
184
  def to_api
181
185
  hash = to_hash
182
186
  apis.each do |key, value|
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.5"
5
+ spec.version = "0.4.6"
6
6
  spec.authors = ["Titus Fortner"]
7
7
  spec.email = ["titusfortner@gmail.com"]
8
8
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: watir_model
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.5
4
+ version: 0.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Titus Fortner