softlayer_messaging 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,9 +7,9 @@ module SoftLayer
7
7
  end
8
8
 
9
9
  def load_endpoint
10
- JSON.parse(
11
- File.open(File.join(File.dirname(File.expand_path(__FILE__)), '../../resources/config.json'), "r").read,
12
- :symbolize_names => true)[:endpoints]
10
+ f = File.open(File.join(File.dirname(File.expand_path(__FILE__)),
11
+ '../../resources/config.json'), "r")
12
+ JSON.parse(f.read)['endpoints']
13
13
  end
14
14
  end
15
15
 
@@ -6,10 +6,10 @@ module SoftLayer::Messaging
6
6
  attr_accessor :auth, :resource
7
7
  def initialize(account, options={})
8
8
  @account = account
9
- options[:datacenter] ||= :dal05
10
- options[:network] ||= :public
9
+ options[:datacenter] ||= 'dal05'
10
+ options[:network] ||= 'public'
11
11
  if not options[:endpoint]
12
- options[:endpoint] = "https://#{SoftLayer.endpoints[options[:datacenter]][options[:network]]}"
12
+ options[:endpoint] = "https://#{SoftLayer.endpoints[options[:datacenter].to_s][options[:network].to_s]}"
13
13
  end
14
14
  @base_resource = RestClient::Resource.new(options[:endpoint])
15
15
  @endpoint = "#{options[:endpoint]}/v1/#{account}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: softlayer_messaging
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: