closer 0.13.2 → 0.13.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/HISTORY.md +5 -0
- data/lib/closer/config.rb +4 -0
- data/lib/closer/helpers/capture.rb +0 -1
- data/lib/closer/helpers/capybara.rb +1 -1
- data/lib/closer/helpers/driver.rb +40 -49
- data/lib/closer/helpers/drivers/chrome.rb +17 -0
- data/lib/closer/helpers/snapshots/db_dump.rb +1 -1
- data/lib/closer/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9f7e1bdd6894caafae58187ee513c17f9b6a66e6dd4e3c98808f0eef97477db
|
4
|
+
data.tar.gz: 1cca731a5f73e65df1654c291de06715452936df46b0eb8cf3f636de34e42e5a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35fa23d0395e1e677026fb46e11338818f450d64bdbc9ca52508adddd941181845745f59711e66413ad23410f9e4af9b21fc0844d4dfc778d7fd75dd3e6b2a49
|
7
|
+
data.tar.gz: '080857e1382aa55d8a2fe8d007fc1f85dc3da2318967677d806f785f2ab7c6a57c3524aec89e7f4efdb3d610dce276a12e2108b3e87f2353ed8262f9e7a8574d'
|
data/HISTORY.md
CHANGED
data/lib/closer/config.rb
CHANGED
@@ -1,61 +1,52 @@
|
|
1
1
|
require 'capybara'
|
2
2
|
require 'selenium-webdriver'
|
3
3
|
|
4
|
-
|
4
|
+
Dir::glob(File.join(File.dirname(__FILE__), 'drivers', '*.rb')).each do |file|
|
5
|
+
require_relative "drivers/#{File.basename(file)}"
|
6
|
+
end
|
5
7
|
|
6
8
|
Capybara.default_driver = (ENV['DRIVER'] || 'firefox').to_sym
|
7
9
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
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
|
+
)
|
16
|
+
end
|
17
|
+
when :firefox
|
18
|
+
Capybara.register_driver :firefox do |app|
|
15
19
|
driver = Capybara::Selenium::Driver.new(app,
|
16
|
-
:
|
17
|
-
:url => "http://#{ENV['SAUCE_USERNAME']}:#{ENV['SAUCE_ACCESS_KEY']}@ondemand.saucelabs.com/wd/hub",
|
18
|
-
:capabilities => caps
|
20
|
+
browser: :firefox
|
19
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'
|
20
35
|
|
21
|
-
|
36
|
+
Capybara::Selenium::Driver.new(
|
37
|
+
app,
|
38
|
+
browser: :firefox,
|
39
|
+
options: options
|
40
|
+
)
|
22
41
|
end
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
Capybara.
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
Capybara.register_driver :firefox do |app|
|
33
|
-
driver = Capybara::Selenium::Driver.new(app,
|
34
|
-
browser: :firefox
|
35
|
-
)
|
36
|
-
end
|
37
|
-
when :headless_chrome
|
38
|
-
Capybara.register_driver :headless_chrome do |app|
|
39
|
-
options = Selenium::WebDriver::Chrome::Options.new
|
40
|
-
options.add_argument('headless')
|
41
|
-
options.add_argument('disable-gpu')
|
42
|
-
options.add_argument('no-sandbox')
|
43
|
-
Capybara::Selenium::Driver.new(
|
44
|
-
app,
|
45
|
-
browser: :chrome,
|
46
|
-
options: options
|
47
|
-
)
|
48
|
-
end
|
49
|
-
when :headless_firefox
|
50
|
-
Capybara.register_driver :headless_firefox do |app|
|
51
|
-
options = Selenium::WebDriver::Firefox::Options.new
|
52
|
-
options.args << '--headless'
|
53
|
-
|
54
|
-
Capybara::Selenium::Driver.new(
|
55
|
-
app,
|
56
|
-
browser: :firefox,
|
57
|
-
options: options
|
58
|
-
)
|
59
|
-
end
|
42
|
+
when :remote_chrome
|
43
|
+
Capybara.register_driver :remote_chrome do |app|
|
44
|
+
|
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
|
+
)
|
60
51
|
end
|
61
52
|
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Closer
|
2
|
+
module Drivers
|
3
|
+
class Chrome
|
4
|
+
|
5
|
+
def self.options
|
6
|
+
options = Selenium::WebDriver::Chrome::Options.new
|
7
|
+
options.add_argument('disable-dev-shm-usage')
|
8
|
+
options.add_argument('disable-gpu')
|
9
|
+
options.add_argument('headless=new')
|
10
|
+
options.add_argument('no-sandbox')
|
11
|
+
options.add_argument('window-size=1280,720')
|
12
|
+
options
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -41,7 +41,7 @@ class DbDump
|
|
41
41
|
filepath = File.join(dump_dir, "#{database}-#{Time.now.strftime('%Y-%m-%d_%H%M')}.dump.gz")
|
42
42
|
|
43
43
|
FileUtils.mkdir_p(File.dirname(filepath))
|
44
|
-
system("mysqldump -u #{user} -p#{password} -h #{host} #{database} | gzip > #{filepath}")
|
44
|
+
system("mysqldump -u #{user} -p#{password} -h #{host} #{database} --no-tablespaces | gzip > #{filepath}")
|
45
45
|
end
|
46
46
|
|
47
47
|
def load_mysql(dump_file)
|
data/lib/closer/version.rb
CHANGED
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.3
|
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-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cucumber
|
@@ -117,6 +117,7 @@ files:
|
|
117
117
|
- lib/closer/helpers/capture.rb
|
118
118
|
- lib/closer/helpers/capybara.rb
|
119
119
|
- lib/closer/helpers/driver.rb
|
120
|
+
- lib/closer/helpers/drivers/chrome.rb
|
120
121
|
- lib/closer/helpers/drivers/file_detector.rb
|
121
122
|
- lib/closer/helpers/multi_test.rb
|
122
123
|
- lib/closer/helpers/snapshot.rb
|
@@ -143,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
143
144
|
- !ruby/object:Gem::Version
|
144
145
|
version: '0'
|
145
146
|
requirements: []
|
146
|
-
rubygems_version: 3.
|
147
|
+
rubygems_version: 3.4.22
|
147
148
|
signing_key:
|
148
149
|
specification_version: 4
|
149
150
|
summary: Cucumber test execution tool
|