Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

[CLI::Gem] Add a --rubocop option #6455

Merged
1 commit merged into from
Nov 8, 2019
Merged

Conversation

segiddins
Copy link
Member

Based upon #6451.

What was the end-user problem that led to this PR?

The problem was I always have to remember how to add RuboCop to my Rakefile when I set up a new gem.

What was your diagnosis of the problem?

My diagnosis was that RuboCop has become enough of a community standard that it makes sense to offer it in bundle gem.

What is your fix for the problem, implemented in this PR?

My fix adds an option to bundle gem to add in RuboCop, in the same way options like :cocand :mit are handled.

Why did you choose this fix out of the possible options?

I chose this fix because it does not require bundler have an opinion on how rubocop is configured.

@colby-swandale
Copy link
Member

Great!! @bundlerbot r+

@bundlerbot
Copy link
Collaborator

📌 Commit d3275e8 has been approved by colby-swandale

@bundlerbot
Copy link
Collaborator

⌛ Testing commit d3275e8 with merge 5e07c2b...

bundlerbot added a commit that referenced this pull request Apr 15, 2018
…colby-swandale

[CLI::Gem] Add a --rubocop option

Based upon #6451.

### What was the end-user problem that led to this PR?

The problem was I always have to remember how to add RuboCop to my Rakefile when I set up a new gem.

### What was your diagnosis of the problem?

My diagnosis was that RuboCop has become enough of a community standard that it makes sense to offer it in `bundle gem`.

### What is your fix for the problem, implemented in this PR?

My fix adds an option to `bundle gem` to add in RuboCop, in the same way options like `:coc`and `:mit` are handled.

### Why did you choose this fix out of the possible options?

I chose this fix because it does not require bundler have an opinion on _how_ rubocop is configured.
@colby-swandale colby-swandale added this to the 1.17.0 milestone Apr 15, 2018
@bundlerbot
Copy link
Collaborator

💔 Test failed - status-travis

@colby-swandale
Copy link
Member

Oh, i didn't notice the failing specs

@segiddins
Copy link
Member Author

I think this just needs a rebase?

@segiddins segiddins force-pushed the segiddins/bundle-gem-rubocop-option branch from d3275e8 to ea6d542 Compare April 16, 2018 15:14
@colby-swandale
Copy link
Member

This looks like it's rebased with some other commits it shouldn't have.

@segiddins
Copy link
Member Author

Nah I just need to rebase the other branch, I think

@colby-swandale
Copy link
Member

Oh i didn't notice that this wasn't going into master.

@segiddins segiddins force-pushed the segiddins/bundle-gem-version-file branch from 880d379 to ea0a09b Compare April 19, 2018 03:49
@segiddins
Copy link
Member Author

Rebased segiddins/bundle-gem-version-file

@@ -0,0 +1 @@
0.1.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought it would be better to add a newline for EOF.

@segiddins segiddins force-pushed the segiddins/bundle-gem-version-file branch from ea0a09b to 225c68e Compare May 1, 2018 05:02
@bundlerbot
Copy link
Collaborator

☔ The latest upstream changes (presumably 225c68e) made this pull request unmergeable. Please resolve the merge conflicts.

@segiddins segiddins force-pushed the segiddins/bundle-gem-rubocop-option branch from ea6d542 to 2df9564 Compare May 1, 2018 05:05
@segiddins
Copy link
Member Author

@indirect r?

@indirect
Copy link
Member

indirect commented Jun 4, 2018

looks good, @bundlerbot r+

@bundlerbot
Copy link
Collaborator

📌 Commit 2df9564 has been approved by indirect

@bundlerbot
Copy link
Collaborator

⌛ Testing commit 2df9564 with merge 29d5f65...

bundlerbot added a commit that referenced this pull request Jun 4, 2018
…indirect

[CLI::Gem] Add a --rubocop option

Based upon #6451.

### What was the end-user problem that led to this PR?

The problem was I always have to remember how to add RuboCop to my Rakefile when I set up a new gem.

### What was your diagnosis of the problem?

My diagnosis was that RuboCop has become enough of a community standard that it makes sense to offer it in `bundle gem`.

### What is your fix for the problem, implemented in this PR?

My fix adds an option to `bundle gem` to add in RuboCop, in the same way options like `:coc`and `:mit` are handled.

### Why did you choose this fix out of the possible options?

I chose this fix because it does not require bundler have an opinion on _how_ rubocop is configured.
@bundlerbot
Copy link
Collaborator

💔 Test failed - status-travis

@segiddins
Copy link
Member Author

@bundlerbot retry

@bundlerbot
Copy link
Collaborator

⌛ Testing commit 2df9564 with merge d2480e2...

bundlerbot added a commit that referenced this pull request Jun 4, 2018
…indirect

[CLI::Gem] Add a --rubocop option

Based upon #6451.

### What was the end-user problem that led to this PR?

The problem was I always have to remember how to add RuboCop to my Rakefile when I set up a new gem.

### What was your diagnosis of the problem?

My diagnosis was that RuboCop has become enough of a community standard that it makes sense to offer it in `bundle gem`.

### What is your fix for the problem, implemented in this PR?

My fix adds an option to `bundle gem` to add in RuboCop, in the same way options like `:coc`and `:mit` are handled.

### Why did you choose this fix out of the possible options?

I chose this fix because it does not require bundler have an opinion on _how_ rubocop is configured.
@bundlerbot
Copy link
Collaborator

💔 Test failed - status-travis

@colby-swandale
Copy link
Member

@bundlerbot retry

@bundlerbot
Copy link
Collaborator

⌛ Testing commit 2df9564 with merge 6803e0e...

@deivid-rodriguez
Copy link
Member

Only changes I made is pointing this PR to master, and adding some missing spaces to the CLI message.

@deivid-rodriguez
Copy link
Member

1.8.7 matrix entry failed, not sure why. I restarted it.

@@ -54,4 +54,7 @@ Gem::Specification.new do |spec|
<%- if config[:test] -%>
spec.add_development_dependency "<%= config[:test] %>", "~> <%= config[:test_framework_version] %>"
<%- end -%>
<%- if config[:rubocop] -%>
spec.add_development_dependency "rubocop"
<%- end -%>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth also to add rubocop-rspec if chosen test framework is rspec IMO

@colby-swandale
Copy link
Member

This is going to have to wait for bundler 2 to be released before we can merge it. For some reason the ruby parser in 1.8.7 is locking up in Bundler::UI:Shell#yes?

@colby-swandale
Copy link
Member

This should be ok to merge now. I can work on getting this over the line.

Copy link
Member

@simi simi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

lib/bundler/cli/gem.rb Outdated Show resolved Hide resolved
@deivid-rodriguez
Copy link
Member

@colby-swandale, are you still planning to wrap up this PR? I can follow up if you are very busy 👍.

@deivid-rodriguez deivid-rodriguez force-pushed the segiddins/bundle-gem-rubocop-option branch from 82faeba to 1d2d5b0 Compare October 2, 2019 09:02
@deivid-rodriguez deivid-rodriguez force-pushed the segiddins/bundle-gem-rubocop-option branch from 1d2d5b0 to 0448ad5 Compare October 3, 2019 15:17
ghost pushed a commit that referenced this pull request Oct 7, 2019
7373: Refactor new gem specs r=deivid-rodriguez a=deivid-rodriguez

### What was the end-user problem that led to this PR?

The problem was that I rebased #6455 and I had trouble getting the specs to pass.

### What was your diagnosis of the problem?

My diagnosis was that the new gemspecs could use a refactor.

### What is your fix for the problem, implemented in this PR?

My fix is to refactor these specs so that they are easier to read and modify.

Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
@deivid-rodriguez deivid-rodriguez force-pushed the segiddins/bundle-gem-rubocop-option branch from 0448ad5 to 2210cad Compare October 12, 2019 14:45
@deivid-rodriguez deivid-rodriguez force-pushed the segiddins/bundle-gem-rubocop-option branch from 2210cad to f821c75 Compare October 19, 2019 18:28
@deivid-rodriguez
Copy link
Member

@colby-swandale Forgot to mention that I updated this PR and it should be finally ready, in case you want to have a look at it before merging.

@deivid-rodriguez deivid-rodriguez removed this from the 3.0 — Breaking Changes milestone Nov 6, 2019
deivid-rodriguez pushed a commit that referenced this pull request Nov 7, 2019
7373: Refactor new gem specs r=deivid-rodriguez a=deivid-rodriguez

### What was the end-user problem that led to this PR?

The problem was that I rebased #6455 and I had trouble getting the specs to pass.

### What was your diagnosis of the problem?

My diagnosis was that the new gemspecs could use a refactor.

### What is your fix for the problem, implemented in this PR?

My fix is to refactor these specs so that they are easier to read and modify.

Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net>
(cherry picked from commit 6ceec55)
@deivid-rodriguez
Copy link
Member

@bundlerbot merge

ghost pushed a commit that referenced this pull request Nov 8, 2019
6455: [CLI::Gem] Add a --rubocop option r=deivid-rodriguez a=segiddins

Based upon #6451.

### What was the end-user problem that led to this PR?

The problem was I always have to remember how to add RuboCop to my Rakefile when I set up a new gem.

### What was your diagnosis of the problem?

My diagnosis was that RuboCop has become enough of a community standard that it makes sense to offer it in `bundle gem`.

### What is your fix for the problem, implemented in this PR?

My fix adds an option to `bundle gem` to add in RuboCop, in the same way options like `:coc`and `:mit` are handled.

### Why did you choose this fix out of the possible options?

I chose this fix because it does not require bundler have an opinion on _how_ rubocop is configured.

Co-authored-by: Samuel Giddins <segiddins@segiddins.me>
@ghost
Copy link

ghost commented Nov 8, 2019

Build succeeded

@ghost ghost merged commit f821c75 into master Nov 8, 2019
@ghost ghost deleted the segiddins/bundle-gem-rubocop-option branch November 8, 2019 21:45
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants