solidus_dev_support 1.1.0 → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +7 -16
  3. data/.github/PULL_REQUEST_TEMPLATE.md +0 -1
  4. data/.github_changelog_generator +4 -0
  5. data/.mergify.yml +39 -0
  6. data/.rubocop.yml +42 -0
  7. data/CHANGELOG.md +74 -5
  8. data/Gemfile +1 -1
  9. data/OLD_CHANGELOG.md +200 -0
  10. data/README.md +13 -6
  11. data/Rakefile +11 -1
  12. data/lib/solidus_dev_support/extension.rb +1 -1
  13. data/lib/solidus_dev_support/rake_tasks.rb +12 -0
  14. data/lib/solidus_dev_support/rspec/feature_helper.rb +18 -9
  15. data/lib/solidus_dev_support/rspec/rails_helper.rb +28 -0
  16. data/lib/solidus_dev_support/rubocop/config.yml +82 -202
  17. data/lib/solidus_dev_support/solidus_command.rb +0 -1
  18. data/lib/solidus_dev_support/templates/extension/.circleci/config.yml +6 -0
  19. data/lib/solidus_dev_support/templates/extension/README.md +43 -22
  20. data/lib/solidus_dev_support/templates/extension/bin/rails +7 -0
  21. data/lib/solidus_dev_support/templates/extension/bin/{r.tt → rails-engine.tt} +0 -0
  22. data/lib/solidus_dev_support/templates/extension/bin/{sandbox_rails → rails-sandbox} +1 -3
  23. data/lib/solidus_dev_support/templates/extension/bin/sandbox.tt +3 -0
  24. data/lib/solidus_dev_support/templates/extension/extension.gemspec.tt +2 -2
  25. data/lib/solidus_dev_support/templates/extension/gitignore +3 -0
  26. data/lib/solidus_dev_support/templates/extension/lib/%file_name%/engine.rb.tt +1 -1
  27. data/lib/solidus_dev_support/templates/extension/lib/generators/%file_name%/install/install_generator.rb.tt +5 -5
  28. data/lib/solidus_dev_support/templates/extension/rubocop.yml +0 -5
  29. data/lib/solidus_dev_support/templates/extension/spec/spec_helper.rb.tt +9 -2
  30. data/lib/solidus_dev_support/version.rb +1 -1
  31. data/solidus_dev_support.gemspec +14 -12
  32. data/spec/features/create_extension_spec.rb +166 -0
  33. data/spec/lib/extension_spec.rb +33 -0
  34. data/spec/spec_helper.rb +16 -0
  35. metadata +37 -27
  36. data/.github/stale.yml +0 -17
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ba24e6dd743046ef4acfa3d5a9f1fe1308f4d2ff5175ca6ace8b537529e4309d
4
- data.tar.gz: 0716f96e176e807aa910408e62b930da5719cd7bc2703b03a1a764230f90b76c
3
+ metadata.gz: 57ffc454eba9fcbba02fb86c44287829fff79b729667b7337e3acf2c7fa09528
4
+ data.tar.gz: 1e408fd52a16aa8bafb5a87d8180661bf2e43126a61203916c0bee70b3dbe13d
5
5
  SHA512:
6
- metadata.gz: 1b9bf1dc55fb744fe1f0aa39ef72a01bb6abc3429530d1b11122afdf71b8ff135e1be280465077f68590eb84c505588cb258602e8ce36ede76511a5008dc075d
7
- data.tar.gz: f73be0985dc2937ffd5380019834b578533f31e014c6d22296c0b52b04e4bee12d2b3c8747ddb6114115e8f1c03afe3880bb6ec4befbe63d01da2aa42a337963
6
+ metadata.gz: 754b6f714db2c8436875c69c9af9aabe018f321c5ea12b683657d56e5a1e6595fb7f16f965cf5ea6701bcd5ea6e0f3c10a27fabd4d07f9abc815f9b1499046d2
7
+ data.tar.gz: c2f11a1b7bd1983dca96baf5a9f62f61b237ff6402657ba4bba72e91133e3a835887e4f9d15a1a423d8236d035516eddc64dab4ff1ba194c39c3c1ca4216f08f
@@ -7,19 +7,6 @@ orbs:
7
7
  # or goes EOL.
8
8
  solidusio_extensions: solidusio/extensions@volatile
9
9
 
10
- executors:
11
- # We don't rely directly on the DB, but we still want to ensure generated
12
- # extensions are able to connect and spin up Solidus. Using an in-memory
13
- # SQLite makes it blazingly fast.
14
- sqlite-memory:
15
- docker:
16
- - image: circleci/ruby:2.5.6-node-browsers
17
- environment:
18
- RAILS_ENV: test
19
- DB: sqlite
20
- DATABASE_URL: sqlite3::memory:?pool=1
21
- DATABASE_CLEANER_ALLOW_REMOTE_DATABASE_URL: true
22
-
23
10
  commands:
24
11
  setup:
25
12
  steps:
@@ -28,14 +15,17 @@ commands:
28
15
 
29
16
  jobs:
30
17
  solidus-master:
31
- executor: sqlite-memory
18
+ executor: solidusio_extensions/sqlite-memory
32
19
  steps: ['setup', 'solidusio_extensions/run-tests-solidus-master']
33
20
  solidus-current:
34
- executor: sqlite-memory
21
+ executor: solidusio_extensions/sqlite-memory
35
22
  steps: ['setup', 'solidusio_extensions/run-tests-solidus-current']
36
23
  solidus-older:
37
- executor: sqlite-memory
24
+ executor: solidusio_extensions/sqlite-memory
38
25
  steps: ['setup', 'solidusio_extensions/run-tests-solidus-older']
26
+ lint-code:
27
+ executor: solidusio_extensions/sqlite-memory
28
+ steps: ['setup', 'solidusio_extensions/lint-code']
39
29
 
40
30
  workflows:
41
31
  "Run specs on supported Solidus versions":
@@ -43,6 +33,7 @@ workflows:
43
33
  - solidus-master
44
34
  - solidus-current
45
35
  - solidus-older
36
+ - lint-code
46
37
 
47
38
  "Weekly run specs against master":
48
39
  triggers:
@@ -8,4 +8,3 @@ Fixes #XXX.
8
8
 
9
9
  - [ ] I have structured the commits for clarity and conciseness.
10
10
  - [ ] I have added relevant automated tests for this change.
11
- - [ ] I have added an entry to the changelog for this change.
@@ -0,0 +1,4 @@
1
+ issues=false
2
+ exclude-labels=infrastructure
3
+ since-tag=v1.4.0
4
+ base=OLD_CHANGELOG.md
@@ -0,0 +1,39 @@
1
+ pull_request_rules:
2
+ - name: request changelog labels when a PR is missing them
3
+ conditions:
4
+ - base=master
5
+ - -label=bug
6
+ - -label=enhancement
7
+ - -label=documentation
8
+ - -label=security
9
+ - -label=removed
10
+ - -label=infrastructure
11
+ actions:
12
+ label:
13
+ add:
14
+ - needs changelog label
15
+ comment:
16
+ message: |
17
+ It looks like this PR is missing a label to determine the type of change it introduces. The maintainer should add one of the following labels:
18
+
19
+ - `bug` for bugfixes.
20
+ - `enhancement` for new features and improvements.
21
+ - `documentation` for documentation changes.
22
+ - `security` for security patches.
23
+ - `removed` for feature removals.
24
+ - `infrastructure` for internal changes that should not go in the changelog.
25
+
26
+ Additionally, the maintainer may also want to add one of the following:
27
+
28
+ - `breaking` for breaking changes.
29
+ - `deprecated` for feature deprecations.
30
+
31
+ Once the correct labels have been set, simply remove the `needs changelog label` label from this PR so I can merge it.
32
+ - name: merge PRs automatically
33
+ conditions:
34
+ - base=master
35
+ - -label="needs changelog label"
36
+ - -label=blocked
37
+ actions:
38
+ merge:
39
+ method: merge
@@ -1,11 +1,53 @@
1
1
  inherit_from:
2
2
  - https://relaxed.ruby.style/rubocop.yml
3
3
 
4
+ Layout/EmptyLinesAroundAttributeAccessor:
5
+ Enabled: true
6
+ Layout/SpaceAroundMethodCallOperator:
7
+ Enabled: true
8
+ Lint/DeprecatedOpenSSLConstant:
9
+ Enabled: true
10
+ Lint/MixedRegexpCaptureTypes:
11
+ Enabled: true
12
+ Lint/RaiseException:
13
+ Enabled: true
14
+ Lint/StructNewOverride:
15
+ Enabled: true
16
+ Style/AccessorGrouping:
17
+ Enabled: true
18
+ Style/BisectedAttrAccessor:
19
+ Enabled: true
20
+ Style/ExponentialNotation:
21
+ Enabled: true
22
+ Style/HashEachMethods:
23
+ Enabled: true
24
+ Style/HashTransformKeys:
25
+ Enabled: true
26
+ Style/HashTransformValues:
27
+ Enabled: true
28
+ Style/RedundantAssignment:
29
+ Enabled: true
30
+ Style/RedundantFetchBlock:
31
+ Enabled: true
32
+ Style/RedundantRegexpCharacterClass:
33
+ Enabled: true
34
+ Style/RedundantRegexpEscape:
35
+ Enabled: true
36
+ Style/SlicingWithRange:
37
+ Enabled: true
38
+
39
+
4
40
  AllCops:
41
+ TargetRubyVersion: 2.5
5
42
  Exclude:
6
43
  - tmp/**/*
44
+ - "vendor/**/*"
45
+ # Generated binstubs
46
+ - bin/rake
7
47
 
8
48
  Style/FrozenStringLiteralComment:
9
49
  Exclude:
10
50
  - "**/bin/*"
11
51
  - "**/exe/*"
52
+ - "spec/**/*"
53
+
@@ -1,11 +1,72 @@
1
1
  # Changelog
2
2
 
3
- All notable changes to this project will be documented in this file.
3
+ ## [Unreleased](https://github.com/solidusio/solidus_dev_support/tree/HEAD)
4
4
 
5
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project
6
- adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
5
+ [Full Changelog](https://github.com/solidusio/solidus_dev_support/compare/v1.5.0...HEAD)
7
6
 
8
- ## [Unreleased]
7
+ **Implemented enhancements:**
8
+
9
+ - Let the extension name include spaces [\#133](https://github.com/solidusio/solidus_dev_support/pull/133) ([elia](https://github.com/elia))
10
+ - Add precompiled badges fro CI and coverage [\#132](https://github.com/solidusio/solidus_dev_support/pull/132) ([elia](https://github.com/elia))
11
+ - Add Changelog Rake task [\#128](https://github.com/solidusio/solidus_dev_support/pull/128) ([tvdeyen](https://github.com/tvdeyen))
12
+ - Readme fixes [\#122](https://github.com/solidusio/solidus_dev_support/pull/122) ([elia](https://github.com/elia))
13
+
14
+ **Fixed bugs:**
15
+
16
+ - Don't install a payment-method in the sandbox [\#131](https://github.com/solidusio/solidus_dev_support/pull/131) ([elia](https://github.com/elia))
17
+ - Run extension generator in sandbox [\#127](https://github.com/solidusio/solidus_dev_support/pull/127) ([elia](https://github.com/elia))
18
+
19
+ ## [v1.5.0](https://github.com/solidusio/solidus_dev_support/tree/v1.5.0) (2020-06-13)
20
+
21
+ [Full Changelog](https://github.com/solidusio/solidus_dev_support/compare/v1.4.0...v1.5.0)
22
+
23
+ **Fixed bugs:**
24
+
25
+ - Fix formatting typo in readme [\#117](https://github.com/solidusio/solidus_dev_support/pull/117) ([aldesantis](https://github.com/aldesantis))
26
+
27
+ **Removed:**
28
+
29
+ - Remove deprecated bin/r and bin/sandbox\_rails binaries [\#118](https://github.com/solidusio/solidus_dev_support/pull/118) ([aldesantis](https://github.com/aldesantis))
30
+
31
+ ## [1.4.0] - 2020-06-05
32
+
33
+ ### Added
34
+
35
+ - Added a "Usage" section to the default readme
36
+
37
+ ### Changed
38
+
39
+ - Restored `bin/rails` and renamed the context specific bins to `bin/rails-engine` and `bin/rails-sandbox`
40
+ - Adjusted the readme structure with better formatting and grammar
41
+ - Moved the RuboCop `AllCops/Exclude` statement back to the internal configuration
42
+
43
+ ### Deprecated
44
+
45
+ - Deprecated `bin/r` in favor of `bin/rails-engine` and `bin/sandbox_rails` in favor of `bin/rails-sandbox`
46
+
47
+ ## [1.3.0] - 2020-05-22
48
+
49
+ ### Added
50
+
51
+ - Ignored `.rvmrc`, `.ruby-version` and `.ruby-gemset` by default in extensions
52
+ - Added deprecation warning when extensions don't support Zeitwerk
53
+
54
+ ### Changed
55
+
56
+ - Updated the extension template to use latest (0.5.X) solidus_support
57
+ - Set Ruby 2.5+ as the minimum Ruby version in generated extensions
58
+
59
+ ### Removed
60
+
61
+ - Removed Stale from the default extension configuration
62
+
63
+ ## [1.2.0] - 2020-04-24
64
+
65
+ ### Changed
66
+
67
+ - Updated the extension template with the latest modifications
68
+
69
+ ## [1.1.0] - 2020-03-06
9
70
 
10
71
  ### Added
11
72
 
@@ -16,6 +77,7 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
16
77
 
17
78
  - Split `bin/rails` into `bin/r` and `bin/sandbox_rails`
18
79
 
80
+
19
81
  ### Fixed
20
82
 
21
83
  - Fixed the sandbox Gemfile not including Solidus
@@ -151,7 +213,11 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
151
213
 
152
214
  Initial release.
153
215
 
154
- [Unreleased]: https://github.com/solidusio/solidus_dev_support/compare/v1.0.1...HEAD
216
+ [Unreleased]: https://github.com/solidusio/solidus_dev_support/compare/v1.4.0...HEAD
217
+ [1.4.0]: https://github.com/solidusio/solidus_dev_support/compare/v1.3.0...v1.4.0
218
+ [1.3.0]: https://github.com/solidusio/solidus_dev_support/compare/v1.2.0...v1.3.0
219
+ [1.2.0]: https://github.com/solidusio/solidus_dev_support/compare/v1.1.0...v1.2.0
220
+ [1.1.0]: https://github.com/solidusio/solidus_dev_support/compare/v1.0.1...v1.1.0
155
221
  [1.0.1]: https://github.com/solidusio/solidus_dev_support/compare/v1.0.0...v1.0.1
156
222
  [1.0.0]: https://github.com/solidusio/solidus_dev_support/compare/v0.6.0...v1.0.0
157
223
  [0.6.0]: https://github.com/solidusio/solidus_dev_support/compare/v0.5.0...v0.6.0
@@ -162,3 +228,6 @@ Initial release.
162
228
  [0.2.0]: https://github.com/solidusio/solidus_dev_support/compare/v0.1.1...v0.2.0
163
229
  [0.1.1]: https://github.com/solidusio/solidus_dev_support/compare/v0.1.0...v0.1.1
164
230
  [0.1.0]: https://github.com/solidusio/solidus_dev_support/releases/tag/v0.1.0
231
+
232
+
233
+ \* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
data/Gemfile CHANGED
@@ -15,10 +15,10 @@ gem 'rails', '>0.a'
15
15
 
16
16
  # These gems will be used by the temporary extensions generated by tests
17
17
  group :test do
18
- gem 'solidus_auth_devise'
19
18
  gem 'factory_bot', '> 4.10.0'
20
19
  gem 'mysql2'
21
20
  gem 'pg'
21
+ gem 'solidus_auth_devise'
22
22
  gem 'sqlite3'
23
23
  end
24
24
 
@@ -0,0 +1,200 @@
1
+ ## [1.4.0] - 2020-06-05
2
+
3
+ ### Added
4
+
5
+ - Added a "Usage" section to the default readme
6
+
7
+ ### Changed
8
+
9
+ - Restored `bin/rails` and renamed the context specific bins to `bin/rails-engine` and `bin/rails-sandbox`
10
+ - Adjusted the readme structure with better formatting and grammar
11
+ - Moved the RuboCop `AllCops/Exclude` statement back to the internal configuration
12
+
13
+ ### Deprecated
14
+
15
+ - Deprecated `bin/r` in favor of `bin/rails-engine` and `bin/sandbox_rails` in favor of `bin/rails-sandbox`
16
+
17
+ ## [1.3.0] - 2020-05-22
18
+
19
+ ### Added
20
+
21
+ - Ignored `.rvmrc`, `.ruby-version` and `.ruby-gemset` by default in extensions
22
+ - Added deprecation warning when extensions don't support Zeitwerk
23
+
24
+ ### Changed
25
+
26
+ - Updated the extension template to use latest (0.5.X) solidus_support
27
+ - Set Ruby 2.5+ as the minimum Ruby version in generated extensions
28
+
29
+ ### Removed
30
+
31
+ - Removed Stale from the default extension configuration
32
+
33
+ ## [1.2.0] - 2020-04-24
34
+
35
+ ### Changed
36
+
37
+ - Updated the extension template with the latest modifications
38
+
39
+ ## [1.1.0] - 2020-03-06
40
+
41
+ ### Added
42
+
43
+ - Made Git ignore `sandbox` in generated extensions
44
+ - Added support for specifying `SOLIDUS_BRANCH` in the sandbox
45
+
46
+ ### Changed
47
+
48
+ - Split `bin/rails` into `bin/r` and `bin/sandbox_rails`
49
+
50
+
51
+ ### Fixed
52
+
53
+ - Fixed the sandbox Gemfile not including Solidus
54
+
55
+ ## [1.0.1] - 2020-02-17
56
+
57
+ ### Fixed
58
+
59
+ - Fixed missing factory definitions when using `modify` on Solidus factories
60
+
61
+ ## [1.0.0] - 2020-02-07
62
+
63
+ ### Added
64
+
65
+ - Added a binstub for `rake` to the extension generator
66
+ - Added the ability for the generator to reuse existing data for the gemspec
67
+
68
+ ### Fixed
69
+
70
+ - Fixed Dependabot throwing an error because of `eval_gemfile` in the Gemfile
71
+
72
+ ## [0.6.0] - 2020-01-20
73
+
74
+ ### Added
75
+
76
+ - Added support for a local Gemfile for local development dependencies (e.g. 'pry-debug')
77
+ - Added a `bin/sandbox` script to all extension for local development with `bin/rails` support.
78
+
79
+ ### Changed
80
+
81
+ - The default rake task no longer re-generates the `test_app` each time it runs.
82
+ In order to get that behavior back simply call clobber before launching it:
83
+ `bin/rake clobber default`
84
+
85
+ ### Fixed
86
+
87
+ - Fixed generated extensions isolating the wrong namespace
88
+
89
+ ## [0.5.0] - 2020-01-16
90
+
91
+ ### Added
92
+
93
+ - Added `--require spec_helper` to the generated `.rspec`
94
+
95
+ ### Fixed
96
+
97
+ - Replaced "Spree" with "Solidus" in the license of generated extensions
98
+
99
+ ### Changed
100
+
101
+ - Updated gem-release to use tags instead of branches for new releases
102
+
103
+ ## [0.4.1] - 2020-01-15
104
+
105
+ ### Fixed
106
+
107
+ - Fixed the generated RuboCop config inheriting from this gem's dev-only config
108
+ - Fixed the generated extension not requiring the `version` file
109
+ - Fixed the generator not properly marking `bin/` files as executable
110
+
111
+ ## [0.4.0] - 2020-01-10
112
+
113
+ ### Added
114
+
115
+ - Enforced Rails version depending on the Solidus version in generated Gemfile
116
+ - Made Git ignore `spec/examples.txt` in generated extensions
117
+ - Added the ability to run `solidus extension .` to update an extension
118
+
119
+ ### Changed
120
+
121
+ - The `solidus` executable is now solely managed by Thor and is open to extension by other gems
122
+
123
+ ### Fixed
124
+
125
+ - Fixed generated extensions using an old Rakefile
126
+ - Fixed some RuboCop offenses in the generated files
127
+ - Fixed the `bin/setup` script calling a non-existing Rake binary
128
+
129
+ ### Removed
130
+
131
+ - Removed RuboCop from the default Rake task
132
+ - Removed the `-v` option from the `solidus` executable
133
+ - Removed the factory_bot gem from the Gemfile
134
+
135
+ ## [0.3.0] - 2020-01-10
136
+
137
+ ### Added
138
+
139
+ - Adopted Ruby 2.4+ as the minimum Ruby version in generated extensions
140
+ - Added `bin/console`, `bin/rails` and `bin/setup` to generated extensions
141
+ - Added some Bundler gemspec defaults to generated extensions
142
+ - Configured the default Rake task to run generate the test app before running RSpec
143
+
144
+ ### Changed
145
+
146
+ - Updated solidus_support to 0.4.0 for Zeitwerk and Rails 6 compatibility
147
+ - Updated the `solidus` executable to only rely on Thor and be open to extension by other gems
148
+
149
+ ### Removed
150
+
151
+ - Removed solidus_support as a dependency
152
+
153
+ ### Fixed
154
+
155
+ - Fixed `extension:test_app` not going back to the root after execution
156
+
157
+ ## [0.2.0] - 2019-12-16
158
+
159
+ ### Added
160
+
161
+ - Adopted [Apparition](https://github.com/twalpole/apparition) as the deafult JS driver for Capybara
162
+ - Fixed window size to 1920x1080px in feature specs
163
+ - Added [Stale](https://github.com/apps/stale) to automatically mark GitHub issues as stale
164
+
165
+ ### Changed
166
+
167
+ - Disabled all `Metrics` cops except for `LineLength`
168
+ - Set `Layout/AlignArguments` cop to `with_fixed_indentation`
169
+ - Disabled `Layout/MultilineOperationIndentation` cop
170
+ - Renamed the project to SolidusDevSupport (was SolidusExtensionDevTools)
171
+
172
+ ### Fixed
173
+
174
+ - Fixed Chrome not starting in headless mode
175
+
176
+ ## [0.1.1] - 2019-11-11
177
+
178
+ ### Fixed
179
+
180
+ - Fixed `rails_helper` not working due to `SolidusDevSupport` not being available
181
+
182
+ ## [0.1.0] - 2019-11-11
183
+
184
+ Initial release.
185
+
186
+ [Unreleased]: https://github.com/solidusio/solidus_dev_support/compare/v1.4.0...HEAD
187
+ [1.4.0]: https://github.com/solidusio/solidus_dev_support/compare/v1.3.0...v1.4.0
188
+ [1.3.0]: https://github.com/solidusio/solidus_dev_support/compare/v1.2.0...v1.3.0
189
+ [1.2.0]: https://github.com/solidusio/solidus_dev_support/compare/v1.1.0...v1.2.0
190
+ [1.1.0]: https://github.com/solidusio/solidus_dev_support/compare/v1.0.1...v1.1.0
191
+ [1.0.1]: https://github.com/solidusio/solidus_dev_support/compare/v1.0.0...v1.0.1
192
+ [1.0.0]: https://github.com/solidusio/solidus_dev_support/compare/v0.6.0...v1.0.0
193
+ [0.6.0]: https://github.com/solidusio/solidus_dev_support/compare/v0.5.0...v0.6.0
194
+ [0.5.0]: https://github.com/solidusio/solidus_dev_support/compare/v0.4.1...v0.5.0
195
+ [0.4.1]: https://github.com/solidusio/solidus_dev_support/compare/v0.4.0...v0.4.1
196
+ [0.4.0]: https://github.com/solidusio/solidus_dev_support/compare/v0.3.0...v0.4.0
197
+ [0.3.0]: https://github.com/solidusio/solidus_dev_support/compare/v0.2.0...v0.3.0
198
+ [0.2.0]: https://github.com/solidusio/solidus_dev_support/compare/v0.1.1...v0.2.0
199
+ [0.1.1]: https://github.com/solidusio/solidus_dev_support/compare/v0.1.0...v0.1.1
200
+ [0.1.0]: https://github.com/solidusio/solidus_dev_support/releases/tag/v0.1.0