Skip to content

Implicit dependency on RuboCop RSpec #2

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
merged 1 commit into from
Mar 28, 2024
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
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ jobs:
- uses: actions/checkout@v4
- name: Use latest RuboCop RSpec from `master`
run: |
sed -e '/rubocop-rspec/d' -i Gemfile
echo "gem 'rubocop-rspec', github: 'rubocop/rubocop-rspec'" > Gemfile.local
- uses: ruby/setup-ruby@v1
with:
Expand All @@ -102,7 +103,7 @@ jobs:
- uses: actions/checkout@v4
- name: Use latest RSpec 4 from `4-0-dev` branch
run: |
sed -e '/rspec/d' -i Gemfile
sed -e "/^gem 'rspec/d" -i Gemfile
cat << EOF > Gemfile.local
gem 'rspec', github: 'rspec/rspec-metagem', branch: '4-0-dev'
gem 'rspec-core', github: 'rspec/rspec-core', branch: '4-0-dev'
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Master (Unreleased)

- Implicit dependency on RuboCop RSpec. Note that if you use rubocop-rspec_rails, you must also explicitly add rubocop-rspec to the Gemfile, because you are changing to an implicit dependency on RuboCop RSpec. ([@ydah])

## 2.28.0 (2024-03-28)

- Extracted from `rubocop-rspec` into a separate repository. ([@ydah])
Expand Down
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,8 @@ gem 'rubocop-rake', '~> 0.6'
gem 'simplecov', '>= 0.19'
gem 'yard'

# TODO: Move to gemspec when RuboCop RSpec v3 is released.
gem 'rubocop-rspec', '~> 2.27'

local_gemfile = 'Gemfile.local'
eval_gemfile(local_gemfile) if File.exist?(local_gemfile)
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,17 @@

## Installation

Just install the `rubocop-rspec_rails` gem
**This gem implicitly depends on the `rubocop-rspec` gem, so you should install it first.**
Just install the `rubocop-rspec` and `rubocop-rspec_rails` gem

```bash
gem install rubocop-rspec_rails
gem install rubocop-rspec rubocop-rspec_rails
```

or if you use bundler put this in your `Gemfile`

```ruby
gem 'rubocop-rspec', require: false
gem 'rubocop-rspec_rails', require: false
```

Expand Down
8 changes: 5 additions & 3 deletions docs/modules/ROOT/pages/installation.adoc
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
= Installation

Just install the `rubocop-rspec_rails` gem
*This gem implicitly depends on the `rubocop-rspec` gem, so you should install it first.*
Just install the `rubocop-rspec` and `rubocop-rspec_rails` gem

[source,bash]
----
gem install rubocop-rspec_rails
gem install rubocop-rspec rubocop-rspec_rails
----

or if you use bundler put this in your `Gemfile`

[source,ruby]
----
gem 'rubocop-rspec_rails'
gem 'rubocop-rspec', require: false
gem 'rubocop-rspec_rails', require: false
----
1 change: 0 additions & 1 deletion rubocop-rspec_rails.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,4 @@ Gem::Specification.new do |spec|
}

spec.add_runtime_dependency 'rubocop', '~> 1.40'
spec.add_runtime_dependency 'rubocop-rspec', '~> 2.27'
end