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

Remove LessThanProc #7030

Merged
4 commits merged into from
Mar 15, 2019
Merged

Remove LessThanProc #7030

4 commits merged into from
Mar 15, 2019

Conversation

deivid-rodriguez
Copy link
Member

@deivid-rodriguez deivid-rodriguez commented Mar 12, 2019

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

The problem was that the LessThanProc class we use for filtering specs is confusing, in my opinion. For example, if I tag a spec with :bundler => "2", I would expect it to run only against bundler 2. However, that's not how it works, it instead runs against any bundler higher than or equal to 2.

What was your diagnosis of the problem?

My diagnosis was that the LessThanProc class could be much simpler, and just check that the passed requirement matches the version the class was created with.

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

My fix is to simplify the LessThanProc class to only do requirement matching, and remove the "less than" functionality.

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

I chose this fix because in my opinion it's simpler to understand and less surprising.

@deivid-rodriguez
Copy link
Member Author

Thanks @colby-swandale!

@bundlerbot r=colby-swandale

ghost pushed a commit that referenced this pull request Mar 15, 2019
7030: Remove `LessThanProc` r=colby-swandale a=deivid-rodriguez

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

The problem was that the `LessThanProc` class we use for filtering specs is confusing, in my opinion. For example, if I tag a spec with `:bundler => "2"`, I would expect it to run only against bundler 2. However, that's not how it works, it instead runs against any bundler higher than or equal to 2. 

### What was your diagnosis of the problem?

My diagnosis was that the `LessThanProc` class could be much simpler, and just check that the passed requirement matches the version the class was created with.

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

My fix is to simplify the `LessThanProc` class to only do requirement matching, and remove the "less than" functionality.

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

I chose this fix because in my opinion it's simpler to understand and less surprising.

Co-authored-by: David Rodríguez <[email protected]>
@ghost
Copy link

ghost commented Mar 15, 2019

Build succeeded

@ghost ghost merged commit 30fa1db into master Mar 15, 2019
@ghost ghost deleted the remove_less_than_proc branch March 15, 2019 12:04
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.

2 participants