Skip to content

Commit 55b738c

Browse files
authored
Merge pull request #191 from solidusio/elia/updates
Update proposed defaults
2 parents 6b85cc1 + b176680 commit 55b738c

10 files changed

Lines changed: 36 additions & 67 deletions

File tree

.circleci/config.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,19 @@ commands:
2929

3030
jobs:
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

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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

4848
In case of conflicting files, you will be prompted for an action. You can overwrite the files with

lib/solidus_dev_support/templates/extension/.circleci/config.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,30 @@ orbs:
1111
solidusio_extensions: solidusio/extensions@volatile
1212

1313
jobs:
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

3034
workflows:
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
Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1 @@
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

lib/solidus_dev_support/templates/extension/Gemfile renamed to lib/solidus_dev_support/templates/extension/Gemfile.tt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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
1616
gem 'rails', '>0.a'
1717

18+
<% if file_name != 'solidus_auth_devise' %>
1819
# Provides basic authentication functionality for testing parts of your engine
1920
gem 'solidus_auth_devise'
20-
21+
<% end %>
2122
case ENV.fetch('DB', nil)
2223
when 'mysql'
2324
gem 'mysql2'

lib/solidus_dev_support/templates/extension/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) <%= Time.now.year %> [name of plugin creator]
1+
Copyright (c) <%= Time.now.year %> <%= gemspec.authors.join ', ' %>
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without modification,

lib/solidus_dev_support/templates/extension/README.md

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -71,21 +71,10 @@ $ bin/rails server
7171
Use 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.

lib/solidus_dev_support/templates/extension/bin/sandbox.tt

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,9 @@
11
#!/usr/bin/env bash
22

33
set -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

318
if [ -z "$SOLIDUS_BRANCH" ]
329
then
@@ -50,7 +27,8 @@ function unbundled {
5027
}
5128

5229
rm -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 \

lib/solidus_dev_support/templates/extension/gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
.sass-cache
99
coverage
1010
Gemfile.lock
11+
Gemfile-local
1112
tmp
1213
nbproject
1314
pkg

lib/solidus_dev_support/templates/extension/lib/generators/%file_name%/install/install_generator.rb.tt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)