salesking / sk_sdk

SalesKing SDK for creating apps and using the API
https://www.salesking.eu
MIT License
8 stars 2 forks source link

Fixed ActiveResource 3.1 incompatibility #5

Closed mlomnicki closed 13 years ago

mlomnicki commented 13 years ago

ActiveResource 3.1 changed a signature of ActiveResoruce::Base#initialize method from

def initialize(attributes = {})

to

def initialize(attributes = {}, persisted = false)

Therefore SK_SDK which overrides this method is no longer compatible.

.rvm/gems/ruby-1.9.2-p290/gems/sk_sdk-0.0.8/lib/sk_sdk/base.rb:18:in `initialize': wrong number of arguments (2 for 1) (ArgumentError)
    from .rvm/gems/ruby-1.9.2-p290/gems/activeresource-3.1.0/lib/active_resource/base.rb:926:in `new'
    from .rvm/gems/ruby-1.9.2-p290/gems/activeresource-3.1.0/lib/active_resource/base.rb:926:in `instantiate_record

This pull request contains a patch which fixes the incompatibility and gives some love to ActiveResource 3.1.

schorsch commented 13 years ago

was already wondering what had changed, when i ran the specs yesterday