solidus_dev_support 1.4.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +10 -17
  3. data/.github/PULL_REQUEST_TEMPLATE.md +0 -1
  4. data/.github_changelog_generator +4 -0
  5. data/.mergify.yml +33 -1
  6. data/.rubocop.yml +42 -0
  7. data/CHANGELOG.md +48 -5
  8. data/Gemfile +1 -1
  9. data/OLD_CHANGELOG.md +200 -0
  10. data/README.md +3 -1
  11. data/Rakefile +11 -1
  12. data/lib/solidus_dev_support/extension.rb +4 -1
  13. data/lib/solidus_dev_support/rake_tasks.rb +12 -0
  14. data/lib/solidus_dev_support/rspec/capybara.rb +18 -0
  15. data/lib/solidus_dev_support/rspec/feature_helper.rb +17 -18
  16. data/lib/solidus_dev_support/rspec/rails_helper.rb +8 -5
  17. data/lib/solidus_dev_support/rubocop/config.yml +82 -203
  18. data/lib/solidus_dev_support/solidus_command.rb +0 -1
  19. data/lib/solidus_dev_support/templates/extension/.circleci/config.yml +6 -0
  20. data/lib/solidus_dev_support/templates/extension/.github/stale.yml +4 -4
  21. data/lib/solidus_dev_support/templates/extension/README.md +28 -8
  22. data/lib/solidus_dev_support/templates/extension/bin/rails-sandbox +1 -1
  23. data/lib/solidus_dev_support/templates/extension/bin/sandbox.tt +2 -0
  24. data/lib/solidus_dev_support/templates/extension/extension.gemspec.tt +1 -1
  25. data/lib/solidus_dev_support/templates/extension/github_changelog_generator +2 -0
  26. data/lib/solidus_dev_support/templates/extension/lib/%file_name%.rb.tt +13 -0
  27. data/lib/solidus_dev_support/templates/extension/lib/%file_name%/configuration.rb.tt +8 -0
  28. data/lib/solidus_dev_support/templates/extension/lib/%file_name%/{factories.rb.tt → testing_support/factories.rb.tt} +0 -0
  29. data/lib/solidus_dev_support/templates/extension/lib/generators/%file_name%/install/install_generator.rb.tt +10 -5
  30. data/lib/solidus_dev_support/templates/extension/lib/generators/%file_name%/install/templates/initializer.rb.tt +6 -0
  31. data/lib/solidus_dev_support/templates/extension/rubocop.yml +3 -0
  32. data/lib/solidus_dev_support/templates/extension/spec/spec_helper.rb.tt +11 -7
  33. data/lib/solidus_dev_support/version.rb +5 -1
  34. data/solidus_dev_support.gemspec +16 -14
  35. data/spec/features/create_extension_spec.rb +171 -0
  36. data/spec/lib/extension_spec.rb +33 -0
  37. data/spec/spec_helper.rb +16 -0
  38. metadata +48 -37
  39. data/lib/solidus_dev_support/templates/extension/bin/r +0 -8
  40. data/lib/solidus_dev_support/templates/extension/bin/sandbox_rails +0 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1fd0df647df1542408d2fbcdd5776d3f68cc8b83ab35d37a38fd242b42631299
4
- data.tar.gz: 613fde5e9f9b26eb3e477d0b80a6da98936a388e5f604f2f22d191fe7eaa049d
3
+ metadata.gz: 775cf185474367ed130d07d17702a80fe73b1f30c16c904d3f0ec2a6ae6d030b
4
+ data.tar.gz: 3cb289f1aa0ac28cae5d1df0f2508acf87c705f07cd706ee4c05f014517d7357
5
5
  SHA512:
6
- metadata.gz: 2af8807191b0fbbaa35acbe9d031c367e75949cd7e66603f826cc2eb4f928e1deef86599c0992f36c34ac7ed18b7a71a9fc2fd5fedf6d8e144af4075fe459f98
7
- data.tar.gz: de34c8168e0118e1949b2fe1c2dbda6a9b5791d5c30651f5541fb50ddd2d129685c34d57b9dc3b19aa7590165bc56cb6af3db57b7871060398a11d9c57e6839d
6
+ metadata.gz: 8051cde4fdfb198b4e034fd67204e8f04f0e91eda4d8c92bf1f7a88b62bfd4a3ebb5d3c9e6e253bf52f3d6589efc9c9c866ccf06124cd77adbff0f06bed23f00
7
+ data.tar.gz: d06396c50c33c207ecbbbc9181a92aa1eeda7daab6f79268128d72b8419d7f755ef923aea33b25505e6faaad187d7bce6428a84b6f2436c5d8ce20702e9aec47
@@ -7,35 +7,27 @@ 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:
26
13
  - checkout
27
- - run: "gem install bundler -v '>=2' --conservative"
14
+ - run:
15
+ command: "gem install bundler -v '>=2' --conservative"
16
+ no_output_timeout: 20m
28
17
 
29
18
  jobs:
30
19
  solidus-master:
31
- executor: sqlite-memory
20
+ executor: solidusio_extensions/sqlite-memory
32
21
  steps: ['setup', 'solidusio_extensions/run-tests-solidus-master']
33
22
  solidus-current:
34
- executor: sqlite-memory
23
+ executor: solidusio_extensions/sqlite-memory
35
24
  steps: ['setup', 'solidusio_extensions/run-tests-solidus-current']
36
25
  solidus-older:
37
- executor: sqlite-memory
26
+ executor: solidusio_extensions/sqlite-memory
38
27
  steps: ['setup', 'solidusio_extensions/run-tests-solidus-older']
28
+ lint-code:
29
+ executor: solidusio_extensions/sqlite-memory
30
+ steps: ['setup', 'solidusio_extensions/lint-code']
39
31
 
40
32
  workflows:
41
33
  "Run specs on supported Solidus versions":
@@ -43,6 +35,7 @@ workflows:
43
35
  - solidus-master
44
36
  - solidus-current
45
37
  - solidus-older
38
+ - lint-code
46
39
 
47
40
  "Weekly run specs against master":
48
41
  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
@@ -1,7 +1,39 @@
1
1
  pull_request_rules:
2
- - name: automatic merge when GitHub branch protection passes on master
2
+ - name: request changelog labels when a PR is missing them
3
3
  conditions:
4
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
5
37
  actions:
6
38
  merge:
7
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,13 +1,53 @@
1
1
  # Changelog
2
2
 
3
- All notable changes to this project will be documented in this file.
3
+ ## [v2.0.1](https://github.com/solidusio/solidus_dev_support/tree/v2.0.1) (2020-09-22)
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/v2.0.0...v2.0.1)
7
6
 
8
- ## [Unreleased]
7
+ **Fixed bugs:**
9
8
 
10
- ## [1.4.0]
9
+ - Fix gem\_version not being found during extension generation [\#144](https://github.com/solidusio/solidus_dev_support/pull/144) ([aldesantis](https://github.com/aldesantis))
10
+
11
+ ## [v2.0.0](https://github.com/solidusio/solidus_dev_support/tree/v2.0.0) (2020-09-22)
12
+
13
+ [Full Changelog](https://github.com/solidusio/solidus_dev_support/compare/v1.5.0...v2.0.0)
14
+
15
+ **Breaking changes:**
16
+
17
+ - Switch the JS driver to WebDriver/Selenium [\#136](https://github.com/solidusio/solidus_dev_support/pull/136) ([elia](https://github.com/elia))
18
+
19
+ **Implemented enhancements:**
20
+
21
+ - Enable new RuboCop cops automatically [\#143](https://github.com/solidusio/solidus_dev_support/pull/143) ([aldesantis](https://github.com/aldesantis))
22
+ - Don't forcefully close issues via stale-bot [\#139](https://github.com/solidusio/solidus_dev_support/pull/139) ([elia](https://github.com/elia))
23
+ - Add the approximate recommendation for dev-support to the gemspec [\#137](https://github.com/solidusio/solidus_dev_support/pull/137) ([elia](https://github.com/elia))
24
+ - Let the extension name include spaces [\#133](https://github.com/solidusio/solidus_dev_support/pull/133) ([elia](https://github.com/elia))
25
+ - Add precompiled badges fro CI and coverage [\#132](https://github.com/solidusio/solidus_dev_support/pull/132) ([elia](https://github.com/elia))
26
+ - Add Changelog Rake task [\#128](https://github.com/solidusio/solidus_dev_support/pull/128) ([tvdeyen](https://github.com/tvdeyen))
27
+ - Readme fixes [\#122](https://github.com/solidusio/solidus_dev_support/pull/122) ([elia](https://github.com/elia))
28
+ - Restore the generic bin/rails command [\#106](https://github.com/solidusio/solidus_dev_support/pull/106) ([elia](https://github.com/elia))
29
+
30
+ **Fixed bugs:**
31
+
32
+ - fix capybara driver declaration [\#141](https://github.com/solidusio/solidus_dev_support/pull/141) ([ccarruitero](https://github.com/ccarruitero))
33
+ - Bump RuboCop to latest 0.90.0 version [\#138](https://github.com/solidusio/solidus_dev_support/pull/138) ([peterberkenbosch](https://github.com/peterberkenbosch))
34
+ - Fix missing backslash in solidus install command [\#135](https://github.com/solidusio/solidus_dev_support/pull/135) ([nirebu](https://github.com/nirebu))
35
+ - Don't install a payment-method in the sandbox [\#131](https://github.com/solidusio/solidus_dev_support/pull/131) ([elia](https://github.com/elia))
36
+ - Run extension generator in sandbox [\#127](https://github.com/solidusio/solidus_dev_support/pull/127) ([elia](https://github.com/elia))
37
+
38
+ ## [v1.5.0](https://github.com/solidusio/solidus_dev_support/tree/v1.5.0) (2020-06-13)
39
+
40
+ [Full Changelog](https://github.com/solidusio/solidus_dev_support/compare/v1.4.0...v1.5.0)
41
+
42
+ **Fixed bugs:**
43
+
44
+ - Fix formatting typo in readme [\#117](https://github.com/solidusio/solidus_dev_support/pull/117) ([aldesantis](https://github.com/aldesantis))
45
+
46
+ **Removed:**
47
+
48
+ - Remove deprecated bin/r and bin/sandbox\_rails binaries [\#118](https://github.com/solidusio/solidus_dev_support/pull/118) ([aldesantis](https://github.com/aldesantis))
49
+
50
+ ## [1.4.0] - 2020-06-05
11
51
 
12
52
  ### Added
13
53
 
@@ -207,3 +247,6 @@ Initial release.
207
247
  [0.2.0]: https://github.com/solidusio/solidus_dev_support/compare/v0.1.1...v0.2.0
208
248
  [0.1.1]: https://github.com/solidusio/solidus_dev_support/compare/v0.1.0...v0.1.1
209
249
  [0.1.0]: https://github.com/solidusio/solidus_dev_support/releases/tag/v0.1.0
250
+
251
+
252
+ \* *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