lib/i2x/client.rb in i2x-0.0.7 vs lib/i2x/client.rb in i2x-0.1
- old
+ new
@@ -7,12 +7,12 @@
# => Load configuration properties from client/script code
#
def initialize config, log
begin
@config = config
- I2X::Config.token = config[:server][:api_key]
- I2X::Config.host = (config[:server][:host].end_with?('/') ? config[:server][:host] : config[:server][:host] << '/')
- I2X::Config.log = log
+ I2X::Config.set_access_token config[:server][:api_key]
+ I2X::Config.set_host config[:server][:host]
+ I2X::Config.set_log log
I2X::Config.log.info(self.class.name) {'Configuration loaded successfully.'}
rescue Exception => e
I2X::Config.log.error(self.class.name) {"Failed to load configuration: #{e}"}
end
\ No newline at end of file