Skip to content

Commit

Permalink
fixed issue with dmphub config
Browse files Browse the repository at this point in the history
  • Loading branch information
briri committed Feb 10, 2021
1 parent 903def0 commit 78d30c3
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions config/initializers/external_apis/dmphub.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,19 @@
# Credentials for minting DOIs via a DMPHub system: https://github.com/CDLUC3/dmphub
# To disable this feature, simply set 'active' to false
Rails.configuration.x.dmphub.landing_page_url = "https://doi.org/"
Rails.configuration.x.dmphub.api_base_url = "http://localhost:3001/api/v0/" # "https://dmphub-stg.cdlib.org/api/v0/"
Rails.configuration.x.dmphub.auth_path = "authenticate"
Rails.configuration.x.dmphub.mint_path = "data_management_plans"
Rails.configuration.x.dmphub.update_path = "data_management_plans"
Rails.configuration.x.dmphub.delete_path = "data_management_plans"

Rails.configuration.x.dmphub.client_id = "E0rukf2HM3DuQbWESclCzddYOY9j44ZJkflwoKhM6vM" # Rails.application.credentials.dmphub[:client_id]
Rails.configuration.x.dmphub.client_secret = "H3YtnycXQfFH6Lxbx7Sbazsx-DNKij8Z3Nsndfe4g6I" # Rails.application.credentials.dmphub[:client_secret]
if Rails.env.development?
Rails.configuration.x.dmphub.api_base_url = "http://localhost:3001/api/v0/"
Rails.configuration.x.dmphub.client_id = "E0rukf2HM3DuQbWESclCzddYOY9j44ZJkflwoKhM6vM"
Rails.configuration.x.dmphub.client_secret = "H3YtnycXQfFH6Lxbx7Sbazsx-DNKij8Z3Nsndfe4g6I"
else
Rails.configuration.x.dmphub.api_base_url = ENV["DMPHUB_URL"]
Rails.configuration.x.dmphub.client_id = Rails.application.credentials.dmphub[:client_id]
Rails.configuration.x.dmphub.client_secret = Rails.application.credentials.dmphub[:client_secret]
end

Rails.configuration.x.dmphub.active = true

0 comments on commit 78d30c3

Please sign in to comment.