algolia / algolia/frontman

Add ability to monkey patch frontman / global_require

Open
#27 6 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Ruby
Stars
112
Forks
2
PR merge metrics
No merged PRs in 30d

Description

Its pretty difficult to monkey patch frontman. Currently I am using the following technique at the top of my config file.

```ruby
# config.rb

::Frontman::App.class_eval do
def import_config(path)
eval File.read(path)
end
end
```

It would be nice if this could be extracted to another file somehow. The problem here is that the context is within `Frontman::App`. Maybe we could have a method like `global_require` that requires files from the global context.

Contributor guide

Open the contributing guide

Research direction

Start with config.rb and the Frontman::App#import_config override shown in the issue, then trace how configuration files are loaded and evaluated. Done means an extracted file can be loaded from the global context without requiring the inline monkey patch; the issue does not name a test to run.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.