solidus_dev_support 0.5.0 → 0.6.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 22dbc17966230ac110fc0129505cbda25986817faa51629c7b0a68455dc893f5
4
- data.tar.gz: edd55039b0d7d67f84ef65ef20979e935c3705cd599e5a9b88f1f388f6d6b070
3
+ metadata.gz: 4fe993c357db63da319ab7b482eabd1ab7ceedf0a1f83d1f851f4eda2a195b4a
4
+ data.tar.gz: 0b63c3d1e43bd550057bfa6e713dd995626f97f69ed319dd8b331f3391e08557
5
5
  SHA512:
6
- metadata.gz: 8ce7fb47313fa68bcd1a3d53244cf45f878f164d0cf3d4f4a637326d9ffd11b4762c9a8b4baa0268e9303ad3b8ee7fd6d2a217b1a0b30783e22e37e64d2bb88f
7
- data.tar.gz: 2b4e414288b002b2ad832a5284632ae819fd54e04ac8a870993ceb2bd1dc427b2f6736554963259f1e73e4de5aceb05d6d9a5931928a030f3ba3405c86e78093
6
+ metadata.gz: a021a1a433d58aafba6b5e795e190a6d16cbe58f10a11906a4a0039faa6bf80e3cab2819091e85df725e53c623689e7e5ef5e4e8af82c5865cb7fcd1f8153b2c
7
+ data.tar.gz: 5bc26377586f11f2ac750251adf044aa62c11be97b9edb2037ae4463cbd3be080bcb8418571ae9c0b5321f3273739310ab3678a10c9f48349db6880e84e8929a
data/.gitignore CHANGED
@@ -7,7 +7,8 @@
7
7
  /spec/reports/
8
8
  /tmp/
9
9
  /vendor/bundle/
10
- Gemfile.lock
10
+ /Gemfile.lock
11
+ /Gemfile-local*
11
12
 
12
13
  # rspec failure tracking
13
14
  .rspec_status
data/CHANGELOG.md CHANGED
@@ -7,6 +7,22 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.6.0] - 2020-01-20
11
+
12
+ ### Added
13
+
14
+ - Added support for a local Gemfile for local development dependencies (e.g. 'pry-debug')
15
+
16
+ ### Changed
17
+
18
+ - The default rake task no longer re-generates the `test_app` each time it runs.
19
+ In order to get that behavior back simply call clobber before launching it:
20
+ `bin/rake clobber default`
21
+
22
+ ### Fixed
23
+
24
+ - Fixed generated extensions isolating the wrong namespace
25
+
10
26
  ## [0.5.0] - 2020-01-16
11
27
 
12
28
  ### Added
@@ -104,7 +120,8 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
104
120
 
105
121
  Initial release.
106
122
 
107
- [Unreleased]: https://github.com/solidusio/solidus_dev_support/compare/v0.5.0...HEAD
123
+ [Unreleased]: https://github.com/solidusio/solidus_dev_support/compare/v0.6.0...HEAD
124
+ [0.6.0]: https://github.com/solidusio/solidus_dev_support/compare/v0.5.0...v0.6.0
108
125
  [0.5.0]: https://github.com/solidusio/solidus_dev_support/compare/v0.4.1...v0.5.0
109
126
  [0.4.1]: https://github.com/solidusio/solidus_dev_support/compare/v0.4.0...v0.4.1
110
127
  [0.4.0]: https://github.com/solidusio/solidus_dev_support/compare/v0.3.0...v0.4.0
data/Gemfile CHANGED
@@ -21,3 +21,7 @@ group :test do
21
21
  gem 'pg'
22
22
  gem 'sqlite3'
23
23
  end
24
+
25
+ # Use a local Gemfile to include development dependencies that might not be
26
+ # relevant for the project or for other contributors, e.g.: `gem 'pry-debug'`.
27
+ eval_gemfile 'Gemfile-local' if File.exist? 'Gemfile-local'
data/README.md CHANGED
@@ -34,6 +34,19 @@ $ solidus extension my_awesome_extension
34
34
  This will generate the basic extension structure, already configured to use all the shiny helpers
35
35
  in solidus_dev_support.
36
36
 
37
+ #### Updating existing extensions
38
+
39
+ If you have an existing extension and want to update it to use the latest standards from this gem,
40
+ you can run the following in the extension's directory:
41
+
42
+ ```console
43
+ $ solidus extension .
44
+ ```
45
+
46
+ In case of conflicting files, you will be prompted for an action. You can overwrite the files with
47
+ the new version, keep the current version or view the diff and only apply the adjustments that make
48
+ sense to you.
49
+
37
50
  ### RSpec helpers
38
51
 
39
52
  This gem provides some useful helpers for RSpec to setup an extension's test environment easily.
@@ -123,15 +136,16 @@ releases for your gem.
123
136
  For instance, you can run the following to release a new minor version:
124
137
 
125
138
  ```console
126
- $ gem bump --version minor --tag --release
139
+ $ gem bump -v minor -r
127
140
  ```
128
141
 
129
142
  The above command will:
130
143
 
131
- * bump the gem version to the next minor;
132
- * commit the change and push it to `upstream/master`;
144
+ * bump the gem version to the next minor (you can also use `patch`, `major` or a specific version
145
+ number);
146
+ * commit the change and push it to `origin/master`;
133
147
  * create a Git tag;
134
- * push the tag to the `upstream` remote;
148
+ * push the tag to the `origin` remote;
135
149
  * release the new version on RubyGems.
136
150
 
137
151
  You can refer to
@@ -146,7 +160,7 @@ To install extension-related Rake tasks, add this to your `Rakefile`:
146
160
  require 'solidus_dev_support/rake_tasks'
147
161
  SolidusDevSupport::RakeTasks.install
148
162
 
149
- task default: %w[extension:test_app extension:specs]
163
+ task default: 'extension:specs'
150
164
  ```
151
165
 
152
166
  (If your extension used the legacy extension Rakefile, then you should completely replace its
@@ -157,7 +171,11 @@ This will provide the following tasks:
157
171
  - `extension:test_app`, which generates a dummy app for your extension
158
172
  - `extension:specs` (default), which runs the specs for your extension
159
173
 
160
- It also allows you to run `rake` to, respectively, generate a test app and run all tests.
174
+ If your extension requires the `test_app` to be always recreated you can do so by running:
175
+
176
+ ```rb
177
+ bundle exec rake extension:test_app extension:specs
178
+ ```
161
179
 
162
180
  ## Development
163
181
 
@@ -34,10 +34,16 @@ module SolidusDevSupport
34
34
  ::CLOBBER.include test_app_path
35
35
 
36
36
  namespace :extension do
37
+ # We need to go back to the gem root since the upstream
38
+ # extension:test_app changes the working directory to be the dummy app.
37
39
  task :test_app do
38
40
  Rake::Task['extension:test_app'].invoke
39
41
  cd root
40
42
  end
43
+
44
+ directory ENV['DUMMY_PATH'] do
45
+ Rake::Task['extension:test_app'].invoke
46
+ end
41
47
  end
42
48
  end
43
49
 
@@ -24,3 +24,7 @@ else
24
24
  end
25
25
 
26
26
  gemspec
27
+
28
+ # Use a local Gemfile to include development dependencies that might not be
29
+ # relevant for the project or for other contributors, e.g.: `gem 'pry-debug'`.
30
+ eval_gemfile 'Gemfile-local' if File.exist? 'Gemfile-local'
@@ -3,4 +3,4 @@
3
3
  require 'solidus_dev_support/rake_tasks'
4
4
  SolidusDevSupport::RakeTasks.install
5
5
 
6
- task default: %w[extension:test_app extension:specs]
6
+ task default: 'extension:specs'
@@ -5,4 +5,4 @@ set -vx
5
5
 
6
6
  gem install bundler --conservative
7
7
  bundle update
8
- bundle exec rake extension:test_app
8
+ bundle exec rake clobber
@@ -6,7 +6,7 @@ module <%= class_name %>
6
6
  class Engine < Rails::Engine
7
7
  include SolidusSupport::EngineExtensions::Decorators
8
8
 
9
- isolate_namespace Spree
9
+ isolate_namespace ::Spree
10
10
 
11
11
  engine_name '<%= file_name %>'
12
12
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SolidusDevSupport
4
- VERSION = "0.5.0"
4
+ VERSION = "0.6.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_dev_support
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alessandro Desantis
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-01-16 00:00:00.000000000 Z
11
+ date: 2020-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: apparition