solidus_dev_support 2.5.2 → 2.5.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: e98ad4f08c0abe09fd5c4a86640e25db13f003324dcbd0ca1dc8e8747dcfd35b
4
- data.tar.gz: 76ac684f40e4615ed1cad8a91c0f1140416e4009ad0e2ddd61986d05a04703e5
3
+ metadata.gz: aca5f58a3e39d6a6e6dcac45c538fc7963bc059eac65b4d8127c3a8a29a4740b
4
+ data.tar.gz: d868457dd1c63018a4f94bac62cac24897efe3bc5c478878cf00d52f67e59e00
5
5
  SHA512:
6
- metadata.gz: 075e9de0887997b6893354aa756a720b82e8cad4f15bbaf59face03658b1a3259360aff1d6b25850d9ea37365dc81e12321b69ed6130b4919384df8ac1b79a9c
7
- data.tar.gz: 8b9432063e8147d83bc856961d8404b140bedc8a921137ba3db8f04542e1d18bfcf87a31f7bcba516a76adc4e977d0bcde8698568945f60e51bd114aaf3631ee
6
+ metadata.gz: 9755aa55ac8beab16aacdea85f5bbe6a9b020c49aecca8ff761ff82bb8328f480964525e5d236a1bc2a43ee3cc244e7823c1b4fe6efbebf02934b7b49b8b9c71
7
+ data.tar.gz: 71ea3d512238276d23ff582febe5233eb5dd090e06857b9584386a50c5ebf2736d6179af49b39dd0fac530996d0d094768ef61313db648844df3df08829ec3d1
@@ -13,7 +13,7 @@ module SolidusDevSupport
13
13
 
14
14
  def initialize(root: Dir.pwd)
15
15
  @root = Pathname(root)
16
- @test_app_path = @root.join(ENV['DUMMY_PATH'] || 'spec/dummy')
16
+ @test_app_path = @root.join(ENV.fetch('DUMMY_PATH', 'spec/dummy'))
17
17
  @gemspec = Bundler.load_gemspec(@root.glob("{,*}.gemspec").first)
18
18
  end
19
19
 
@@ -43,7 +43,7 @@ module SolidusDevSupport
43
43
  cd root
44
44
  end
45
45
 
46
- directory ENV['DUMMY_PATH'] do
46
+ directory ENV.fetch('DUMMY_PATH', nil) do
47
47
  Rake::Task['extension:test_app'].invoke
48
48
  end
49
49
  end
@@ -61,7 +61,7 @@ module SolidusDevSupport
61
61
  require 'rspec/core/rake_task'
62
62
 
63
63
  namespace :extension do
64
- ::RSpec::Core::RakeTask.new(:specs, [] => FileList[ENV['DUMMY_PATH']]) do |t|
64
+ ::RSpec::Core::RakeTask.new(:specs, [] => FileList[ENV.fetch('DUMMY_PATH', nil)]) do |t|
65
65
  # Ref: https://circleci.com/docs/2.0/configuration-reference#store_test_results
66
66
  # Ref: https://github.com/solidusio/circleci-orbs-extensions#test-results-rspec
67
67
  if ENV['TEST_RESULTS_PATH']
@@ -82,7 +82,7 @@ module SolidusDevSupport
82
82
 
83
83
  config.user = repo.owner
84
84
  config.project = repo.name
85
- config.future_release = "v#{ENV['UNRELEASED_VERSION'] || gemspec.version}"
85
+ config.future_release = "v#{ENV.fetch('UNRELEASED_VERSION') { gemspec.version }}"
86
86
 
87
87
  rescue Octokit::InvalidRepository
88
88
  warn <<~WARN
@@ -3,16 +3,20 @@
3
3
  require 'webdrivers/chromedriver'
4
4
 
5
5
  # Allow to override the initial windows size
6
- CAPYBARA_WINDOW_SIZE = (ENV['CAPYBARA_WINDOW_SIZE'] || '1920x1080').split('x', 2).map(&:to_i)
6
+ CAPYBARA_WINDOW_SIZE = ENV.fetch('CAPYBARA_WINDOW_SIZE', '1920x1080').split('x', 2).map(&:to_i)
7
+ CAPYBARA_WINDOW_WIDTH = CAPYBARA_WINDOW_SIZE[0]
8
+ CAPYBARA_WINDOW_HEIGHT = CAPYBARA_WINDOW_SIZE[1]
7
9
 
8
- Capybara.javascript_driver = (ENV['CAPYBARA_JAVASCRIPT_DRIVER'] || "solidus_chrome_headless").to_sym
10
+ Capybara.javascript_driver = ENV.fetch('CAPYBARA_JAVASCRIPT_DRIVER', "solidus_chrome_headless").to_sym
9
11
  Capybara.default_max_wait_time = 10
10
12
  Capybara.server = :puma, { Silent: true } # A fix for rspec/rspec-rails#1897
11
13
 
12
14
  Capybara.drivers[:selenium_chrome_headless].tap do |original_driver|
13
15
  Capybara.register_driver :solidus_chrome_headless do |app|
14
16
  original_driver.call(app).tap do |driver|
15
- driver.options[:options].args << "--window-size=#{CAPYBARA_WINDOW_SIZE.join(',')}"
17
+ driver.resize_window_to(
18
+ driver.current_window_handle, CAPYBARA_WINDOW_WIDTH, CAPYBARA_WINDOW_HEIGHT
19
+ )
16
20
  end
17
21
  end
18
22
  end
@@ -14,7 +14,7 @@ RSpec.configure do |config|
14
14
  config.mock_with :rspec
15
15
  config.color = true
16
16
 
17
- config.fail_fast = ENV['FAIL_FAST'] || false
17
+ config.fail_fast = ENV.fetch('FAIL_FAST', false)
18
18
  config.order = 'random'
19
19
 
20
20
  config.raise_errors_for_deprecations!
@@ -1,6 +1,9 @@
1
1
  version: 2.1
2
2
 
3
3
  orbs:
4
+ # Required for feature specs.
5
+ browser-tools: circleci/browser-tools@1.1
6
+
4
7
  # Always take the latest version of the orb, this allows us to
5
8
  # run specs against Solidus supported versions only without the need
6
9
  # to change this configuration every time a Solidus version is released
@@ -11,14 +14,17 @@ jobs:
11
14
  run-specs-with-postgres:
12
15
  executor: solidusio_extensions/postgres
13
16
  steps:
17
+ - browser-tools/install-browser-tools
14
18
  - solidusio_extensions/run-tests
15
19
  run-specs-with-mysql:
16
20
  executor: solidusio_extensions/mysql
17
21
  steps:
22
+ - browser-tools/install-browser-tools
18
23
  - solidusio_extensions/run-tests
19
24
  lint-code:
20
25
  executor: solidusio_extensions/sqlite-memory
21
26
  steps:
27
+ - browser-tools/install-browser-tools
22
28
  - solidusio_extensions/lint-code
23
29
 
24
30
  workflows:
@@ -14,7 +14,7 @@ gem 'rails', '>0.a'
14
14
  # Provides basic authentication functionality for testing parts of your engine
15
15
  gem 'solidus_auth_devise'
16
16
 
17
- case ENV['DB']
17
+ case ENV.fetch('DB', nil)
18
18
  when 'mysql'
19
19
  gem 'mysql2'
20
20
  when 'postgresql'
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SolidusDevSupport
4
- VERSION = "2.5.2"
4
+ VERSION = "2.5.3"
5
5
 
6
6
  def self.gem_version
7
7
  Gem::Version.new(VERSION)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_dev_support
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.2
4
+ version: 2.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alessandro Desantis
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-11-23 00:00:00.000000000 Z
11
+ date: 2022-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara
@@ -412,7 +412,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
412
412
  - !ruby/object:Gem::Version
413
413
  version: '0'
414
414
  requirements: []
415
- rubygems_version: 3.0.3
415
+ rubygems_version: 3.1.6
416
416
  signing_key:
417
417
  specification_version: 4
418
418
  summary: Development tools for Solidus extensions.