Этот коммит содержится в:
Mattia Roccoberton
2020-09-03 11:26:54 +02:00
родитель ab8c4fd73f
Коммит 668bd642e5
5 изменённых файлов: 47 добавлений и 60 удалений

1
.gitignore поставляемый
Просмотреть файл

@@ -2,6 +2,7 @@
*.orig *.orig
/.rspec_failures /.rspec_failures
/.rubocop-*
/Gemfile.lock /Gemfile.lock
/_misc/ /_misc/

Просмотреть файл

@@ -1,73 +1,27 @@
require: inherit_from:
- rubocop-rspec - https://relaxed.ruby.style/rubocop.yml
Rails:
Enabled: true
AllCops: AllCops:
TargetRubyVersion: 2.3.8
TargetRailsVersion: 5.2
Exclude: Exclude:
- db/schema.rb
- bin/* - bin/*
- node_modules/**/* - spec/dummy/**/*
# Temporary files NewCops: enable
- tmp/**/*
Rails/InverseOf: Gemspec/RequiredRubyVersion:
Enabled: false Enabled: false
Style/Documentation: Naming/FileName:
Enabled: false Enabled: false
Metrics/ClassLength: Layout/LineLength:
# Default value is 100 Enabled: true
Max: 150
Metrics/LineLength:
# Default is 80
Max: 120 Max: 120
Metrics/ModuleLength: Style/HashEachMethods:
# Default is 100 Enabled: true
Max: 150
Metrics/ParameterLists: Style/HashTransformKeys:
# Default is 5 Enabled: true
Max: 6
RSpec/ExampleLength: Style/HashTransformValues:
# Default is 10 Enabled: true
Max: 20
Style/FrozenStringLiteralComment:
# Deface DOES edit strings in place
Exclude:
- 'app/overrides/**/*'
RSpec/MultipleExpectations:
# Default is 3
Max: 5
RSpec/NestedGroups:
# Default is 3
Max: 6
Metrics/AbcSize:
Max: 25
Metrics/BlockLength:
# This value double the rubocop default
Max: 50
Metrics/CyclomaticComplexity:
# This value double the rubocop default
Max: 12
Metrics/MethodLength:
# This value double the rubocop default
Max: 20
Metrics/PerceivedComplexity:
# Default is 7
Max: 10

Просмотреть файл

@@ -1,3 +1,5 @@
# frozen_string_literal: true
source 'https://rubygems.org' source 'https://rubygems.org'
gemspec gemspec

Просмотреть файл

@@ -25,6 +25,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'puma', '~> 4.3.5' spec.add_development_dependency 'puma', '~> 4.3.5'
spec.add_development_dependency 'rspec_junit_formatter', '~> 0.4.1' spec.add_development_dependency 'rspec_junit_formatter', '~> 0.4.1'
spec.add_development_dependency 'rspec-rails', '~> 4.0.1' spec.add_development_dependency 'rspec-rails', '~> 4.0.1'
spec.add_development_dependency 'rubocop', '~> 0.90.0'
spec.add_development_dependency 'selenium-webdriver', '~> 3.142.7' spec.add_development_dependency 'selenium-webdriver', '~> 3.142.7'
spec.add_development_dependency 'sqlite3', '~> 1.4.2' spec.add_development_dependency 'sqlite3', '~> 1.4.2'
end end

29
bin/rubocop Исполняемый файл
Просмотреть файл

@@ -0,0 +1,29 @@
#!/usr/bin/env ruby
# frozen_string_literal: true
#
# This file was generated by Bundler.
#
# The application 'rubocop' is installed as part of a gem, and
# this file is here to facilitate running it.
#
require "pathname"
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)
bundle_binstub = File.expand_path("../bundle", __FILE__)
if File.file?(bundle_binstub)
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
load(bundle_binstub)
else
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
end
end
require "rubygems"
require "bundler/setup"
load Gem.bin_path("rubocop", "rubocop")