Skip to content
This repository has been archived by the owner on Jan 18, 2022. It is now read-only.

Remove ActiveSupport #2

Open
wants to merge 19 commits into
base: 3-10-cucumber
Choose a base branch
from

Conversation

ZimbiX
Copy link

@ZimbiX ZimbiX commented Feb 3, 2021

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:

  • Update the specs to cater for both cases of whether ActiveSupport is present
  • Support showing deprecations when ActiveSupport is not present

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.

1 participant