tanakai 1.7.1 → 1.7.3

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: cb65d7166d55618db1a70554c886990b5bd39133caaead43e3cc7038b05f4e1d
4
+ data.tar.gz: 62f247465198e57c82d1759d198d48bc8ae16070b5f1905bc7177688458ce703
5
5
  SHA512:
6
- metadata.gz: 12b9a122343c1599c87caf97cd527bf98c83db50e4f5fab40b4657932c41b41c5f3437a26297141a2e19f064f5083ba9b12c099d4bc20f537b0cf440aa92d9e2
7
- data.tar.gz: 756e98178ef2c1fe80d9dfca936eab248e46e1c199665c23973fa9b96ad513a9bad2e4d0498e6ea3d3442a3aa76bf744109d91161e39c89aa0b29cdf83385ed0
6
+ metadata.gz: 13c3ae4c8ed0154ad514594907434d95fc9e94f15b2822aa94cc325a43f13f1838cbd6c19cd6617092eca9a7f3048ab98ef116e108d1bfa9d07665a384ee9587
7
+ data.tar.gz: 9d491510a9532e5cac24c06e02a4794fe5588ea230577750077dbff3b8db30249fbbac6ebeaec5059a074b1812f34eb2c3d6113a0e0586f106e684881095f039
data/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  ## Next
4
4
  * Your contribution here
5
5
 
6
+ ## 1.7.3
7
+ ### Fixes
8
+ * [#7](https://github.com/glaucocustodio/tanakai/pull/7): Fix Cuprite error when using root user in docker - [mqzhang](https://github.com/mqzhang)
9
+
10
+ ## 1.7.2
11
+ ### Fixes
12
+ * [#6](https://github.com/glaucocustodio/tanakai/pull/6): Fix url validation - [MrChriss](https://github.com/MrChriss)
13
+
6
14
  ## 1.7.1
7
15
  ### Fixes
8
16
  * [#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
@@ -17,6 +17,7 @@ module Tanakai::BrowserBuilder
17
17
  # Register driver
18
18
  Capybara.register_driver :cuprite do |app|
19
19
  driver_options = { headless: ENV.fetch("HEADLESS", "true") == "true" }
20
+ driver_options[:browser_options] = {'no-sandbox': nil} if Process.uid == 0 # root user
20
21
  logger.debug "BrowserBuilder (cuprite): enabled extensions"
21
22
 
22
23
  Capybara::Cuprite::Driver.new(app, driver_options)
@@ -1,3 +1,3 @@
1
1
  module Tanakai
2
- VERSION = "1.7.1"
2
+ VERSION = "1.7.3"
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.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Afanasev
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2023-11-02 00:00:00.000000000 Z
12
+ date: 2023-12-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor