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

Enable rubyconfig to work with array ENV variables #6029

Merged
merged 1 commit into from
Sep 10, 2024

Conversation

cjcolvar
Copy link
Member

With this flag set environment variables with sequential suffixes can be used to set array Settings.

For example,

export SETTINGS__BIB_RETRIEVER__DEFAULT__QUERY__0="cql.serverChoice='^C%{bib_id}'"
export SETTINGS__BIB_RETRIEVER__DEFAULT__QUERY__1="cql.serverChoice exact '%{bib_id}'"
export SETTINGS__BIB_RETRIEVER__DEFAULT__QUERY__2="cql.serverChoice='%{bib_id}'"

will result in

Settings.bib_retriever.default.query
# ["cql.serverChoice='^C%{bib_id}'", "cql.serverChoice exact '%{bib_id}'", "cql.serverChoice='%{bib_id}'"]

With this flag set environment variables with sequential suffixes can be used to set array Settings.

For example,
```
export SETTINGS__BIB_RETRIEVER__DEFAULT__QUERY__0="cql.serverChoice='^C%{bib_id}'"
export SETTINGS__BIB_RETRIEVER__DEFAULT__QUERY__1="cql.serverChoice exact '%{bib_id}'"
export SETTINGS__BIB_RETRIEVER__DEFAULT__QUERY__2="cql.serverChoice='%{bib_id}'"
```
will result in
```
Settings.bib_retriever.default.query
# ["cql.serverChoice='^C%{bib_id}'", "cql.serverChoice exact '%{bib_id}'", "cql.serverChoice='%{bib_id}'"]
```
@cjcolvar cjcolvar merged commit 0925315 into develop Sep 10, 2024
2 checks passed
@cjcolvar cjcolvar deleted the cjcolvar-patch-3 branch September 10, 2024 18:24
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