solidus_cmd 1.2.0 → 1.3.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
- SHA1:
3
- metadata.gz: 4ea4891f16da58730c1ccb1ace46aadea472970d
4
- data.tar.gz: 8923acb9b42417d4fdebf4cc71d4b28a565b9eeb
2
+ SHA256:
3
+ metadata.gz: e5d4f25f4720163e9f55fc5cc96f8e1cf774e1a560ebbbf8fc58d98dccdb51dc
4
+ data.tar.gz: 1d1cad8ce7d747ea0f8876b33665cd00e20be2974f463ea4662b1dbcf524070f
5
5
  SHA512:
6
- metadata.gz: 70c5709ac326b7c045ab388bc1cd0bb176e24dbed848f475fe45c3aaeb29ab82ca343ee392793f8becd7409b7c3f67c49715a0d420d8c62b44e7ccf5ed46937a
7
- data.tar.gz: 446688a931d9afceb6455d2e27162b8a40b2c41ac529e86c4a5641d212d0bae30b576a89de35109aa27fac3ee060bb3b4e242037e42dd442cfc8c6ca329a2a6b
6
+ metadata.gz: 921700a2cea18009b40824d4109e6bf55b4659a21093afea90936a018e23a7341a5339f31d922706e8243fc3faa4ec11eeaebe6c8a09a2750b5a59d8b76484af
7
+ data.tar.gz: 85fda13eb49c36f6ca0e049ed9a4ab043dfb2c89433c9cd9ebd98c8040030bc325599b5407182c804606bce47484eed43a2682e575a3821b6752076de3b49df4
data/.gem_release.yml ADDED
@@ -0,0 +1,4 @@
1
+ bump:
2
+ recurse: false
3
+ file: 'lib/solidus_cmd/version.rb'
4
+ message: Bump Solidus CMD to %{version}
data/.hound.yml ADDED
@@ -0,0 +1,6 @@
1
+ ruby:
2
+ config_file: .rubocop.yml
3
+ scss:
4
+ enabled: false
5
+ javascript:
6
+ enabled: false
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --require spec_helper
data/.rubocop.yml CHANGED
@@ -1,4 +1,8 @@
1
- # Relaxed.Ruby.Style
1
+ require: rubocop-rspec
2
+ require: rubocop-rails
3
+
4
+ inherit_gem:
5
+ relaxed-rubocop: .rubocop.yml
2
6
 
3
7
  AllCops:
4
8
  Exclude:
@@ -6,227 +10,3 @@ AllCops:
6
10
  - 'vendor/bundle/**/*'
7
11
  - 'lib/solidus_cmd/templates/extension/**/*'
8
12
  TargetRubyVersion: 2.1
9
-
10
- # Sometimes I believe this reads better
11
- # This also causes spacing issues on multi-line fixes
12
- Style/BracesAroundHashParameters:
13
- Enabled: false
14
-
15
- # We use class vars and will have to continue doing so for compatability
16
- Style/ClassVars:
17
- Enabled: false
18
-
19
- # We need these names for backwards compatability
20
- Style/PredicateName:
21
- Enabled: false
22
-
23
- Style/AccessorMethodName:
24
- Enabled: false
25
-
26
- # This has been used for customization
27
- Style/MutableConstant:
28
- Enabled: false
29
-
30
- Style/ClassAndModuleChildren:
31
- Enabled: false
32
-
33
- Style/GuardClause:
34
- Enabled: false
35
-
36
- Style/WordArray:
37
- Enabled: false
38
-
39
- Style/ConditionalAssignment:
40
- Enabled: false
41
-
42
- Performance/Count:
43
- Enabled: false
44
-
45
- Style/RaiseArgs:
46
- Enabled: false
47
-
48
- Style/OpMethod:
49
- Enabled: false
50
-
51
- # We can use good judgement here
52
- Style/RegexpLiteral:
53
- Enabled: false
54
-
55
- # Unicode comments are useful
56
- Style/AsciiComments:
57
- Enabled: false
58
-
59
- Lint/EndAlignment:
60
- Enabled: false
61
-
62
- Style/ElseAlignment:
63
- Enabled: false
64
-
65
- Style/IndentationWidth:
66
- Enabled: false
67
-
68
- Style/AlignParameters:
69
- Enabled: false
70
-
71
- Style/ClosingParenthesisIndentation:
72
- Enabled: false
73
-
74
- Style/MultilineMethodCallIndentation:
75
- Enabled: false
76
-
77
- Style/IndentArray:
78
- Enabled: false
79
-
80
- Style/IndentHash:
81
- Enabled: false
82
-
83
- Style/AlignHash:
84
- Enabled: false
85
-
86
- # From http://relaxed.ruby.style/
87
-
88
- Style/Alias:
89
- Enabled: false
90
- StyleGuide: http://relaxed.ruby.style/#stylealias
91
-
92
- Style/BeginBlock:
93
- Enabled: false
94
- StyleGuide: http://relaxed.ruby.style/#stylebeginblock
95
-
96
- Style/BlockDelimiters:
97
- Enabled: false
98
- StyleGuide: http://relaxed.ruby.style/#styleblockdelimiters
99
-
100
- Style/Documentation:
101
- Enabled: false
102
- StyleGuide: http://relaxed.ruby.style/#styledocumentation
103
-
104
- Style/DotPosition:
105
- Enabled: false
106
- StyleGuide: http://relaxed.ruby.style/#styledotposition
107
-
108
- Style/DoubleNegation:
109
- Enabled: false
110
- StyleGuide: http://relaxed.ruby.style/#styledoublenegation
111
-
112
- Style/EndBlock:
113
- Enabled: false
114
- StyleGuide: http://relaxed.ruby.style/#styleendblock
115
-
116
- Style/FormatString:
117
- Enabled: false
118
- StyleGuide: http://relaxed.ruby.style/#styleformatstring
119
-
120
- Style/IfUnlessModifier:
121
- Enabled: false
122
- StyleGuide: http://relaxed.ruby.style/#styleifunlessmodifier
123
-
124
- Style/Lambda:
125
- Enabled: false
126
- StyleGuide: http://relaxed.ruby.style/#stylelambda
127
-
128
- Style/ModuleFunction:
129
- Enabled: false
130
- StyleGuide: http://relaxed.ruby.style/#stylemodulefunction
131
-
132
- Style/MultilineBlockChain:
133
- Enabled: false
134
- StyleGuide: http://relaxed.ruby.style/#stylemultilineblockchain
135
-
136
- Style/NegatedIf:
137
- Enabled: false
138
- StyleGuide: http://relaxed.ruby.style/#stylenegatedif
139
-
140
- Style/NegatedWhile:
141
- Enabled: false
142
- StyleGuide: http://relaxed.ruby.style/#stylenegatedwhile
143
-
144
- Style/ParallelAssignment:
145
- Enabled: false
146
- StyleGuide: http://relaxed.ruby.style/#styleparallelassignment
147
-
148
- Style/PercentLiteralDelimiters:
149
- Enabled: false
150
- StyleGuide: http://relaxed.ruby.style/#stylepercentliteraldelimiters
151
-
152
- Style/PerlBackrefs:
153
- Enabled: false
154
- StyleGuide: http://relaxed.ruby.style/#styleperlbackrefs
155
-
156
- Style/Semicolon:
157
- Enabled: false
158
- StyleGuide: http://relaxed.ruby.style/#stylesemicolon
159
-
160
- Style/SignalException:
161
- Enabled: false
162
- StyleGuide: http://relaxed.ruby.style/#stylesignalexception
163
-
164
- Style/SingleLineBlockParams:
165
- Enabled: false
166
- StyleGuide: http://relaxed.ruby.style/#stylesinglelineblockparams
167
-
168
- Style/SingleLineMethods:
169
- Enabled: false
170
- StyleGuide: http://relaxed.ruby.style/#stylesinglelinemethods
171
-
172
- Style/SpaceBeforeBlockBraces:
173
- Enabled: false
174
- StyleGuide: http://relaxed.ruby.style/#stylespacebeforeblockbraces
175
-
176
- Style/SpaceInsideParens:
177
- Enabled: false
178
- StyleGuide: http://relaxed.ruby.style/#stylespaceinsideparens
179
-
180
- Style/SpecialGlobalVars:
181
- Enabled: false
182
- StyleGuide: http://relaxed.ruby.style/#stylespecialglobalvars
183
-
184
- Style/StringLiterals:
185
- Enabled: false
186
- StyleGuide: http://relaxed.ruby.style/#stylestringliterals
187
-
188
- Style/SymbolProc:
189
- Enabled: false
190
-
191
- Style/WhileUntilModifier:
192
- Enabled: false
193
- StyleGuide: http://relaxed.ruby.style/#stylewhileuntilmodifier
194
-
195
- Lint/AmbiguousRegexpLiteral:
196
- Enabled: false
197
- StyleGuide: http://relaxed.ruby.style/#lintambiguousregexpliteral
198
-
199
- Lint/AssignmentInCondition:
200
- Enabled: false
201
- StyleGuide: http://relaxed.ruby.style/#lintassignmentincondition
202
-
203
- Lint/HandleExceptions:
204
- Exclude:
205
- - '*/Rakefile'
206
-
207
- Metrics/AbcSize:
208
- Enabled: false
209
-
210
- Metrics/BlockNesting:
211
- Enabled: false
212
-
213
- Metrics/ClassLength:
214
- Enabled: false
215
-
216
- Metrics/ModuleLength:
217
- Enabled: false
218
-
219
- Metrics/CyclomaticComplexity:
220
- Enabled: false
221
-
222
- Metrics/LineLength:
223
- Enabled: false
224
-
225
- Metrics/MethodLength:
226
- Enabled: false
227
-
228
- Metrics/ParameterLists:
229
- Enabled: false
230
-
231
- Metrics/PerceivedComplexity:
232
- Enabled: false
data/.travis.yml ADDED
@@ -0,0 +1,3 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.4.1
data/README.md CHANGED
@@ -1,12 +1,41 @@
1
- Solidus cmd
2
- ===========
1
+ <img src="./logo.svg" width=350>
3
2
 
4
- Command line utility to create new Solidus extensions
3
+ - [solidus.io](http://solidus.io/)
4
+ - [Documentation](https://guides.solidus.io)
5
+ - [Join our Slack](http://slack.solidus.io/) ([solidusio.slack.com](http://solidusio.slack.com))
6
+ - [solidus-security](https://groups.google.com/forum/#!forum/solidus-security) mailing list
7
+ - [Supported Solidus extensions](http://extensions.solidus.io/)
5
8
 
6
- See the main solidus project: https://github.com/solidusio/solidus
9
+ ## solidus_cmd
7
10
 
8
- To build a new Solidus Extension, you can run
9
- ```ruby
10
- solidus extension my_extension
11
+ solidus_cmd is a command line utility for creating extensions for the [Solidus ecommerce platform](https://github.com/solidusio/solidus).
12
+
13
+ ## Getting started
14
+
15
+ Install the gem!
16
+
17
+ ```bash
18
+ $ gem install solidus_cmd
11
19
  ```
20
+ Create your Solidus extension with the `solidus extension` command.
21
+
22
+ ```bash
23
+ $ solidus extension my_extension
24
+ ```
25
+
26
+ A Solidus extension is bundled as a Ruby gem, so be sure to update your `.gemspec` file.
27
+
28
+ You can now load your extension in your Solidus project's Gemfile.
29
+
30
+ ## Questions?
31
+
32
+ The best way to ask questions is via the [#support channel on the Solidus Slack](https://solidusio.slack.com/messages/support/details/).
33
+
34
+ ## Tests
35
+
36
+ We use [RSpec](http://rspec.info) for tests. Ideally all PRs include tests!
37
+
38
+
39
+ ## Contributing
12
40
 
41
+ Solidus is an open source project and we encourage contributions.
data/Rakefile CHANGED
@@ -1,2 +1,13 @@
1
- require "bundler"
1
+ require 'bundler'
2
+ require 'rubocop/rake_task'
3
+
2
4
  Bundler::GemHelper.install_tasks
5
+
6
+ begin
7
+ require 'rspec/core/rake_task'
8
+ RSpec::Core::RakeTask.new(:spec)
9
+ RuboCop::RakeTask.new
10
+ task default: %i(spec)
11
+ rescue LoadError
12
+ warn "Error loading some rake tasks"
13
+ end
data/bin/solidus CHANGED
@@ -1,11 +1,54 @@
1
1
  #!/usr/bin/env ruby
2
2
  require 'solidus_cmd'
3
+ require 'solidus_cmd/version'
4
+ require 'optparse'
3
5
 
4
- command = ARGV.first
5
- case command
6
- when 'extension'
7
- ARGV.shift
6
+ # Print help if no options are supplied
7
+ ARGV << '--help' unless ARGV.first
8
+
9
+ if ARGV.first == 'extension' || ARGV.first == 'e'
10
+ ARGV.shift
11
+ if ARGV.first
8
12
  SolidusCmd::Extension.start
13
+ else
14
+ puts 'An extension must have a name!'
15
+ puts `solidus -h`
16
+ end
9
17
  else
10
- fail "unknown command: #{command}"
18
+ Options = Struct.new(:name)
19
+
20
+ # Used to parse options from the command line
21
+ class Parser
22
+ def self.parse(options)
23
+ args = Options.new()
24
+
25
+ opt_parser = OptionParser.new do |opts|
26
+ opts.banner = 'Usage: solidus [[extension extension_name] | [-h] [-v]]'
27
+
28
+ opts.on('-h',
29
+ '--help',
30
+ 'Prints this help') do
31
+ puts opts
32
+ end
33
+
34
+ opts.on('-v',
35
+ '--version',
36
+ "Prints the current version: #{SolidusCmd::VERSION}") do
37
+ puts SolidusCmd::VERSION
38
+ end
39
+ end
40
+
41
+ begin
42
+ opt_parser.parse!(options)
43
+ rescue OptionParser::InvalidOption => e
44
+ puts e
45
+ puts "Try 'solidus --help' for more information."
46
+ exit 1
47
+ end
48
+
49
+ args
50
+ end
51
+ end
52
+
53
+ Parser.parse(ARGV)
11
54
  end
@@ -19,9 +19,10 @@ module SolidusCmd
19
19
  directory 'lib', "#{file_name}/lib"
20
20
  directory 'bin', "#{file_name}/bin"
21
21
 
22
- template 'extension.gemspec', "#{file_name}/#{file_name}.gemspec"
22
+ template 'extension.gemspec.erb', "#{file_name}/#{file_name}.gemspec"
23
23
  template 'Gemfile', "#{file_name}/Gemfile"
24
24
  template 'gitignore', "#{file_name}/.gitignore"
25
+ template 'gem_release.yml.tt', "#{file_name}/.gem_release.yml"
25
26
  template 'LICENSE', "#{file_name}/LICENSE"
26
27
  template 'Rakefile', "#{file_name}/Rakefile"
27
28
  template 'README.md', "#{file_name}/README.md"
@@ -38,10 +39,6 @@ module SolidusCmd
38
39
  Thor::Util.camel_case file_name
39
40
  end
40
41
 
41
- def solidus_version
42
- '~> 1.0'
43
- end
44
-
45
42
  def use_prefix(prefix)
46
43
  unless file_name =~ /^#{prefix}/
47
44
  @file_name = prefix + Thor::Util.snake_case(file_name)
@@ -1,7 +1,25 @@
1
1
  source 'https://rubygems.org'
2
+ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
3
+
4
+ branch = ENV.fetch('SOLIDUS_BRANCH', 'master')
5
+ gem 'solidus', github: 'solidusio/solidus', branch: branch
2
6
 
3
- gem 'solidus', github: 'solidusio/solidus'
4
7
  # Provides basic authentication functionality for testing parts of your engine
5
- gem 'solidus_auth_devise', '~> 1.0'
8
+ gem 'solidus_auth_devise'
9
+
10
+ # This is needed to avoid incompatibilities between this extension and
11
+ # old versions of solidus (< 2.5). This can be reverted when Solidus 2.4
12
+ # reaches EOL. See https://github.com/solidusio/solidus/pull/2835
13
+ if branch < 'v2.5'
14
+ gem 'factory_bot', '4.10.0'
15
+ else
16
+ gem 'factory_bot', '> 4.10.0'
17
+ end
18
+
19
+ if ENV['DB'] == 'mysql'
20
+ gem 'mysql2', '~> 0.4.10'
21
+ else
22
+ gem 'pg', '~> 0.21'
23
+ end
6
24
 
7
25
  gemspec
@@ -29,11 +29,20 @@ bundle
29
29
  bundle exec rake
30
30
  ```
31
31
 
32
- When testing your applications integration with this extension you may use it's factories.
32
+ When testing your application's integration with this extension you may use its factories.
33
33
  Simply add this require statement to your spec_helper:
34
34
 
35
35
  ```ruby
36
36
  require '<%= file_name %>/factories'
37
37
  ```
38
38
 
39
+ Releasing
40
+ ---------
41
+
42
+ Your new extension version can be released using `gem-release` like this:
43
+
44
+ ```shell
45
+ bundle exec gem bump -v VERSION --tag --push --remote upstream && gem release
46
+ ```
47
+
39
48
  Copyright (c) <%= Time.now.year %> [name of extension creator], released under the New BSD License
@@ -14,19 +14,19 @@ Gem::Specification.new do |s|
14
14
  # s.homepage = 'http://www.example.com'
15
15
 
16
16
  s.files = Dir["{app,config,db,lib}/**/*", 'LICENSE', 'Rakefile', 'README.md']
17
- s.test_files = Dir['test/**/*']
17
+ s.test_files = Dir['spec/**/*']
18
18
 
19
- s.add_dependency 'solidus_core', '<%= solidus_version %>'
19
+ s.add_dependency 'solidus_core' # Set Solidus version
20
20
 
21
21
  s.add_development_dependency 'capybara'
22
+ s.add_development_dependency 'ffaker'
22
23
  s.add_development_dependency 'poltergeist'
23
24
  s.add_development_dependency 'coffee-rails'
24
25
  s.add_development_dependency 'sass-rails'
25
26
  s.add_development_dependency 'database_cleaner'
26
- s.add_development_dependency 'factory_girl'
27
27
  s.add_development_dependency 'rspec-rails'
28
- s.add_development_dependency 'rubocop', '0.37.2'
29
- s.add_development_dependency 'rubocop-rspec', '1.4.0'
28
+ s.add_development_dependency 'rubocop'
29
+ s.add_development_dependency 'rubocop-rspec'
30
30
  s.add_development_dependency 'simplecov'
31
- s.add_development_dependency 'sqlite3'
31
+ s.add_development_dependency 'gem-release'
32
32
  end
@@ -0,0 +1,5 @@
1
+ bump:
2
+ recurse: false
3
+ file: 'lib/<%=file_name%>/version.rb'
4
+ message: Bump <%=class_name%> to %{version}
5
+ branch: true
@@ -1,4 +1,4 @@
1
- FactoryGirl.define do
1
+ FactoryBot.define do
2
2
  # Define your Spree extensions Factories within this file to enable applications, and other extensions to use and override them.
3
3
  #
4
4
  # Example adding this to your spec_helper will load these Factories for use:
@@ -15,73 +15,17 @@ ENV['RAILS_ENV'] = 'test'
15
15
 
16
16
  require File.expand_path('../dummy/config/environment.rb', __FILE__)
17
17
 
18
- require 'rspec/rails'
19
- require 'database_cleaner'
20
- require 'ffaker'
18
+ # Requires factories and other useful helpers defined in spree_core.
19
+ require 'solidus_support/extension/feature_helper'
21
20
 
22
21
  # Requires supporting ruby files with custom matchers and macros, etc,
23
22
  # in spec/support/ and its subdirectories.
24
- Dir[File.join(File.dirname(__FILE__), 'support/**/*.rb')].each { |f| require f }
25
-
26
- # Requires factories and other useful helpers defined in spree_core.
27
- require 'spree/testing_support/authorization_helpers'
28
- require 'spree/testing_support/capybara_ext'
29
- require 'spree/testing_support/controller_requests'
30
- require 'spree/testing_support/factories'
31
- require 'spree/testing_support/url_helpers'
23
+ Dir[File.join(File.dirname(__FILE__), 'support/**/*.rb')].each {|f| require f }
32
24
 
33
25
  # Requires factories defined in lib/<%= file_name %>/factories.rb
34
26
  require '<%= file_name %>/factories'
35
27
 
36
28
  RSpec.configure do |config|
37
- config.include FactoryGirl::Syntax::Methods
38
-
39
- # Infer an example group's spec type from the file location.
40
29
  config.infer_spec_type_from_file_location!
41
-
42
- # == URL Helpers
43
- #
44
- # Allows access to Spree's routes in specs:
45
- #
46
- # visit spree.admin_path
47
- # current_path.should eql(spree.products_path)
48
- config.include Spree::TestingSupport::UrlHelpers
49
-
50
- # == Mock Framework
51
- #
52
- # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
53
- #
54
- # config.mock_with :mocha
55
- # config.mock_with :flexmock
56
- # config.mock_with :rr
57
- config.mock_with :rspec
58
- config.color = true
59
-
60
- # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
61
- config.fixture_path = "#{::Rails.root}/spec/fixtures"
62
-
63
- # Capybara javascript drivers require transactional fixtures set to false, and we use DatabaseCleaner
64
- # to cleanup after each test instead. Without transactional fixtures set to false the records created
65
- # to setup a test will be unavailable to the browser, which runs under a separate server instance.
66
30
  config.use_transactional_fixtures = false
67
-
68
- # Ensure Suite is set to use transactions for speed.
69
- config.before :suite do
70
- DatabaseCleaner.strategy = :transaction
71
- DatabaseCleaner.clean_with :truncation
72
- end
73
-
74
- # Before each spec check if it is a Javascript test and switch between using database transactions or not where necessary.
75
- config.before :each do
76
- DatabaseCleaner.strategy = RSpec.current_example.metadata[:js] ? :truncation : :transaction
77
- DatabaseCleaner.start
78
- end
79
-
80
- # After each spec clean the database.
81
- config.after :each do
82
- DatabaseCleaner.clean
83
- end
84
-
85
- config.fail_fast = ENV['FAIL_FAST'] || false
86
- config.order = 'random'
87
31
  end
@@ -5,4 +5,18 @@ bundler_args: --quiet
5
5
  script:
6
6
  - bundle exec rake
7
7
  rvm:
8
- - 2.1.5
8
+ - 2.5.1
9
+ env:
10
+ matrix:
11
+ - SOLIDUS_BRANCH=v2.4 DB=postgres
12
+ - SOLIDUS_BRANCH=v2.5 DB=postgres
13
+ - SOLIDUS_BRANCH=v2.6 DB=postgres
14
+ - SOLIDUS_BRANCH=v2.7 DB=postgres
15
+ - SOLIDUS_BRANCH=v2.8 DB=postgres
16
+ - SOLIDUS_BRANCH=master DB=postgres
17
+ - SOLIDUS_BRANCH=v2.4 DB=mysql
18
+ - SOLIDUS_BRANCH=v2.5 DB=mysql
19
+ - SOLIDUS_BRANCH=v2.6 DB=mysql
20
+ - SOLIDUS_BRANCH=v2.7 DB=mysql
21
+ - SOLIDUS_BRANCH=v2.8 DB=mysql
22
+ - SOLIDUS_BRANCH=master DB=mysql
@@ -1,3 +1,3 @@
1
1
  module SolidusCmd
2
- VERSION = '1.2.0'
2
+ VERSION = '1.3.0'
3
3
  end
data/logo.svg ADDED
@@ -0,0 +1,27 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 20.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
+ viewBox="0 0 576 142.4" style="enable-background:new 0 0 576 142.4;" xml:space="preserve">
5
+ <g>
6
+ <path d="M14,111.6c7.3,7.9,19.3,14,29.9,14c11.8,0,18.9-6.7,18.9-12c0-6.3-4.9-9.6-12.4-11l-11.6-2.2
7
+ C12,95.4,4.5,86.8,4.5,73.2c0-16.1,13.6-31.1,37.4-31.1c13.2,0,24.8,3.9,37.8,13.2L68,69.7c-10-8.5-18.9-10.6-25.6-10.6
8
+ c-8.8,0-17.5,4.3-17.5,12c0,5.7,4.5,8.7,12.4,10L58,85c16.9,3.1,25.2,11.2,25.2,25.4c0,14-11.4,32.1-40.3,32.1
9
+ c-16.1,0-29.9-5.7-42.9-16.7L14,111.6z"/>
10
+ <path d="M143.9,42.1c33.2,0,52.5,25,52.5,50.1s-19.3,50.1-52.5,50.1c-33.2,0-52.5-25-52.5-50.1S110.6,42.1,143.9,42.1
11
+ M143.9,123.2c17.9,0,30.9-13.8,30.9-30.9s-13-30.9-30.9-30.9C126,61.4,113,75.2,113,92.3S126,123.2,143.9,123.2"/>
12
+ <path d="M266.9,16.1c5.7,0,10.3,4.6,10.3,10.3c0,5.7-4.6,10.3-10.3,10.3c-5.7,0-10.3-4.6-10.3-10.3
13
+ C256.6,20.7,261.2,16.1,266.9,16.1"/>
14
+ <rect x="256.7" y="57.1" width="20.4" height="85.3"/>
15
+ <path d="M371.5,16.1V52c-8.4-6.1-19.2-9.8-32.1-9.8c-33.2,0-52.5,25-52.5,50.1s19.3,50.1,52.5,50.1
16
+ c12.9,0,23.7-3.8,32.1-9.8v9.8h20.4V16.1H371.5z M339.4,123.2c-17.9,0-30.9-13.8-30.9-30.9s13-30.9,30.9-30.9
17
+ c17.9,0,30.9,13.8,30.9,30.9S357.3,123.2,339.4,123.2z"/>
18
+ <path d="M402.2,42.3h20.4V98c0,14,10.2,24,23,24c12.8,0,23-10,23-24V42.3h20.4v57.5c0,26.7-20.8,42.7-43.5,42.7
19
+ c-22.6,0-43.5-15.9-43.5-42.7V42.3z"/>
20
+ <path d="M506.8,111.8c7.3,7.9,19.3,14,29.9,14c11.8,0,18.9-6.7,18.9-12c0-6.3-4.9-9.6-12.4-11l-11.6-2.2
21
+ c-26.7-4.9-34.2-13.6-34.2-27.1c0-16.1,13.6-31.1,37.4-31.1c13.2,0,24.8,3.9,37.8,13.2L560.9,70c-10-8.5-18.9-10.6-25.6-10.6
22
+ c-8.8,0-17.5,4.3-17.5,12c0,5.7,4.5,8.7,12.4,10l20.6,3.9c16.9,3.1,25.2,11.2,25.2,25.4c0,14-11.4,32.1-40.3,32.1
23
+ c-16.1,0-29.9-5.7-42.9-16.7L506.8,111.8z"/>
24
+ <path d="M235.4,120c-5.7-3.3-8-7-8.3-16.6l0,0V37.2c0-19.9-9.8-27.1-30.9-37.2l-9,16.1l11,6.3c5.7,3.3,8,7,8.3,16.6
25
+ l0,0v66.3c0,19.9,9.8,27.1,30.9,37.2l9-16.1L235.4,120z"/>
26
+ </g>
27
+ </svg>
data/solidus_cmd.gemspec CHANGED
@@ -1,4 +1,5 @@
1
1
  # -*- encoding: utf-8 -*-
2
+
2
3
  $:.push File.expand_path("../lib", __FILE__)
3
4
  require 'solidus_cmd/version'
4
5
 
@@ -18,10 +19,14 @@ Gem::Specification.new do |s|
18
19
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
20
  s.require_paths = ["lib"]
20
21
 
22
+ s.add_development_dependency 'byebug'
21
23
  s.add_development_dependency 'rspec'
22
24
  s.add_development_dependency 'rake'
23
- s.add_development_dependency 'rubocop', '0.37.2'
24
- s.add_development_dependency 'rubocop-rspec', '1.4.0'
25
+ s.add_development_dependency 'rubocop', '~> 0.71'
26
+ s.add_development_dependency 'rubocop-rails'
27
+ s.add_development_dependency 'rubocop-rspec'
28
+ s.add_development_dependency 'relaxed-rubocop'
29
+ s.add_development_dependency 'gem-release'
25
30
  # Temporary hack until https://github.com/wycats/thor/issues/234 is fixed
26
31
  s.add_dependency 'thor', '~> 0.14'
27
32
  end
@@ -0,0 +1,22 @@
1
+ require 'spec_helper'
2
+
3
+ RSpec.describe "Extension Creation" do
4
+ let(:ext_root) { File.expand_path('../../..', __FILE__) }
5
+ let(:tmp_root) { "#{ext_root}/spec" }
6
+ let(:build_dir) { "tmp" }
7
+ let(:extension_name) { "test_extension" }
8
+ let(:gemspec_name) { "solidus_#{extension_name}.gemspec" }
9
+
10
+ before(:each) do
11
+ system("cd #{tmp_root} && mkdir #{build_dir}")
12
+ end
13
+
14
+ after(:each) do
15
+ system("cd #{tmp_root} && rm -rf #{build_dir}")
16
+ end
17
+
18
+ it "creates a new extension" do
19
+ out = `cd #{tmp_root}/#{build_dir} && #{ext_root}/bin/solidus extension #{extension_name}`.to_s
20
+ expect(out).to match(/#{gemspec_name}/)
21
+ end
22
+ end
data/spec/spec_helper.rb CHANGED
@@ -19,9 +19,11 @@ RSpec.configure do |config|
19
19
  config.color = true
20
20
  config.mock_with :rspec
21
21
 
22
- config.fixture_path = "#{::Rails.root}/spec/fixtures"
22
+ if defined?(Rails)
23
+ config.fixture_path = Rails.root.join('spec', 'fixtures')
24
+ config.use_transactional_fixtures = false
25
+ end
23
26
 
24
- config.use_transactional_fixtures = false
25
27
 
26
28
  config.fail_fast = ENV['FAIL_FAST'] || false
27
29
  end
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_cmd
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Solidus Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-22 00:00:00.000000000 Z
11
+ date: 2019-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: byebug
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: rspec
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -42,30 +56,72 @@ dependencies:
42
56
  name: rubocop
43
57
  requirement: !ruby/object:Gem::Requirement
44
58
  requirements:
45
- - - '='
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '0.71'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '0.71'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rubocop-rails
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
46
74
  - !ruby/object:Gem::Version
47
- version: 0.37.2
75
+ version: '0'
48
76
  type: :development
49
77
  prerelease: false
50
78
  version_requirements: !ruby/object:Gem::Requirement
51
79
  requirements:
52
- - - '='
80
+ - - ">="
53
81
  - !ruby/object:Gem::Version
54
- version: 0.37.2
82
+ version: '0'
55
83
  - !ruby/object:Gem::Dependency
56
84
  name: rubocop-rspec
57
85
  requirement: !ruby/object:Gem::Requirement
58
86
  requirements:
59
- - - '='
87
+ - - ">="
60
88
  - !ruby/object:Gem::Version
61
- version: 1.4.0
89
+ version: '0'
62
90
  type: :development
63
91
  prerelease: false
64
92
  version_requirements: !ruby/object:Gem::Requirement
65
93
  requirements:
66
- - - '='
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: relaxed-rubocop
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
67
102
  - !ruby/object:Gem::Version
68
- version: 1.4.0
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: gem-release
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
69
125
  - !ruby/object:Gem::Dependency
70
126
  name: thor
71
127
  requirement: !ruby/object:Gem::Requirement
@@ -87,8 +143,12 @@ executables:
87
143
  extensions: []
88
144
  extra_rdoc_files: []
89
145
  files:
146
+ - ".gem_release.yml"
90
147
  - ".gitignore"
148
+ - ".hound.yml"
149
+ - ".rspec"
91
150
  - ".rubocop.yml"
151
+ - ".travis.yml"
92
152
  - Gemfile
93
153
  - LICENSE
94
154
  - README.md
@@ -108,7 +168,8 @@ files:
108
168
  - lib/solidus_cmd/templates/extension/bin/rails.tt
109
169
  - lib/solidus_cmd/templates/extension/config/locales/en.yml
110
170
  - lib/solidus_cmd/templates/extension/config/routes.rb
111
- - lib/solidus_cmd/templates/extension/extension.gemspec
171
+ - lib/solidus_cmd/templates/extension/extension.gemspec.erb
172
+ - lib/solidus_cmd/templates/extension/gem_release.yml.tt
112
173
  - lib/solidus_cmd/templates/extension/gitignore
113
174
  - lib/solidus_cmd/templates/extension/lib/%file_name%.rb.tt
114
175
  - lib/solidus_cmd/templates/extension/lib/%file_name%/engine.rb.tt
@@ -120,7 +181,9 @@ files:
120
181
  - lib/solidus_cmd/templates/extension/spec/spec_helper.rb.tt
121
182
  - lib/solidus_cmd/templates/extension/travis.yml
122
183
  - lib/solidus_cmd/version.rb
184
+ - logo.svg
123
185
  - solidus_cmd.gemspec
186
+ - spec/features/extension_creation_spec.rb
124
187
  - spec/spec_helper.rb
125
188
  homepage: http://solidus.io
126
189
  licenses:
@@ -141,9 +204,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
141
204
  - !ruby/object:Gem::Version
142
205
  version: '0'
143
206
  requirements: []
144
- rubyforge_project:
145
- rubygems_version: 2.5.1
207
+ rubygems_version: 3.0.6
146
208
  signing_key:
147
209
  specification_version: 4
148
210
  summary: Solidus command line utility
149
- test_files: []
211
+ test_files:
212
+ - spec/features/extension_creation_spec.rb
213
+ - spec/spec_helper.rb