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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4e482414f9e180f0957b8fd85610484f0364d3dd
4
- data.tar.gz: 61a3914b9edb4d3194b84670003c2156d61fbb70
3
+ metadata.gz: f63efada5a69252835a31b4afc02e4084122a777
4
+ data.tar.gz: b3bc9194a93c31db5117fc36ef2ca17f338acf08
5
5
  SHA512:
6
- metadata.gz: f703f0bc6cfbac3a9acf85aa49ceaab9718eb7aea8f67e680ff5cc251c9ad60e5a5acb300fe24d3415b327cdc8b0f2c8635d365ddd42f7df9279c2e071f4d350
7
- data.tar.gz: 659633f5675e0905bcc976d4fbddb08da1a79fe9b730c220c0e7fa3cb3af0e0d00bea2bcb9475e8f7ecb937046b89489d227ccb74e75e14f89c83d3d9c56113b
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
 
@@ -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}"
@@ -1,3 +1,3 @@
1
1
  module PageObjectify
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: page-objectify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shujon Mollah