-
Notifications
You must be signed in to change notification settings - Fork 52
Common search for .roast
#134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
df61907
to
a47fb85
Compare
.roast
77edb32
to
ae911e1
Compare
- Added a higher level `Roast::Config` which currently just has a `root` method - Factored initializers and cache out into their own bits of Roast::Config
More obvious this way.
ae911e1
to
db087bc
Compare
@nfgrep progress? |
@nfgrep progress?
Yup! Core functionality works, need to polish and publish out of draft now.
|
module DotRoast | ||
class << self | ||
def root(starting_path = Dir.pwd, ending_path = File.dirname(Dir.home)) | ||
unless starting_path.start_with?(ending_path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The lack of this was a bug in the prev code, pwd wasn't under HOME, you'd end up hanging/looping forever.
|
||
if cache_enabled | ||
# Call the original function and pass in the cache | ||
cache = Roast::Helpers::FunctionCache.for_workflow(workflow_configuration.name, workflow_configuration.workflow_path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We used configuration
in the prev code instead of workflow_configuration
which was silently failing to do any function caching, this fixes that.
Closes #135
To fix this, this PR:
Roast::DotRoast
which currently just has aroot
methodBonus:
Cache.for_workflow
to namespace caches by workflow (to avoid any collisions that sharing a .roast might've caused).