solidus_dev_support 2.9.0 → 2.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/lib/solidus_dev_support/rake_tasks.rb +6 -5
- data/lib/solidus_dev_support/templates/extension/Gemfile.tt +1 -5
- data/lib/solidus_dev_support/templates/extension/bin/sandbox.tt +2 -1
- data/lib/solidus_dev_support/version.rb +1 -1
- data/spec/features/create_extension_spec.rb +1 -5
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 788f71717b021055e787d2c6674185edfc3f0c8154f282909193dd8d6b3f1340
|
4
|
+
data.tar.gz: a2c3bc4da0c08605d5119b3d2470996f6acc953c687124ac086543036fd96544
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 870e124775746c0c9b0f5b1a26e116c72e646b6eb44d9586278cfc2b26462d7ce38c0b93637ea149576234d6e2d6adf41a3f423752f90707b58a98ed42330e24
|
7
|
+
data.tar.gz: 3feabe8e96ff3d15f5f03bc02512e7000c69188717c85b3d3991435a40049954c3cc070784e5cb6c35f250b1238a973cb6741cb4363b606ad55d716e266ab2ef
|
data/Gemfile
CHANGED
@@ -7,14 +7,15 @@ module SolidusDevSupport
|
|
7
7
|
class RakeTasks
|
8
8
|
include Rake::DSL
|
9
9
|
|
10
|
-
def self.install(
|
11
|
-
new(
|
10
|
+
def self.install(**args)
|
11
|
+
new(**args).tap(&:install)
|
12
12
|
end
|
13
13
|
|
14
|
-
def initialize(root: Dir.pwd)
|
14
|
+
def initialize(root: Dir.pwd, user_class: "Spree::LegacyUser")
|
15
15
|
@root = Pathname(root)
|
16
16
|
@test_app_path = @root.join(ENV.fetch('DUMMY_PATH', 'spec/dummy'))
|
17
17
|
@gemspec = Bundler.load_gemspec(@root.glob("{,*}.gemspec").first)
|
18
|
+
@user_class = user_class
|
18
19
|
end
|
19
20
|
|
20
21
|
attr_reader :test_app_path, :root, :gemspec
|
@@ -39,12 +40,12 @@ module SolidusDevSupport
|
|
39
40
|
# We need to go back to the gem root since the upstream
|
40
41
|
# extension:test_app changes the working directory to be the dummy app.
|
41
42
|
task :test_app do
|
42
|
-
Rake::Task['extension:test_app'].invoke
|
43
|
+
Rake::Task['extension:test_app'].invoke(@user_class)
|
43
44
|
cd root
|
44
45
|
end
|
45
46
|
|
46
47
|
directory ENV.fetch('DUMMY_PATH', nil) do
|
47
|
-
Rake::Task['extension:test_app'].invoke
|
48
|
+
Rake::Task['extension:test_app'].invoke(@user_class)
|
48
49
|
end
|
49
50
|
end
|
50
51
|
end
|
@@ -20,17 +20,13 @@ end
|
|
20
20
|
# See https://github.com/bundler/bundler/issues/6677
|
21
21
|
gem 'rails', '>0.a'
|
22
22
|
|
23
|
-
<% if file_name != 'solidus_auth_devise' %>
|
24
|
-
# Provides basic authentication functionality for testing parts of your engine
|
25
|
-
gem 'solidus_auth_devise'
|
26
|
-
<% end %>
|
27
23
|
case ENV.fetch('DB', nil)
|
28
24
|
when 'mysql'
|
29
25
|
gem 'mysql2'
|
30
26
|
when 'postgresql'
|
31
27
|
gem 'pg'
|
32
28
|
else
|
33
|
-
gem 'sqlite3'
|
29
|
+
gem 'sqlite3', '~> 1.4'
|
34
30
|
end
|
35
31
|
|
36
32
|
# While we still support Ruby < 3 we need to workaround a limitation in
|
@@ -30,7 +30,8 @@ echo "~~~> Removing the old sandbox"
|
|
30
30
|
rm -rf ./sandbox
|
31
31
|
|
32
32
|
echo "~~~> Creating a pristine Rails app"
|
33
|
-
rails
|
33
|
+
rails_version=`bundle exec ruby -e'require "rails"; puts Rails.version'`
|
34
|
+
rails _${rails_version}_ new sandbox \
|
34
35
|
--database="${DB:-sqlite3}" \
|
35
36
|
--skip-git \
|
36
37
|
--skip-keeps \
|
@@ -96,11 +96,9 @@ RSpec.describe 'Create extension' do
|
|
96
96
|
|
97
97
|
def check_bundle_install
|
98
98
|
cd(install_path) do
|
99
|
-
open('Gemfile', 'a') { |f| f.puts "gem 'solidus_dev_support', path: '
|
99
|
+
open('Gemfile', 'a') { |f| f.puts "gem 'solidus_dev_support', path: '../..'" }
|
100
100
|
end
|
101
101
|
|
102
|
-
expect { bundle_install }.to raise_error(command_failed_error, /invalid gemspec/)
|
103
|
-
|
104
102
|
# Update gemspec with the required fields
|
105
103
|
gemspec_path = install_path.join(gemspec_name)
|
106
104
|
gemspec = gemspec_path.read.lines
|
@@ -139,9 +137,7 @@ RSpec.describe 'Create extension' do
|
|
139
137
|
|
140
138
|
def check_sandbox
|
141
139
|
cd(install_path) do
|
142
|
-
# rubocop:disable Lint/InterpolationCheck
|
143
140
|
command = 'bin/rails-sandbox runner "puts %{The version of SolidusTestExtension is #{SolidusTestExtension::VERSION}}"'
|
144
|
-
# rubocop:enable Lint/InterpolationCheck
|
145
141
|
|
146
142
|
first_run_output = sh(command)
|
147
143
|
expect(first_run_output).to include("Creating the sandbox app...")
|
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.
|
4
|
+
version: 2.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alessandro Desantis
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-12-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|
@@ -390,7 +390,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
390
390
|
- !ruby/object:Gem::Version
|
391
391
|
version: '0'
|
392
392
|
requirements: []
|
393
|
-
rubygems_version: 3.
|
393
|
+
rubygems_version: 3.5.22
|
394
394
|
signing_key:
|
395
395
|
specification_version: 4
|
396
396
|
summary: Development tools for Solidus extensions.
|