solidus_dev_support 1.4.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -0,0 +1,33 @@
1
+ require 'solidus_dev_support/extension'
2
+
3
+ RSpec.describe SolidusDevSupport::Extension do
4
+ describe '#default_homepage' do
5
+ before do
6
+ expect(subject).to receive(:git).with('remote get-url origin', any_args).and_return(remote)
7
+ expect(subject).to receive(:github_user).and_return('[USERNAME]')
8
+ expect(subject).to receive(:file_name).and_return('solidus_foo_bar')
9
+ end
10
+
11
+ context 'with a git ssh-style remote' do
12
+ let(:remote) { 'git@github.com:solidusio-contrib/solidus_extension_dev_tools.git' }
13
+
14
+ it 'generates a github home page value' do
15
+ expect(subject.default_homepage).to eq('https://github.com/solidusio-contrib/solidus_extension_dev_tools')
16
+ end
17
+ end
18
+
19
+ context 'with a git https remote' do
20
+ let(:remote) { 'https://github.com/solidusio-contrib/solidus_extension_dev_tools.git' }
21
+
22
+ it 'generates a github home page value' do
23
+ expect(subject.default_homepage).to eq('https://github.com/solidusio-contrib/solidus_extension_dev_tools')
24
+ end
25
+ end
26
+ end
27
+
28
+ describe '#default_gemspec' do
29
+ it 'has a changelog_uri' do
30
+ expect(subject.default_gemspec.metadata['changelog_uri']).to end_with('/releases')
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/setup"
4
+ require "solidus_dev_support"
5
+
6
+ RSpec.configure do |config|
7
+ # Enable flags like --only-failures and --next-failure
8
+ config.example_status_persistence_file_path = ".rspec_status"
9
+
10
+ # Disable RSpec exposing methods globally on `Module` and `main`
11
+ config.disable_monkey_patching!
12
+
13
+ config.expect_with :rspec do |c|
14
+ c.syntax = :expect
15
+ end
16
+ end
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_dev_support
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 2.1.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-06-05 00:00:00.000000000 Z
11
+ date: 2020-10-02 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: apparition
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '0.4'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '0.4'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: capybara
29
15
  requirement: !ruby/object:Gem::Requirement
@@ -58,14 +44,14 @@ dependencies:
58
44
  requirements:
59
45
  - - "~>"
60
46
  - !ruby/object:Gem::Version
61
- version: 0.1.16
47
+ version: '0.2'
62
48
  type: :runtime
63
49
  prerelease: false
64
50
  version_requirements: !ruby/object:Gem::Requirement
65
51
  requirements:
66
52
  - - "~>"
67
53
  - !ruby/object:Gem::Version
68
- version: 0.1.16
54
+ version: '0.2'
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: database_cleaner
71
57
  requirement: !ruby/object:Gem::Requirement
@@ -151,47 +137,47 @@ dependencies:
151
137
  - !ruby/object:Gem::Version
152
138
  version: '4.3'
153
139
  - !ruby/object:Gem::Dependency
154
- name: rspec-rails
140
+ name: rspec_junit_formatter
155
141
  requirement: !ruby/object:Gem::Requirement
156
142
  requirements:
157
- - - "~>"
143
+ - - ">="
158
144
  - !ruby/object:Gem::Version
159
- version: 4.0.0.beta3
145
+ version: '0'
160
146
  type: :runtime
161
147
  prerelease: false
162
148
  version_requirements: !ruby/object:Gem::Requirement
163
149
  requirements:
164
- - - "~>"
150
+ - - ">="
165
151
  - !ruby/object:Gem::Version
166
- version: 4.0.0.beta3
152
+ version: '0'
167
153
  - !ruby/object:Gem::Dependency
168
- name: rspec_junit_formatter
154
+ name: rspec-rails
169
155
  requirement: !ruby/object:Gem::Requirement
170
156
  requirements:
171
- - - ">="
157
+ - - "~>"
172
158
  - !ruby/object:Gem::Version
173
- version: '0'
159
+ version: 4.0.0.beta3
174
160
  type: :runtime
175
161
  prerelease: false
176
162
  version_requirements: !ruby/object:Gem::Requirement
177
163
  requirements:
178
- - - ">="
164
+ - - "~>"
179
165
  - !ruby/object:Gem::Version
180
- version: '0'
166
+ version: 4.0.0.beta3
181
167
  - !ruby/object:Gem::Dependency
182
168
  name: rubocop
183
169
  requirement: !ruby/object:Gem::Requirement
184
170
  requirements:
185
171
  - - "~>"
186
172
  - !ruby/object:Gem::Version
187
- version: 0.76.0
173
+ version: '0.90'
188
174
  type: :runtime
189
175
  prerelease: false
190
176
  version_requirements: !ruby/object:Gem::Requirement
191
177
  requirements:
192
178
  - - "~>"
193
179
  - !ruby/object:Gem::Version
194
- version: 0.76.0
180
+ version: '0.90'
195
181
  - !ruby/object:Gem::Dependency
196
182
  name: rubocop-performance
197
183
  requirement: !ruby/object:Gem::Requirement
@@ -254,6 +240,20 @@ dependencies:
254
240
  - - "<"
255
241
  - !ruby/object:Gem::Version
256
242
  version: '3'
243
+ - !ruby/object:Gem::Dependency
244
+ name: webdrivers
245
+ requirement: !ruby/object:Gem::Requirement
246
+ requirements:
247
+ - - "~>"
248
+ - !ruby/object:Gem::Version
249
+ version: '4.4'
250
+ type: :runtime
251
+ prerelease: false
252
+ version_requirements: !ruby/object:Gem::Requirement
253
+ requirements:
254
+ - - "~>"
255
+ - !ruby/object:Gem::Version
256
+ version: '4.4'
257
257
  - !ruby/object:Gem::Dependency
258
258
  name: bundler
259
259
  requirement: !ruby/object:Gem::Requirement
@@ -293,6 +293,7 @@ files:
293
293
  - ".circleci/config.yml"
294
294
  - ".gem_release.yml"
295
295
  - ".github/PULL_REQUEST_TEMPLATE.md"
296
+ - ".github_changelog_generator"
296
297
  - ".gitignore"
297
298
  - ".mergify.yml"
298
299
  - ".rspec"
@@ -301,6 +302,7 @@ files:
301
302
  - CHANGELOG.md
302
303
  - Gemfile
303
304
  - LICENSE.txt
305
+ - OLD_CHANGELOG.md
304
306
  - README.md
305
307
  - Rakefile
306
308
  - bin/console
@@ -311,6 +313,7 @@ files:
311
313
  - lib/solidus_dev_support.rb
312
314
  - lib/solidus_dev_support/extension.rb
313
315
  - lib/solidus_dev_support/rake_tasks.rb
316
+ - lib/solidus_dev_support/rspec/capybara.rb
314
317
  - lib/solidus_dev_support/rspec/coverage.rb
315
318
  - lib/solidus_dev_support/rspec/feature_helper.rb
316
319
  - lib/solidus_dev_support/rspec/rails_helper.rb
@@ -330,53 +333,61 @@ files:
330
333
  - lib/solidus_dev_support/templates/extension/app/assets/stylesheets/spree/backend/%file_name%.css
331
334
  - lib/solidus_dev_support/templates/extension/app/assets/stylesheets/spree/frontend/%file_name%.css
332
335
  - lib/solidus_dev_support/templates/extension/bin/console.tt
333
- - lib/solidus_dev_support/templates/extension/bin/r
334
336
  - lib/solidus_dev_support/templates/extension/bin/rails
335
337
  - lib/solidus_dev_support/templates/extension/bin/rails-engine.tt
336
338
  - lib/solidus_dev_support/templates/extension/bin/rails-sandbox
337
339
  - lib/solidus_dev_support/templates/extension/bin/rake
338
340
  - lib/solidus_dev_support/templates/extension/bin/sandbox.tt
339
- - lib/solidus_dev_support/templates/extension/bin/sandbox_rails
340
341
  - lib/solidus_dev_support/templates/extension/bin/setup
341
342
  - lib/solidus_dev_support/templates/extension/config/locales/en.yml
342
343
  - lib/solidus_dev_support/templates/extension/config/routes.rb
343
344
  - lib/solidus_dev_support/templates/extension/extension.gemspec.tt
344
345
  - lib/solidus_dev_support/templates/extension/gem_release.yml.tt
346
+ - lib/solidus_dev_support/templates/extension/github_changelog_generator
345
347
  - lib/solidus_dev_support/templates/extension/gitignore
346
348
  - lib/solidus_dev_support/templates/extension/lib/%file_name%.rb.tt
349
+ - lib/solidus_dev_support/templates/extension/lib/%file_name%/configuration.rb.tt
347
350
  - lib/solidus_dev_support/templates/extension/lib/%file_name%/engine.rb.tt
348
- - lib/solidus_dev_support/templates/extension/lib/%file_name%/factories.rb.tt
351
+ - lib/solidus_dev_support/templates/extension/lib/%file_name%/testing_support/factories.rb.tt
349
352
  - lib/solidus_dev_support/templates/extension/lib/%file_name%/version.rb.tt
350
353
  - lib/solidus_dev_support/templates/extension/lib/generators/%file_name%/install/install_generator.rb.tt
354
+ - lib/solidus_dev_support/templates/extension/lib/generators/%file_name%/install/templates/initializer.rb.tt
351
355
  - lib/solidus_dev_support/templates/extension/rspec
352
356
  - lib/solidus_dev_support/templates/extension/rubocop.yml
353
357
  - lib/solidus_dev_support/templates/extension/spec/spec_helper.rb.tt
354
358
  - lib/solidus_dev_support/testing_support/preferences.rb
355
359
  - lib/solidus_dev_support/version.rb
356
360
  - solidus_dev_support.gemspec
361
+ - spec/features/create_extension_spec.rb
362
+ - spec/lib/extension_spec.rb
363
+ - spec/spec_helper.rb
357
364
  homepage: https://github.com/solidusio/solidus_dev_support
358
365
  licenses:
359
366
  - MIT
360
367
  metadata:
361
368
  homepage_uri: https://github.com/solidusio/solidus_dev_support
362
369
  source_code_uri: https://github.com/solidusio/solidus_dev_support
370
+ changelog_uri: https://github.com/solidusio/solidus_dev_support/blob/master/CHANGELOG.md
363
371
  post_install_message:
364
372
  rdoc_options: []
365
373
  require_paths:
366
374
  - lib
367
375
  required_ruby_version: !ruby/object:Gem::Requirement
368
376
  requirements:
369
- - - ">="
377
+ - - "~>"
370
378
  - !ruby/object:Gem::Version
371
- version: '0'
379
+ version: '2.5'
372
380
  required_rubygems_version: !ruby/object:Gem::Requirement
373
381
  requirements:
374
382
  - - ">="
375
383
  - !ruby/object:Gem::Version
376
384
  version: '0'
377
385
  requirements: []
378
- rubygems_version: 3.0.6
386
+ rubygems_version: 3.1.2
379
387
  signing_key:
380
388
  specification_version: 4
381
389
  summary: Development tools for Solidus extensions.
382
- test_files: []
390
+ test_files:
391
+ - spec/features/create_extension_spec.rb
392
+ - spec/lib/extension_spec.rb
393
+ - spec/spec_helper.rb
@@ -1,8 +0,0 @@
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"
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- warn %{
4
- DEPRECATION: bin/sandbox_rails has been replaced by bin/rails-sandbox, please
5
- use that command instead.
6
- }.strip
7
-
8
- exec "#{__dir__}/rails-engine"