Sha256: a03fefe4594dc7518f9a4f20fa3236f07ee25e19f677628336aa3cf0ae9b6473
Contents?: true
Size: 1.17 KB
Versions: 1
Compression:
Stored size: 1.17 KB
Contents
# allow this to be used outside of full Rails init this_dir = File.dirname(__FILE__) $: << this_dir unless $:.include?(this_dir) #require 'faster_csv' require 'yaml' require 'hashie' require 'core_ext' require 'trigga/param_fu' require 'net_helper' #require 'trigga/param_fu' Dir[File.join(File.dirname(File.expand_path(__FILE__)),"admin_api_client","proxies","*.rb")].each {|f| require f } Dir[File.join(File.dirname(File.expand_path(__FILE__)),"admin_api_client","*.rb")].each {|f| require f } # load configuration unless defined? RAILS_ENV RAILS_ENV = ENV['RAILS_ENV'] || ENV['RACK_ENV'] || "development" end Itrigga.add_log_line("", true) Itrigga.add_log_line(" iTrigga Admin Client API") Itrigga.add_log_line("", true) begin plugin_configuration_file = ENV['TRIGGA_ADMIN_API_CLIENT_CONFIG_FILE'] || File.join(File.dirname(File.expand_path(__FILE__)),"..","..","configuration.yml") TRIGGA_ADMIN_API_CLIENT_CONFIG = Hashie::Mash.new(YAML.load_file(plugin_configuration_file)[RAILS_ENV]) rescue Exception => e Itrigga.add_log_line("...disabled => Unable to load Admin Client API configuration from #{plugin_configuration_file}.\n") Itrigga.add_log_line("Exception: #{e.message}") end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
itrigga-admin_api_client-0.2.0 | lib/itrigga/admin_api_client.rb |