File tree Expand file tree Collapse file tree
lib/solidus_dev_support/templates/extension
lib/generators/%file_name%/install Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,13 +29,19 @@ commands:
2929
3030jobs :
3131 solidus-master :
32- executor : solidusio_extensions/sqlite
32+ executor :
33+ name : solidusio_extensions/sqlite
34+ ruby_version : ' 3.1'
3335 steps : ['setup', 'solidusio_extensions/run-tests-solidus-master', 'notify']
3436 solidus-current :
35- executor : solidusio_extensions/sqlite
37+ executor :
38+ name : solidusio_extensions/sqlite
39+ ruby_version : ' 3.0'
3640 steps : ['setup', 'solidusio_extensions/run-tests-solidus-current', 'notify']
3741 solidus-older :
38- executor : solidusio_extensions/sqlite
42+ executor :
43+ name : solidusio_extensions/sqlite
44+ ruby_version : ' 2.7'
3945 steps : ['setup', 'solidusio_extensions/run-tests-solidus-older', 'notify']
4046 lint-code :
4147 executor : solidusio_extensions/sqlite
Original file line number Diff line number Diff line change @@ -38,11 +38,11 @@ in solidus_dev_support.
3838
3939#### Updating existing extensions
4040
41- If you have an existing extension and want to update it to use the latest standards from this gem,
42- you can run the following in the extension's directory:
41+ If you have an existing extension generated with ` solidus_dev_support ` and want to update it to use
42+ the latest standards from this gem, you can run the following in the extension's directory:
4343
4444``` console
45- $ solidus extension .
45+ $ bundle exec solidus extension .
4646```
4747
4848In case of conflicting files, you will be prompted for an action. You can overwrite the files with
Original file line number Diff line number Diff line change @@ -11,25 +11,30 @@ orbs:
1111 solidusio_extensions : solidusio/extensions@volatile
1212
1313jobs :
14+ run-specs-with-sqlite :
15+ executor : solidusio_extensions/sqlite
16+ steps :
17+ - browser-tools/install-chrome
18+ - solidusio_extensions/run-tests
1419 run-specs-with-postgres :
1520 executor : solidusio_extensions/postgres
1621 steps :
17- - browser-tools/install-browser-tools
22+ - browser-tools/install-chrome
1823 - solidusio_extensions/run-tests
1924 run-specs-with-mysql :
2025 executor : solidusio_extensions/mysql
2126 steps :
22- - browser-tools/install-browser-tools
27+ - browser-tools/install-chrome
2328 - solidusio_extensions/run-tests
2429 lint-code :
2530 executor : solidusio_extensions/sqlite-memory
2631 steps :
27- - browser-tools/install-browser-tools
2832 - solidusio_extensions/lint-code
2933
3034workflows :
3135 " Run specs on supported Solidus versions " :
3236 jobs :
37+ - run-specs-with-sqlite
3338 - run-specs-with-postgres
3439 - run-specs-with-mysql
3540 - lint-code
@@ -43,5 +48,6 @@ workflows:
4348 only :
4449 - master
4550 jobs :
51+ - run-specs-with-sqlite
4652 - run-specs-with-postgres
4753 - run-specs-with-mysql
Original file line number Diff line number Diff line change 1- # Number of days of inactivity before an issue becomes stale
2- daysUntilStale : 60
3- # Number of days of inactivity before a stale issue is closed
4- daysUntilClose : false
5- # Issues with these labels will never be considered stale
6- exemptLabels :
7- - pinned
8- - security
9- # Label to use when marking an issue as stale
10- staleLabel : stale
11- # Comment to post when marking an issue as stale. Set to `false` to disable
12- markComment : >
13- This issue has been automatically marked as stale because it has not had
14- recent activity. It might be closed if no further activity occurs. Thank you
15- for your contributions.
16- # Comment to post when closing a stale issue. Set to `false` to disable
17- closeComment : false
1+ _extends : .github
Original file line number Diff line number Diff line change @@ -15,9 +15,10 @@ gem 'solidus_frontend' if branch >= 'v3.2' # rubocop:disable Bundler/DuplicatedG
1515# See https://github.com/bundler/bundler/issues/6677
1616gem 'rails', '>0.a'
1717
18+ <% if file_name != 'solidus_auth_devise' %>
1819# Provides basic authentication functionality for testing parts of your engine
1920gem 'solidus_auth_devise'
20-
21+ <% end %>
2122case ENV.fetch('DB', nil)
2223when 'mysql'
2324 gem 'mysql2'
Original file line number Diff line number Diff line change 1- Copyright (c) <%= Time.now.year %> [name of plugin creator]
1+ Copyright (c) <%= Time.now.year %> <%= gemspec.authors.join ', ' %>
22All rights reserved.
33
44Redistribution and use in source and binary forms, with or without modification,
Original file line number Diff line number Diff line change @@ -71,21 +71,10 @@ $ bin/rails server
7171Use Ctrl - C to stop
7272```
7373
74- ### Updating the changelog
75-
76- Before and after releases the changelog should be updated to reflect the up-to-date status of
77- the project:
78-
79- ``` shell
80- bin/rake changelog
81- git add CHANGELOG.md
82- git commit -m " Update the changelog"
83- ```
84-
8574### Releasing new versions
8675
87- Please refer to the dedicated [ page] ( https://github.com/solidusio/solidus/wiki/How-to-release-extensions ) on Solidus wiki.
76+ Please refer to the [ dedicated page] ( https://github.com/solidusio/solidus/wiki/How-to-release-extensions ) in the Solidus wiki.
8877
8978## License
9079
91- Copyright (c) <%= Time.now.year %> [ name of extension author ] , released under the New BSD License.
80+ Copyright (c) <%= Time.now.year %> <%= gemspec.authors.join ', ' %> , released under the New BSD License.
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
33set -e
4- if [ -n " $DEBUG " ]
5- then
6- set -x
7- fi
4+ test -z " ${DEBUG+empty_string} " || set -x
85
9- case " $DB " in
10- postgres|postgresql)
11- RAILSDB=" postgresql"
12- ;;
13- mysql)
14- RAILSDB=" mysql"
15- ;;
16- sqlite3|sqlite)
17- RAILSDB=" sqlite3"
18- ;;
19- ' ' )
20- echo " ~~> Use 'export DB=[postgres|mysql|sqlite]' to control the DB adapter"
21- RAILSDB=" sqlite3"
22- ;;
23- * )
24- echo " Invalid value specified for the Solidus sandbox: DB=\" $DB \" ."
25- echo " Please use 'postgres', 'mysql', or 'sqlite' instead."
26- exit 1
27- ;;
28- esac
29- echo " ~~> Using $RAILSDB as the database engine"
6+ test " $DB " = " sqlite" && export DB=" sqlite3"
307
318if [ -z " $SOLIDUS_BRANCH " ]
329then
@@ -50,7 +27,8 @@ function unbundled {
5027}
5128
5229rm -rf ./sandbox
53- unbundled bundle exec rails new sandbox --database=" $RAILSDB " \
30+ unbundled bundle exec rails new sandbox \
31+ --database=" ${DB:- sqlite3} " \
5432 --skip-bundle \
5533 --skip-git \
5634 --skip-keeps \
Original file line number Diff line number Diff line change 88.sass-cache
99coverage
1010Gemfile.lock
11+ Gemfile-local
1112tmp
1213nbproject
1314pkg
Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ module <%= class_name %>
66 class_option :auto_run_migrations, type: :boolean, default: false
77 source_root File.expand_path('templates', __dir__)
88
9+ def self.exit_on_failure?
10+ true
11+ end
12+
913 def copy_initializer
1014 template 'initializer.rb', 'config/initializers/<%= file_name %>.rb'
1115 end
You can’t perform that action at this time.
0 commit comments