Sha256: 0520181bfe49d315b60e6043a929763ce58eca221b6305256c50b040fd574a20

Contents?: true

Size: 1.12 KB

Versions: 2

Compression:

Stored size: 1.12 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

Trigga.add_log_line("", true)
Trigga.add_log_line(" iTrigga Admin Client API")
Trigga.add_log_line("", true)
 
begin
  plugin_configuration_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
  Trigga.add_log_line("...disabled => Unable to load Admin Client API configuration from #{plugin_configuration_file}.\n")
  Trigga.add_log_line("Exception: #{e.message}")
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
itrigga-admin_api_client-0.1.2 lib/trigga/admin_api_client.rb
itrigga-admin_api_client-0.1.1 lib/trigga/admin_api_client.rb