solidus_frontend 3.2.1 → 3.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +6 -0
- data/bin/sandbox +1 -1
- data/lib/generators/solidus_frontend/install/install_generator.rb +23 -0
- data/lib/spree/frontend/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8db0a9c977a78ff94acc7f6e1f965f496ca55c36b9355aedd1e57fe67c89aff8
|
4
|
+
data.tar.gz: c8277571c5058be80d6d723885cf929a9b5d554d729c08c93ca03af6b7dda73a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5443dc755596e683fecc3e4fff1908aed31240fa239488902edc274d7269d06cbd46706ec6cd5e22347c79b9d7e687c688a625cd12e1ad37932b4f5af4ded718
|
7
|
+
data.tar.gz: ac79894252b7ffaac61cce98f63c5a4ffb5d66bf617d92a8fd4522d7b07c866616764a6a2ec891d7f4fb0e3d4596c26f89f23c39acfbb6a8ad7dc42d14e4a73e
|
data/.circleci/config.yml
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
version: 2.1
|
2
2
|
|
3
|
+
skip_solidus_bolt: &skip_solidus_bolt
|
4
|
+
environment:
|
5
|
+
SKIP_SOLIDUS_BOLT: 1
|
6
|
+
|
3
7
|
orbs:
|
4
8
|
browser-tools: circleci/browser-tools@1.3
|
5
9
|
|
@@ -18,6 +22,7 @@ commands:
|
|
18
22
|
|
19
23
|
jobs:
|
20
24
|
run-specs-with-postgres:
|
25
|
+
<<: *skip_solidus_bolt
|
21
26
|
executor: solidusio_extensions/postgres
|
22
27
|
steps:
|
23
28
|
- checkout
|
@@ -27,6 +32,7 @@ jobs:
|
|
27
32
|
- solidusio_extensions/run-tests-solidus-master
|
28
33
|
- solidusio_extensions/store-test-results
|
29
34
|
run-specs-with-mysql:
|
35
|
+
<<: *skip_solidus_bolt
|
30
36
|
executor: solidusio_extensions/mysql
|
31
37
|
steps:
|
32
38
|
- checkout
|
data/bin/sandbox
CHANGED
@@ -80,7 +80,7 @@ unbundled bundle exec rails generate solidus:install \
|
|
80
80
|
$@
|
81
81
|
|
82
82
|
unbundled bundle exec rails generate solidus:auth:install
|
83
|
-
unbundled bundle exec rails generate ${extension_name}:install
|
83
|
+
unbundled bundle exec rails generate ${extension_name}:install --auto-accept
|
84
84
|
|
85
85
|
echo
|
86
86
|
echo "🚀 Sandbox app successfully created for $extension_name!"
|
@@ -5,6 +5,10 @@ module SolidusFrontend
|
|
5
5
|
class InstallGenerator < Rails::Generators::Base
|
6
6
|
source_root File.expand_path('templates', __dir__)
|
7
7
|
|
8
|
+
class_option :auto_accept,
|
9
|
+
type: :boolean,
|
10
|
+
default: false
|
11
|
+
|
8
12
|
def copy_initializer
|
9
13
|
template 'initializer.rb', 'config/initializers/solidus_frontend.rb'
|
10
14
|
end
|
@@ -19,6 +23,25 @@ module SolidusFrontend
|
|
19
23
|
template "vendor/assets/javascripts/spree/frontend/all.js"
|
20
24
|
template "vendor/assets/stylesheets/spree/frontend/all.css"
|
21
25
|
end
|
26
|
+
|
27
|
+
def install_solidus_bolt
|
28
|
+
return if ENV['SKIP_SOLIDUS_BOLT'] || !(options[:auto_accept] || yes?(<<~MSG))
|
29
|
+
Would you like to add bolt (https://www.bolt.com) as a default payment method?
|
30
|
+
|
31
|
+
If you answer yes, solidus_bolt (https://github.com/solidusio/solidus_bolt)
|
32
|
+
will be added to the installation (y/n):
|
33
|
+
MSG
|
34
|
+
|
35
|
+
gem 'solidus_bolt'
|
36
|
+
bundle_cleanly { `bundle` }
|
37
|
+
generate 'solidus_bolt:install --auto-run-migrations'
|
38
|
+
end
|
39
|
+
|
40
|
+
private
|
41
|
+
|
42
|
+
def bundle_cleanly(&block)
|
43
|
+
Bundler.respond_to?(:with_unbundled_env) ? Bundler.with_unbundled_env(&block) : Bundler.with_clean_env(&block)
|
44
|
+
end
|
22
45
|
end
|
23
46
|
end
|
24
47
|
end
|