Skip to content

Generate/readme: add spring-commands-rspec to the bundle #1891

@carlthuringer

Description

@carlthuringer

I'm probably not the only person who is confounded by the occurrence of the following message in one of my tools:

Version: 2.0.2

Usage: spring COMMAND [ARGS]

Commands for spring itself:

  binstub         Generate spring based binstubs. Use --all to generate a binstub for all known commands. Use --remove to revert.
  help            Print available commands.
  server          Explicitly start a Spring server in the foreground
  status          Show current status.
  stop            Stop all spring processes for this project.

Commands for your application:

  rails           Run a rails command. The following sub commands will use spring: console, runner, generate, destroy, test.
  rake            Runs the rake command

Now, this happens because the tool I am using is assuming that if I've got rspec, and spring, then I must be using them together. But I didn't choose to have spring, Rails put it in my gemfile and honestly, when's the last time you read up on every gem in rails new?

What I did choose was rspec-rails because I want to use rspec with rails, and it adds rspec as a dependency, so I don't need to specify it separately (but I do anyways).

Why doesn't rspec-rails add spring-commands-rspec as a development dependency and generate the stub after rails generate rspec:install? Rails invokes the spring binstub generator at the end of rails new and for most of us that is the last time binstubs will ever be generated.

In the readme it's recommended to generate a binstub for rspec:

bundle binstubs rspec-core

If the convention is to use binstubs, and rails values conventions, then it follows that rspec-rails should generate the binstubs for me and further, add spring-commands-rspec to my dependencies.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions