alchemy-solidus 3.0.2 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +1 -1
- data/lib/alchemy/solidus/version.rb +1 -1
- data/lib/generators/alchemy/solidus/install/install_generator.rb +14 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a20516abea7d38b47f1a022998b93c48dddadff27a75e82bf511b0d4bde77792
|
4
|
+
data.tar.gz: c991f9f52ce9c98a87adc6b8ca880564c8f8bfc2802aff44b17b808e252543b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb405c8a49ba7ce079fe81a94577447673c1c0f6b22b8161153097dec0f6f9e65af98bfb91be37ba26ca3bf0f71ef1e336e34968b70154a71ae5ac440dea3510
|
7
|
+
data.tar.gz: 959ff15ccbba0ab90a0a170bd9cc5fcffe099b89f388fb2066b220c0e45d9636782fe4c4e4a76cfb92e2a177801b520b499954493de84f31890663cb292acd37
|
data/Rakefile
CHANGED
@@ -20,7 +20,7 @@ task :test_setup do
|
|
20
20
|
system <<-SETUP.strip_heredoc
|
21
21
|
export RAILS_ENV=test && \
|
22
22
|
bin/rake db:environment:set db:drop && \
|
23
|
-
bin/rails g spree:install --force --
|
23
|
+
bin/rails g spree:install --force --auto-accept --no-seed --no-sample && \
|
24
24
|
bin/rails g alchemy:solidus:install --auto-accept --force
|
25
25
|
SETUP
|
26
26
|
exit($?.exitstatus) unless $?.success?
|
@@ -1,5 +1,12 @@
|
|
1
1
|
require 'rails/generators'
|
2
|
-
require '
|
2
|
+
require 'alchemy/version'
|
3
|
+
|
4
|
+
if Alchemy.gem_version >= Gem::Version.new("5.0.0.a")
|
5
|
+
require 'generators/alchemy/install/install_generator'
|
6
|
+
else
|
7
|
+
require 'rails/generators/alchemy/install/install_generator'
|
8
|
+
end
|
9
|
+
|
3
10
|
require 'generators/spree/custom_user/custom_user_generator'
|
4
11
|
require 'solidus_support'
|
5
12
|
|
@@ -83,14 +90,17 @@ module Alchemy
|
|
83
90
|
password = ask("Enter the password for the admin user", default: password)
|
84
91
|
end
|
85
92
|
|
93
|
+
# This is a bit strange, but without the double save this fails with a failed validation.
|
86
94
|
Alchemy::User.create!(
|
87
95
|
login: login,
|
88
96
|
email: email,
|
89
97
|
password: password,
|
90
98
|
password_confirmation: password,
|
91
|
-
alchemy_roles: 'admin'
|
92
|
-
|
93
|
-
|
99
|
+
alchemy_roles: 'admin'
|
100
|
+
).tap do |user|
|
101
|
+
user.spree_roles = [Spree::Role.find_or_create_by!(name: 'admin')]
|
102
|
+
user.save!
|
103
|
+
end
|
94
104
|
end
|
95
105
|
end
|
96
106
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alchemy-solidus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0
|
4
|
+
version: 3.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas von Deyen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-06-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: alchemy_cms
|