watir_model 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +4 -0
- data/lib/watir_model.rb +3 -1
- data/watir_model.gemspec +3 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9085dc14b69f2a8e1ed12aecd5241f513e990524
|
4
|
+
data.tar.gz: 2be96f1b547f5f1b7b572f87bd02f808c704fad4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a15324a7547c57422ffeec87c1c3a957ba6acfb9341b198145f59aa6857e488d42b4d104c3d38cbad75c46fb6faef945a8d15c0a5028e579e16cd25f0a516520
|
7
|
+
data.tar.gz: ed15f70dc9e37ee0fac354d173b11b65caa73b4920105a3ed8b1685b3a9922b1fbf391f545bac116f13341602b79c0261f5f589b202d7f823eb7d8039bb86cc0
|
data/CHANGES.md
CHANGED
data/lib/watir_model.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require '
|
1
|
+
require 'active_support/hash_with_indifferent_access'
|
2
2
|
|
3
3
|
class WatirModel
|
4
4
|
class << self
|
@@ -26,6 +26,7 @@ class WatirModel
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def convert(hash, *args)
|
29
|
+
hash.deep_symbolize_keys!
|
29
30
|
filtered = hash.reject { |k| !keys.include?(k) }
|
30
31
|
model = new(filtered)
|
31
32
|
args.each do |key|
|
@@ -38,6 +39,7 @@ class WatirModel
|
|
38
39
|
end
|
39
40
|
|
40
41
|
def initialize(hash={})
|
42
|
+
hash.deep_symbolize_keys!
|
41
43
|
update(hash)
|
42
44
|
|
43
45
|
(self.class.defaults.keys - hash.keys).each do |key|
|
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.3.
|
5
|
+
spec.version = "0.3.1"
|
6
6
|
spec.authors = ["Titus Fortner"]
|
7
7
|
spec.email = ["titusfortner@gmail.com"]
|
8
8
|
|
@@ -24,6 +24,8 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
25
25
|
spec.require_paths = ["lib"]
|
26
26
|
|
27
|
+
spec.add_runtime_dependency 'activesupport'
|
28
|
+
|
27
29
|
spec.add_development_dependency "bundler", "~> 1.9"
|
28
30
|
spec.add_development_dependency "rake", "~> 10.0"
|
29
31
|
spec.add_development_dependency "rspec", "~> 3.3"
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: watir_model
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.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:
|
11
|
+
date: 2017-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activesupport
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: bundler
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|