solidus_dev_support 1.6.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +3 -1
- data/CHANGELOG.md +10 -0
- data/lib/solidus_dev_support/rspec/capybara.rb +18 -0
- data/lib/solidus_dev_support/rspec/feature_helper.rb +1 -11
- data/lib/solidus_dev_support/rubocop/config.yml +1 -1
- data/lib/solidus_dev_support/templates/extension/.github/stale.yml +4 -4
- data/lib/solidus_dev_support/templates/extension/README.md +5 -1
- data/lib/solidus_dev_support/templates/extension/bin/sandbox.tt +1 -1
- data/lib/solidus_dev_support/templates/extension/extension.gemspec.tt +1 -1
- data/lib/solidus_dev_support/version.rb +5 -1
- data/solidus_dev_support.gemspec +2 -2
- data/spec/features/create_extension_spec.rb +11 -6
- metadata +20 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca90c2de99b0e00b59747e9aaf0cc9149adcdbd0568311d4fbc7a921fa61b9e0
|
4
|
+
data.tar.gz: c0063153a36c95f8b3fa8f406b46b412242bfef54055857b3f109de682966e6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e59dc8c12d5fde03a58a67102e72194a34a7dd19df88b79b4e59ba9d77900fcdeb6b3216c31618a429ada33bb8558548e3854105e2a17e7b126b4f651a7d4dc
|
7
|
+
data.tar.gz: 3c6f158eb5ed20f1eec861a7fc971a7bbdd296bd8529afa61f434ba23933d7843456714cbb3c657cffecee90c0d8ff642a6920c31d89dd464c42684342c02079
|
data/.circleci/config.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -4,8 +4,15 @@
|
|
4
4
|
|
5
5
|
[Full Changelog](https://github.com/solidusio/solidus_dev_support/compare/v1.5.0...HEAD)
|
6
6
|
|
7
|
+
**Breaking changes:**
|
8
|
+
|
9
|
+
- Switch the JS driver to WebDriver/Selenium [\#136](https://github.com/solidusio/solidus_dev_support/pull/136) ([elia](https://github.com/elia))
|
10
|
+
|
7
11
|
**Implemented enhancements:**
|
8
12
|
|
13
|
+
- Enable new RuboCop cops automatically [\#143](https://github.com/solidusio/solidus_dev_support/pull/143) ([aldesantis](https://github.com/aldesantis))
|
14
|
+
- Don't forcefully close issues via stale-bot [\#139](https://github.com/solidusio/solidus_dev_support/pull/139) ([elia](https://github.com/elia))
|
15
|
+
- Add the approximate recommendation for dev-support to the gemspec [\#137](https://github.com/solidusio/solidus_dev_support/pull/137) ([elia](https://github.com/elia))
|
9
16
|
- Let the extension name include spaces [\#133](https://github.com/solidusio/solidus_dev_support/pull/133) ([elia](https://github.com/elia))
|
10
17
|
- Add precompiled badges fro CI and coverage [\#132](https://github.com/solidusio/solidus_dev_support/pull/132) ([elia](https://github.com/elia))
|
11
18
|
- Add Changelog Rake task [\#128](https://github.com/solidusio/solidus_dev_support/pull/128) ([tvdeyen](https://github.com/tvdeyen))
|
@@ -13,6 +20,9 @@
|
|
13
20
|
|
14
21
|
**Fixed bugs:**
|
15
22
|
|
23
|
+
- fix capybara driver declaration [\#141](https://github.com/solidusio/solidus_dev_support/pull/141) ([ccarruitero](https://github.com/ccarruitero))
|
24
|
+
- Bump RuboCop to latest 0.90.0 version [\#138](https://github.com/solidusio/solidus_dev_support/pull/138) ([peterberkenbosch](https://github.com/peterberkenbosch))
|
25
|
+
- Fix missing backslash in solidus install command [\#135](https://github.com/solidusio/solidus_dev_support/pull/135) ([nirebu](https://github.com/nirebu))
|
16
26
|
- Don't install a payment-method in the sandbox [\#131](https://github.com/solidusio/solidus_dev_support/pull/131) ([elia](https://github.com/elia))
|
17
27
|
- Run extension generator in sandbox [\#127](https://github.com/solidusio/solidus_dev_support/pull/127) ([elia](https://github.com/elia))
|
18
28
|
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Allow to override the initial windows size
|
4
|
+
CAPYBARA_WINDOW_SIZE = (ENV['CAPYBARA_WINDOW_SIZE'] || '1920x1080').split('x', 2).map(&:to_i)
|
5
|
+
|
6
|
+
Capybara.javascript_driver = (ENV['CAPYBARA_JAVASCRIPT_DRIVER'] || "solidus_chrome_headless").to_sym
|
7
|
+
Capybara.default_max_wait_time = 10
|
8
|
+
Capybara.server = :puma, { Silent: true } # A fix for rspec/rspec-rails#1897
|
9
|
+
|
10
|
+
Capybara.drivers[:selenium_chrome_headless].tap do |original_driver|
|
11
|
+
Capybara.register_driver :solidus_chrome_headless do |app|
|
12
|
+
original_driver.call(app).tap do |driver|
|
13
|
+
driver.options[:options].args << "--window-size=#{CAPYBARA_WINDOW_SIZE.join(',')}"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
require 'spree/testing_support/capybara_ext'
|
@@ -10,17 +10,7 @@
|
|
10
10
|
require 'solidus_dev_support/rspec/rails_helper'
|
11
11
|
|
12
12
|
require 'capybara-screenshot/rspec'
|
13
|
-
require 'capybara
|
14
|
-
|
15
|
-
Capybara.javascript_driver = (ENV['CAPYBARA_DRIVER'] || :apparition).to_sym
|
16
|
-
Capybara.default_max_wait_time = 10
|
17
|
-
Capybara.server = :puma, { Silent: true } # A fix for rspec/rspec-rails#1897
|
18
|
-
|
19
|
-
Capybara.register_driver :apparition do |app|
|
20
|
-
Capybara::Apparition::Driver.new(app, window_size: [1920, 1080])
|
21
|
-
end
|
22
|
-
|
23
|
-
require 'spree/testing_support/capybara_ext'
|
13
|
+
require 'solidus_dev_support/rspec/capybara'
|
24
14
|
|
25
15
|
def dev_support_assets_preload
|
26
16
|
if Rails.application.respond_to?(:precompiled_assets)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require: ["rubocop-rspec", "rubocop-rails", "rubocop-performance"]
|
2
2
|
|
3
|
-
AllCops: {TargetRubyVersion: 2.5, Exclude: ["spec/dummy/**/*", "sandbox/**/*", "vendor/**/*"]}
|
3
|
+
AllCops: {TargetRubyVersion: 2.5, Exclude: ["spec/dummy/**/*", "sandbox/**/*", "vendor/**/*"], NewCops: enable}
|
4
4
|
|
5
5
|
Layout/ArgumentAlignment: {EnforcedStyle: with_fixed_indentation}
|
6
6
|
Layout/DotPosition: {Enabled: false, StyleGuide: "https://relaxed.ruby.style/#layoutdotposition"}
|
@@ -1,17 +1,17 @@
|
|
1
1
|
# Number of days of inactivity before an issue becomes stale
|
2
2
|
daysUntilStale: 60
|
3
3
|
# Number of days of inactivity before a stale issue is closed
|
4
|
-
daysUntilClose:
|
4
|
+
daysUntilClose: false
|
5
5
|
# Issues with these labels will never be considered stale
|
6
6
|
exemptLabels:
|
7
7
|
- pinned
|
8
8
|
- security
|
9
9
|
# Label to use when marking an issue as stale
|
10
|
-
staleLabel:
|
10
|
+
staleLabel: stale
|
11
11
|
# Comment to post when marking an issue as stale. Set to `false` to disable
|
12
12
|
markComment: >
|
13
13
|
This issue has been automatically marked as stale because it has not had
|
14
|
-
recent activity. It
|
14
|
+
recent activity. It might be closed if no further activity occurs. Thank you
|
15
15
|
for your contributions.
|
16
16
|
# Comment to post when closing a stale issue. Set to `false` to disable
|
17
|
-
closeComment: false
|
17
|
+
closeComment: false
|
@@ -84,7 +84,11 @@ git commit -m "Update the changelog"
|
|
84
84
|
Your new extension version can be released using `gem-release` like this:
|
85
85
|
|
86
86
|
```shell
|
87
|
-
bundle exec gem bump -v
|
87
|
+
bundle exec gem bump -v 1.6.0
|
88
|
+
bin/rake changelog
|
89
|
+
git commit -a --amend
|
90
|
+
git push
|
91
|
+
bundle exec gem release
|
88
92
|
```
|
89
93
|
|
90
94
|
## License
|
@@ -72,7 +72,7 @@ unbundled bundle exec rails generate spree:install \
|
|
72
72
|
--user_class=Spree::User \
|
73
73
|
--enforce_available_locales=true \
|
74
74
|
--with-authentication=false \
|
75
|
-
--payment-method=none
|
75
|
+
--payment-method=none \
|
76
76
|
$@
|
77
77
|
|
78
78
|
unbundled bundle exec rails generate solidus:auth:install
|
@@ -32,5 +32,5 @@ Gem::Specification.new do |spec|
|
|
32
32
|
spec.add_dependency 'solidus_core', ['>= 2.0.0', '< 3']
|
33
33
|
spec.add_dependency 'solidus_support', '~> 0.5'
|
34
34
|
|
35
|
-
spec.add_development_dependency 'solidus_dev_support'
|
35
|
+
spec.add_development_dependency 'solidus_dev_support', '<%= SolidusDevSupport.gem_version.approximate_recommendation %>'
|
36
36
|
end
|
data/solidus_dev_support.gemspec
CHANGED
@@ -28,7 +28,6 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.executables = files.grep(%r{^exe/}) { |f| File.basename(f) }
|
29
29
|
spec.require_paths = ["lib"]
|
30
30
|
|
31
|
-
spec.add_dependency 'apparition', '~> 0.4'
|
32
31
|
spec.add_dependency 'capybara', '~> 3.29'
|
33
32
|
spec.add_dependency 'capybara-screenshot', '~> 1.0'
|
34
33
|
spec.add_dependency 'codecov', '~> 0.2'
|
@@ -40,11 +39,12 @@ Gem::Specification.new do |spec|
|
|
40
39
|
spec.add_dependency 'puma', '~> 4.3'
|
41
40
|
spec.add_dependency 'rspec_junit_formatter'
|
42
41
|
spec.add_dependency 'rspec-rails', '~> 4.0.0.beta3'
|
43
|
-
spec.add_dependency 'rubocop', '~> 0.
|
42
|
+
spec.add_dependency 'rubocop', '~> 0.90'
|
44
43
|
spec.add_dependency 'rubocop-performance', '~> 1.5'
|
45
44
|
spec.add_dependency 'rubocop-rails', '~> 2.3'
|
46
45
|
spec.add_dependency 'rubocop-rspec', '~> 1.36'
|
47
46
|
spec.add_dependency 'solidus_core', ['>= 2.0', '< 3']
|
47
|
+
spec.add_dependency 'webdrivers', '~> 4.4'
|
48
48
|
|
49
49
|
spec.add_development_dependency 'bundler'
|
50
50
|
spec.add_development_dependency 'rake'
|
@@ -21,13 +21,18 @@ RSpec.describe 'Create extension' do
|
|
21
21
|
mkdir_p(tmp_path)
|
22
22
|
end
|
23
23
|
|
24
|
+
def step(method_name)
|
25
|
+
puts "Step #{method_name}"
|
26
|
+
send method_name
|
27
|
+
end
|
28
|
+
|
24
29
|
it 'checks the create extension process' do
|
25
|
-
check_solidus_cmd
|
26
|
-
check_create_extension
|
27
|
-
check_bundle_install
|
28
|
-
check_default_task
|
29
|
-
check_run_specs
|
30
|
-
check_sandbox
|
30
|
+
step :check_solidus_cmd
|
31
|
+
step :check_create_extension
|
32
|
+
step :check_bundle_install
|
33
|
+
step :check_default_task
|
34
|
+
step :check_run_specs
|
35
|
+
step :check_sandbox
|
31
36
|
end
|
32
37
|
|
33
38
|
private
|
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:
|
4
|
+
version: 2.0.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-
|
11
|
+
date: 2020-09-22 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
|
@@ -184,14 +170,14 @@ dependencies:
|
|
184
170
|
requirements:
|
185
171
|
- - "~>"
|
186
172
|
- !ruby/object:Gem::Version
|
187
|
-
version: 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.
|
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
|
@@ -313,6 +313,7 @@ files:
|
|
313
313
|
- lib/solidus_dev_support.rb
|
314
314
|
- lib/solidus_dev_support/extension.rb
|
315
315
|
- lib/solidus_dev_support/rake_tasks.rb
|
316
|
+
- lib/solidus_dev_support/rspec/capybara.rb
|
316
317
|
- lib/solidus_dev_support/rspec/coverage.rb
|
317
318
|
- lib/solidus_dev_support/rspec/feature_helper.rb
|
318
319
|
- lib/solidus_dev_support/rspec/rails_helper.rb
|
@@ -379,7 +380,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
379
380
|
- !ruby/object:Gem::Version
|
380
381
|
version: '0'
|
381
382
|
requirements: []
|
382
|
-
rubygems_version: 3.1.
|
383
|
+
rubygems_version: 3.1.2
|
383
384
|
signing_key:
|
384
385
|
specification_version: 4
|
385
386
|
summary: Development tools for Solidus extensions.
|