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

Pass quick_search_config.yml file through ERB processor #22

Merged
merged 1 commit into from
Aug 23, 2018

Conversation

dsteelma-umd
Copy link
Contributor

The quick_search_config.yml file contains some properties that
might differ on a dev server vs. a production server. For example,
the Best Bets "solr_url" property might point to a dev Solr instance
from a dev server, and a production Solr instance on a production
server.

Is it often convenient to provide such information via environment
variables that are passed into Rails. This pull request modifies
the processing of the config/quick_search_config.yml file to pass
it through the ERB template processor. ERB directives such as
"<%= ENV['SOLR_URL'] %>" can then be added to the file, to enable
environment variables to be utilized.

The quick_search_config.yml file contains some properties that
might differ on a dev server vs. a production server. For example,
the Best Bets "solr_url" property might point to a dev Solr instance
from a dev server, and a production Solr instance on a production
server.

Is it often convenient to provide such information via environment
variables that are passed into Rails. This pull request modifies
the processing of the config/quick_search_config.yml file to pass
it through the ERB template processor. ERB directives such as
"<%= ENV['SOLR_URL'] %>" can then be added to the file, to enable
environment variables to be utilized.
@jronallo jronallo requested a review from kbeswick August 13, 2018 20:14
@kbeswick kbeswick merged commit fe97622 into NCSU-Libraries:master Aug 23, 2018
@kbeswick
Copy link
Member

Looks good to me. We've been using this approach in some of our more recent Rails applications too. Thanks for adding this!

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.

2 participants