solidus_support 0.2.2 → 0.3.1
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 +4 -4
- data/.rubocop.yml +8 -0
- data/.travis.yml +4 -9
- data/Gemfile +1 -1
- data/Rakefile +11 -1
- data/lib/solidus_support.rb +4 -4
- data/lib/solidus_support/extension/feature_helper.rb +12 -4
- data/lib/solidus_support/extension/rails_helper.rb +2 -1
- data/lib/solidus_support/migration.rb +3 -5
- data/lib/solidus_support/version.rb +1 -1
- data/solidus_support.gemspec +16 -13
- data/spec/support/dummy_app.rb +2 -1
- metadata +45 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f6db8de62847880d849391cac8bea93fd39c63f32738a41121c910ec38694656
|
4
|
+
data.tar.gz: 516068e598452089f9c93f07e30f7578d333c5e1620436c39e4ab2a49bacda82
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '09bfa6215ef8559a804ad22cb2647d30a3830f26c56473640c8a6e9ae1053e05b1344d851767c0c371bdf709c1dda8b7ae35553538274dc8f3c61f58b355e412'
|
7
|
+
data.tar.gz: 26b40f4ac3842128c218fce132b989eceeb9a9d21ada007858990aca34cd5b7bc9228071068b5e111fa0198d4f454ee8943129c08f501b7d033e4604066b6bf8
|
data/.rubocop.yml
ADDED
data/.travis.yml
CHANGED
@@ -10,14 +10,9 @@ rvm:
|
|
10
10
|
- 2.4.2
|
11
11
|
env:
|
12
12
|
matrix:
|
13
|
-
- SOLIDUS_BRANCH=v1.0
|
14
|
-
- SOLIDUS_BRANCH=v1.1
|
15
|
-
- SOLIDUS_BRANCH=v1.2
|
16
|
-
- SOLIDUS_BRANCH=v1.3
|
17
|
-
- SOLIDUS_BRANCH=v1.4
|
18
|
-
- SOLIDUS_BRANCH=v2.0
|
19
|
-
- SOLIDUS_BRANCH=v2.1
|
20
|
-
- SOLIDUS_BRANCH=v2.2
|
21
|
-
- SOLIDUS_BRANCH=v2.3
|
22
13
|
- SOLIDUS_BRANCH=v2.4
|
14
|
+
- SOLIDUS_BRANCH=v2.5
|
15
|
+
- SOLIDUS_BRANCH=v2.6
|
16
|
+
- SOLIDUS_BRANCH=v2.7
|
17
|
+
- SOLIDUS_BRANCH=v2.8
|
23
18
|
- SOLIDUS_BRANCH=master
|
data/Gemfile
CHANGED
data/Rakefile
CHANGED
data/lib/solidus_support.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
require
|
2
|
-
require
|
3
|
-
require
|
1
|
+
require 'solidus_support/version'
|
2
|
+
require 'solidus_support/migration'
|
3
|
+
require 'solidus_core'
|
4
4
|
|
5
5
|
module SolidusSupport
|
6
6
|
class << self
|
@@ -12,7 +12,7 @@ module SolidusSupport
|
|
12
12
|
Gem::Version.new(Spree.solidus_version)
|
13
13
|
else
|
14
14
|
# 1.0 doesn't have gem_version
|
15
|
-
Gem::Specification.detect{|x| x.name ==
|
15
|
+
Gem::Specification.detect { |x| x.name == 'solidus_core' }.version
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
@@ -8,13 +8,21 @@
|
|
8
8
|
require 'solidus_support/extension/rails_helper'
|
9
9
|
|
10
10
|
require 'capybara-screenshot/rspec'
|
11
|
-
require '
|
11
|
+
require 'selenium/webdriver'
|
12
12
|
|
13
|
-
Capybara.register_driver :
|
14
|
-
|
13
|
+
Capybara.register_driver :selenium_chrome_headless do |app|
|
14
|
+
capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(
|
15
|
+
chromeOptions: { args: %w[headless start-maximized] }
|
16
|
+
)
|
17
|
+
|
18
|
+
Capybara::Selenium::Driver.new(
|
19
|
+
app,
|
20
|
+
browser: :chrome,
|
21
|
+
desired_capabilities: capabilities
|
22
|
+
)
|
15
23
|
end
|
16
24
|
|
17
|
-
Capybara.javascript_driver = :
|
25
|
+
Capybara.javascript_driver = (ENV['CAPYBARA_DRIVER'] || :selenium_chrome_headless).to_sym
|
18
26
|
Capybara.default_max_wait_time = 10
|
19
27
|
|
20
28
|
require 'spree/testing_support/capybara_ext'
|
@@ -29,7 +29,8 @@ RSpec.configure do |config|
|
|
29
29
|
DatabaseCleaner.clean_with :truncation
|
30
30
|
end
|
31
31
|
|
32
|
-
# Around each spec check if it is a Javascript test and switch between using
|
32
|
+
# Around each spec check if it is a Javascript test and switch between using
|
33
|
+
# database transactions or not where necessary.
|
33
34
|
config.around(:each) do |example|
|
34
35
|
DatabaseCleaner.strategy = RSpec.current_example.metadata[:js] ? :truncation : :transaction
|
35
36
|
|
@@ -6,11 +6,9 @@ module SolidusSupport
|
|
6
6
|
else
|
7
7
|
# Rails < 5 doesn't support specifying rails version of migrations, but
|
8
8
|
# it _is_ rails 4.2, so we can use that when requested.
|
9
|
-
if version.to_s == '4.2'
|
10
|
-
|
11
|
-
|
12
|
-
raise ArgumentError, %q{Unknown migration version "#{version}"; expected one of "4.2"}
|
13
|
-
end
|
9
|
+
return ActiveRecord::Migration if version.to_s == '4.2'
|
10
|
+
|
11
|
+
raise ArgumentError, "Unknown migration version '#{version}'; expected one of '4.2'"
|
14
12
|
end
|
15
13
|
end
|
16
14
|
end
|
data/solidus_support.gemspec
CHANGED
@@ -1,23 +1,26 @@
|
|
1
|
-
#
|
2
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
3
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
5
|
require 'solidus_support/version'
|
5
6
|
|
6
7
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name =
|
8
|
+
spec.name = 'solidus_support'
|
8
9
|
spec.version = SolidusSupport::VERSION
|
9
|
-
spec.authors = [
|
10
|
-
spec.email = [
|
10
|
+
spec.authors = ['John Hawthorn']
|
11
|
+
spec.email = ['john@stembolt.com']
|
11
12
|
|
12
|
-
spec.summary =
|
13
|
-
spec.description =
|
14
|
-
spec.homepage =
|
13
|
+
spec.summary = 'A common functionality for solidus extensions'
|
14
|
+
spec.description = 'Collection of common functionality for solidus extensions'
|
15
|
+
spec.homepage = 'https://solidus.io'
|
15
16
|
|
16
17
|
spec.files = `git ls-files -z`.split("\x0")
|
17
|
-
spec.require_paths = [
|
18
|
+
spec.require_paths = ['lib']
|
18
19
|
|
19
|
-
spec.add_development_dependency
|
20
|
-
spec.add_development_dependency
|
21
|
-
spec.add_development_dependency
|
22
|
-
spec.add_development_dependency
|
20
|
+
spec.add_development_dependency 'bundler', '~> 1.14'
|
21
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
22
|
+
spec.add_development_dependency 'rspec-rails', '~> 3.7'
|
23
|
+
spec.add_development_dependency 'rubocop'
|
24
|
+
spec.add_development_dependency 'rubocop-rspec'
|
25
|
+
spec.add_development_dependency 'solidus_core'
|
23
26
|
end
|
data/spec/support/dummy_app.rb
CHANGED
@@ -11,7 +11,8 @@ Bundler.require(:default, :test)
|
|
11
11
|
module DummyApp
|
12
12
|
class Application < ::Rails::Application
|
13
13
|
config.eager_load = false
|
14
|
-
config.paths[
|
14
|
+
config.paths['config/database'] = File.expand_path('dummy_app/database.yml', __dir__)
|
15
|
+
config.active_record.sqlite3.represent_boolean_as_integer = true
|
15
16
|
end
|
16
17
|
end
|
17
18
|
|
metadata
CHANGED
@@ -1,29 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solidus_support
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Hawthorn
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: solidus_core
|
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'
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: bundler
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,6 +52,48 @@ dependencies:
|
|
66
52
|
- - "~>"
|
67
53
|
- !ruby/object:Gem::Version
|
68
54
|
version: '3.7'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rubocop
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rubocop-rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: solidus_core
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
69
97
|
description: Collection of common functionality for solidus extensions
|
70
98
|
email:
|
71
99
|
- john@stembolt.com
|
@@ -75,6 +103,7 @@ extra_rdoc_files: []
|
|
75
103
|
files:
|
76
104
|
- ".gitignore"
|
77
105
|
- ".rspec"
|
106
|
+
- ".rubocop.yml"
|
78
107
|
- ".travis.yml"
|
79
108
|
- Gemfile
|
80
109
|
- README.md
|