This repository has been archived by the owner on Jan 18, 2022. It is now read-only.
forked from ruby-protobuf/protobuf
-
Notifications
You must be signed in to change notification settings - Fork 1
Remove ActiveSupport #2
Open
ZimbiX
wants to merge
19
commits into
cucumber-attic:3-10-cucumber
Choose a base branch
from
greensync:remove-activesupport
base: 3-10-cucumber
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Remove ActiveSupport #2
ZimbiX
wants to merge
19
commits into
cucumber-attic:3-10-cucumber
from
greensync:remove-activesupport
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…_ext/module/aliasing'
…nstantize, and #classify
… with simple Time.now maths
…ext/hash/reverse_merge'
…veSupport::Deprecation when present
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves cucumber/common#1096.
In an app, I would normally use Facets for these kinds of methods, as it lets you require just the methods you need. But in a gem, it's not good practice to monkeypatch core classes, as the changed functionality leaks into gems and apps which depend on it; in fact, this broke our app when we upgraded to Cucumber 4+; hence the PR.
I found refinements to be a handy way to provide the core class extension functionality just in the scope of the file they're used in, without leaking it. But it does mean copying in code from ActiveSupport / Facets. In each instance, I chose the leaner code.
There are a few things that could use some work, but this is a start, and it at least drops the ActiveSupport requirement and gets our app working with the latest Cucumber: