Skip to content

Updated travis build scripts + rubocop config (from rspec-dev) #1962

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
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
200 changes: 190 additions & 10 deletions .rubocop_rspec_base.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# This file was generated on 2017-11-21T14:21:55+11:00 from the rspec-dev repo.
# This file was generated on 2018-03-04T16:52:14+01:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

# This file contains defaults for RSpec projects. Individual projects
# can customize by inheriting this file and overriding particular settings.

AccessModifierIndentation:
EnforcedStyle: outdent
Enabled: false

# "Use alias_method instead of alias"
# We're fine with `alias`.
Expand Down Expand Up @@ -50,9 +50,6 @@ DoubleNegation:
EachWithObject:
Enabled: false

Encoding:
EnforcedStyle: when_needed

FormatString:
EnforcedStyle: percent

Expand All @@ -73,7 +70,7 @@ MethodLength:
Max: 15

# Who cares what we call the argument for binary operator methods?
OpMethod:
BinaryOperatorParameterName:
Enabled: false

PercentLiteralDelimiters:
Expand All @@ -98,9 +95,6 @@ PredicateName:
Proc:
Enabled: false

RedundantReturn:
AllowMultipleReturnValues: true

# Exceptions should be rescued with `Support::AllExceptionsExceptOnesWeMustNotRescue`
RescueException:
Enabled: true
Expand All @@ -121,10 +115,196 @@ StringLiterals:
Style/SpecialGlobalVars:
Enabled: false

Style/TrailingComma:
Style/TrailingCommaInLiteral:
Enabled: false

Style/TrailingCommaInArguments:
Enabled: false

TrivialAccessors:
AllowDSLWriters: true
AllowPredicates: true
ExactNameMatch: true

Style/ParallelAssignment:
Enabled: false

Layout/EmptyLineBetweenDefs:
Enabled: false

Layout/FirstParameterIndentation:
Enabled: false

Naming/ConstantName:
Enabled: false

Style/ClassCheck:
Enabled: false

Style/ConditionalAssignment:
Enabled: false

Style/EmptyMethod:
Enabled: false

Style/FormatStringToken:
Enabled: false

Style/GuardClause:
Enabled: false

Style/IdenticalConditionalBranches:
Enabled: false

Style/IfUnlessModifier:
Enabled: false

Style/IfUnlessModifierOfIfUnless:
Enabled: false

Style/MethodMissing:
Enabled: false

Style/MixinUsage:
Enabled: false

Style/MultipleComparison:
Enabled: false

Style/MutableConstant:
Enabled: false

Style/NestedModifier:
Enabled: false

Style/NestedParenthesizedCalls:
Enabled: false

Style/NumericPredicate:
Enabled: false

Style/RedundantParentheses:
Enabled: false

Style/StringLiteralsInInterpolation:
Enabled: false

Style/SymbolArray:
Enabled: false

Style/SymbolProc:
Enabled: false

Style/YodaCondition:
Enabled: false

Style/ZeroLengthPredicate:
Enabled: false

Layout/ClosingParenthesisIndentation:
Enabled: false

Layout/ExtraSpacing:
Enabled: false

Layout/MultilineMethodCallBraceLayout:
Enabled: false

Layout/MultilineMethodCallIndentation:
Enabled: false

Layout/MultilineOperationIndentation:
Enabled: false

Layout/SpaceAroundBlockParameters:
Enabled: false

Layout/SpaceAroundOperators:
Enabled: false

Layout/SpaceBeforeComma:
Enabled: false

Style/BlockDelimiters:
Enabled: false

Style/EmptyCaseCondition:
Enabled: false

Style/MultilineIfModifier:
Enabled: false

Style/RescueStandardError:
Enabled: false

Style/StderrPuts:
Enabled: false

Style/TernaryParentheses:
Enabled: false

# This could likely be enabled, but it had a false positive on rspec-mocks
# (suggested change was not behaviour preserving) so I don't trust it.
Performance/HashEachMethods:
Enabled: false

Naming/HeredocDelimiterNaming:
Enabled: false

Layout/EmptyLineAfterMagicComment:
Enabled: false

Layout/IndentArray:
Enabled: false

Layout/IndentAssignment:
Enabled: false

Layout/IndentHeredoc:
Enabled: false

Layout/SpaceInsidePercentLiteralDelimiters:
Enabled: false

Style/EmptyElse:
Enabled: false

Style/IfInsideElse:
Enabled: false

Style/RedundantReturn:
Enabled: false

Style/StructInheritance:
Enabled: false

Naming/VariableNumber:
Enabled: false

Layout/SpaceInsideStringInterpolation:
Enabled: false

Style/DateTime:
Enabled: false

Style/ParenthesesAroundCondition:
Enabled: false

Layout/EmptyLinesAroundBlockBody:
Enabled: false

Lint/ImplicitStringConcatenation:
Enabled: false

Lint/NestedMethodDefinition:
Enabled: false

Style/RegexpLiteral:
Enabled: false

Style/TrailingUnderscoreVariable:
Enabled: false

Layout/EmptyLinesAroundAccessModifier:
Enabled: false

4 changes: 3 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was generated on 2017-11-21T14:21:55+11:00 from the rspec-dev repo.
# This file was generated on 2018-03-04T16:52:14+01:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

version: "{build}"
Expand Down Expand Up @@ -37,3 +37,5 @@ environment:
- ruby_version: 200
- ruby_version: 21
- ruby_version: 22
- ruby_version: 23-x64
- ruby_version: 24-x64
2 changes: 1 addition & 1 deletion script/clone_all_rspec_repos
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# This file was generated on 2017-11-21T14:21:55+11:00 from the rspec-dev repo.
# This file was generated on 2018-03-04T16:52:14+01:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

set -e
Expand Down
10 changes: 3 additions & 7 deletions script/functions.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was generated on 2017-11-21T14:21:55+11:00 from the rspec-dev repo.
# This file was generated on 2018-03-04T16:52:14+01:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
Expand Down Expand Up @@ -83,11 +83,7 @@ function run_spec_suite_for {
pushd ../$1
unset BUNDLE_GEMFILE
bundle_install_flags=`cat .travis.yml | grep bundler_args | tr -d '"' | grep -o " .*"`
if is_mri_192_plus; then
travis_retry eval "RUBYOPT=$RUBYOPT:'--enable rubygems' bundle install $bundle_install_flags"
else
travis_retry eval "bundle install $bundle_install_flags"
fi
travis_retry eval "(unset RUBYOPT; exec bundle install $bundle_install_flags)"
run_specs_and_record_done
popd
else
Expand Down Expand Up @@ -184,7 +180,7 @@ function check_documentation_coverage {

function check_style_and_lint {
echo "bin/rubocop lib"
bin/rubocop lib
eval "(unset RUBYOPT; exec bin/rubocop lib)"
}

function run_all_spec_suites {
Expand Down
2 changes: 1 addition & 1 deletion script/predicate_functions.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was generated on 2017-11-21T14:21:55+11:00 from the rspec-dev repo.
# This file was generated on 2018-03-04T16:52:14+01:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

function is_mri {
Expand Down
2 changes: 1 addition & 1 deletion script/run_build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# This file was generated on 2017-11-21T14:21:55+11:00 from the rspec-dev repo.
# This file was generated on 2018-03-04T16:52:14+01:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

set -e
Expand Down
2 changes: 1 addition & 1 deletion script/travis_functions.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file was generated on 2017-11-21T14:21:55+11:00 from the rspec-dev repo.
# This file was generated on 2018-03-04T16:52:14+01:00 from the rspec-dev repo.
# DO NOT modify it by hand as your changes will get lost the next time it is generated.

# Taken from:
Expand Down