Skip to content
This repository has been archived by the owner on Nov 19, 2018. It is now read-only.

Rails 5.2.beta2 #156

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions .codeclimate.yml

This file was deleted.

9 changes: 9 additions & 0 deletions .rubocop-thread_safety.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# # rubocop-thread_safety cops
# ThreadSafety/ClassAndModuleAttributes:
# Enabled: true
#
# ThreadSafety/InstanceVariableInClassMethod:
# Enabled: true
#
# ThreadSafety/NewThread:
# Enabled: true
178 changes: 6 additions & 172 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,174 +1,8 @@
require: rubocop-thread_safety
require: rubocop-rspec

AllCops:
TargetRubyVersion: 2.4
Exclude:
- 'Capfile'
- 'db/schema.rb'
- 'db/migrate/20160804143438_init_schema.rb'
- 'db/migrate/20170630161747_squasher_clean.rb'
- 'bin/brakeman'
- 'bin/bundle'
- 'bin/bundle-audit'
- 'bin/cap'
- 'bin/capify'
- 'bin/mry'
- 'bin/puma'
- 'bin/pumactl'
- 'bin/rails'
- 'bin/rake'
- 'bin/rspec'
- 'bin/rubocop'
- 'bin/setup'
- 'bin/sidekiq'
- 'bin/sidekiqctl'
- 'bin/squasher'
- 'bin/update'
- 'bin/whenever'
- 'bin/wheneverize'
- 'bin/yarn'
- 'bin/license_finder'
- 'spec/spec_helper.rb'
- 'spec/rails_helper.rb'
DisplayCopNames: true
DisplayStyleGuide: true
TargetRailsVersion: 5.1

Rails:
Enabled: true

# Allow block comments
Style/BlockComments:
Enabled: false

# Disable
Style/Documentation:
Enabled: false

Layout/DotPosition:
Enabled: true
EnforcedStyle: leading

Style/FrozenStringLiteralComment:
Enabled: true
EnforcedStyle: never

# Recheck this cop later
Style/FlipFlop:
Description: 'Checks for flip flops'
StyleGuide: '#no-flip-flops'
Enabled: true

# Recheck this cop later
Style/RedundantException:
Description: "Checks for an obsolete RuntimeException argument in raise/fail."
StyleGuide: '#no-explicit-runtimeerror'
Enabled: true

# Recheck this cop later
Style/SafeNavigation:
Description: >-
This cop transforms usages of a method call safeguarded by
a check for the existance of the object to
safe navigation (`&.`).
Enabled: true

# Recheck this cop later
Style/SignalException:
Description: 'Checks for proper usage of fail and raise.'
StyleGuide: '#prefer-raise-over-fail'
Enabled: true

# Enable with EnforcedStyle is space
Layout/SpaceInsideStringInterpolation:
EnforcedStyle: space
Enabled: true

# Enable with EnforcedStyle is single_quotes
Style/StringLiterals:
EnforcedStyle: single_quotes
Enabled: true

# Limit lines to 80 characters
Metrics/LineLength:
Enabled: false

# TimeZone stuff
Rails/TimeZone:
EnforcedStyle: strict
Enabled: true

# Identifies possible cases where Active Record save! or related should be used.
Rails/SaveBang:
Enabled: true

# Suggests the usage of an auto resource cleanup version of a method (if available)
Style/AutoResourceCleanup:
Enabled: true

# Preferred collection methods
Style/CollectionMethods:
Enabled: true

# Use UTF-8 as the source file encoding
Style/Encoding:
Enabled: true

# Use `raise` or `fail` with an explicit exception class and
# message, rather than just a message.
Style/ImplicitRuntimeError:
Enabled: true

# Avoid chaining a method call on a do...end block
Style/MethodCalledOnDoEndBlock:
Enabled: true

# Check for a newline after the assignment operator in multi-line assignments
Layout/MultilineAssignmentLayout:
Enabled: true

# Just ignore order of gems in Gemfile
Bundler/OrderedGems:
Enabled: false

# Use %i or %I for an array of symbols.
Style/SymbolArray:
Enabled: false

Metrics/BlockLength:
Exclude:
- 'app/documentation/**/*.rb'
- 'config/routes.rb'
- 'config/environments/production.rb'
- 'config/sitemap.rb'
- 'spec/**/*.rb'

Metrics/ClassLength:
Exclude:
- 'app/documentation/**/*.rb'

Style/GuardClause:
Enabled: false

Style/IfUnlessModifier:
Enabled: false

Style/ConditionalAssignment:
Enabled: true
EnforcedStyle: assign_to_condition

Naming/FileName:
Enabled: true
Exclude:
- 'config/initializers/rack-cors.rb'
- 'config/initializers/rack-force_domain.rb'
- 'config/initializers/rack-mini-profiler.rb'
- 'config/initializers/rack-timeout.rb'
- 'spec/support/capybara-email.rb'
- 'spec/support/shoulda-callback-matchers.rb'
- 'spec/support/shoulda-matchers.rb'

# Disable broken cop
Style/FormatStringToken:
Description: 'Use a consistent style for format string tokens.'
Enabled: false
inherit_from:
- .rubocop_general.yml
- .rubocop_rspec.yml
- .rubocop-thread_safety.yml
- .rubocop_todo.yml
174 changes: 174 additions & 0 deletions .rubocop.yml.old
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
require: rubocop-thread_safety

AllCops:
TargetRubyVersion: 2.4
Exclude:
- 'Capfile'
- 'db/schema.rb'
- 'db/migrate/20160804143438_init_schema.rb'
- 'db/migrate/20170630161747_squasher_clean.rb'
- 'bin/brakeman'
- 'bin/bundle'
- 'bin/bundle-audit'
- 'bin/cap'
- 'bin/capify'
- 'bin/mry'
- 'bin/puma'
- 'bin/pumactl'
- 'bin/rails'
- 'bin/rake'
- 'bin/rspec'
- 'bin/rubocop'
- 'bin/setup'
- 'bin/sidekiq'
- 'bin/sidekiqctl'
- 'bin/squasher'
- 'bin/update'
- 'bin/whenever'
- 'bin/wheneverize'
- 'bin/yarn'
- 'bin/license_finder'
- 'spec/spec_helper.rb'
- 'spec/rails_helper.rb'
DisplayCopNames: true
DisplayStyleGuide: true
TargetRailsVersion: 5.1

Rails:
Enabled: true

# Allow block comments
Style/BlockComments:
Enabled: false

# Disable
Style/Documentation:
Enabled: false

Layout/DotPosition:
Enabled: true
EnforcedStyle: leading

Style/FrozenStringLiteralComment:
Enabled: true
EnforcedStyle: never

# Recheck this cop later
Style/FlipFlop:
Description: 'Checks for flip flops'
StyleGuide: '#no-flip-flops'
Enabled: true

# Recheck this cop later
Style/RedundantException:
Description: "Checks for an obsolete RuntimeException argument in raise/fail."
StyleGuide: '#no-explicit-runtimeerror'
Enabled: true

# Recheck this cop later
Style/SafeNavigation:
Description: >-
This cop transforms usages of a method call safeguarded by
a check for the existance of the object to
safe navigation (`&.`).
Enabled: true

# Recheck this cop later
Style/SignalException:
Description: 'Checks for proper usage of fail and raise.'
StyleGuide: '#prefer-raise-over-fail'
Enabled: true

# Enable with EnforcedStyle is space
Layout/SpaceInsideStringInterpolation:
EnforcedStyle: space
Enabled: true

# Enable with EnforcedStyle is single_quotes
Style/StringLiterals:
EnforcedStyle: single_quotes
Enabled: true

# Limit lines to 80 characters
Metrics/LineLength:
Enabled: false

# TimeZone stuff
Rails/TimeZone:
EnforcedStyle: strict
Enabled: true

# Identifies possible cases where Active Record save! or related should be used.
Rails/SaveBang:
Enabled: true

# Suggests the usage of an auto resource cleanup version of a method (if available)
Style/AutoResourceCleanup:
Enabled: true

# Preferred collection methods
Style/CollectionMethods:
Enabled: true

# Use UTF-8 as the source file encoding
Style/Encoding:
Enabled: true

# Use `raise` or `fail` with an explicit exception class and
# message, rather than just a message.
Style/ImplicitRuntimeError:
Enabled: true

# Avoid chaining a method call on a do...end block
Style/MethodCalledOnDoEndBlock:
Enabled: true

# Check for a newline after the assignment operator in multi-line assignments
Layout/MultilineAssignmentLayout:
Enabled: true

# Just ignore order of gems in Gemfile
Bundler/OrderedGems:
Enabled: false

# Use %i or %I for an array of symbols.
Style/SymbolArray:
Enabled: false

Metrics/BlockLength:
Exclude:
- 'app/documentation/**/*.rb'
- 'config/routes.rb'
- 'config/environments/production.rb'
- 'config/sitemap.rb'
- 'spec/**/*.rb'

Metrics/ClassLength:
Exclude:
- 'app/documentation/**/*.rb'

Style/GuardClause:
Enabled: false

Style/IfUnlessModifier:
Enabled: false

Style/ConditionalAssignment:
Enabled: true
EnforcedStyle: assign_to_condition

Naming/FileName:
Enabled: true
Exclude:
- 'config/initializers/rack-cors.rb'
- 'config/initializers/rack-force_domain.rb'
- 'config/initializers/rack-mini-profiler.rb'
- 'config/initializers/rack-timeout.rb'
- 'spec/support/capybara-email.rb'
- 'spec/support/shoulda-callback-matchers.rb'
- 'spec/support/shoulda-matchers.rb'

# Disable broken cop
Style/FormatStringToken:
Description: 'Use a consistent style for format string tokens.'
Enabled: false
Loading