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 +4 -4
- data/HISTORY.md +2 -2
- data/lib/closer/helpers/driver.rb +49 -40
- data/lib/closer/version.rb +1 -1
- data/lib/tasks/close.rake +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6070a60f3349e8d059b551a8d898dc6838927b56b1792cee04ec6a1d25096258
|
4
|
+
data.tar.gz: f4e0784493862fc08ed9349955e94888dcabb0e2547c19fe532dcbe6d4621d5b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0dcdc09a60d2b231adf271533de8c281344fdd7337085883730a133af965d7f3fe98f450ab462875cb83310822f1f14f5f96613801dc1b5311353ce9b6e6e77
|
7
|
+
data.tar.gz: 8119cbda28866d2059061361a6ecec27a7ee1c064259979d0754996c835c52cb6f6cd65363dfa8ffd6a70db8ecd27fac4b2110d10e063dce61d2a9907eac0a6e
|
data/HISTORY.md
CHANGED
@@ -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
|
-
|
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
|
11
|
-
when
|
12
|
-
|
13
|
-
|
14
|
-
|
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
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
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
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
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
|
data/lib/closer/version.rb
CHANGED
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'] || '
|
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.
|
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-
|
11
|
+
date: 2024-12-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cucumber
|