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

Generalise fallback to default file #936

Merged

Conversation

fjorba
Copy link
Contributor

@fjorba fjorba commented May 14, 2020

There are uses RISM::MARC and RISM::EDITOR_CONFIGURATION all over Muscat, and if a value other than default is defined, the application fails in unsuspected places.

This patch creates a generic function so it falls back to default if a specific file does not exist. I have been using for a while in two different Muscat test instances, one having the default values and another having created a custom value.

fjorba added 3 commits May 3, 2020 16:59
Add a new function get_marc_editor_profile_path in
app/models/config_file_path.rb to wrap all open file calls with RISM::MARC
or RISM::EDITOR_CONFIGURATION configuration values, so that when a specific
file does not exist, fall back to default paths.
@xhero xhero merged commit 3094d3b into rism-digital:develop May 20, 2020
@fjorba fjorba deleted the generalise-fallback-to-default-file branch May 20, 2020 09:28
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