Sha256: 71e069e7312bd818e8c738f6c18e43d0dc3b7cb502c43c35c4697fad080f0cfe

Contents?: true

Size: 616 Bytes

Versions: 7

Compression:

Stored size: 616 Bytes

Contents

require 'settingslogic'

# Class representing OneacctExport settings
class Settings < Settingslogic
  CONF_NAME = 'conf.yml'

  # three possible configuration file locations in order by preference
  # if configuration file is found rest of the locations are ignored
  source "#{ENV['HOME']}/.oneacct-export/#{CONF_NAME}"\
    if File.exist?("#{ENV['HOME']}/.oneacct-export/#{CONF_NAME}")
  source "/etc/oneacct-export/#{CONF_NAME}"\
    if File.exist?("/etc/oneacct-export/#{CONF_NAME}")
  source "#{File.dirname(__FILE__)}/../config/#{CONF_NAME}"

  namespace ENV['RAILS_ENV'] ? ENV['RAILS_ENV'] : 'production'
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
oneacct-export-0.5.0 lib/settings.rb
oneacct-export-0.4.6 lib/settings.rb
oneacct-export-0.4.5 lib/settings.rb
oneacct-export-0.4.4 lib/settings.rb
oneacct-export-0.4.3 lib/settings.rb
oneacct-export-0.4.2 lib/settings.rb
oneacct-export-0.3.0 lib/settings.rb