Sha256: 09a6fc8fc2cdf272e6bb276a38387c5a58eaf2e78e4b62831580cc4056ae7e40
Contents?: true
Size: 665 Bytes
Versions: 7
Compression:
Stored size: 665 Bytes
Contents
class DoiConfig @@config_info, @@url = nil def self.configure @@config_info ||= YAML.load(File.open(File.join(Rails.root, "config/doi.yml"))) end def self.username configure[Rails.env]['username'] end def self.password configure[Rails.env]['password'] end def self.shoulder configure[Rails.env]['shoulder'] end def self.url_for_creating_doi @@url_for_creating_doi ||= "#{configure[Rails.env]['url'].sub("://", "://#{username}:#{password}@")}shoulder/#{shoulder}" end def self.url_for_updating_doi @@url_for_updating_doi ||= "#{configure[Rails.env]['url'].sub("://", "://#{username}:#{password}@")}id/" end end
Version data entries
7 entries across 7 versions & 1 rubygems