Skip to content
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

Add ERB support for yml config files, cache result of raw_content #121

Closed
wants to merge 2 commits into from
Closed

Add ERB support for yml config files, cache result of raw_content #121

wants to merge 2 commits into from

Conversation

SidOfc
Copy link

@SidOfc SidOfc commented Jun 13, 2017

Added ERB support in ~/.teamocil/*.yml files

This change allows you to write dynamic ruby code within your yml config files.
This means you can base all your commands in your config (to be executed on panes / windows) on a path that is relative to the current directory, using root: <%= Dir.pwd %> for instance.

cache result of raw_content method in lib/layout.rb

This change is simply a side-effect of the above addition, I noticed the method is called multiple times, re-reading the yml file, since I added ERB support I figured it would be nice to cache the result after fetching it :)

Hope you will accept the change, I'll be installing my commit locally for now, cheers for this command line tool, it's fantastic!

@SidOfc
Copy link
Author

SidOfc commented Jun 13, 2017

There seems to be an encoding error coming from the specs, trying to solve it now but I'm probably going to have to look at this some more tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant