solidus_dev_support 2.5.4 โ†’ 2.5.5

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: 85a6ab192c62cc4e24367a2dc3be90d11779653bf8aa065a5079c390a19e8bc1
4
- data.tar.gz: 839d23671a6475fbc0a67fdb2647e275debf52bbe04bffa3acffa06ccb75fd16
3
+ metadata.gz: fe379e7fb130ab58c9441d18cae3d9c0eb6041c112db22497d93d170f4670267
4
+ data.tar.gz: 0a2bbcd253dd04a0b76723aa46279c68a0d2596c57fb7dc197c89bc4b8d50e16
5
5
  SHA512:
6
- metadata.gz: a872cd08b37f12b1fdad990c97bfa943a12f8ea86948fd5f28aea51e5f6d8f11e399049e26e78138caf2dd0ca218b363020940d7eff3b9e53a6b74230996537c
7
- data.tar.gz: 03d5230592262f2027272467ff7c5f866ef8943c590710b476fafa45b21c10e1faf0f4b58c209334e06148caf979e2bd50be4aab438e46d67341fa3de0499a56
6
+ metadata.gz: 16934e61453c2437bf129eaaa4ffb91927ccb811d5325490da187ede88a8d14c956e3e9d44bfb2b358f745036b4fdeced91a20884467e6bf2e3899222f72fae5
7
+ data.tar.gz: 31090179be805e26f804ee26e7fb3ac70865d73105087777e2485961ddfed1a41c6ce48d32c7e4b1cceb45796cb5a2e189099756665228301196b73c13212a9d
data/.circleci/config.yml CHANGED
@@ -12,21 +12,25 @@ commands:
12
12
  steps:
13
13
  - checkout
14
14
  - run:
15
- command: "gem install bundler -v '>=2' --conservative"
16
- no_output_timeout: 20m
15
+ name: "Update bundler"
16
+ command: |
17
+ sudo gem update --system
18
+ gem --version
19
+ gem install bundler -v '>=2.3.21' --conservative
20
+ bundle --version
17
21
 
18
22
  jobs:
19
23
  solidus-master:
20
- executor: solidusio_extensions/sqlite-memory
24
+ executor: solidusio_extensions/sqlite
21
25
  steps: ['setup', 'solidusio_extensions/run-tests-solidus-master']
22
26
  solidus-current:
23
- executor: solidusio_extensions/sqlite-memory
27
+ executor: solidusio_extensions/sqlite
24
28
  steps: ['setup', 'solidusio_extensions/run-tests-solidus-current']
25
29
  solidus-older:
26
- executor: solidusio_extensions/sqlite-memory
30
+ executor: solidusio_extensions/sqlite
27
31
  steps: ['setup', 'solidusio_extensions/run-tests-solidus-older']
28
32
  lint-code:
29
- executor: solidusio_extensions/sqlite-memory
33
+ executor: solidusio_extensions/sqlite
30
34
  steps: ['setup', 'solidusio_extensions/lint-code']
31
35
 
32
36
  workflows:
data/CHANGELOG.md CHANGED
@@ -1,8 +1,21 @@
1
1
  # Changelog
2
2
 
3
- ## [2.5.4](https://github.com/solidusio/solidus_dev_support/tree/2.5.4) (2022-05-31)
3
+ ## [2.5.5](https://github.com/solidusio/solidus_dev_support/tree/2.5.5) (2022-09-08)
4
4
 
5
- [Full Changelog](https://github.com/solidusio/solidus_dev_support/compare/v2.5.2...2.5.4)
5
+ [Full Changelog](https://github.com/solidusio/solidus_dev_support/compare/v2.5.4...2.5.5)
6
+
7
+ **Implemented enhancements:**
8
+
9
+ - Configure solidus\_chrome\_headless as capybara-screenshot driver [\#190](https://github.com/solidusio/solidus_dev_support/pull/190) ([tvdeyen](https://github.com/tvdeyen))
10
+ - Misc: auth-devise, extracted frontend gem, sqlite [\#188](https://github.com/solidusio/solidus_dev_support/pull/188) ([elia](https://github.com/elia))
11
+
12
+ **Fixed bugs:**
13
+
14
+ - Revert temporary fix for Octokit [\#186](https://github.com/solidusio/solidus_dev_support/pull/186) ([waiting-for-dev](https://github.com/waiting-for-dev))
15
+
16
+ ## [v2.5.4](https://github.com/solidusio/solidus_dev_support/tree/v2.5.4) (2022-05-31)
17
+
18
+ [Full Changelog](https://github.com/solidusio/solidus_dev_support/compare/v2.5.2...v2.5.4)
6
19
 
7
20
  **Fixed bugs:**
8
21
 
@@ -78,7 +78,6 @@ module SolidusDevSupport
78
78
 
79
79
  GitHubChangelogGenerator::RakeTask.new(:changelog) do |config|
80
80
  require 'octokit'
81
- require 'octokit/repository'
82
81
  repo = Octokit::Repository.from_url(gemspec.metadata['source_code_uri'] || gemspec.homepage)
83
82
 
84
83
  config.user = repo.owner
@@ -21,4 +21,10 @@ Capybara.drivers[:selenium_chrome_headless].tap do |original_driver|
21
21
  end
22
22
  end
23
23
 
24
+ require 'capybara-screenshot/rspec'
25
+
26
+ Capybara::Screenshot.register_driver(:solidus_chrome_headless) do |driver, path|
27
+ driver.browser.save_screenshot(path)
28
+ end
29
+
24
30
  require 'spree/testing_support/capybara_ext'
@@ -8,11 +8,9 @@
8
8
  #
9
9
 
10
10
  require 'solidus_dev_support/rspec/rails_helper'
11
-
12
- require 'capybara-screenshot/rspec'
13
11
  require 'solidus_dev_support/rspec/capybara'
14
12
 
15
- def dev_support_assets_preload
13
+ dev_support_assets_preload = ->(*) {
16
14
  if Rails.application.respond_to?(:precompiled_assets)
17
15
  Rails.application.precompiled_assets
18
16
  else
@@ -21,18 +19,14 @@ def dev_support_assets_preload
21
19
  Rails.application.assets.find_asset(asset)
22
20
  end
23
21
  end
24
- end
22
+ }
25
23
 
26
24
  RSpec.configure do |config|
27
25
  config.when_first_matching_example_defined(type: :feature) do
28
- config.before :suite do
29
- dev_support_assets_preload
30
- end
26
+ config.before :suite, &dev_support_assets_preload
31
27
  end
32
28
 
33
29
  config.when_first_matching_example_defined(type: :system) do
34
- config.before :suite do
35
- dev_support_assets_preload
36
- end
30
+ config.before :suite, &dev_support_assets_preload
37
31
  end
38
32
  end
@@ -6,6 +6,10 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
6
6
  branch = ENV.fetch('SOLIDUS_BRANCH', 'master')
7
7
  gem 'solidus', github: 'solidusio/solidus', branch: branch
8
8
 
9
+ # The solidus_frontend gem has been pulled out since v3.2
10
+ gem 'solidus_frontend', github: 'solidusio/solidus_frontend' if branch == 'master'
11
+ gem 'solidus_frontend' if branch >= 'v3.2' # rubocop:disable Bundler/DuplicatedGem
12
+
9
13
  # Needed to help Bundler figure out how to resolve dependencies,
10
14
  # otherwise it takes forever to resolve them.
11
15
  # See https://github.com/bundler/bundler/issues/6677
@@ -23,6 +27,11 @@ else
23
27
  gem 'sqlite3'
24
28
  end
25
29
 
30
+ # While we still support Ruby < 3 we need to workaround a limitation in
31
+ # the 'async' gem that relies on the latest ruby, since RubyGems doesn't
32
+ # resolve gems based on the required ruby version.
33
+ gem 'async', '< 3' if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('3')
34
+
26
35
  gemspec
27
36
 
28
37
  # Use a local Gemfile to include development dependencies that might not be
@@ -1,6 +1,10 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
3
  set -e
4
+ if [ ! -z $DEBUG ]
5
+ then
6
+ set -x
7
+ fi
4
8
 
5
9
  case "$DB" in
6
10
  postgres|postgresql)
@@ -9,21 +13,36 @@ postgres|postgresql)
9
13
  mysql)
10
14
  RAILSDB="mysql"
11
15
  ;;
12
- sqlite|'')
16
+ sqlite3|sqlite)
17
+ RAILSDB="sqlite3"
18
+ ;;
19
+ '')
20
+ echo "~~> Use 'export DB=[postgres|mysql|sqlite]' to control the DB adapter"
13
21
  RAILSDB="sqlite3"
14
22
  ;;
15
23
  *)
16
- echo "Invalid DB specified: $DB"
24
+ echo "Invalid value specified for the Solidus sandbox: DB=\"$DB\"."
25
+ echo "Please use 'postgres', 'mysql', or 'sqlite' instead."
17
26
  exit 1
18
27
  ;;
19
28
  esac
29
+ echo "~~> Using $RAILSDB as the database engine"
20
30
 
21
- if [ ! -z $SOLIDUS_BRANCH ]
31
+ if [ -n $SOLIDUS_BRANCH ]
22
32
  then
23
33
  BRANCH=$SOLIDUS_BRANCH
24
34
  else
35
+ echo "~~> Use 'export SOLIDUS_BRANCH=[master|v3.2|...]' to control the Solidus branch"
25
36
  BRANCH="master"
26
37
  fi
38
+ echo "~~> Using branch $BRANCH of solidus"
39
+
40
+ if [ -z $SOLIDUS_FRONTEND ]
41
+ then
42
+ echo "~~> Use 'export SOLIDUS_FRONTEND=[solidus_frontend|solidus_starter_frontend]' to control the Solidus frontend"
43
+ SOLIDUS_FRONTEND="solidus_frontend"
44
+ fi
45
+ echo "~~> Using branch $SOLIDUS_FRONTEND as the solidus frontend"
27
46
 
28
47
  extension_name="<%= file_name %>"
29
48
 
@@ -50,7 +69,6 @@ fi
50
69
  cd ./sandbox
51
70
  cat <<RUBY >> Gemfile
52
71
  gem 'solidus', github: 'solidusio/solidus', branch: '$BRANCH'
53
- gem 'solidus_auth_devise', '>= 2.1.0'
54
72
  gem 'rails-i18n'
55
73
  gem 'solidus_i18n'
56
74
 
@@ -71,16 +89,14 @@ unbundled bundle exec rails generate solidus:install \
71
89
  --auto-accept \
72
90
  --user_class=Spree::User \
73
91
  --enforce_available_locales=true \
74
- --with-authentication=false \
92
+ --with-authentication=<%= file_name != 'solidus_auth_devise' %> \
75
93
  --payment-method=none \
94
+ --frontend=${SOLIDUS_FRONTEND} \
76
95
  $@
77
96
 
78
- unbundled bundle exec rails generate solidus:auth:install
79
- unbundled bundle exec rails generate ${extension_name}:install
97
+ unbundled bundle exec rails generate solidus:auth:install --auto-run-migrations
98
+ unbundled bundle exec rails generate ${extension_name}:install --auto-run-migrations
80
99
 
81
100
  echo
82
101
  echo "๐Ÿš€ Sandbox app successfully created for $extension_name!"
83
- echo "๐Ÿš€ Using $RAILSDB and Solidus $BRANCH"
84
- echo "๐Ÿš€ Use 'export DB=[postgres|mysql|sqlite]' to control the DB adapter"
85
- echo "๐Ÿš€ Use 'export SOLIDUS_BRANCH=<BRANCH-NAME>' to control the Solidus version"
86
- echo "๐Ÿš€ This app is intended for test purposes."
102
+ echo "๐Ÿงช This app is intended for test purposes."
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
17
17
  spec.metadata['source_code_uri'] = '<%= gemspec.metadata["source_code_uri"] %>'
18
18
  spec.metadata['changelog_uri'] = '<%= gemspec.metadata["changelog_uri"] %>'
19
19
 
20
- spec.required_ruby_version = Gem::Requirement.new('~> 2.5')
20
+ spec.required_ruby_version = Gem::Requirement.new('>= 2.5', '< 4')
21
21
 
22
22
  # Specify which files should be added to the gem when it is released.
23
23
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SolidusDevSupport
4
- VERSION = "2.5.4"
4
+ VERSION = "2.5.5"
5
5
 
6
6
  def self.gem_version
7
7
  Gem::Version.new(VERSION)
@@ -33,7 +33,7 @@ Gem::Specification.new do |spec|
33
33
  spec.add_dependency 'capybara-screenshot', '~> 1.0'
34
34
  spec.add_dependency 'codecov', '~> 0.2'
35
35
  spec.add_dependency 'database_cleaner', '~> 1.7'
36
- spec.add_dependency 'factory_bot', '~> 4.8'
36
+ spec.add_dependency 'factory_bot', '>= 4.8'
37
37
  spec.add_dependency 'factory_bot_rails'
38
38
  spec.add_dependency 'ffaker', '~> 2.13'
39
39
  spec.add_dependency 'gem-release', '~> 2.1'
@@ -155,18 +155,22 @@ RSpec.describe 'Create extension' do
155
155
 
156
156
  def sh(*args)
157
157
  command = args.size == 1 ? args.first : args.shelljoin
158
- output, status = with_unbundled_env { Open3.capture2e(command) }
158
+ output, status = with_unbundled_env do
159
+ Open3.capture2e({ 'CI' => nil }, command)
160
+ end
159
161
 
160
- if status.success?
161
- output.to_s
162
- else
163
- if $DEBUG
164
- warn '~' * 80
165
- warn "$ #{command}"
166
- warn output.to_s
167
- end
162
+ if $DEBUG || ENV['DEBUG']
163
+ warn '~' * 80
164
+ warn "$ #{command}"
165
+ warn output.to_s
166
+ warn "$ #{command} ~~~~> EXIT STATUS: #{status.exitstatus}"
167
+ end
168
+
169
+ unless status.success?
168
170
  raise(command_failed_error, "command failed: #{command}\n#{output}")
169
171
  end
172
+
173
+ output.to_s
170
174
  end
171
175
 
172
176
  def with_unbundled_env(&block)
@@ -182,11 +186,12 @@ RSpec.describe 'Create extension' do
182
186
  # variables doesn't help because commands are run with a clean env.
183
187
  bundle_path = "#{gem_root}/vendor/bundle"
184
188
 
185
- command = 'bundle install'
186
- command += " --path=#{bundle_path.shellescape}" if File.exist?(bundle_path)
189
+ if File.exist?(bundle_path)
190
+ sh "bundle config set --local path #{bundle_path.shellescape}"
191
+ end
187
192
 
188
193
  output = nil
189
- cd(install_path) { output = sh command }
194
+ cd(install_path) { output = sh 'bundle install' }
190
195
  output
191
196
  end
192
197
  end
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.4
4
+ version: 2.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alessandro Desantis
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-05-31 00:00:00.000000000 Z
11
+ date: 2022-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara
@@ -70,14 +70,14 @@ dependencies:
70
70
  name: factory_bot
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '4.8'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '4.8'
83
83
  - !ruby/object:Gem::Dependency
@@ -308,7 +308,7 @@ dependencies:
308
308
  - - ">="
309
309
  - !ruby/object:Gem::Version
310
310
  version: '0'
311
- description:
311
+ description:
312
312
  email:
313
313
  - alessandrodesantis@nebulab.it
314
314
  executables:
@@ -397,7 +397,7 @@ metadata:
397
397
  source_code_uri: https://github.com/solidusio/solidus_dev_support
398
398
  changelog_uri: https://github.com/solidusio/solidus_dev_support/blob/master/CHANGELOG.md
399
399
  rubygems_mfa_required: 'true'
400
- post_install_message:
400
+ post_install_message:
401
401
  rdoc_options: []
402
402
  require_paths:
403
403
  - lib
@@ -412,8 +412,8 @@ 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.1
416
- signing_key:
415
+ rubygems_version: 3.3.21
416
+ signing_key:
417
417
  specification_version: 4
418
418
  summary: Development tools for Solidus extensions.
419
419
  test_files: