Skip to content

Commit

Permalink
abstract usal api
Browse files Browse the repository at this point in the history
  • Loading branch information
kjgarza committed May 28, 2018
1 parent dbc6a67 commit a3179e0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/concerns/queueable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def queue_report(options={})
end

def report_url
"https://metrics.test.datacite.org/reports/#{uid}"
"#{ENV["USAGE_URL"]}/reports/#{uid}"
end

def sqs
Expand Down
2 changes: 2 additions & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@
ENV['MYSQL_PORT'] ||= "3306"
ENV['TRUSTED_IP'] ||= "10.0.40.1"
ENV['LEVRIERO_URL'] ||= "https://api.datacite.org"
ENV['USAGE_URL'] ||= "https://metrics.datacite.org"


module Sashimi
class Application < Rails::Application
Expand Down
2 changes: 1 addition & 1 deletion spec/rails_helper.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ENV['RAILS_ENV'] = 'test'

ENV['USAGE_URL'] = "https://metrics.test.datacite.org"
# set up Code Climate
require 'simplecov'
SimpleCov.start
Expand Down

0 comments on commit a3179e0

Please sign in to comment.