Skip to content
This repository has been archived by the owner on Mar 23, 2024. It is now read-only.

Enable ERB processing of requirejs.yml #56

Closed
billmag opened this issue Jun 20, 2012 · 3 comments · Fixed by #72
Closed

Enable ERB processing of requirejs.yml #56

billmag opened this issue Jun 20, 2012 · 3 comments · Fixed by #72

Comments

@billmag
Copy link
Contributor

billmag commented Jun 20, 2012

It'd be great to be able to use ERB in the requirejs.yml gem. An example of how to do it is here:
http://urgetopunt.com/rails/2009/09/12/yaml-config-with-erb.html

I looked through a few other gems, Mongoid is a good example of one that is already doing this:

  def load_yaml(path)
    YAML.load(ERB.new(File.new(path).read).result)[env_name]
  end

I can put in a pull request for this if there are no objections.

@jwhitley
Copy link
Owner

@billmag, sounds great. I've done this a bazillion times before; not sure why I didn't clatter out this idiom out of sheer habit already! If you want to send a pull request that'd be greatly appreciated; my current gig is keeping me pretty busy right now.

@billmag
Copy link
Contributor Author

billmag commented Jun 26, 2012

How do you want it tested? It doesn't look like you're using a real .yml file in your current test rig.

@neersighted
Copy link
Contributor

Close this?

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 a pull request may close this issue.

4 participants