Skip to content

Commit

Permalink
Merge pull request #2071 from rspec/4-0-dev
Browse files Browse the repository at this point in the history
Long running 4.0 development branch
  • Loading branch information
JonRowe committed Oct 18, 2019
2 parents 33ab374 + 6728e9d commit a60adc9
Show file tree
Hide file tree
Showing 78 changed files with 2,469 additions and 414 deletions.
27 changes: 27 additions & 0 deletions .rubocop.yml
Expand Up @@ -43,3 +43,30 @@ PerlBackrefs:
# We probably can refactor the backref out, but for now excluding it since
# we can't use named matches in 1.8.7
- lib/generators/rspec/scaffold/scaffold_generator.rb

Style/AccessModifierDeclarations:
Enabled: false

Naming/MemoizedInstanceVariableName:
Enabled: false

Naming/UncommunicativeMethodParamName:
Enabled: false

Metrics/PerceivedComplexity:
Enabled: false

Metrics/BlockLength:
Enabled: false

Lint/AssignmentInCondition:
Enabled: false

Lint/EmptyExpression:
Enabled: false

Layout/AlignHash:
Enabled: false

Naming/RescuedExceptionsVariableName:
Enabled: false
29 changes: 18 additions & 11 deletions .rubocop_rspec_base.yml
Expand Up @@ -22,7 +22,7 @@ CaseEquality:
Enabled: false

# Warns when the class is excessively long.
ClassLength:
Metrics/ClassLength:
Max: 100

CollectionMethods:
Expand Down Expand Up @@ -66,7 +66,7 @@ LineLength:
Max: 100

# Over time we'd like to get this down, but this is what we're at now.
MethodLength:
Metrics/MethodLength:
Max: 15

# Who cares what we call the argument for binary operator methods?
Expand Down Expand Up @@ -115,7 +115,10 @@ StringLiterals:
Style/SpecialGlobalVars:
Enabled: false

Style/TrailingCommaInLiteral:
Style/TrailingCommaInArrayLiteral:
Enabled: false

Style/TrailingCommaInHashLiteral:
Enabled: false

Style/TrailingCommaInArguments:
Expand All @@ -132,7 +135,7 @@ Style/ParallelAssignment:
Layout/EmptyLineBetweenDefs:
Enabled: false

Layout/FirstParameterIndentation:
Layout/IndentFirstArgument:
Enabled: false

Naming/ConstantName:
Expand All @@ -150,6 +153,9 @@ Style/EmptyMethod:
Style/FormatStringToken:
Enabled: false

Style/FrozenStringLiteralComment:
Enabled: false

Style/GuardClause:
Enabled: false

Expand All @@ -162,7 +168,10 @@ Style/IfUnlessModifier:
Style/IfUnlessModifierOfIfUnless:
Enabled: false

Style/MethodMissing:
Style/MethodMissingSuper:
Enabled: false

Style/MissingRespondToMissing:
Enabled: false

Style/MixinUsage:
Expand Down Expand Up @@ -243,18 +252,13 @@ Style/StderrPuts:
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:
Layout/IndentFirstArrayElement:
Enabled: false

Layout/IndentAssignment:
Expand Down Expand Up @@ -307,3 +311,6 @@ Style/TrailingUnderscoreVariable:

Layout/EmptyLinesAroundAccessModifier:
Enabled: false

Metrics/AbcSize:
Enabled: false
176 changes: 30 additions & 146 deletions .travis.yml
Expand Up @@ -37,180 +37,64 @@ dist: trusty

matrix:
include:
# Rails dev / 6 builds >= 2.4.4
# Rails 6 builds
- rvm: jruby-head
jdk: oraclejdk11
env:
- RAILS_VERSION='~>6.0'
- JRUBY_OPT=--dev
- JAVA_OPTS="--add-opens java.base/sun.nio.ch=org.jruby.dist --add-opens java.base/java.io=org.jruby.dist --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.security=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.security.cert=ALL-UNNAMED --add-opens=java.base/java.util.zip=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.util.regex=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/javax.crypto=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED"
- rvm: 2.6.3
env: RAILS_VERSION=master
- rvm: 2.5.3
env: RAILS_VERSION=master
- rvm: 2.4.4
env: RAILS_VERSION=master
env: RAILS_VERSION='~>6.0'
- rvm: 2.5.5
env: RAILS_VERSION='~>6.0'

# Rails 5.2 builds >= 2.2.2
- rvm: jruby-head
jdk: oraclejdk11
env:
- RAILS_VERSION='~> 5.2.0'
- JRUBY_OPT=--dev
- JAVA_OPTS="--add-opens java.base/sun.nio.ch=org.jruby.dist --add-opens java.base/java.io=org.jruby.dist --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.security=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.security.cert=ALL-UNNAMED --add-opens=java.base/java.util.zip=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.util.regex=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/javax.crypto=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED"
- rvm: 2.6.3
env: RAILS_VERSION='~> 5.2.0'
- rvm: 2.5.3
- rvm: 2.5.5
env: RAILS_VERSION='~> 5.2.0'
- rvm: 2.4.4
- rvm: 2.4.6
env: RAILS_VERSION='~> 5.2.0'
- rvm: 2.3.7
env: RAILS_VERSION='~> 5.2.0'
- rvm: 2.2.10
- rvm: 2.3.8
env: RAILS_VERSION='~> 5.2.0'

# Rails 5.1 Builds >= 2.2.2
- rvm: 2.6.3
env: RAILS_VERSION='~> 5.1.0'
- rvm: 2.5.3
env: RAILS_VERSION='~> 5.1.0'
- rvm: 2.4.4
- rvm: 2.5.5
env: RAILS_VERSION='~> 5.1.0'
- rvm: 2.3.7
- rvm: 2.4.6
env: RAILS_VERSION='~> 5.1.0'
- rvm: 2.2.10
- rvm: 2.3.8
env: RAILS_VERSION='~> 5.1.0'

# Rails 5.0 Builds >= 2.2.2
- rvm: 2.6.3
env: RAILS_VERSION='~> 5.0.0'
- rvm: 2.5.3
env: RAILS_VERSION='~> 5.0.0'
- rvm: 2.4.4
- rvm: 2.5.5
env: RAILS_VERSION='~> 5.0.0'
- rvm: 2.3.7
- rvm: 2.4.6
env: RAILS_VERSION='~> 5.0.0'
- rvm: 2.2.10
- rvm: 2.3.8
env: RAILS_VERSION='~> 5.0.0'

# Rails 4.2 Builds >= 1.9.3
- rvm: 2.4.4
- rvm: 2.5.5
env: RAILS_VERSION='~> 4.2.0'
- rvm: 2.4.4
env: RAILS_VERSION=4-2-stable
- rvm: 2.3.7
- rvm: 2.4.6
env: RAILS_VERSION='~> 4.2.0'
- rvm: 2.3.7
env: RAILS_VERSION=4-2-stable
- rvm: 2.2.10
- rvm: 2.4.6
env: RAILS_VERSION='~> 4.2.0'
- rvm: 2.2.10
env: RAILS_VERSION=4-2-stable
- rvm: 2.1.10
- rvm: 2.3.8
env: RAILS_VERSION='~> 4.2.0'
- rvm: 2.1.10
env: RAILS_VERSION=4-2-stable
- rvm: 2.0.0
- rvm: 2.3.8
env: RAILS_VERSION='~> 4.2.0'
- rvm: 2.0.0
env: RAILS_VERSION=4-2-stable
- rvm: 1.9.3
env: RAILS_VERSION='~> 4.2.0'
- rvm: 1.9.3
env: RAILS_VERSION=4-2-stable

# Rails 4.1 Builds >= 1.9.3, < 2.4
- rvm: 2.3.7
env: RAILS_VERSION='~> 4.1.0'
- rvm: 2.3.7
env: RAILS_VERSION=4-1-stable
- rvm: 2.2.10
env: RAILS_VERSION='~> 4.1.0'
- rvm: 2.2.10
env: RAILS_VERSION=4-1-stable
- rvm: 2.1.10
env: RAILS_VERSION='~> 4.1.0'
- rvm: 2.1.10
env: RAILS_VERSION=4-1-stable
- rvm: 2.0.0
env: RAILS_VERSION='~> 4.1.0'
- rvm: 2.0.0
env: RAILS_VERSION=4-1-stable
- rvm: 1.9.3
env: RAILS_VERSION='~> 4.1.0'
- rvm: 1.9.3
env: RAILS_VERSION=4-1-stable

# Rails 4.0 Builds >= 1.8.11, < 2.4
- rvm: 2.3.7
env: RAILS_VERSION='~> 4.0.4'
- rvm: 2.3.7
env: RAILS_VERSION=4-0-stable
- rvm: 2.2.10
env: RAILS_VERSION='~> 4.0.4'
- rvm: 2.2.10
env: RAILS_VERSION=4-0-stable
- rvm: 2.1.10
env: RAILS_VERSION='~> 4.0.4'
- rvm: 2.1.10
env: RAILS_VERSION=4-0-stable
- rvm: 2.0.0
env: RAILS_VERSION='~> 4.0.4'
- rvm: 2.0.0
env: RAILS_VERSION=4-0-stable
- rvm: 1.9.3
env: RAILS_VERSION='~> 4.0.4'
- rvm: 1.9.3
env: RAILS_VERSION=4-0-stable

# Rails 3.2 Builds < 2.4
- rvm: 2.3.7
env: RAILS_VERSION='~> 3.2.17'
- rvm: 2.3.7
env: RAILS_VERSION=3-2-stable
- rvm: 2.2.10
env: RAILS_VERSION='~> 3.2.17'
- rvm: 2.2.10
env: RAILS_VERSION=3-2-stable
- rvm: 2.1.10
env: RAILS_VERSION='~> 3.2.17'
- rvm: 2.1.10
env: RAILS_VERSION=3-2-stable
- rvm: 2.0.0
env: RAILS_VERSION='~> 3.2.17'
- rvm: 2.0.0
env: RAILS_VERSION=3-2-stable
- rvm: 1.9.3
env: RAILS_VERSION='~> 3.2.17'
- rvm: 1.9.3
env: RAILS_VERSION=3-2-stable
- rvm: 1.9.2
env: RAILS_VERSION='~> 3.2.17'
- rvm: 1.9.2
env: RAILS_VERSION=3-2-stable
- rvm: 1.8.7
env: RAILS_VERSION='~> 3.2.17'
- rvm: 1.8.7
env: RAILS_VERSION=3-2-stable

# Rails 3.1 Builds, < 2.2
- rvm: 2.1.10
env: RAILS_VERSION='~> 3.1.12'
- rvm: 2.0.0
env: RAILS_VERSION='~> 3.1.12'
- rvm: 1.9.3
env: RAILS_VERSION='~> 3.1.12'
- rvm: 1.9.2
env: RAILS_VERSION='~> 3.1.12'
- rvm: 1.8.7
env: RAILS_VERSION='~> 3.1.12'

# Rails 3.0 Builds, < 2
- rvm: 1.9.3
env: RAILS_VERSION='~> 3.0.20'
- rvm: 1.9.2
env: RAILS_VERSION='~> 3.0.20'
- rvm: 1.8.7
env: RAILS_VERSION='~> 3.0.20'

allow_failures:
- rvm: 2.6.3
env: RAILS_VERSION=master
- rvm: 2.5.3
env: RAILS_VERSION=master
- rvm: 2.4.4
env: RAILS_VERSION=master
fast_finish: true

branches:
only:
- master
- /^\d+-\d+-maintenance$/
2 changes: 1 addition & 1 deletion BUILD_DETAIL.md
Expand Up @@ -68,7 +68,7 @@ $ bin/cucumber

## YARD documentation

RSpec uses [YARD](https://yardoc.org/) for API documentation on the [rspec.info site](http://rspec.info/).
RSpec uses [YARD](https://yardoc.org/) for API documentation on the [rspec.info site](https://rspec.info/).
Our commitment to [SemVer](https://semver.org) requires that we explicitly
declare our public API, and our build uses YARD to ensure that every
class, module and method has either been labeled `@private` or has at
Expand Down
18 changes: 18 additions & 0 deletions CONTRIBUTING.md
Expand Up @@ -50,3 +50,21 @@ immediately. These are good ones to tackle to help us actively fix bugs.
Maintenance branches are how we manage the different supported point releases
of RSpec. As such, while they might look like good candidates to merge into
master, please do not open pull requests to merge them.

## How do the cukes work?

The cucumber features for RSpec rails document how it works, but are also quasi
executable tests for the framework. They execute in the context of a pre-setup
Rails app.

1. Before the cucumber specs run, the directory `tmp/aruba` is cleared
2. If the example app hasn't already been created,
`bundle exec rake generate:app generate:stuff` is executed.
3. The example app is copied in to `tmp/aruba`
4. Everything in `tmp/aruba/spec/*` is deleted apart from `spec/spec_helper.rb` and
`spec/rails_helper.rb`
5. the cucumber suite executes, creating files in that app and executing them

The best way to debug the app is to run a failing cucumber feature, which will
leave the test files intact in `tmp/aruba`, then you can cd in to that director
and run it in the bundle context of the aruba app.

0 comments on commit a60adc9

Please sign in to comment.