tanakai 1.7.1 → 1.7.2

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: f639e8c843d1effdd2fa5268fe01ee0fda5adcb741ecda49b5e8f2c8a51f55a3
4
- data.tar.gz: d03287426dc9e1e802ef149ad9edf5f83813ea067d22f9f6fb8fa7ec33bb3c5a
3
+ metadata.gz: 412cdf33eda65d65336652df303c4eb55cf395f5154e53f88a1c901ef4360c55
4
+ data.tar.gz: eb0217edc65c54bbe6b243596965b5073e0c3a308e5b52249d9de7027e8382e9
5
5
  SHA512:
6
- metadata.gz: 12b9a122343c1599c87caf97cd527bf98c83db50e4f5fab40b4657932c41b41c5f3437a26297141a2e19f064f5083ba9b12c099d4bc20f537b0cf440aa92d9e2
7
- data.tar.gz: 756e98178ef2c1fe80d9dfca936eab248e46e1c199665c23973fa9b96ad513a9bad2e4d0498e6ea3d3442a3aa76bf744109d91161e39c89aa0b29cdf83385ed0
6
+ metadata.gz: 87cdf732e266dc15d8a160d8ca7d4161f838b05f870d1fcc6b74f2c62f85a380ac98df778660206ab93927e22cd03dc5855b90062285461f48db041baeaa4cb4
7
+ data.tar.gz: 96b44cde5d58de7579dccd0394545f035412b01e26a46e2d686969176d6ea36589089ab3306a5972d2ae8cca4e8eb3d57b3c89173d96fe6531b5be8e528eae59
data/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@
3
3
  ## Next
4
4
  * Your contribution here
5
5
 
6
+ ## 1.7.2
7
+ ### Fixes
8
+ * [#6](https://github.com/glaucocustodio/tanakai/pull/6): Fix url validation - [MrChriss](https://github.com/MrChriss)
9
+
6
10
  ## 1.7.1
7
11
  ### Fixes
8
12
  * [#5](https://github.com/glaucocustodio/tanakai/pull/5): Replace `File.exists`/`Dir.exists` that have been removed on ruby 3.2 - [MrChriss](https://github.com/MrChriss)
data/lib/tanakai/base.rb CHANGED
@@ -192,7 +192,9 @@ module Tanakai
192
192
  end
193
193
 
194
194
  def request_to(handler, delay = nil, url:, data: {}, response_type: :html)
195
- raise InvalidUrlError, "Requested url is invalid: #{url}" unless URI.parse(url).kind_of?(URI::HTTP)
195
+ if %w[http https].exclude?(Addressable::URI.parse(url).scheme)
196
+ raise InvalidUrlError, "Requested url scheme is invalid: #{url}"
197
+ end
196
198
 
197
199
  if @config[:skip_duplicate_requests] && !unique_request?(url)
198
200
  add_event(:duplicate_requests) if self.with_info
@@ -1,3 +1,3 @@
1
1
  module Tanakai
2
- VERSION = "1.7.1"
2
+ VERSION = "1.7.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tanakai
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.1
4
+ version: 1.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Afanasev