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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dc092e3f56ca3cc6ced2816d687b67790dd6fe571226ddde5e9ce0a2c0e6307e
4
- data.tar.gz: 9f3b68ca170a184f19415dd4576db00d6dd122e35f5dc6cc32f4c0e16ba7da16
3
+ metadata.gz: e9f7e1bdd6894caafae58187ee513c17f9b6a66e6dd4e3c98808f0eef97477db
4
+ data.tar.gz: 1cca731a5f73e65df1654c291de06715452936df46b0eb8cf3f636de34e42e5a
5
5
  SHA512:
6
- metadata.gz: '096b6e8fb195e017153c2b3b3f87ad693e492179924dd5c3216f0027da9a96c7d437d91cea5c978e4bd1a061f8653e69e2ab266db6d41e06ad0eb61117225ed9'
7
- data.tar.gz: 3ed348a021138756530b38c96a0800ff85c1c645b33bbbe335d2e5b1bd7b8b49fa7a7151ef51a034a660b815a77424ad9f75dec210baa034b0f922d7bcc782a4
6
+ metadata.gz: 35fa23d0395e1e677026fb46e11338818f450d64bdbc9ca52508adddd941181845745f59711e66413ad23410f9e4af9b21fc0844d4dfc778d7fd75dd3e6b2a49
7
+ data.tar.gz: '080857e1382aa55d8a2fe8d007fc1f85dc3da2318967677d806f785f2ab7c6a57c3524aec89e7f4efdb3d610dce276a12e2108b3e87f2353ed8262f9e7a8574d'
data/HISTORY.md CHANGED
@@ -1,3 +1,8 @@
1
+ # 0.13.3
2
+ Release Date: 2024-12-22
3
+ * add --no-tablespaces option to mysqldump
4
+ * drop support for travis
5
+
1
6
  # 0.13.2
2
7
  Release Date: 2024-12-20
3
8
  * drop support for poltergeist
data/lib/closer/config.rb CHANGED
@@ -8,6 +8,10 @@ class Closer::Config
8
8
  ENV['MERGE_TIMEOUT'] || 3600
9
9
  end
10
10
 
11
+ def remote?
12
+ true_value?(ENV['REMOTE'])
13
+ end
14
+
11
15
  private
12
16
 
13
17
  def true_value?(value)
@@ -19,7 +19,6 @@ module Closer
19
19
 
20
20
  unless options.fetch(:force, false)
21
21
  return if ENV['FORMAT'] == 'junit'
22
- return if ENV['CI'] == 'travis'
23
22
  end
24
23
 
25
24
  url = Rack::Utils.unescape(current_url)
@@ -2,7 +2,7 @@ require 'capybara'
2
2
  Capybara.default_selector = :css
3
3
  Capybara.server = :puma, {Silent: true} if defined?(Puma)
4
4
 
5
- if ENV['CI'] == 'travis'
5
+ if ENV['REMOTE']
6
6
  Capybara.server_host = '127.0.0.1'
7
7
  Capybara.server_port = '3000'
8
8
  end
@@ -1,61 +1,52 @@
1
1
  require 'capybara'
2
2
  require 'selenium-webdriver'
3
3
 
4
- require_relative 'drivers/file_detector'
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
- if ENV['CI'] == 'travis'
9
- caps = Selenium::WebDriver::Remote::Capabilities.__send__(Capybara.default_driver, {
10
- 'tunnel-identifier' => ENV['TRAVIS_JOB_NUMBER']
11
- })
12
- caps.platform = ENV['PLATFORM'] unless ENV['PLATFORM'].empty?
13
-
14
- Capybara.register_driver Capybara.default_driver do |app|
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
- :browser => :remote,
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
- Closer::Drivers::FileDetector.apply(driver)
36
+ Capybara::Selenium::Driver.new(
37
+ app,
38
+ browser: :firefox,
39
+ options: options
40
+ )
22
41
  end
23
- else
24
- case Capybara.default_driver
25
- when :chrome
26
- Capybara.register_driver :chrome do |app|
27
- driver = Capybara::Selenium::Driver.new(app,
28
- browser: :chrome
29
- )
30
- end
31
- when :firefox
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)
@@ -1,3 +1,3 @@
1
1
  module Closer
2
- VERSION = '0.13.2'
2
+ VERSION = '0.13.3'
3
3
  end
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.2
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-19 00:00:00.000000000 Z
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.3.26
147
+ rubygems_version: 3.4.22
147
148
  signing_key:
148
149
  specification_version: 4
149
150
  summary: Cucumber test execution tool