Skip to content
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

Incompatibilities with rspec-core edge and version issues #249

Closed
lorefnon opened this issue Feb 18, 2014 · 13 comments
Closed

Incompatibilities with rspec-core edge and version issues #249

lorefnon opened this issue Feb 18, 2014 · 13 comments

Comments

@lorefnon
Copy link

When using published version of 'guard-rspec' along with master of rspec-core we run into incompatibility issues due to recent changes in rspec-core -- especially : rspec/rspec-core@b2fea38

However if I try to switch to edge version of guard-rspec:

gem "guard-rspec", 
  github: "guard/guard-rspec",
  branch: "master",
  require: false

I run into dependency version mismatch:

Bundler could not find compatible versions for gem "rspec-core":
  In Gemfile:
    guard-rspec (>= 0) ruby depends on
      rspec-core (~> 2.14.0) ruby

    rspec-core (3.0.0.beta1)
@lorefnon
Copy link
Author

The following interim measure works for now (with published guard-rspec)

guard :rspec do

  ::RSpec::Core::ConfigurationOptions.class_eval do
    alias :parse_options :options
  end
  ...
end

@bobbytables
Copy link

With RSpec beta2 released I'm seeing this as well.

@907th
Copy link
Contributor

907th commented Feb 19, 2014

Hi, @lorefnon @bobbytables !

Regarding dependency issue

I set up a new app with workaround from #236

# Gemfile
# ...
gem 'rspec-core', '~> 3.0.0.beta2', git: 'https://github.com/rspec/rspec-core.git', branch: 'master'
gem 'guard-rspec', '~> 4.2.6', git: 'https://github.com/guard/guard-rspec.git', branch: 'master'
gem 'rspec', '~> 3.0.0.beta2'  # workaround from guard-rspec #236

My bundler version is:

$ bundle --version
Bundler version 1.5.3

And bundle was completed succesfully:

$ bundle
Updating https://github.com/rspec/rspec-core.git
Updating https://github.com/guard/guard-rspec.git
Fetching gem metadata from https://rubygems.org/.......
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Installing rake (10.1.1)
Installing i18n (0.6.9)
Installing minitest (4.7.5)
Installing multi_json (1.8.4)
...
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.

See #236 for more info on RSpec dependency issues.

@907th
Copy link
Contributor

907th commented Feb 19, 2014

@lorefnon I don't understand what the issue with RSpec::Core::ConfigurationOptions#parse_options. Can you clarify it, please?

@bobbytables
Copy link

I think this issue is actually missing one of the bugs (it might be illustrating both?).

Rspec beta2 bundles with guard-rspec sure, but upon trying to start it you run into issues.

@bobbytables
Copy link

The problem is that guard-rspec is using the method parse_options to get the options from RSpec::Core. However, this commit: rspec/rspec-core@b2fea38 changes the method name.

The monkey patches simply aliases to the new method.

@907th
Copy link
Contributor

907th commented Feb 19, 2014

@bobbytables Thanks, I'm seeing it now.

@907th
Copy link
Contributor

907th commented Feb 19, 2014

I've added the fix in #250. Could you try it, please?

@lorefnon
Copy link
Author

Thank you @907th for fixing this, this indeed resolves the issue.

@907th 907th closed this as completed in d4b064a Feb 22, 2014
907th pushed a commit that referenced this issue Feb 22, 2014
RSpec::Core::ConfigurationOptions#options support for rspec-core 3.0.0.beta2. Fix #249
@907th
Copy link
Contributor

907th commented Feb 22, 2014

Version 4.2.7 released. Thank you to all participants!

@thibaudgg
Copy link
Member

@907th thanks!

@myronmarston
Copy link
Contributor

Reposting my comment from d4b064a (I found that first but this looks like a better place for it):

RSpec::Core::ConfigurationOptions has always been labeled as a private API. Please do not use private APIs as we may change then in any minor or patch release.

If you need a particular public API, please open an issue and discuss with us. We will often recatogorize private APIs as public when users ask for them to be public, and then they become subject to SemVer and we won't break you willy-nilly in any release.

@thibaudgg
Copy link
Member

@myronmarston good point, just opened an issue on rspec-core!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants