coelacanth 0.3.2 → 0.3.4

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: dc0f98072fb81b09973a8acbee60d8f9b34c31cdb75e161f7d2f1e8f2bd9ee3c
4
- data.tar.gz: fba2700643da179439dc2588717bb78b06fb6d9ef056c262ae792084e81ab4eb
3
+ metadata.gz: 6b0de37380e1baaf97ecdbd15909bd84d20dda5bee7af7c3e267a7e035bc5b63
4
+ data.tar.gz: '08f9b452549ed9166e94fe2f2244adb4ff7c6b1b93f4aea6602faa33e3eb436e'
5
5
  SHA512:
6
- metadata.gz: 0a7c6bd212ba78c390798d9b522f5f3f5927941a95eec56ec20e78c0d4744756cd8b3a5cc8eada99f8e5f4539309785d7b8dec1c6ab0454201450e700063016f
7
- data.tar.gz: 7144aaf89b5ad33ebb8858e866c639c70da8aaffa9d028b7fe898d4fdf0c4d2cb65c4793d96af8bfa4cc2c595b1cb4559927dceda1368323b8d98cfb215363fb
6
+ metadata.gz: 8057607e40d7b490521487972e33fe73345f0d01de7f2e7a04ac728032f5c018b06b935aead884b532eea4248c0264efb0463dff8abd4225ab929e11c17f3548
7
+ data.tar.gz: b56428c0e7625f91aefdeeefb6a979ac0ed2ea01fa2a517fd9d5d96cf901ac1c0c342d4078fbfa1aca63cf3577de635f7ea729a89017837c72165a3d0c6ead3d
data/Gemfile CHANGED
@@ -8,7 +8,7 @@ gemspec
8
8
  gem "ferrum", "~> 0.16"
9
9
  gem "rake", "~> 13.2"
10
10
  gem "rspec", "~> 3.0"
11
- gem "rubocop", "~> 1.21"
11
+ gem "rubocop", "~> 1.75"
12
12
  gem "oga", "~> 3.4"
13
13
  gem "base64", "~> 0.2.0"
14
14
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- coelacanth (0.3.1)
4
+ coelacanth (0.3.4)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -17,14 +17,14 @@ GEM
17
17
  bigdecimal
18
18
  rexml
19
19
  diff-lcs (1.6.1)
20
- ferrum (0.16)
20
+ ferrum (0.17.1)
21
21
  addressable (~> 2.5)
22
22
  base64 (~> 0.2)
23
23
  concurrent-ruby (~> 1.1)
24
24
  webrick (~> 1.7)
25
25
  websocket-driver (~> 0.7)
26
26
  hashdiff (1.1.2)
27
- json (2.10.2)
27
+ json (2.11.3)
28
28
  language_server-protocol (3.17.0.4)
29
29
  lint_roller (1.1.0)
30
30
  oga (3.4)
@@ -35,7 +35,7 @@ GEM
35
35
  ast (~> 2.4.1)
36
36
  racc
37
37
  prism (1.4.0)
38
- public_suffix (6.0.1)
38
+ public_suffix (6.0.2)
39
39
  racc (1.8.1)
40
40
  rainbow (3.1.1)
41
41
  rake (13.2.1)
@@ -54,7 +54,7 @@ GEM
54
54
  diff-lcs (>= 1.2.0, < 2.0)
55
55
  rspec-support (~> 3.13.0)
56
56
  rspec-support (3.13.2)
57
- rubocop (1.75.3)
57
+ rubocop (1.75.5)
58
58
  json (~> 2.3)
59
59
  language_server-protocol (~> 3.17.0.2)
60
60
  lint_roller (~> 1.1.0)
@@ -96,7 +96,7 @@ DEPENDENCIES
96
96
  oga (~> 3.4)
97
97
  rake (~> 13.2)
98
98
  rspec (~> 3.0)
99
- rubocop (~> 1.21)
99
+ rubocop (~> 1.75)
100
100
  webmock (~> 3.25)
101
101
 
102
102
  BUNDLED WITH
@@ -28,14 +28,18 @@ module Coelacanth::Client
28
28
  private
29
29
 
30
30
  def remote_client
31
- if @remote_client.nil?
32
- headers = @config.read("remote_client.headers")
33
- @remote_client = ::Ferrum::Browser.new(
34
- ws_url: @config.read("remote_client.ws_url"),
35
- timeout: @config.read("remote_client.timeout")
36
- ).create_page
37
- @remote_client.headers.set(headers) unless headers.empty?
38
- end
31
+ return @remote_client if @remote_client
32
+
33
+ headers = @config.read("remote_client.headers")
34
+
35
+ @browser = ::Ferrum::Browser.new(
36
+ ws_url: @config.read("remote_client.ws_url"),
37
+ timeout: @config.read("remote_client.timeout")
38
+ )
39
+ @remote_client = @browser.create_page
40
+
41
+ @remote_client.headers.set(headers) if headers && headers.any?
42
+
39
43
  @remote_client
40
44
  end
41
45
  end
@@ -6,7 +6,7 @@ module Coelacanth
6
6
  # Coelacanth::Dom
7
7
  class Dom
8
8
  def oga(url)
9
- Oga.parse_xml(Client::Ferrum.new(url).get_response)
9
+ Oga.parse_xml(Net::HTTP.get_response(URI.parse(url)).body)
10
10
  end
11
11
  end
12
12
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Coelacanth
4
- VERSION = "0.3.2"
4
+ VERSION = "0.3.4"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coelacanth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yusuke