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 block form to Nenv() helper method #3

Merged
merged 1 commit into from
Jan 16, 2015

Conversation

monkbroc
Copy link
Contributor

I added a Ruby-ism to allow using the Nenv(:namespace) helper in block form. It avoids creating a local variable, but mostly I like the way it looks.

Here's how I use it in my application:

Nenv :filepicker do |fp|
  Rails.application.config.filepicker_rails.api_key = fp.api_key
  Rails.application.config.filepicker_rails.cdn_host = "https://#{fp.cdn}"
end

e2 added a commit that referenced this pull request Jan 16, 2015
Add block form to Nenv() helper method
@e2 e2 merged commit e5dd87c into e2:master Jan 16, 2015
@e2
Copy link
Owner

e2 commented Jan 16, 2015

Absolutely beautiful PR request!

@coveralls
Copy link

Coverage Status

Coverage increased (+0.88%) when pulling f47d908 on monkbroc:namespace-block-form into 58ce856 on e2:master.

@monkbroc
Copy link
Contributor Author

Thanks! I love the gem. I have been feeling a wrongness about having to check for == 'true' or == 'yes' against environment variables. Very non-Ruby. Nice work coming up with a beautiful DSL!

@e2
Copy link
Owner

e2 commented Jan 16, 2015

I like this so much I released 0.2.0. Thanks so much again!

@monkbroc
Copy link
Contributor Author

👍

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

3 participants