richurls 0.1.5 → 0.1.6

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
  SHA256:
3
- metadata.gz: 152db211b4624c484d7ed793783e1e820e0c28209c9bc0417806e5bf46d3e451
4
- data.tar.gz: 53c740a903d763eea8c845cdaacc12c037650a592f96c18ad24bad39508f2ac9
3
+ metadata.gz: 708ee687cae619b4181d746a5654be2d3e7113b8d52494fa2211a5085b89f52b
4
+ data.tar.gz: 237bb78f3e46d26298944560bbbe02283998f8044eb0216e0de4fdcd3dc70c62
5
5
  SHA512:
6
- metadata.gz: 9e1e784775160b9dba5b0dbfbd9ae586b578e876dd89b08ca9081dfc7bb7792e8bae76e8a4a34b19cac16c85c0dcb3ea884e4cc0fd168cda199425743def8cc2
7
- data.tar.gz: b30b263c2c2e3b11954c15a06867f71f1ecd28ec89f90deaff5a83f17fcd5004bb3a305cceefcb7337a54341f194f1c7b95053ea57319aff6ea452bcacd6c470
6
+ metadata.gz: 68815be064f5b4dbda9af5d7d9030dca75c323debe384a22871671a9092194888e2b102524f58b1082083b59b3fa9605d570d50f7b83e3ba1fec42100d6b5fec
7
+ data.tar.gz: 852e95350f1f3de6ce7f7e3366450626c355c514ec63ba302b545fc1b9fadefd68f9f0f2741802df3c798afe1ab486a940c5d8e20a800cddc5002ff79a4c4bb4
data/.rubocop.yml CHANGED
@@ -1,3 +1,9 @@
1
+ AllCops:
2
+ TargetRubyVersion: 2.7
3
+
4
+ Lint/SuppressedException:
5
+ Enabled: false
6
+
1
7
  Lint/AssignmentInCondition:
2
8
  Exclude:
3
9
  - 'spec/**/*.rb'
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- richurls (0.1.5)
4
+ richurls (0.1.6)
5
5
  oj (~> 3)
6
6
  ox (~> 2)
7
7
  patron (~> 0.13)
@@ -32,6 +32,7 @@ module RichUrls
32
32
  raise NoXMLError,
33
33
  'document is not proper XML'
34
34
  end
35
+ rescue XMLHandler::StopParsingError
35
36
  end
36
37
 
37
38
  def decorate
data/lib/xml_handler.rb CHANGED
@@ -17,6 +17,7 @@ module RichUrls
17
17
  src
18
18
  ].freeze
19
19
 
20
+ StopParsingError = Class.new(StandardError)
20
21
  El = Struct.new(:name, :attributes)
21
22
 
22
23
  attr_accessor :elements
@@ -46,6 +47,8 @@ module RichUrls
46
47
 
47
48
  el = @elements.last
48
49
  el.attributes[name] = str
50
+
51
+ raise StopParsingError if name == WHITELISTED_ATTRS.last
49
52
  end
50
53
 
51
54
  def text(str)
data/richurls.gemspec CHANGED
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |spec|
5
5
  spec.name = 'richurls'
6
- spec.version = '0.1.5'
6
+ spec.version = '0.1.6'
7
7
  spec.authors = ['grdw']
8
8
  spec.email = ['gerard@wetransfer.com']
9
9
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: richurls
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - grdw