action_kit_api 0.1.10 → 0.1.11
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.
@@ -72,21 +72,14 @@ module ActionKitApi
|
|
72
72
|
return nil
|
73
73
|
end
|
74
74
|
|
75
|
-
def self.call(command, args
|
75
|
+
def self.call(command, args)
|
76
76
|
raise NoConnection if @@connection.nil?
|
77
77
|
|
78
78
|
# XMLRPC::Client doesn't flush it's IO buffer which occasionally
|
79
79
|
# causes a second command on the same connection to fail with an
|
80
80
|
# EOFError. Using the _async version of this causes XMLRPC::Client
|
81
81
|
# to use a new connection each time eliminating this issue
|
82
|
-
|
83
|
-
@@connection.call_async(command, args)
|
84
|
-
rescue RuntimeError => exception
|
85
|
-
puts command
|
86
|
-
puts args
|
87
|
-
puts exception.inspect
|
88
|
-
raise exception
|
89
|
-
end
|
82
|
+
@@connection.call_async(command, args)
|
90
83
|
end
|
91
84
|
|
92
85
|
def self.version
|
@@ -6,7 +6,7 @@ module ActionKitApi
|
|
6
6
|
|
7
7
|
class ApiDataModel
|
8
8
|
def initialize(hash = {})
|
9
|
-
@required_attrs
|
9
|
+
@required_attrs ||= []
|
10
10
|
|
11
11
|
self.update(hash)
|
12
12
|
end
|
@@ -18,7 +18,8 @@ module ActionKitApi
|
|
18
18
|
|
19
19
|
# TODO: Add blacklisting to the model to prevent read-only attributes from syncing
|
20
20
|
# this is a temporary fix.
|
21
|
-
hash = self.to_hash
|
21
|
+
hash = self.to_hash
|
22
|
+
hash.delete("subscription_status")
|
22
23
|
response = ActionKitApi::Connection.call("#{class_name}.save_or_create", hash)
|
23
24
|
|
24
25
|
# Update ourselves to include the data that the server populated
|