Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rspec/rspec-core
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.5.0.beta4
Choose a base ref
...
head repository: rspec/rspec-core
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.5.0
Choose a head ref
  • 17 commits
  • 23 files changed
  • 4 contributors

Commits on Jun 5, 2016

  1. Configuration menu
    Copy the full SHA
    652b251 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f797b9d View commit details
    Browse the repository at this point in the history

Commits on Jun 6, 2016

  1. Merge pull request #2261 from rspec/update-travis-build-scripts-2016-…

    …06-05-for-master
    
    Updates from rspec-dev (2016-06-05)
    JonRowe committed Jun 6, 2016
    Configuration menu
    Copy the full SHA
    bc14826 View commit details
    Browse the repository at this point in the history

Commits on Jun 14, 2016

  1. Support --bisect in SPEC_OPTS

    Currently if RSpec is invoked with SPEC_OPTS="--bisect", an infinite number
    of child processes is spawned. This is because the bisect feature works by
    spawning child processes for each bisection run. In the normal cli usage case,
    the --bisect argument is removed before the child processes are invoked. It
    is not removed from the SPEC_OPTS variable, however, meaning each child
    process believes it's starting a new bisection.
    
    This commit allows Bisect::Runner to invoke its child processes with a
    modified environment, removing --bisect if present. In modern rubies we can
    use Open3.capture2e's optional environment argument - in older rubies and
    JRuby we have to fall back on modifying the parent process's environment, then
    restoring it after the child process has run.
    
    Previously the Bisect::Runner was invoked during options parsing. However,
    because SPEC_OPTS and the cli args are parsed by separate instances of the
    parser, invoking the bisection during SPEC_OPTS parsing meant the cli args
    were lost.
    
    To address this I've made the OptionParser set a :bisect option, which is then
    picked up in the main Runner to invoke the actual bisection. This has
    increased the complexity of Runner.run, and there are other invocations
    remaining in the OptionParser (e.g. --init and --help). These will be
    refactored in a follow-up commit, so that the OptionParser sets a callable in
    each case that can be called in the main Runner.
    urbanautomaton committed Jun 14, 2016
    Configuration menu
    Copy the full SHA
    9780a52 View commit details
    Browse the repository at this point in the history
  2. Set alternative RSpec invocations as callables in OptionParser

    RSpec can be invoked with a number of CLI flags that result in substantially
    different code paths. As well as the default runner, there is:
    
    * `--init` - initializes the project directory and exits
    * `--help` - prints CLI usage and exits
    * `--version` - prints the version and exits
    * `--drb` - runs examples via a DRb connection
    * `--bisect` - starts a bisection process
    
    Previously some of these paths were invoked directly in the OptionParser
    (--init, --help and --version), while others were invoked by the main
    Runner.run call. This necessitated a lot of complexity in Runner.run, and a
    reasonable amount of stubbing of exit calls (which can be error-prone, and
    lead to a prematurely-terminated test run).
    
    This commit refactors the different invocations into callables, which the
    OptionParser sets as the `:runner` option. If an alternative invocation is
    found in Runner.run, it is used, falling back to the default of instantiating
    a Runner and starting it.
    
    The invocation callables do not handle exiting themselves, but are required to
    return an exit code instead. They must all accept the following arguments:
    
        @param options [RSpec::Core::ConfigurationOptions]
        @param err [IO]
        @param out [IO]
    
    At the moment the invocations are tested via the OptionParser specs - in
    future work we intend to extract these to their own module and test them
    independently.
    urbanautomaton committed Jun 14, 2016
    Configuration menu
    Copy the full SHA
    b420cf5 View commit details
    Browse the repository at this point in the history
  3. Disable PerceivedComplexity cop for Parser#parse

    This method is now occasionally (but not reliably) failing the
    PerceivedComplexity cop. Since the complexity of this method is hard to
    control and the CyclomaticComplexity rule is already disabled for it, I'm
    turning off the cop for this method only.
    urbanautomaton committed Jun 14, 2016
    Configuration menu
    Copy the full SHA
    b5741ab View commit details
    Browse the repository at this point in the history
  4. Force ruby 2.2 version to 2.2.5 on travis

    Previously, this was set to `2.2` in the expectation that travis would use the
    latest of the 2.2.x branch as a result. However, builds appear to be running
    with 2.2.0-p0, which contains erroneous warnings that can force variables and
    lets to be needlessly renamed.
    
    While this may be a travis bug, I'm explicitly setting the version in the
    configuration to ensure that an up-to-date version is picked up in the
    meanwhile.
    urbanautomaton committed Jun 14, 2016
    Configuration menu
    Copy the full SHA
    4add368 View commit details
    Browse the repository at this point in the history
  5. Extract Parser::Callables to Invocations module

    Previous work introduced a set of invocation callables that could be set in
    the OptionParser to run instead of the default RSpec::Core::Runner. Testing
    them via the the OptionParser seemed out-of-place, however, and made the test
    stimulus needlessly complex.
    
    This change extracts the invocations to a set of callable objects defined in
    the RSpec::Core::Invocations namespace, allowing them to be tested separately
    from the OptionParser.
    urbanautomaton committed Jun 14, 2016
    Configuration menu
    Copy the full SHA
    d52c969 View commit details
    Browse the repository at this point in the history
  6. Merge pull request #2271 from urbanautomaton/support-bisect-in-spec-opts

    Support bisect in spec opts
    myronmarston authored Jun 14, 2016
    Configuration menu
    Copy the full SHA
    97a0cdb View commit details
    Browse the repository at this point in the history
  7. Add changelog for #2271.

    [ci skip]
    myronmarston committed Jun 14, 2016
    Configuration menu
    Copy the full SHA
    2edb982 View commit details
    Browse the repository at this point in the history

Commits on Jun 15, 2016

  1. Configuration menu
    Copy the full SHA
    e6e7fb6 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #2272 from rspec/update-travis-build-scripts-2016-…

    …06-14-for-master
    
    Updates from rspec-dev (2016-06-14)
    JonRowe authored Jun 15, 2016
    Configuration menu
    Copy the full SHA
    9456a31 View commit details
    Browse the repository at this point in the history

Commits on Jun 17, 2016

  1. Include SPEC_OPTS values in bisect reproduction command

    Previously the following command:
    
        SPEC_OPTS="--bisect --seed 125" rspec blah_spec.rb
    
    would return a repro command something like
    
        rspec blah_spec.rb[1:2,1:4]
    
    However, this won't run in the correct order without the seed. This patch
    includes SPEC_OPTS in the bisect reproduction command, minus the `--bisect`
    flag.
    
    By default, cukes using aruba to run commands are given an environment with
    SPEC_OPTS="-r/path/to/features/support/require_expect_syntax_in_aruba_specs.rb",
    which ensures that `should` and `should_not` are not used in the examples.
    
    Now that SPEC_OPTS is included in the bisect reproduction command, however,
    this setting shows up in the final output, breaking the existing assertions.
    
    To prevent this I've added a new tag, `@with-clean-spec-opts`, and added this
    tag to the logic controlling whether the above file is loaded.
    urbanautomaton committed Jun 17, 2016
    Configuration menu
    Copy the full SHA
    796f2e9 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #2274 from urbanautomaton/include-spec-opts-in-bis…

    …ect-repro-command
    
    Include SPEC_OPTS in bisect reproduction command
    myronmarston authored Jun 17, 2016
    Configuration menu
    Copy the full SHA
    407328c View commit details
    Browse the repository at this point in the history
  3. Add changelog for #2274.

    myronmarston committed Jun 17, 2016
    Configuration menu
    Copy the full SHA
    fe1256b View commit details
    Browse the repository at this point in the history

Commits on Jul 1, 2016

  1. Bump version to 3.5.0

    Sam Phippen committed Jul 1, 2016
    Configuration menu
    Copy the full SHA
    134028d View commit details
    Browse the repository at this point in the history
  2. Add changelog entry for v3.5.0

    Sam Phippen committed Jul 1, 2016
    Configuration menu
    Copy the full SHA
    21b8ae6 View commit details
    Browse the repository at this point in the history
Loading