watir_model 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fb66fe24b50991cf49d310d6a97f089e30913591
4
- data.tar.gz: 7e3688b4c12b17d386371604ab359e63cdb66434
3
+ metadata.gz: 97265c57a19f28001518080cb987a0444e883cb3
4
+ data.tar.gz: 5119b50288ccba390ea7d4aa3074e57cf6f63940
5
5
  SHA512:
6
- metadata.gz: e1c922f20e1d39fb88d9f8fc92cd08736937ebc63375a2f7c051cbf8751102dc5b17a19fb392cd8bba4076fdb5532c41e3805d416941690fffc5db0301cd1e5d
7
- data.tar.gz: 2101fd335a12e59c92a8fb83d8d39ac9e22313ad1afd96453363a024e46926f814ccbb86567ecdefb3e5fb5a13ed0628d03136dc39eae2fcd8056b203249ea43
6
+ metadata.gz: ce1e7c651914ca25400663e2e0c0c2072f6b0caa0dd4102cc089f1b7c7d7470a8cea540e7e98353fdc402a19e6cd6753339813de77a5e6e670a59a356e8a9eda
7
+ data.tar.gz: db4c7232c9884d4e8064f021f1ce78761c45cb02cca7a88137d1dda65893d59525d8641d1b27924c7b17130b95718678fbf36edb731a5e875a0bc297c5e0c478
data/CHANGES.md CHANGED
@@ -1,3 +1,7 @@
1
+ ### 0.4.1 (2017-12-26)
2
+
3
+ * support for key aliases to work with `#convert`
4
+
1
5
  ### 0.4.0 (2017-12-24)
2
6
 
3
7
  * support for `:data_type` parameter to allow conversion and enforcement of key types
data/README.md CHANGED
@@ -18,7 +18,7 @@ And then execute:
18
18
 
19
19
  Or install it yourself as:
20
20
 
21
- $ gem install test-model
21
+ $ gem install watir_model
22
22
 
23
23
  To use this library:
24
24
 
@@ -26,13 +26,9 @@ To use this library:
26
26
  require 'watir_model'
27
27
  ```
28
28
 
29
- ## Development
30
-
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
-
33
29
  ## Contributing
34
30
 
35
- 1. Fork it ( https://github.com/[my-github-username]/watir_model/fork )
31
+ 1. Fork it ( https://github.com/titusfortner/watir_model/fork )
36
32
  2. Create your feature branch (`git checkout -b my-new-feature`)
37
33
  3. Commit your changes (`git commit -am 'Add some feature'`)
38
34
  4. Push to the branch (`git push origin my-new-feature`)
data/lib/watir_model.rb CHANGED
@@ -78,7 +78,7 @@ class WatirModel
78
78
 
79
79
  def convert(hash, *args)
80
80
  hash.deep_symbolize_keys!
81
- filtered = hash.reject { |k| !keys.include?(k) }
81
+ filtered = hash.select { |k| keys.include?(k) || aliases.keys.include?(k) }
82
82
  model = new(filtered)
83
83
  args.each do |key|
84
84
  model.instance_eval do
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.0"
5
+ spec.version = "0.4.1"
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.0
4
+ version: 0.4.1
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-24 00:00:00.000000000 Z
11
+ date: 2017-12-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport