Skip to content

Commit

Permalink
app.datacite.org to api.datacite.org
Browse files Browse the repository at this point in the history
  • Loading branch information
richardhallett committed Nov 23, 2018
1 parent 22f6309 commit 95fbc38
Show file tree
Hide file tree
Showing 35 changed files with 1,333 additions and 1,268 deletions.
65 changes: 65 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [

{
"name": "Debug Local File",
"type": "Ruby",
"request": "launch",
"cwd": "${workspaceRoot}",
"program": "${workspaceRoot}/main.rb"
},
{
"name": "Listen for rdebug-ide",
"type": "Ruby",
"request": "attach",
"cwd": "${workspaceRoot}",
"remoteHost": "127.0.0.1",
"remotePort": "1234",
"remoteWorkspaceRoot": "${workspaceRoot}"
},
{
"name": "Rails server",
"type": "Ruby",
"request": "launch",
"cwd": "${workspaceRoot}",
"program": "${workspaceRoot}/bin/rails",
"args": [
"server"
]
},
{
"name": "RSpec - all",
"type": "Ruby",
"request": "launch",
"cwd": "${workspaceRoot}",
"program": "${workspaceRoot}/bin/rspec",
"args": [
"-I",
"${workspaceRoot}"
]
},
{
"name": "RSpec - active spec file only",
"type": "Ruby",
"request": "launch",
"cwd": "${workspaceRoot}",
"program": "${workspaceRoot}/bin/rspec",
"args": [
"-I",
"${workspaceRoot}",
"${file}"
]
},
{
"name": "Cucumber",
"type": "Ruby",
"request": "launch",
"cwd": "${workspaceRoot}",
"program": "${workspaceRoot}/bin/cucumber"
}
]
}
2 changes: 1 addition & 1 deletion app/controllers/concerns/helpable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def get_handle_url(id: nil)
# content-types registered for that DOI
def get_registered_content_types(id)
doi = doi_from_url(id)
media_url = Rails.env.production? ? "https://app.datacite.org" : "https://app.test.datacite.org"
media_url = Rails.env.production? ? "https://api.datacite.org" : "https://api.test.datacite.org"
media_url += "/dois/#{doi}/media"
response = Maremma.get media_url
response.body.fetch("data", []).reduce({}) do|sum, media|
Expand Down
Loading

0 comments on commit 95fbc38

Please sign in to comment.