selenium_tor 2.1.0 → 2.2.0

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: 3bb9b5a97f55ceb2d55b2940a6475c2ef9175759a17e938e9b1d1d1b51517df3
4
- data.tar.gz: e232a3b3ad7c3afff9221c08977743f39040e5adbd33813f6fe3b6b07c425b83
3
+ metadata.gz: ae1ed331a58c7e616cd3caf5f74e7efa67efa9ac29a31ee2ab1783a38822a5a5
4
+ data.tar.gz: 33aacd6a6582bf72120270b7401ed7fd1efb1abf34ea13cafeb8d70ce8a15120
5
5
  SHA512:
6
- metadata.gz: 5cd45536c48760c84936bd4cb26b8b495f65d5b6dd488b7af3e312ed9b725143ea0a56508021cef889f6aef14daca1ccfe6c11681a1ccaecb118c0b6a62d8237
7
- data.tar.gz: f81ee65b98ccdc460816f1647cfc738dc31a7b529ea235e2fb5065c90379d5f2e0d9f46dd2edbb1c62bb75eb0d3b33a4cfe1518c24027a82b313a09c17683761
6
+ metadata.gz: 99746351074c59ad8d99cf40990abaf9a62cc787e7572f7f23069b93ea5d77ed3eae7e68794920203989d13e50f1cfdb8d3f23b4b879bafa6fe6e33eb3d57c51
7
+ data.tar.gz: b4a03bbfb0c9dc2bc64929f074ba16d81153671a57ba1c2fc0ddc4f1ce5862a39fad01d5f21bc758125c309b84fe9a24e931f76dc6d28b9db049baba9eee4cdf
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  ## master (unreleased)
2
2
 
3
+ ## [2.2.0] - 2025-09-25
4
+
5
+ * add options arg -remote-allow-system-access necessary for TB 15+
6
+ * add NotoColorEmoji font (15.0a3)
7
+
8
+ ## [2.1.1] - 2025-07-23
9
+
10
+ * fix bug in LibxulPatchable when fetching repo checksums
11
+
3
12
  ## [2.1.0] - 2025-06-24
4
13
 
5
14
  ### New features
data/Guardfile CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- guard :minitest do
3
+ guard :minitest, all_on_start: false do
4
4
  watch(%r{^test/(.*)/?test_(.*)\.rb$})
5
5
  watch(%r{^features/(.*)/?test_(.*)\.rb$})
6
6
  watch(%r{^lib/(.*/)?([^/]+)\.rb$}) { |m| "test/#{m[1]}test_#{m[2]}.rb" }
Binary file
data/lib/tor/driver.rb CHANGED
@@ -31,14 +31,19 @@ module Selenium
31
31
 
32
32
  LOCALHOST_PORT_REGEXP = /127\.0\.0\.1:(\d+)/
33
33
 
34
+ NOTO_COLOR_EMOJI = 'NotoColorEmoji.ttf'
35
+ FONTS_NOTO_COLOR_EMOJI_PATH = File.expand_path File.join('fonts', NOTO_COLOR_EMOJI)
36
+
34
37
  attr_reader :tor_process
35
38
 
36
39
  def initialize(options: nil, **)
37
40
  @data_dir = Dir.mktmpdir
38
41
  @options = options || Options.new # fix for issue #11, 'tis a puzzlement
42
+ @options.add_argument '-remote-allow-system-access' # FF 138+
39
43
  add_torrc_path_to_options
40
44
  @instance = DriverDelegate.new(options: @options, **)
41
45
  install_extensions @instance
46
+ noto_color_emoji_font # to remove in 15 stable
42
47
  pid = create_tor_process_and_start_tor(@options.tor_opts)
43
48
  @instance.pref[PREF_SOCKS_PORT] = socks_port(pid)
44
49
  super(@instance)
@@ -95,13 +100,21 @@ module Selenium
95
100
  end
96
101
 
97
102
  def domain
98
- URI(current_url).host&.match(/[^\.]+\.\w+$/)
103
+ URI(current_url).host&.match(/[^.]+\.\w+$/)
99
104
  end
100
105
 
101
106
  def socks_port(pid)
102
107
  str = `netstat -tnlp 2>/dev/null|grep #{pid}/tor` # net-tools dep
103
108
  str.match(LOCALHOST_PORT_REGEXP)[1].to_i
104
109
  end
110
+
111
+ def noto_color_emoji_font
112
+ if Tor::TBB_VERSION.to_i < 15
113
+ FileUtils.rm FONTS_NOTO_COLOR_EMOJI_PATH rescue Errno::ENOENT # rubocop:disable Style/RescueModifier
114
+ else
115
+ FileUtils.cp File.expand_path(NOTO_COLOR_EMOJI), FONTS_NOTO_COLOR_EMOJI_PATH
116
+ end
117
+ end
105
118
  end
106
119
  end
107
120
  end
@@ -1,4 +1,28 @@
1
1
  ---
2
+ 15.0a3:
3
+ unpatched_libxul: 8088a4549fe3d3f8fb0c7460333b1ffc12255810d2d43eb3c01c5f3b090f16c0
4
+ patched_libxul: 26c7e4ae0a8d63ede3f7b683985d30a7e4d5ef2f57b8c915935551f5801d1008
5
+ patch_checksum: a7ec23c6a2cb4bc045c977a69d16af69569355bedd6f6c08a4ffca5ea418bc93
6
+ 15.0a2:
7
+ unpatched_libxul: 0fcdb8bd2815007ed42ebd082eedf933d9c6e19457d76a3a10937c526fbf1b1e
8
+ patched_libxul: 2cf79b3a372dfe6bf10cfedb32fd9d5057e7a00d4b3dc9095eee378ea16221c4
9
+ patch_checksum: 5398870eaa76551459c6e9389b55783242426bbd30ac47ad09fe30b4604f96a9
10
+ 15.0a1:
11
+ unpatched_libxul: f45088cb17883e14410687ca2fb09a68e45bef699f105641dbe9fd0fdb0f9d09
12
+ patched_libxul: 7b5c745180d2d89e2c80b12debb18789758e4618dfee66ff0cd3b41fc922abc4
13
+ patch_checksum: 459744d0a0bcd7b83f019d746b79066d21ec55e59657df126eb76921d7686ae4
14
+ 14.5.7:
15
+ unpatched_libxul: d470f31ce92df0da3a5dde7ba9a223e9a021aa03e9678a40892635bab91cf4a3
16
+ patched_libxul: cc55cfdbfadcbd68c689b87a0a50a1f90dc2eb912ef783e7dd65f6f7431c6cba
17
+ patch_checksum: 6ef4235d56e4183b2ac924f154b8149a7643c7ea4a6309adb80cdd2633503a29
18
+ 14.5.6:
19
+ unpatched_libxul: dad37d046d0853e8fa1309ee56cdca89795d097909bb91aa6e30d768877c3438
20
+ patched_libxul: 7dfcb43f27f6062549e797aa1e8b7b904aa7f70f2c72259bafd329d8c5d25ade
21
+ patch_checksum: e15b60ccd3d7296411dfb3e7849b51e5097df7ef4543bb89fbbeb1e2477c3d33
22
+ 14.5.5:
23
+ unpatched_libxul: df44312e44e8c72d4c4b618f8acff00cb8a0367391c4f490dec186fe2408c914
24
+ patched_libxul: fdc827bb5c2a9b58e90a00c07d2f1cf40a51d8f0b5510f65f1f90726c0c9f015
25
+ patch_checksum: bae6dcbfa6ef93e6549ae5008ce0b34ed7a32e41fe29c77a76b3572e1f47a0ce
2
26
  14.5.4:
3
27
  unpatched_libxul: e2b89720c2a168ab948a329569d34495bdce18744b8c2f79a8dddb9d120a6aed
4
28
  patched_libxul: a687d91f0314fcc194b71e10b85a2a3be267ee2302feb0d72ed0db790af2dffa
@@ -81,7 +81,7 @@ module Selenium
81
81
  end
82
82
 
83
83
  def repo_checksums
84
- YAML.load(URI(REPO_LIBXUL_CHECKSUMS).read)[Tor::TBB_VERSION]
84
+ YAML.load(URI(REPO_LIBXUL_CHECKSUMS).read)[Tor::TBB_VERSION] || {}
85
85
  end
86
86
 
87
87
  def checksum_for(file)
data/lib/tor/version.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  module Selenium
4
4
  module WebDriver
5
5
  module Tor
6
- VERSION = '2.1.0'
6
+ VERSION = '2.2.0'
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: selenium_tor
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - MatzFan
@@ -48,6 +48,7 @@ files:
48
48
  - CHANGELOG.md
49
49
  - Guardfile
50
50
  - LICENSE.txt
51
+ - NotoColorEmoji.ttf
51
52
  - README.md
52
53
  - Rakefile
53
54
  - fonts/000_README.txt
@@ -235,7 +236,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
235
236
  - !ruby/object:Gem::Version
236
237
  version: '0'
237
238
  requirements: []
238
- rubygems_version: 3.7.0.dev
239
+ rubygems_version: 3.7.1
239
240
  specification_version: 4
240
241
  summary: Selenium extension for Tor Browser
241
242
  test_files: []