watir_model 0.4.2 → 0.4.3

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: 4904880adbf6b85baeeff411bb114b8c643d1aa3
4
- data.tar.gz: 4e631bd91990116e3dd870bbb2fab80d3e2b8c03
3
+ metadata.gz: e3bfd298eef33645bdffb9882febd6b54b6d0c6f
4
+ data.tar.gz: 28829ffbd5b3ed5b0526f7ae863d883927fd083d
5
5
  SHA512:
6
- metadata.gz: 6967901d8c92c031591f026f99de26320a97007b3f10dbbac1389f554e6f929e2856c9a080f516c952f5a44de8e3d6a726f1787bbfdd8c40d21d7e59d80a6ae5
7
- data.tar.gz: 4e7b64c250dfb22c02c7fc22cfc07fb525d88618af86b2af062c0bc437150f6bd26820536b280950a0d66ff2dd0274f0970ee0552aaeb01b001bc98bca676165
6
+ metadata.gz: d493371956ccae3c2fcf8665f425429cde9323d93848f930b9d9d7ba3511a72658422595a348d9e7e57b127cb4b67d0b7dfefedffc1cc317d4fc4725b238f30b
7
+ data.tar.gz: 4a78deb330ed905139adc826d51f1daa0dd7c10df625c01731b4a311b813934ea1fddb72a476879d224fb9bd296b01394c14fc3c7c7995e398c0905f885e572a
data/CHANGES.md CHANGED
@@ -1,3 +1,7 @@
1
+ ### 0.4.3 (2017-12-28)
2
+
3
+ * support for `#to_hash` to work with nested models
4
+
1
5
  ### 0.4.2 (2017-12-27)
2
6
 
3
7
  * support for `:api` and `#to_api` for outputting JSON with alternate keys
data/lib/watir_model.rb CHANGED
@@ -174,6 +174,7 @@ class WatirModel
174
174
  opt.each_with_object({}) do |key, hash|
175
175
  value = send(key)
176
176
  next if value.nil?
177
+ value = value.to_hash if value.is_a? WatirModel
177
178
  hash[key] = value
178
179
  end
179
180
  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.2"
5
+ spec.version = "0.4.3"
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.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Titus Fortner