softlayer / softlayer-ruby

http://softlayer.github.io/softlayer-ruby/
MIT License
54 stars 35 forks source link

V3.0: Removing explicit receiver for private method calls in VirtualServerUpgradeOrder(verify, place_order!) #90

Closed thejohnlin closed 9 years ago

thejohnlin commented 9 years ago

In order to resolve a NoMethodError when placing or verifying a VirtualServerUpgradeOrder, I removed the "self" receivers from the verify, place_order!, and _item_price_with_capacity methods in VirtualServerUpgradeOrder.rb.

To reproduce, please review this sample:

vg_upgrade_order = SoftLayer::VirtualServerUpgradeOrder.new(vg)
vg_upgrade_order.ram = 4
vg_upgrade_order.place_order!

The stack dump is provided below:


c:/Ruby193/lib/ruby/gems/1.9.1/gems/softlayer_api-3.0.1/lib/softlayer/VirtualServerUpgradeOrder.rb:69:in `place_order!': private method `order_object' called for #<SoftLayer::VirtualServerUpgradeOrder:0x3cd2510> (NoMetho
dError)
        from c:/Users/IBM_ADMIN/workspace/john-v3-softlayer-api-wrapper_src/bin/sl_cli.rb:50:in `upgrade'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.19.1/lib/thor/invocation.rb:115:in `invoke'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.19.1/lib/thor.rb:235:in `block in subcommand'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
        from c:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
        from sl:4:in `<main>'
coveralls commented 9 years ago

Coverage Status

Coverage remained the same at 99.76% when pulling bd690a50a77313e7f07d0f66e98444ceee074dc1 on thejohnlin:v3.0 into e045720bf2c5c7cd40479fd402e20b1234723951 on softlayer:master.

coveralls commented 9 years ago

Coverage Status

Coverage remained the same at 99.76% when pulling bd690a50a77313e7f07d0f66e98444ceee074dc1 on thejohnlin:v3.0 into e045720bf2c5c7cd40479fd402e20b1234723951 on softlayer:master.