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 application.local.yml support #49

Closed
wants to merge 1 commit into from
Closed

Add application.local.yml support #49

wants to merge 1 commit into from

Conversation

ppworks
Copy link

@ppworks ppworks commented Apr 23, 2013

Add "application.local.yml" support like a 'rails_config'

@laserlemon
Copy link
Owner

What value does this add?

@ppworks
Copy link
Author

ppworks commented Apr 23, 2013

If you have OAuth credential in ENV like ENV['FB_APP_SECRET']
you can push 'config/application.yml' to public remote repository.
But can put your real credential into local disc and produciton server.

  • config/application.yml for public
FB_APP_SECRET: 'dumy credential'
  • config/application.local.yml for local or production
FB_APP_SECRET: 'your real credential'

and add .gitignore

config/application.local.yml

@laserlemon
Copy link
Owner

I see. The usefulness you're describing for application.local.yml is actually Figaro's intention for application.yml. Figaro's generator automatically Git-ignores application.yml for this reason. My workflow has been to commit an application.example.yml to my repository containing dummy values and comments as to which values are applicable to application.yml.

In an effort to simplify configuration management to the one application.yml file, I'm going to close the issue. But please feel free to continue the discussion here.

@laserlemon laserlemon closed this Apr 23, 2013
@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 5d60346 on ppworks:merge_local_yaml into 61a4bd3 on laserlemon:master.

@Sinetheta
Copy link

The problem with application.example.yml is that your local setup then quickly falls out of date. I imagine we all add some form of the following to our bin/setup

  unless File.exist?("config/application.yml")
    system "cp config/application.yml.example config/application.yml"
  end

Which is great for a first install, but then you have to manually pull in changes from the example config forever forwards.

Alternatively, we could ignore application.local.yml and encourage people to check in application.yml as their "default values". No project setup required, the onus is now on environments which want to add overrides.

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

4 participants