selenium_chrome_helper 0.1.6 → 0.1.7

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: 53cc5509f21ea3d72827a5d581b31c83beab63176fb38eb5f36831e6a902a0f0
4
- data.tar.gz: 3db7e48ce4f63ab0ca567b20d88d300d85dd0a85715e5d9a0df8106a5a036bc6
3
+ metadata.gz: 7e2c6036630870a945ef7a84793c16714e759d94559d3cd3b0f1955c552d1abc
4
+ data.tar.gz: 16466d851db87a8c81bf49dae35d669abcbafb610217c01c06e73897889f7021
5
5
  SHA512:
6
- metadata.gz: 53bd775f8e623c70616c737694e8928e8a51acf38f0dee0f302c2fc11647862d3dbf22b7ed53500db8cc6c5753c73c296f10cc4e68cf743a04af5f97cc611c95
7
- data.tar.gz: 8c1775982f1c7bbf13fd0be4fb3d057c0756f7839fede46d2137df2c68554ebc5a16e11814c33f35c605888704e37ac9b9362b9af71b8fceae1d16e5f86ee7d4
6
+ metadata.gz: 751cbf3daab36bfedb7176fabeb7672d64acf88e99a5c79672640395c633ab938b87883665cb1d7d86592411f15021155a2cc5589fbe8110f21044c37c2a905c
7
+ data.tar.gz: 0433ff00eb1ab2690c23c35a73160f8bc63db9c37e8c7d154400e54829e28c40f804f9a40a3f58d4311048fb12a6e8cce4f81d9bfe3ae093e30b2dc3f2504f10
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SeleniumChromeHelper
4
- VERSION = '0.1.6'
4
+ VERSION = '0.1.7'
5
5
  end
@@ -78,6 +78,7 @@ namespace :chrome do
78
78
  create_entry_directory(entry_path)
79
79
  extract_entry(entry, entry_path)
80
80
  make_executable_if_chromedriver(entry, entry_path)
81
+ make_executable_if_chrome(entry, entry_path)
81
82
  end
82
83
 
83
84
  def create_entry_directory(entry_path)
@@ -93,5 +94,16 @@ namespace :chrome do
93
94
 
94
95
  FileUtils.chmod('+x', entry_path)
95
96
  end
97
+
98
+ def make_executable_if_chrome
99
+ return unless RUBY_PLATFORM =~ /darwin/
100
+
101
+ FileUtils.chmod('+x', entry_path) if entry.name.end_with?('MacOS/Google Chrome for Testing')
102
+
103
+ return unless entry.name.include?('Google Chrome for Testing.app')
104
+
105
+ app_bundle_root = entry_path[/.*Google Chrome for Testing\.app/]
106
+ system('xattr', '-d', 'com.apple.quarantine', app_bundle_root) if app_bundle_root && File.exist?(app_bundle_root)
107
+ end
96
108
  end
97
109
  # rubocop:enable Metrics/BlockLength, Security/Open
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: selenium_chrome_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gonzalo Robaina