coelacanth 0.3.3 → 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: 6b5da8cc3c59910b576c9dedd300abf57413e70fc85182f7e6f2ac3fda181b9c
4
- data.tar.gz: 3c49609446189d08a5e144860e4f959d6f7e71e1721641d09ed2cc4bfc397559
3
+ metadata.gz: 6b0de37380e1baaf97ecdbd15909bd84d20dda5bee7af7c3e267a7e035bc5b63
4
+ data.tar.gz: '08f9b452549ed9166e94fe2f2244adb4ff7c6b1b93f4aea6602faa33e3eb436e'
5
5
  SHA512:
6
- metadata.gz: ae911565bc8b062da7861f1a6d13fc769b25cb2c546996b841f8ef1dbd53e6da26b99d60aa26d71d2232d2e9538d36864aaced027e1f8400177ae8fe00a8b193
7
- data.tar.gz: 4a3e3675c63a4623a77f7c5ff997da0377c047b07e791069e7f55dc3834d9902ce64ad25f3491bca7ede851994c1fdac365e1f7247f4073b5cf1aa0f37265794
6
+ metadata.gz: 8057607e40d7b490521487972e33fe73345f0d01de7f2e7a04ac728032f5c018b06b935aead884b532eea4248c0264efb0463dff8abd4225ab929e11c17f3548
7
+ data.tar.gz: b56428c0e7625f91aefdeeefb6a979ac0ed2ea01fa2a517fd9d5d96cf901ac1c0c342d4078fbfa1aca63cf3577de635f7ea729a89017837c72165a3d0c6ead3d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- coelacanth (0.3.3)
4
+ coelacanth (0.3.4)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -17,7 +17,7 @@ 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)
@@ -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)
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Coelacanth
4
- VERSION = "0.3.3"
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.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yusuke