solidus_cmd 1.3.0 → 1.4.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: e5d4f25f4720163e9f55fc5cc96f8e1cf774e1a560ebbbf8fc58d98dccdb51dc
4
- data.tar.gz: 1d1cad8ce7d747ea0f8876b33665cd00e20be2974f463ea4662b1dbcf524070f
3
+ metadata.gz: e953382d28efd9b0845e9147fb55024a80e181e1c0dc9674c8aabc43abff282f
4
+ data.tar.gz: 7d0458bf00c72f540bd066601aee390b84fda4fcbfa8651823f953c1266f7249
5
5
  SHA512:
6
- metadata.gz: 921700a2cea18009b40824d4109e6bf55b4659a21093afea90936a018e23a7341a5339f31d922706e8243fc3faa4ec11eeaebe6c8a09a2750b5a59d8b76484af
7
- data.tar.gz: 85fda13eb49c36f6ca0e049ed9a4ab043dfb2c89433c9cd9ebd98c8040030bc325599b5407182c804606bce47484eed43a2682e575a3821b6752076de3b49df4
6
+ metadata.gz: 1e0801103838d80d0ad76ed52c522d626185cc5ea5c0b922bacdbe525b520666c309da26afa47d842395dca95a3ca2fcf68f9abe9a511a3b5ba45b706f90a85d
7
+ data.tar.gz: 5d97ad07993876aacdc320dfdf8c03fef02504ef20f48ac692a777691bb2f7feeb5bf0f2bc9e71933ab3e80dabe41b16cb5b5a9890d84783008977a25d0fafbf
data/README.md CHANGED
@@ -27,6 +27,17 @@ A Solidus extension is bundled as a Ruby gem, so be sure to update your `.gemspe
27
27
 
28
28
  You can now load your extension in your Solidus project's Gemfile.
29
29
 
30
+
31
+ ### Passing options to extensions generator
32
+
33
+ You can pass `--ci` option to the generator command to configure the CI
34
+ platform to use in the extension. By default circleci is used and recommended
35
+ but you can also use travis with:
36
+
37
+ ```bash
38
+ $ solidus extension my_extension --ci=travis
39
+ ```
40
+
30
41
  ## Questions?
31
42
 
32
43
  The best way to ask questions is via the [#support channel on the Solidus Slack](https://solidusio.slack.com/messages/support/details/).
@@ -7,6 +7,7 @@ module SolidusCmd
7
7
 
8
8
  desc "builds a solidus extension"
9
9
  argument :file_name, type: :string, desc: 'rails app_path', default: '.'
10
+ class_option :ci, type: :string, desc: 'which ci platform to use (circleci, travis)', default: 'circleci'
10
11
 
11
12
  source_root File.expand_path('../templates/extension', __FILE__)
12
13
 
@@ -31,7 +32,13 @@ module SolidusCmd
31
32
  template 'rspec', "#{file_name}/.rspec"
32
33
  template 'spec/spec_helper.rb.tt', "#{file_name}/spec/spec_helper.rb"
33
34
  template 'rubocop.yml', "#{file_name}/.rubocop.yml"
34
- template 'travis.yml', "#{file_name}/.travis.yml"
35
+
36
+ case options[:ci]
37
+ when "travis"
38
+ template 'travis.yml', "#{file_name}/.travis.yml"
39
+ when "circleci"
40
+ directory '.circleci', "#{file_name}/.circleci"
41
+ end
35
42
  end
36
43
 
37
44
  no_tasks do
@@ -0,0 +1,35 @@
1
+ version: 2.1
2
+
3
+ orbs:
4
+ # Always take the latest version of the orb, this allows us to
5
+ # run specs against Solidus supported versions only without the need
6
+ # to change this configuration every time a Solidus version is released
7
+ # or goes EOL.
8
+ solidusio_extensions: solidusio/extensions@volatile
9
+
10
+ jobs:
11
+ run-specs-with-postgres:
12
+ executor: solidusio_extensions/postgres
13
+ steps:
14
+ - solidusio_extensions/run-tests
15
+ run-specs-with-mysql:
16
+ executor: solidusio_extensions/mysql
17
+ steps:
18
+ - solidusio_extensions/run-tests
19
+
20
+ workflows:
21
+ "Run specs on supported Solidus versions":
22
+ jobs:
23
+ - run-specs-with-postgres
24
+ - run-specs-with-mysql
25
+ "Weekly run specs against master":
26
+ triggers:
27
+ - schedule:
28
+ cron: "0 0 * * 4" # every Thursday
29
+ filters:
30
+ branches:
31
+ only:
32
+ - master
33
+ jobs:
34
+ - run-specs-with-postgres
35
+ - run-specs-with-mysql
@@ -1,3 +1,3 @@
1
1
  module SolidusCmd
2
- VERSION = '1.3.0'
2
+ VERSION = '1.4.0'
3
3
  end
@@ -19,4 +19,16 @@ RSpec.describe "Extension Creation" do
19
19
  out = `cd #{tmp_root}/#{build_dir} && #{ext_root}/bin/solidus extension #{extension_name}`.to_s
20
20
  expect(out).to match(/#{gemspec_name}/)
21
21
  end
22
+
23
+ describe 'CI platform' do
24
+ it 'uses circleci by default' do
25
+ out = `cd #{tmp_root}/#{build_dir} && #{ext_root}/bin/solidus extension #{extension_name}`.to_s
26
+ expect(out).to match(".circleci")
27
+ end
28
+
29
+ it "allows specifying a ci platform" do
30
+ out = `cd #{tmp_root}/#{build_dir} && #{ext_root}/bin/solidus extension #{extension_name} --ci=travis`.to_s
31
+ expect(out).to match(".travis.yml")
32
+ end
33
+ end
22
34
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_cmd
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
  - Solidus Team
@@ -156,6 +156,7 @@ files:
156
156
  - bin/solidus
157
157
  - lib/solidus_cmd.rb
158
158
  - lib/solidus_cmd/extension.rb
159
+ - lib/solidus_cmd/templates/extension/.circleci/config.yml
159
160
  - lib/solidus_cmd/templates/extension/CONTRIBUTING.md
160
161
  - lib/solidus_cmd/templates/extension/Gemfile
161
162
  - lib/solidus_cmd/templates/extension/LICENSE