solidus_dev_support 1.3.0 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e564494d205d3ad1b785d19a2755125c0b22ddae03f485ae2ff136ed6a84fbcf
4
- data.tar.gz: 9f6d4d0d80bcc84c14e0c49ae6d8aff768a41318a08b22281923b670ac2c8e60
3
+ metadata.gz: 1fd0df647df1542408d2fbcdd5776d3f68cc8b83ab35d37a38fd242b42631299
4
+ data.tar.gz: 613fde5e9f9b26eb3e477d0b80a6da98936a388e5f604f2f22d191fe7eaa049d
5
5
  SHA512:
6
- metadata.gz: eeac780a3f6da8740951d1798c1543b6bc4a7def6b9ec5841ccd7600163f5c08c52d26bc5606d006f723666c68f74c78eac71eb6f63830354f736445f4418e9d
7
- data.tar.gz: aa0b8514fac3724ab7272af5fe2675ef9eb1aa1d859b8b2ebaf20616efbfad948b3b3a069ed7f553b34310691c2739b675759311167b971f644f894cacab47db
6
+ metadata.gz: 2af8807191b0fbbaa35acbe9d031c367e75949cd7e66603f826cc2eb4f928e1deef86599c0992f36c34ac7ed18b7a71a9fc2fd5fedf6d8e144af4075fe459f98
7
+ data.tar.gz: de34c8168e0118e1949b2fe1c2dbda6a9b5791d5c30651f5541fb50ddd2d129685c34d57b9dc3b19aa7590165bc56cb6af3db57b7871060398a11d9c57e6839d
@@ -7,7 +7,23 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
- ## [1.3.0]
10
+ ## [1.4.0]
11
+
12
+ ### Added
13
+
14
+ - Added a "Usage" section to the default readme
15
+
16
+ ### Changed
17
+
18
+ - Restored `bin/rails` and renamed the context specific bins to `bin/rails-engine` and `bin/rails-sandbox`
19
+ - Adjusted the readme structure with better formatting and grammar
20
+ - Moved the RuboCop `AllCops/Exclude` statement back to the internal configuration
21
+
22
+ ### Deprecated
23
+
24
+ - Deprecated `bin/r` in favor of `bin/rails-engine` and `bin/sandbox_rails` in favor of `bin/rails-sandbox`
25
+
26
+ ## [1.3.0] - 2020-05-22
11
27
 
12
28
  ### Added
13
29
 
@@ -23,13 +39,13 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
23
39
 
24
40
  - Removed Stale from the default extension configuration
25
41
 
26
- ## [1.2.0]
42
+ ## [1.2.0] - 2020-04-24
27
43
 
28
44
  ### Changed
29
45
 
30
46
  - Updated the extension template with the latest modifications
31
47
 
32
- ## [1.1.0]
48
+ ## [1.1.0] - 2020-03-06
33
49
 
34
50
  ### Added
35
51
 
@@ -176,7 +192,8 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
176
192
 
177
193
  Initial release.
178
194
 
179
- [Unreleased]: https://github.com/solidusio/solidus_dev_support/compare/v1.3.0...HEAD
195
+ [Unreleased]: https://github.com/solidusio/solidus_dev_support/compare/v1.4.0...HEAD
196
+ [1.4.0]: https://github.com/solidusio/solidus_dev_support/compare/v1.3.0...v1.4.0
180
197
  [1.3.0]: https://github.com/solidusio/solidus_dev_support/compare/v1.2.0...v1.3.0
181
198
  [1.2.0]: https://github.com/solidusio/solidus_dev_support/compare/v1.1.0...v1.2.0
182
199
  [1.1.0]: https://github.com/solidusio/solidus_dev_support/compare/v1.0.1...v1.1.0
data/README.md CHANGED
@@ -50,16 +50,16 @@ sense to you.
50
50
  ### Sandbox app
51
51
 
52
52
  When developing an extension you will surely need to try it out within a Rails app with Solidus
53
- installed. Using solidus_dev_support your extension will have a `bin/sandbox_rails` executable that will
53
+ installed. Using solidus_dev_support your extension will have a `bin/rails-sandbox` executable that will
54
54
  operate on a _sandbox_ app (creating it if necessary).
55
55
 
56
- The path for the sandbox app is `./sandbox` and `bin/sandbox_rails` will forward any Rails command
56
+ The path for the sandbox app is `./sandbox` and `bin/rails-sandbox` will forward any Rails command
57
57
  to `sandbox/bin/rails`.
58
58
 
59
59
  Example:
60
60
 
61
61
  ```bash
62
- $ bin/sandbox_rails server
62
+ $ bin/rails-sandbox server
63
63
  => Booting Puma
64
64
  => Rails 6.0.2.1 application starting in development
65
65
  * Listening on tcp://127.0.0.1:3000
@@ -80,15 +80,20 @@ By default we use sqlite3 and the master branch.
80
80
 
81
81
  ### Rails generators
82
82
 
83
- Your extension will have a `bin/r` executable that you can use for generating models, migrations
83
+ Your extension will have a `bin/rails-engine` executable that you can use for generating models, migrations
84
84
  etc. It's the same as the default `rails` command in Rails engines.
85
85
 
86
86
  Example:
87
87
 
88
88
  ```bash
89
- $ bin/r generate migration AddStoreIdToProducts
89
+ $ bin/rails-engine generate migration AddStoreIdToProducts
90
90
  ```
91
91
 
92
+ ### The `bin/rails` shortcut
93
+
94
+ For convenience a `bin/rails` executable is also provided that will run everything but generators on the sandbox application. Generators will instead be processed in the context of the extension.
95
+
96
+
92
97
  ### RSpec helpers
93
98
 
94
99
  This gem provides some useful helpers for RSpec to setup an extension's test environment easily.
@@ -183,6 +183,7 @@ AllCops:
183
183
  TargetRubyVersion: 2.5
184
184
  Exclude:
185
185
  - spec/dummy/**/*
186
+ - sandbox/**/*
186
187
  - vendor/**/*
187
188
 
188
189
  Metrics/BlockLength:
@@ -1,10 +1,8 @@
1
- <%= class_name %>
2
- <%= "=" * class_name.size %>
1
+ # <%= class_name %>
3
2
 
4
- Introduction goes here.
3
+ [Explain what your extension does.]
5
4
 
6
- Installation
7
- ------------
5
+ ## Installation
8
6
 
9
7
  Add <%= file_name %> to your Gemfile:
10
8
 
@@ -19,10 +17,17 @@ bundle
19
17
  bundle exec rails g <%= file_name %>:install
20
18
  ```
21
19
 
22
- Testing
23
- -------
20
+ ## Usage
24
21
 
25
- First bundle your dependencies, then run `bin/rake`. `bin/rake` will default to building the dummy app if it does not exist, then it will run specs. The dummy app can be regenerated by using `bin/rake extension:test_app`.
22
+ [Explain how to use your extension once it's been installed.]
23
+
24
+ ## Development
25
+
26
+ ### Testing the extension
27
+
28
+ First bundle your dependencies, then run `bin/rake`. `bin/rake` will default to building the dummy
29
+ app if it does not exist, then it will run specs. The dummy app can be regenerated by using
30
+ `bin/rake extension:test_app`.
26
31
 
27
32
  ```shell
28
33
  bundle
@@ -42,14 +47,13 @@ Simply add this require statement to your spec_helper:
42
47
  require '<%= file_name %>/factories'
43
48
  ```
44
49
 
45
- Sandbox app
46
- -----------
50
+ ## Running the sandbox
47
51
 
48
- To run this extension in a sandboxed Solidus application you can run `bin/sandbox`
49
- The path for the sandbox app is `./sandbox` and `bin/rails` will forward any Rails command
50
- to `sandbox/bin/rails`.
52
+ To run this extension in a sandboxed Solidus application, you can run `bin/sandbox`. The path for
53
+ the sandbox app is `./sandbox` and `bin/rails` will forward any Rails commands to
54
+ `sandbox/bin/rails`.
51
55
 
52
- Example:
56
+ Here's an example:
53
57
 
54
58
  ```shell
55
59
  $ bin/rails server
@@ -59,8 +63,7 @@ $ bin/rails server
59
63
  Use Ctrl-C to stop
60
64
  ```
61
65
 
62
- Releasing
63
- ---------
66
+ ### Releasing new versions
64
67
 
65
68
  Your new extension version can be released using `gem-release` like this:
66
69
 
@@ -68,4 +71,6 @@ Your new extension version can be released using `gem-release` like this:
68
71
  bundle exec gem bump -v VERSION --tag --push --remote upstream && gem release
69
72
  ```
70
73
 
71
- Copyright (c) <%= Time.now.year %> [name of extension creator], released under the New BSD License
74
+ ## License
75
+
76
+ Copyright (c) <%= Time.now.year %> [name of extension author], released under the New BSD License.
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ warn %{
4
+ DEPRECATION: bin/r has been replaced by bin/rails-engine, please use that
5
+ command instead.
6
+ }.strip
7
+
8
+ exec "#{__dir__}/rails-engine"
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ if %w[g generate].include? ARGV.first
4
+ exec "#{__dir__}/rails-engine", *ARGV
5
+ else
6
+ exec "#{__dir__}/rails-sandbox", *ARGV
7
+ end
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ app_root = 'sandbox'
4
+
5
+ unless File.exist? "#{app_root}/bin/rails"
6
+ warn 'Creating the sandbox app...'
7
+ Dir.chdir "#{__dir__}/.." do
8
+ system "#{__dir__}/sandbox" or begin # rubocop:disable Style/AndOr
9
+ warn 'Automatic creation of the sandbox app failed'
10
+ exit 1
11
+ end
12
+ end
13
+ end
14
+
15
+ Dir.chdir app_root
16
+ exec 'bin/rails', *ARGV
@@ -1,18 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- # frozen_string_literal: true
3
+ warn %{
4
+ DEPRECATION: bin/sandbox_rails has been replaced by bin/rails-sandbox, please
5
+ use that command instead.
6
+ }.strip
4
7
 
5
- app_root = 'sandbox'
6
-
7
- unless File.exist? "#{app_root}/bin/rails"
8
- warn 'Creating the sandbox app...'
9
- Dir.chdir "#{__dir__}/.." do
10
- system "#{__dir__}/sandbox" or begin # rubocop:disable Style/AndOr
11
- warn 'Automatic creation of the sandbox app failed'
12
- exit 1
13
- end
14
- end
15
- end
16
-
17
- Dir.chdir app_root
18
- exec 'bin/rails', *ARGV
8
+ exec "#{__dir__}/rails-engine"
@@ -1,7 +1,2 @@
1
1
  require:
2
2
  - solidus_dev_support/rubocop
3
-
4
- AllCops:
5
- Exclude:
6
- - sandbox/**/*
7
- - spec/dummy/**/*
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SolidusDevSupport
4
- VERSION = "1.3.0"
4
+ VERSION = "1.4.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: 1.3.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alessandro Desantis
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-05-22 00:00:00.000000000 Z
11
+ date: 2020-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: apparition
@@ -282,7 +282,7 @@ dependencies:
282
282
  - - ">="
283
283
  - !ruby/object:Gem::Version
284
284
  version: '0'
285
- description:
285
+ description:
286
286
  email:
287
287
  - alessandrodesantis@nebulab.it
288
288
  executables:
@@ -330,7 +330,10 @@ files:
330
330
  - lib/solidus_dev_support/templates/extension/app/assets/stylesheets/spree/backend/%file_name%.css
331
331
  - lib/solidus_dev_support/templates/extension/app/assets/stylesheets/spree/frontend/%file_name%.css
332
332
  - lib/solidus_dev_support/templates/extension/bin/console.tt
333
- - lib/solidus_dev_support/templates/extension/bin/r.tt
333
+ - lib/solidus_dev_support/templates/extension/bin/r
334
+ - lib/solidus_dev_support/templates/extension/bin/rails
335
+ - lib/solidus_dev_support/templates/extension/bin/rails-engine.tt
336
+ - lib/solidus_dev_support/templates/extension/bin/rails-sandbox
334
337
  - lib/solidus_dev_support/templates/extension/bin/rake
335
338
  - lib/solidus_dev_support/templates/extension/bin/sandbox.tt
336
339
  - lib/solidus_dev_support/templates/extension/bin/sandbox_rails
@@ -357,7 +360,7 @@ licenses:
357
360
  metadata:
358
361
  homepage_uri: https://github.com/solidusio/solidus_dev_support
359
362
  source_code_uri: https://github.com/solidusio/solidus_dev_support
360
- post_install_message:
363
+ post_install_message:
361
364
  rdoc_options: []
362
365
  require_paths:
363
366
  - lib
@@ -373,7 +376,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
373
376
  version: '0'
374
377
  requirements: []
375
378
  rubygems_version: 3.0.6
376
- signing_key:
379
+ signing_key:
377
380
  specification_version: 4
378
381
  summary: Development tools for Solidus extensions.
379
382
  test_files: []