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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9458c9b23471af597aa21b0c27fb3ad00e0a829f364f72b2ba9a579e564a6e29
4
- data.tar.gz: '09eebf44c01872177527514bdda6a50fc5a3354b122c85d2d5f12794516fd53d'
3
+ metadata.gz: a20516abea7d38b47f1a022998b93c48dddadff27a75e82bf511b0d4bde77792
4
+ data.tar.gz: c991f9f52ce9c98a87adc6b8ca880564c8f8bfc2802aff44b17b808e252543b2
5
5
  SHA512:
6
- metadata.gz: fbbb24e6746d071ebfeb72cdda900b50b30441cc5bcbf8b524d8ffbbbe364dcb641b27f1bf64f11a3e433097cf3ead40ce50b1b3ec0aed23610afeb99d091283
7
- data.tar.gz: 2be71ea7f1d13b05cc86b95c625002bf5e1b51c019854006a336083a3092cd0cccf1a4971010caae8f92d29b190de878fcc1e776e117fd76e4b534cff51de23d
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 --quiet --auto-accept --no-seed --no-sample && \
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,5 @@
1
1
  module Alchemy
2
2
  module Solidus
3
- VERSION = "3.0.2"
3
+ VERSION = "3.1.0"
4
4
  end
5
5
  end
@@ -1,5 +1,12 @@
1
1
  require 'rails/generators'
2
- require 'rails/generators/alchemy/install/install_generator'
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
- spree_roles: [Spree::Role.find_or_create_by!(name: 'admin')]
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.2
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-02-25 00:00:00.000000000 Z
11
+ date: 2020-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: alchemy_cms