page-objectify 0.0.8 → 0.0.9
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 +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/page-objectify/dom.rb +12 -2
- data/lib/page-objectify/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f63efada5a69252835a31b4afc02e4084122a777
|
|
4
|
+
data.tar.gz: b3bc9194a93c31db5117fc36ef2ca17f338acf08
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6a107806b380380aa072887359f380caca7c183132a8ef7babb31817eb3f7e18c226ae6d3180922b03a8c8508162350c0fc163cb0b76729cdb0755f76ac44e26
|
|
7
|
+
data.tar.gz: 8649d8f88944940548ee29aa075f59cd350354c0b7f37011637ebfaa3ec827632c40d331010836f25f55ef6773ce83ea980c29bf4c4fb7e41863ba347a6a8793
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## [v0.0.8](https://github.com/smoll/page-objectify/tree/v0.0.8) (2015-11-11)
|
|
4
|
+
[Full Changelog](https://github.com/smoll/page-objectify/compare/v0.0.7...v0.0.8)
|
|
5
|
+
|
|
3
6
|
## [v0.0.7](https://github.com/smoll/page-objectify/tree/v0.0.7) (2015-11-11)
|
|
4
7
|
[Full Changelog](https://github.com/smoll/page-objectify/compare/v0.0.6...v0.0.7)
|
|
5
8
|
|
data/lib/page-objectify/dom.rb
CHANGED
|
@@ -6,6 +6,8 @@ module PageObjectify
|
|
|
6
6
|
class DOM
|
|
7
7
|
include Logging
|
|
8
8
|
|
|
9
|
+
attr_reader :tags_to_accessors, :input_types_to_accessors
|
|
10
|
+
|
|
9
11
|
def initialize(html)
|
|
10
12
|
@html = html
|
|
11
13
|
@doc = Nokogiri::HTML(@html)
|
|
@@ -13,7 +15,7 @@ module PageObjectify
|
|
|
13
15
|
@tags_to_accessors = {}
|
|
14
16
|
@input_types_to_accessors = {}
|
|
15
17
|
@types = %i(text password checkbox button image reset submit radio hidden file)
|
|
16
|
-
@ignored_tags = %i(meta style body script) # that could possibly have an HTML id
|
|
18
|
+
@ignored_tags = %i(meta style body script thead tbody) # that could possibly have an HTML id
|
|
17
19
|
|
|
18
20
|
generate_mapping
|
|
19
21
|
end
|
|
@@ -76,7 +78,15 @@ module PageObjectify
|
|
|
76
78
|
@tags_to_accessors[:button] = "button"
|
|
77
79
|
|
|
78
80
|
# Fix for https://github.com/smoll/page-objectify/issues/13
|
|
79
|
-
[:h1, :h2, :h3, :h4, :h5].each { |k| @tags_to_accessors[k] = k.to_s }
|
|
81
|
+
[:h1, :h2, :h3, :h4, :h5, :h6].each { |k| @tags_to_accessors[k] = k.to_s }
|
|
82
|
+
|
|
83
|
+
# Fix for https://github.com/smoll/page-objectify/issues/16
|
|
84
|
+
@tags_to_accessors[:td] = "cell"
|
|
85
|
+
@tags_to_accessors[:th] = "cell"
|
|
86
|
+
@tags_to_accessors[:b] = "b"
|
|
87
|
+
@tags_to_accessors.delete(:tr)
|
|
88
|
+
@tags_to_accessors.delete(:option)
|
|
89
|
+
@input_types_to_accessors[:checkbox] = "checkbox"
|
|
80
90
|
|
|
81
91
|
logger.debug "TAGS_TO_ACCESSORS = #{@tags_to_accessors}"
|
|
82
92
|
logger.debug "TYPES_TO_ACCESSORS = #{@input_types_to_accessors}"
|