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

Unify config.yaml source location in config.ru #3

Open
ravenium opened this issue Oct 16, 2013 · 1 comment
Open

Unify config.yaml source location in config.ru #3

ravenium opened this issue Oct 16, 2013 · 1 comment

Comments

@ravenium
Copy link

Hello,

Since certwriter is pretty intertwined with the rest of r509, it seems only fitting that it should look in the same spot as the rest of r509. Currently, there appears to be a spot to do this in the initialization, but it doesn't appear to be used:

---snip---
def initialize(app, config=nil)
@app = app

            unless config
                @config = YAML.load_file("config.yaml")
            else
                @config = config

--snip---

In config.ru, we have the following:

config_data = File.read("/custom/path/to/our/config.yaml").

It would seem to be a good idea if certwriter would reference this same path when it's called.

@reaperhulk
Copy link
Member

Hi @ravenium, I'm hugely sorry about the delay in responding here. I didn't have notifications configured on this repo!

It's been awhile since I looked at the middleware (I spend more time in r509 itself obviously), but it looks like the config param is only used in the specs as a way to inject the configuration. Can you pass it in when calling use R509::Middleware::CertWriter in the config.ru?

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

No branches or pull requests

2 participants