jamesn-softlayer-ruby 0.7.0.0 → 0.7.1.0

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.
data/Changes CHANGED
@@ -1,6 +1,10 @@
1
1
 
2
- Changes since 0.6.3
2
+ Changes since 0.7.0
3
+
4
+ account for the off chance we are calling a method and @authHeader is nil in slapiCall
5
+ fix a bug that would cause classes to be nil in declareClasses if we only passed soap service names (not method names as the commit says)
3
6
 
7
+ Changes since 0.6.3
4
8
 
5
9
  Added a CDNLayer sample
6
10
  Refactor slapiCall and realCall to clean up a bit of a mess, fix method parameter handling, and cleans up header handling. There's a bit of an api change here.
data/lib/softlayer.rb CHANGED
@@ -55,6 +55,7 @@ module SoftLayer
55
55
  services = args[:soap]
56
56
  base = args[:base]
57
57
 
58
+ classes = [] if classes.nil?
58
59
  unless (services.nil? || services.empty?)
59
60
  services.each do |s|
60
61
  c = s.gsub(/_/,'::')
@@ -230,7 +230,7 @@ module SoftLayer
230
230
  h = args[:headers]
231
231
  a = args[:args]
232
232
  y = args[:yield]
233
- @slapi.headerhandler << @authHeader unless @slapi.headerhandler.include?(@authHeader)
233
+ @slapi.headerhandler << @authHeader unless (@slapi.headerhandler.include?(@authHeader) || @authHeader.nil?)
234
234
  h.each {|e| @slapi.headerhandler << e }
235
235
  args = []
236
236
  a.each { |k,v| args.push(v) }
@@ -48,16 +48,14 @@ SLAPICLASSES = [ 'SoftLayer::Account', 'SoftLayer::Network::ContentDelivery::Acc
48
48
  SoftLayer::declareClasses(:ruby => SLAPICLASSES)
49
49
  account = SoftLayer::Account.new(:user => AUTH_USER, :key => AUTH_KEY, :initParam => ACCT_ID)
50
50
  account.objectMask={'cdnAccountName' => nil}
51
- cdnacct = nil
52
51
 
53
52
  # Get the accout number by matching the name that was in ARGV[2]
53
+ cdnacct = nil
54
54
  account.getCdnAccounts.each do |c|
55
55
  # pp c
56
56
  cdnacct = SoftLayer::Network::ContentDelivery::Account.new(:initParam => c['id']) if c['cdnAccountName'] == CDN_ACCT
57
57
  end
58
58
 
59
- cdnacct.getPopNames
60
-
61
59
  fname = File.basename(INFILE)
62
60
  # base64 encode the file
63
61
  b64 = [IO.read(INFILE)].pack("m")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jamesn-softlayer-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0.0
4
+ version: 0.7.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Nuckolls