solidus_support 0.2.2 → 0.3.1

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
2
  SHA256:
3
- metadata.gz: 7c6337566230395848b49403c4b56e36c77e145a4b622c08e144021b8fbf86e1
4
- data.tar.gz: 6a89880916b4420dd0faafa0542d33da84e0ae95ee5193402441af91a96d3799
3
+ metadata.gz: f6db8de62847880d849391cac8bea93fd39c63f32738a41121c910ec38694656
4
+ data.tar.gz: 516068e598452089f9c93f07e30f7578d333c5e1620436c39e4ab2a49bacda82
5
5
  SHA512:
6
- metadata.gz: 3c202ec470b49983809717d7f9e8633e0a086bd1e782410aa0f221fd444e23842842f112fea46da313f23e66aba3a28ee0a9560b3c227b0f412c41ad129ce597
7
- data.tar.gz: 6c03785d6c92023a8d9fe6b3e1fc5d12867c712fce458f7bf33417918ee4f814b91428ecae72593dbc30317e25cb70902780afb2693b10b4ee155e602e4b071d
6
+ metadata.gz: '09bfa6215ef8559a804ad22cb2647d30a3830f26c56473640c8a6e9ae1053e05b1344d851767c0c371bdf709c1dda8b7ae35553538274dc8f3c61f58b355e412'
7
+ data.tar.gz: 26b40f4ac3842128c218fce132b989eceeb9a9d21ada007858990aca34cd5b7bc9228071068b5e111fa0198d4f454ee8943129c08f501b7d033e4604066b6bf8
@@ -0,0 +1,8 @@
1
+ Metrics/BlockLength:
2
+ ExcludedMethods: ['describe', 'context']
3
+
4
+ Metrics/LineLength:
5
+ Max: 100
6
+
7
+ Style/Documentation:
8
+ Enabled: false
@@ -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
@@ -6,5 +6,5 @@ gem 'solidus_core', github: 'solidusio/solidus', branch: branch
6
6
  # Specify your gem's dependencies in solidus_support.gemspec
7
7
  gemspec
8
8
 
9
- gem 'sqlite3'
10
9
  gem 'sprockets-rails'
10
+ gem 'sqlite3'
data/Rakefile CHANGED
@@ -1 +1,11 @@
1
- require "bundler/gem_tasks"
1
+ require 'bundler'
2
+
3
+ begin
4
+ require 'rubocop/rake_task'
5
+ require 'rspec/core/rake_task'
6
+
7
+ RuboCop::RakeTask.new
8
+ RSpec::Core::RakeTask.new(:spec)
9
+
10
+ task default: %i[spec]
11
+ end
@@ -1,6 +1,6 @@
1
- require "solidus_support/version"
2
- require "solidus_support/migration"
3
- require "solidus_core"
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 == "solidus_core" }.version
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 'capybara/poltergeist'
11
+ require 'selenium/webdriver'
12
12
 
13
- Capybara.register_driver :poltergeist do |app|
14
- Capybara::Poltergeist::Driver.new(app, js_errors: true, timeout: 90)
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 = :poltergeist
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 database transactions or not where necessary.
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
- ActiveRecord::Migration
11
- else
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
@@ -1,3 +1,3 @@
1
1
  module SolidusSupport
2
- VERSION = "0.2.2"
2
+ VERSION = '0.3.1'.freeze
3
3
  end
@@ -1,23 +1,26 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
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 = "solidus_support"
8
+ spec.name = 'solidus_support'
8
9
  spec.version = SolidusSupport::VERSION
9
- spec.authors = ["John Hawthorn"]
10
- spec.email = ["john@stembolt.com"]
10
+ spec.authors = ['John Hawthorn']
11
+ spec.email = ['john@stembolt.com']
11
12
 
12
- spec.summary = %q{A common functionality for solidus extensions}
13
- spec.description = %q{Collection of common functionality for solidus extensions}
14
- spec.homepage = "https://solidus.io"
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 = ["lib"]
18
+ spec.require_paths = ['lib']
18
19
 
19
- spec.add_development_dependency "solidus_core"
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"
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
@@ -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["config/database"] = File.expand_path('../dummy_app/database.yml', __FILE__)
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.2.2
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: 2018-10-09 00:00:00.000000000 Z
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