solidus_dev_support 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.circleci/config.yml +35 -0
- data/.github/PULL_REQUEST_TEMPLATE.md +11 -0
- data/.github/stale.yml +17 -0
- data/.gitignore +12 -0
- data/.rspec +3 -0
- data/.rubocop-https---relaxed-ruby-style-rubocop-yml +174 -0
- data/.rubocop.yml +2 -0
- data/CHANGELOG.md +39 -0
- data/Gemfile +8 -0
- data/LICENSE.txt +21 -0
- data/README.md +154 -0
- data/Rakefile +8 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/exe/solidus +52 -0
- data/lib/solidus_dev_support.rb +15 -0
- data/lib/solidus_dev_support/extension.rb +50 -0
- data/lib/solidus_dev_support/rake_tasks.rb +61 -0
- data/lib/solidus_dev_support/rspec/coverage.rb +22 -0
- data/lib/solidus_dev_support/rspec/feature_helper.rb +39 -0
- data/lib/solidus_dev_support/rspec/rails_helper.rb +60 -0
- data/lib/solidus_dev_support/rspec/spec_helper.rb +25 -0
- data/lib/solidus_dev_support/rubocop.rb +16 -0
- data/lib/solidus_dev_support/rubocop/config.yml +201 -0
- data/lib/solidus_dev_support/templates/extension/.circleci/config.yml +35 -0
- data/lib/solidus_dev_support/templates/extension/.github/stale.yml +17 -0
- data/lib/solidus_dev_support/templates/extension/CONTRIBUTING.md +57 -0
- data/lib/solidus_dev_support/templates/extension/Gemfile +25 -0
- data/lib/solidus_dev_support/templates/extension/LICENSE +26 -0
- data/lib/solidus_dev_support/templates/extension/README.md +48 -0
- data/lib/solidus_dev_support/templates/extension/Rakefile +32 -0
- data/lib/solidus_dev_support/templates/extension/app/assets/javascripts/spree/backend/%file_name%.js +2 -0
- data/lib/solidus_dev_support/templates/extension/app/assets/javascripts/spree/frontend/%file_name%.js +2 -0
- data/lib/solidus_dev_support/templates/extension/app/assets/stylesheets/spree/backend/%file_name%.css +4 -0
- data/lib/solidus_dev_support/templates/extension/app/assets/stylesheets/spree/frontend/%file_name%.css +4 -0
- data/lib/solidus_dev_support/templates/extension/bin/rails.tt +7 -0
- data/lib/solidus_dev_support/templates/extension/config/locales/en.yml +5 -0
- data/lib/solidus_dev_support/templates/extension/config/routes.rb +5 -0
- data/lib/solidus_dev_support/templates/extension/extension.gemspec.erb +23 -0
- data/lib/solidus_dev_support/templates/extension/gem_release.yml.tt +5 -0
- data/lib/solidus_dev_support/templates/extension/gitignore +15 -0
- data/lib/solidus_dev_support/templates/extension/lib/%file_name%.rb.tt +4 -0
- data/lib/solidus_dev_support/templates/extension/lib/%file_name%/engine.rb.tt +22 -0
- data/lib/solidus_dev_support/templates/extension/lib/%file_name%/factories.rb.tt +4 -0
- data/lib/solidus_dev_support/templates/extension/lib/%file_name%/version.rb.tt +5 -0
- data/lib/solidus_dev_support/templates/extension/lib/generators/%file_name%/install/install_generator.rb.tt +32 -0
- data/lib/solidus_dev_support/templates/extension/rspec +1 -0
- data/lib/solidus_dev_support/templates/extension/rubocop.yml +15 -0
- data/lib/solidus_dev_support/templates/extension/spec/spec_helper.rb.tt +24 -0
- data/lib/solidus_dev_support/testing_support/preferences.rb +45 -0
- data/lib/solidus_dev_support/version.rb +5 -0
- data/solidus_dev_support.gemspec +50 -0
- metadata +384 -0
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require "bundler/setup"
|
5
|
+
require "solidus_dev_support"
|
6
|
+
|
7
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
+
# with your gem easier. You can also use a different console, if you like.
|
9
|
+
|
10
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
11
|
+
# require "pry"
|
12
|
+
# Pry.start
|
13
|
+
|
14
|
+
require "irb"
|
15
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/exe/solidus
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require 'optparse'
|
5
|
+
|
6
|
+
require 'solidus_dev_support'
|
7
|
+
require 'solidus_dev_support/extension'
|
8
|
+
|
9
|
+
Options = Struct.new(:name)
|
10
|
+
|
11
|
+
class Parser
|
12
|
+
class << self
|
13
|
+
def parse(args)
|
14
|
+
options.parse!(args)
|
15
|
+
end
|
16
|
+
|
17
|
+
def options
|
18
|
+
OptionParser.new do |opts|
|
19
|
+
opts.banner = 'Usage: solidus [[extension extension_name] | [-h] [-v]]'
|
20
|
+
|
21
|
+
opts.on('-h', '--help', 'Prints this help') do
|
22
|
+
puts opts
|
23
|
+
end
|
24
|
+
|
25
|
+
opts.on(
|
26
|
+
'-v',
|
27
|
+
'--version',
|
28
|
+
"Prints the current version: #{SolidusDevSupport::VERSION}"
|
29
|
+
) do
|
30
|
+
puts SolidusDevSupport::VERSION
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
# Print help if no options are supplied
|
38
|
+
ARGV << '--help' unless ARGV.first
|
39
|
+
|
40
|
+
if ARGV.first == 'extension' || ARGV.first == 'e'
|
41
|
+
ARGV.shift
|
42
|
+
|
43
|
+
unless ARGV.first
|
44
|
+
puts 'An extension must have a name!'
|
45
|
+
puts `solidus -h`
|
46
|
+
exit 1
|
47
|
+
end
|
48
|
+
|
49
|
+
SolidusDevSupport::Extension.start
|
50
|
+
else
|
51
|
+
Parser.parse(ARGV)
|
52
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "solidus_support"
|
4
|
+
require "solidus_dev_support/version"
|
5
|
+
|
6
|
+
module SolidusDevSupport
|
7
|
+
class Error < StandardError; end
|
8
|
+
|
9
|
+
class << self
|
10
|
+
def reset_spree_preferences_deprecated?
|
11
|
+
first_version_without_reset = Gem::Requirement.new('>= 2.9')
|
12
|
+
first_version_without_reset.satisfied_by?(SolidusSupport.solidus_gem_version)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'thor'
|
4
|
+
require 'thor/group'
|
5
|
+
|
6
|
+
module SolidusDevSupport
|
7
|
+
class Extension < Thor::Group
|
8
|
+
include Thor::Actions
|
9
|
+
|
10
|
+
desc 'builds a solidus extension'
|
11
|
+
argument :file_name, type: :string, desc: 'rails app_path', default: '.'
|
12
|
+
|
13
|
+
source_root File.expand_path('templates/extension', __dir__)
|
14
|
+
|
15
|
+
def generate
|
16
|
+
use_prefix 'solidus_'
|
17
|
+
|
18
|
+
empty_directory file_name
|
19
|
+
|
20
|
+
directory 'app', "#{file_name}/app"
|
21
|
+
directory 'lib', "#{file_name}/lib"
|
22
|
+
directory 'bin', "#{file_name}/bin"
|
23
|
+
directory '.circleci', "#{file_name}/.circleci"
|
24
|
+
directory '.github', "#{file_name}/.github"
|
25
|
+
|
26
|
+
template 'extension.gemspec.erb', "#{file_name}/#{file_name}.gemspec"
|
27
|
+
template 'Gemfile', "#{file_name}/Gemfile"
|
28
|
+
template 'gitignore', "#{file_name}/.gitignore"
|
29
|
+
template 'gem_release.yml.tt', "#{file_name}/.gem_release.yml"
|
30
|
+
template 'LICENSE', "#{file_name}/LICENSE"
|
31
|
+
template 'Rakefile', "#{file_name}/Rakefile"
|
32
|
+
template 'README.md', "#{file_name}/README.md"
|
33
|
+
template 'config/routes.rb', "#{file_name}/config/routes.rb"
|
34
|
+
template 'config/locales/en.yml', "#{file_name}/config/locales/en.yml"
|
35
|
+
template 'rspec', "#{file_name}/.rspec"
|
36
|
+
template 'spec/spec_helper.rb.tt', "#{file_name}/spec/spec_helper.rb"
|
37
|
+
template 'rubocop.yml', "#{file_name}/.rubocop.yml"
|
38
|
+
end
|
39
|
+
|
40
|
+
no_tasks do
|
41
|
+
def class_name
|
42
|
+
Thor::Util.camel_case file_name
|
43
|
+
end
|
44
|
+
|
45
|
+
def use_prefix(prefix)
|
46
|
+
@file_name = prefix + Thor::Util.snake_case(file_name) unless file_name =~ /^#{prefix}/
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'rake'
|
4
|
+
require 'pathname'
|
5
|
+
|
6
|
+
module SolidusDevSupport
|
7
|
+
class RakeTasks
|
8
|
+
include Rake::DSL
|
9
|
+
|
10
|
+
def self.install(*args)
|
11
|
+
new(*args).tap(&:install)
|
12
|
+
end
|
13
|
+
|
14
|
+
def initialize(root: Dir.pwd)
|
15
|
+
@root = Pathname(root)
|
16
|
+
@test_app_path = @root.join(ENV['DUMMY_PATH'] || 'spec/dummy')
|
17
|
+
@gemspec = Bundler.load_gemspec(@root.glob("{,*}.gemspec").first)
|
18
|
+
end
|
19
|
+
|
20
|
+
attr_reader :test_app_path, :root, :gemspec
|
21
|
+
|
22
|
+
def install
|
23
|
+
install_test_app_task
|
24
|
+
install_rspec_task
|
25
|
+
end
|
26
|
+
|
27
|
+
def install_test_app_task
|
28
|
+
require 'rake/clean'
|
29
|
+
::CLOBBER.include test_app_path
|
30
|
+
|
31
|
+
ENV['DUMMY_PATH'] = test_app_path.to_s
|
32
|
+
ENV['LIB_NAME'] = gemspec.name
|
33
|
+
require 'spree/testing_support/extension_rake'
|
34
|
+
|
35
|
+
namespace :extension do
|
36
|
+
directory ENV['DUMMY_PATH'] do
|
37
|
+
Rake::Task['extension:test_app']
|
38
|
+
|
39
|
+
# We need to go back to the gem root since extension:test_app changes
|
40
|
+
# the working directory to be the dummy app.
|
41
|
+
cd root
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
def install_rspec_task
|
47
|
+
namespace :extension do
|
48
|
+
require 'rspec/core/rake_task'
|
49
|
+
::RSpec::Core::RakeTask.new(:specs, [] => FileList[ENV['DUMMY_PATH']]) do |t|
|
50
|
+
# Ref: https://circleci.com/docs/2.0/configuration-reference#store_test_results
|
51
|
+
# Ref: https://github.com/solidusio/circleci-orbs-extensions#test-results-rspec
|
52
|
+
if ENV['TEST_RESULTS_PATH']
|
53
|
+
t.rspec_opts =
|
54
|
+
"--format progress " \
|
55
|
+
"--format RspecJunitFormatter --out #{ENV['TEST_RESULTS_PATH']}"
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# A SimpleCov and Codecov configuration to track code coverage in your extension
|
4
|
+
#
|
5
|
+
# Include it AT THE TOP of your spec/spec_helper.rb:
|
6
|
+
#
|
7
|
+
# require 'solidus_dev_support/rspec/coverage'
|
8
|
+
#
|
9
|
+
# Note that things may not work properly if you don't include this at the very top!
|
10
|
+
#
|
11
|
+
|
12
|
+
require 'simplecov'
|
13
|
+
SimpleCov.start('rails') do
|
14
|
+
add_filter %r{^/lib/generators/.*/install/install_generator.rb}
|
15
|
+
add_filter %r{^/lib/.*/factories.rb}
|
16
|
+
add_filter %r{^/lib/.*/version.rb}
|
17
|
+
end
|
18
|
+
|
19
|
+
if ENV['CI']
|
20
|
+
require 'codecov'
|
21
|
+
SimpleCov.formatter = SimpleCov::Formatter::Codecov
|
22
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# A basic feature_helper to be included as the starting point for extensions
|
4
|
+
#
|
5
|
+
# Can be required from an extension's spec/feature_helper.rb
|
6
|
+
#
|
7
|
+
# require 'solidus_dev_support/rspec/feature_helper'
|
8
|
+
#
|
9
|
+
|
10
|
+
require 'solidus_dev_support/rspec/rails_helper'
|
11
|
+
|
12
|
+
require 'capybara-screenshot/rspec'
|
13
|
+
require 'capybara/apparition'
|
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'
|
24
|
+
|
25
|
+
RSpec.configure do |config|
|
26
|
+
config.when_first_matching_example_defined(type: :feature) do
|
27
|
+
config.before :suite do
|
28
|
+
# Preload assets
|
29
|
+
if Rails.application.respond_to?(:precompiled_assets)
|
30
|
+
Rails.application.precompiled_assets
|
31
|
+
else
|
32
|
+
# For older sprockets 2.x
|
33
|
+
Rails.application.config.assets.precompile.each do |asset|
|
34
|
+
Rails.application.assets.find_asset(asset)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# A basic rails_helper to be included as the starting point for extensions
|
4
|
+
#
|
5
|
+
# Can be required from an extension's spec/rails_helper.rb
|
6
|
+
#
|
7
|
+
# require 'solidus_dev_support/rspec/rails_helper'
|
8
|
+
#
|
9
|
+
|
10
|
+
require 'solidus_dev_support/rspec/spec_helper'
|
11
|
+
require 'solidus_dev_support'
|
12
|
+
|
13
|
+
require 'rspec/rails'
|
14
|
+
require 'database_cleaner'
|
15
|
+
require 'factory_bot_rails'
|
16
|
+
require 'ffaker'
|
17
|
+
|
18
|
+
require 'spree/testing_support/authorization_helpers'
|
19
|
+
require 'spree/testing_support/factories'
|
20
|
+
require 'spree/testing_support/url_helpers'
|
21
|
+
require 'spree/testing_support/preferences'
|
22
|
+
require 'spree/testing_support/controller_requests'
|
23
|
+
require 'solidus_dev_support/testing_support/preferences'
|
24
|
+
|
25
|
+
RSpec.configure do |config|
|
26
|
+
config.infer_spec_type_from_file_location!
|
27
|
+
|
28
|
+
config.include FactoryBot::Syntax::Methods
|
29
|
+
|
30
|
+
# visit spree.admin_path
|
31
|
+
# current_path.should eql(spree.products_path)
|
32
|
+
config.include Spree::TestingSupport::UrlHelpers
|
33
|
+
|
34
|
+
config.include Spree::TestingSupport::ControllerRequests, type: :controller
|
35
|
+
|
36
|
+
config.include Spree::TestingSupport::Preferences
|
37
|
+
config.include SolidusDevSupport::TestingSupport::Preferences
|
38
|
+
|
39
|
+
config.before :suite do
|
40
|
+
DatabaseCleaner.clean_with :truncation
|
41
|
+
end
|
42
|
+
|
43
|
+
config.before do
|
44
|
+
ActiveJob::Base.queue_adapter = :test
|
45
|
+
end
|
46
|
+
|
47
|
+
# Around each spec check if it is a Javascript test and switch between using
|
48
|
+
# database transactions or not where necessary.
|
49
|
+
config.around(:each) do |example|
|
50
|
+
DatabaseCleaner.strategy = RSpec.current_example.metadata[:js] ? :truncation : :transaction
|
51
|
+
|
52
|
+
DatabaseCleaner.cleaning do
|
53
|
+
reset_spree_preferences unless SolidusDevSupport.reset_spree_preferences_deprecated?
|
54
|
+
|
55
|
+
example.run
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
config.include ActiveJob::TestHelper
|
60
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# A basic spec_helper to be included as the starting point for extensions
|
4
|
+
#
|
5
|
+
# Can be required from an extension's spec/spec_helper.rb
|
6
|
+
#
|
7
|
+
# require 'solidus_dev_support/rspec/spec_helper'
|
8
|
+
#
|
9
|
+
|
10
|
+
RSpec.configure do |config|
|
11
|
+
config.filter_run focus: true
|
12
|
+
config.run_all_when_everything_filtered = true
|
13
|
+
|
14
|
+
config.mock_with :rspec
|
15
|
+
config.color = true
|
16
|
+
|
17
|
+
config.fail_fast = ENV['FAIL_FAST'] || false
|
18
|
+
config.order = 'random'
|
19
|
+
|
20
|
+
config.raise_errors_for_deprecations!
|
21
|
+
|
22
|
+
config.example_status_persistence_file_path = "./spec/examples.txt"
|
23
|
+
|
24
|
+
Kernel.srand config.seed
|
25
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module SolidusDevSupport
|
4
|
+
module RuboCop
|
5
|
+
CONFIG_PATH = "#{__dir__}/rubocop/config.yml"
|
6
|
+
|
7
|
+
def self.inject_defaults!
|
8
|
+
config = ::RuboCop::ConfigLoader.load_file(CONFIG_PATH)
|
9
|
+
puts "configuration from #{CONFIG_PATH}" if ::RuboCop::ConfigLoader.debug?
|
10
|
+
config = ::RuboCop::ConfigLoader.merge_with_default(config, CONFIG_PATH, unset_nil: false)
|
11
|
+
::RuboCop::ConfigLoader.instance_variable_set(:@default_configuration, config)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
SolidusDevSupport::RuboCop.inject_defaults!
|
@@ -0,0 +1,201 @@
|
|
1
|
+
# Relaxed.Ruby.Style
|
2
|
+
## Version 2.4
|
3
|
+
|
4
|
+
Style/Alias:
|
5
|
+
Enabled: false
|
6
|
+
StyleGuide: https://relaxed.ruby.style/#stylealias
|
7
|
+
|
8
|
+
Style/AsciiComments:
|
9
|
+
Enabled: false
|
10
|
+
StyleGuide: https://relaxed.ruby.style/#styleasciicomments
|
11
|
+
|
12
|
+
Style/BeginBlock:
|
13
|
+
Enabled: false
|
14
|
+
StyleGuide: https://relaxed.ruby.style/#stylebeginblock
|
15
|
+
|
16
|
+
Style/BlockDelimiters:
|
17
|
+
Enabled: false
|
18
|
+
StyleGuide: https://relaxed.ruby.style/#styleblockdelimiters
|
19
|
+
|
20
|
+
Style/CommentAnnotation:
|
21
|
+
Enabled: false
|
22
|
+
StyleGuide: https://relaxed.ruby.style/#stylecommentannotation
|
23
|
+
|
24
|
+
Style/Documentation:
|
25
|
+
Enabled: false
|
26
|
+
StyleGuide: https://relaxed.ruby.style/#styledocumentation
|
27
|
+
|
28
|
+
Layout/DotPosition:
|
29
|
+
Enabled: false
|
30
|
+
StyleGuide: https://relaxed.ruby.style/#layoutdotposition
|
31
|
+
|
32
|
+
Style/DoubleNegation:
|
33
|
+
Enabled: false
|
34
|
+
StyleGuide: https://relaxed.ruby.style/#styledoublenegation
|
35
|
+
|
36
|
+
Style/EndBlock:
|
37
|
+
Enabled: false
|
38
|
+
StyleGuide: https://relaxed.ruby.style/#styleendblock
|
39
|
+
|
40
|
+
Style/FormatString:
|
41
|
+
Enabled: false
|
42
|
+
StyleGuide: https://relaxed.ruby.style/#styleformatstring
|
43
|
+
|
44
|
+
Style/IfUnlessModifier:
|
45
|
+
Enabled: false
|
46
|
+
StyleGuide: https://relaxed.ruby.style/#styleifunlessmodifier
|
47
|
+
|
48
|
+
Style/Lambda:
|
49
|
+
Enabled: false
|
50
|
+
StyleGuide: https://relaxed.ruby.style/#stylelambda
|
51
|
+
|
52
|
+
Style/ModuleFunction:
|
53
|
+
Enabled: false
|
54
|
+
StyleGuide: https://relaxed.ruby.style/#stylemodulefunction
|
55
|
+
|
56
|
+
Style/MultilineBlockChain:
|
57
|
+
Enabled: false
|
58
|
+
StyleGuide: https://relaxed.ruby.style/#stylemultilineblockchain
|
59
|
+
|
60
|
+
Style/NegatedIf:
|
61
|
+
Enabled: false
|
62
|
+
StyleGuide: https://relaxed.ruby.style/#stylenegatedif
|
63
|
+
|
64
|
+
Style/NegatedWhile:
|
65
|
+
Enabled: false
|
66
|
+
StyleGuide: https://relaxed.ruby.style/#stylenegatedwhile
|
67
|
+
|
68
|
+
Style/NumericPredicate:
|
69
|
+
Enabled: false
|
70
|
+
StyleGuide: https://relaxed.ruby.style/#stylenumericpredicate
|
71
|
+
|
72
|
+
Style/ParallelAssignment:
|
73
|
+
Enabled: false
|
74
|
+
StyleGuide: https://relaxed.ruby.style/#styleparallelassignment
|
75
|
+
|
76
|
+
Style/PercentLiteralDelimiters:
|
77
|
+
Enabled: false
|
78
|
+
StyleGuide: https://relaxed.ruby.style/#stylepercentliteraldelimiters
|
79
|
+
|
80
|
+
Style/PerlBackrefs:
|
81
|
+
Enabled: false
|
82
|
+
StyleGuide: https://relaxed.ruby.style/#styleperlbackrefs
|
83
|
+
|
84
|
+
Style/Semicolon:
|
85
|
+
Enabled: false
|
86
|
+
StyleGuide: https://relaxed.ruby.style/#stylesemicolon
|
87
|
+
|
88
|
+
Style/SignalException:
|
89
|
+
Enabled: false
|
90
|
+
StyleGuide: https://relaxed.ruby.style/#stylesignalexception
|
91
|
+
|
92
|
+
Style/SingleLineBlockParams:
|
93
|
+
Enabled: false
|
94
|
+
StyleGuide: https://relaxed.ruby.style/#stylesinglelineblockparams
|
95
|
+
|
96
|
+
Style/SingleLineMethods:
|
97
|
+
Enabled: false
|
98
|
+
StyleGuide: https://relaxed.ruby.style/#stylesinglelinemethods
|
99
|
+
|
100
|
+
Layout/SpaceBeforeBlockBraces:
|
101
|
+
Enabled: false
|
102
|
+
StyleGuide: https://relaxed.ruby.style/#layoutspacebeforeblockbraces
|
103
|
+
|
104
|
+
Layout/SpaceInsideParens:
|
105
|
+
Enabled: false
|
106
|
+
StyleGuide: https://relaxed.ruby.style/#layoutspaceinsideparens
|
107
|
+
|
108
|
+
Style/SpecialGlobalVars:
|
109
|
+
Enabled: false
|
110
|
+
StyleGuide: https://relaxed.ruby.style/#stylespecialglobalvars
|
111
|
+
|
112
|
+
Style/StringLiterals:
|
113
|
+
Enabled: false
|
114
|
+
StyleGuide: https://relaxed.ruby.style/#stylestringliterals
|
115
|
+
|
116
|
+
Style/TrailingCommaInArguments:
|
117
|
+
Enabled: false
|
118
|
+
StyleGuide: https://relaxed.ruby.style/#styletrailingcommainarguments
|
119
|
+
|
120
|
+
Style/TrailingCommaInArrayLiteral:
|
121
|
+
Enabled: false
|
122
|
+
StyleGuide: https://relaxed.ruby.style/#styletrailingcommainarrayliteral
|
123
|
+
|
124
|
+
Style/TrailingCommaInHashLiteral:
|
125
|
+
Enabled: false
|
126
|
+
StyleGuide: https://relaxed.ruby.style/#styletrailingcommainhashliteral
|
127
|
+
|
128
|
+
Style/SymbolArray:
|
129
|
+
Enabled: false
|
130
|
+
StyleGuide: http://relaxed.ruby.style/#stylesymbolarray
|
131
|
+
|
132
|
+
Style/WhileUntilModifier:
|
133
|
+
Enabled: false
|
134
|
+
StyleGuide: https://relaxed.ruby.style/#stylewhileuntilmodifier
|
135
|
+
|
136
|
+
Style/WordArray:
|
137
|
+
Enabled: false
|
138
|
+
StyleGuide: https://relaxed.ruby.style/#stylewordarray
|
139
|
+
|
140
|
+
Lint/AmbiguousRegexpLiteral:
|
141
|
+
Enabled: false
|
142
|
+
StyleGuide: https://relaxed.ruby.style/#lintambiguousregexpliteral
|
143
|
+
|
144
|
+
Lint/AssignmentInCondition:
|
145
|
+
Enabled: false
|
146
|
+
StyleGuide: https://relaxed.ruby.style/#lintassignmentincondition
|
147
|
+
|
148
|
+
Metrics/AbcSize:
|
149
|
+
Enabled: false
|
150
|
+
|
151
|
+
Metrics/BlockNesting:
|
152
|
+
Enabled: false
|
153
|
+
|
154
|
+
Metrics/ClassLength:
|
155
|
+
Enabled: false
|
156
|
+
|
157
|
+
Metrics/ModuleLength:
|
158
|
+
Enabled: false
|
159
|
+
|
160
|
+
Metrics/CyclomaticComplexity:
|
161
|
+
Enabled: false
|
162
|
+
|
163
|
+
# Metrics/LineLength:
|
164
|
+
# Enabled: false
|
165
|
+
|
166
|
+
Metrics/MethodLength:
|
167
|
+
Enabled: false
|
168
|
+
|
169
|
+
Metrics/ParameterLists:
|
170
|
+
Enabled: false
|
171
|
+
|
172
|
+
Metrics/PerceivedComplexity:
|
173
|
+
Enabled: false
|
174
|
+
|
175
|
+
# Our overrides after this point:
|
176
|
+
|
177
|
+
require:
|
178
|
+
- rubocop-rspec
|
179
|
+
- rubocop-rails
|
180
|
+
- rubocop-performance
|
181
|
+
|
182
|
+
AllCops:
|
183
|
+
Exclude:
|
184
|
+
- spec/dummy/**/*
|
185
|
+
- vendor/**/*
|
186
|
+
|
187
|
+
Metrics/BlockLength:
|
188
|
+
Enabled: false
|
189
|
+
|
190
|
+
Metrics/LineLength:
|
191
|
+
Enabled: true
|
192
|
+
Max: 100
|
193
|
+
|
194
|
+
RSpec/ExampleLength:
|
195
|
+
Enabled: false
|
196
|
+
|
197
|
+
Layout/AlignArguments:
|
198
|
+
EnforcedStyle: with_fixed_indentation
|
199
|
+
|
200
|
+
Layout/MultilineOperationIndentation:
|
201
|
+
Enabled: false
|