closer 0.13.3 → 0.13.4

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: e9f7e1bdd6894caafae58187ee513c17f9b6a66e6dd4e3c98808f0eef97477db
4
- data.tar.gz: 1cca731a5f73e65df1654c291de06715452936df46b0eb8cf3f636de34e42e5a
3
+ metadata.gz: 6070a60f3349e8d059b551a8d898dc6838927b56b1792cee04ec6a1d25096258
4
+ data.tar.gz: f4e0784493862fc08ed9349955e94888dcabb0e2547c19fe532dcbe6d4621d5b
5
5
  SHA512:
6
- metadata.gz: 35fa23d0395e1e677026fb46e11338818f450d64bdbc9ca52508adddd941181845745f59711e66413ad23410f9e4af9b21fc0844d4dfc778d7fd75dd3e6b2a49
7
- data.tar.gz: '080857e1382aa55d8a2fe8d007fc1f85dc3da2318967677d806f785f2ab7c6a57c3524aec89e7f4efdb3d610dce276a12e2108b3e87f2353ed8262f9e7a8574d'
6
+ metadata.gz: d0dcdc09a60d2b231adf271533de8c281344fdd7337085883730a133af965d7f3fe98f450ab462875cb83310822f1f14f5f96613801dc1b5311353ce9b6e6e77
7
+ data.tar.gz: 8119cbda28866d2059061361a6ecec27a7ee1c064259979d0754996c835c52cb6f6cd65363dfa8ffd6a70db8ecd27fac4b2110d10e063dce61d2a9907eac0a6e
data/HISTORY.md CHANGED
@@ -1,5 +1,5 @@
1
- # 0.13.3
2
- Release Date: 2024-12-22
1
+ # 0.13.4
2
+ Release Date: 2024-12-24
3
3
  * add --no-tablespaces option to mysqldump
4
4
  * drop support for travis
5
5
 
@@ -5,48 +5,57 @@ Dir::glob(File.join(File.dirname(__FILE__), 'drivers', '*.rb')).each do |file|
5
5
  require_relative "drivers/#{File.basename(file)}"
6
6
  end
7
7
 
8
- Capybara.default_driver = (ENV['DRIVER'] || 'firefox').to_sym
8
+ browser = ENV['DRIVER']
9
+ boottype = 'headless' if ENV['HEADLESS']
10
+ boottype = 'remote' if ENV['REMOTE'] # always headless
11
+ Capybara.default_driver = [boottype, browser].compact.join('_').to_sym
9
12
 
10
- case Capybara.default_driver
11
- when :chrome
12
- Capybara.register_driver :chrome do |app|
13
- driver = Capybara::Selenium::Driver.new(app,
14
- browser: :chrome
15
- )
13
+ case browser
14
+ when 'chrome'
15
+ case boottype
16
+ when 'headless'
17
+ Capybara.register_driver :headless_chrome do |app|
18
+ Capybara::Selenium::Driver.new(
19
+ app,
20
+ browser: :chrome,
21
+ options: Closer::Drivers::Chrome.options
22
+ )
23
+ end
24
+ when 'remote'
25
+ Capybara.register_driver :remote_chrome do |app|
26
+ Capybara::Selenium::Driver.new(
27
+ app,
28
+ browser: :remote,
29
+ url: 'http://127.0.0.1:4444/wd/hub',
30
+ options: Closer::Drivers::Chrome.options
31
+ )
32
+ end
33
+ else
34
+ Capybara.register_driver :chrome do |app|
35
+ driver = Capybara::Selenium::Driver.new(app,
36
+ browser: :chrome
37
+ )
38
+ end
16
39
  end
17
- when :firefox
18
- Capybara.register_driver :firefox do |app|
19
- driver = Capybara::Selenium::Driver.new(app,
20
- browser: :firefox
21
- )
22
- end
23
- when :headless_chrome
24
- Capybara.register_driver :headless_chrome do |app|
25
- Capybara::Selenium::Driver.new(
26
- app,
27
- browser: :chrome,
28
- options: Closer::Drivers::Chrome.options
29
- )
30
- end
31
- when :headless_firefox
32
- Capybara.register_driver :headless_firefox do |app|
33
- options = Selenium::WebDriver::Firefox::Options.new
34
- options.args << '--headless'
35
-
36
- Capybara::Selenium::Driver.new(
37
- app,
38
- browser: :firefox,
39
- options: options
40
- )
41
- end
42
- when :remote_chrome
43
- Capybara.register_driver :remote_chrome do |app|
40
+ when 'firefox'
41
+ case boottype
42
+ when 'headless'
43
+ Capybara.register_driver :headless_firefox do |app|
44
+ options = Selenium::WebDriver::Firefox::Options.new
45
+ options.args << '--headless'
44
46
 
45
- Capybara::Selenium::Driver.new(
46
- app,
47
- browser: :remote,
48
- url: 'http://127.0.0.1:4444/wd/hub',
49
- options: Closer::Drivers::Chrome.options
50
- )
47
+ Capybara::Selenium::Driver.new(
48
+ app,
49
+ browser: :firefox,
50
+ options: options
51
+ )
52
+ end
53
+ else
54
+ Capybara.register_driver :firefox do |app|
55
+ driver = Capybara::Selenium::Driver.new(
56
+ app,
57
+ browser: :firefox
58
+ )
59
+ end
51
60
  end
52
61
  end
@@ -1,3 +1,3 @@
1
1
  module Closer
2
- VERSION = '0.13.3'
2
+ VERSION = '0.13.4'
3
3
  end
data/lib/tasks/close.rake CHANGED
@@ -55,7 +55,8 @@ task :close => dependencies do |t, args|
55
55
  end
56
56
 
57
57
  options = [
58
- 'DRIVER=' + (ENV['DRIVER'] || 'headless_chrome'),
58
+ 'DRIVER=' + (ENV['DRIVER'] || 'chrome'),
59
+ 'HEADLESS=' + (ENV['HEADLESS'] || 'false'),
59
60
  'PAUSE=' + (ENV['PAUSE'] || '0'),
60
61
  'COVERAGE=' + (ENV['COVERAGE'] || 'false'),
61
62
  'ACCEPTANCE_TEST=true',
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: closer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.3
4
+ version: 0.13.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - ichy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-12-22 00:00:00.000000000 Z
11
+ date: 2024-12-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber