aranha-selenium 0.7.1 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 951e9e5db49e16c7825f8b24707b6b61236b78bef2a5b99c73860291e7dc7b23
4
- data.tar.gz: 7ed611aadeb3401b3e2e5c2d43f5d5554be7f92d32ffe8ec8e0bb25c93f7f93e
3
+ metadata.gz: 38da8ad6f2737626bb06a9d17c4088e797de9cfb7f3e48ac7313fe2a5a6fbf08
4
+ data.tar.gz: feb50faa49ae4569110e6581c14181ec9929cc85487be6335acca527a7031b6a
5
5
  SHA512:
6
- metadata.gz: 893bc2edc73ec2c6c2004729d3515e86bfd6ee809f2b5cf183647e308873fb8a6b4e970ccd3e721007c25dddcc7b64be0b7bde884298eb5c63c993ec2e14b3d4
7
- data.tar.gz: '04994c6b945fac7288c65232de46af2d4b10d2b1edc26c0b0ef1159462b09c28a38931c71df156f53d9a35b66391c5a306b69b6aa73cb67634496c1eaa625fe7'
6
+ metadata.gz: 6396875e4a91c55bd620be2af4428c34abbd1511418461bca45a4971cee8d358b9f560d71e8371f825103eb5308b8ce7d18ede0c6d67cb557151ae39ae9982e1
7
+ data.tar.gz: e2b31b761174dfbd30c42981f949bae4bfb13bc7d2a20f3ccc7eed24f83bc24cfa44d6239f8391fd97ffb50859403376229b2e9d15fa98ce7d62757188670ba7
@@ -42,7 +42,9 @@ module Aranha
42
42
 
43
43
  # @return [Aranha::Selenium::DriverOptions]
44
44
  def driver_options
45
- ::Aranha::Selenium::DriverOptions.assert(options.except(:driver))
45
+ ::Aranha::Selenium::DriverOptions.default.merge(
46
+ ::Aranha::Selenium::DriverOptions.assert(options.except(:driver))
47
+ )
46
48
  end
47
49
 
48
50
  require_sub __FILE__
@@ -17,8 +17,8 @@ module Aranha
17
17
  end
18
18
 
19
19
  # @return [Aranha::Selenium::DriverOptions]
20
- def instance
21
- @instance ||= new
20
+ def default
21
+ @default ||= new
22
22
  end
23
23
  end
24
24
 
@@ -39,6 +39,8 @@ module Aranha
39
39
  user_values.each { |k, v| send("#{k}=", v) }
40
40
  end
41
41
 
42
+ compare_by :to_h
43
+
42
44
  lists.option.each_value do |key|
43
45
  define_method(key) { send("#{key}_option").value }
44
46
  define_method("#{key}=") { |user_value| send("#{key}_option").user_value = user_value }
@@ -54,6 +56,17 @@ module Aranha
54
56
  end
55
57
  end
56
58
 
59
+ # @param other [Aranha::Selenium::DriverOptions]
60
+ # @return [Aranha::Selenium::DriverOptions]
61
+ def merge(other)
62
+ self.class.assert(to_h.merge(other.to_h))
63
+ end
64
+
65
+ # @return [Hash]
66
+ def to_h
67
+ options.values.reject { |opt| opt.user_value.nil? }.to_h { |opt| [opt.key, opt.user_value] }
68
+ end
69
+
57
70
  private
58
71
 
59
72
  def options
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Aranha
4
4
  module Selenium
5
- VERSION = '0.7.1'
5
+ VERSION = '0.8.0'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aranha-selenium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esquilo Azul Company
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-12-09 00:00:00.000000000 Z
11
+ date: 2023-12-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: eac_fs