spaceship/lib/spaceship/base.rb in fastlane-2.68.2 vs spaceship/lib/spaceship/base.rb in fastlane-2.69.0.beta.20171201010003
- old
+ new
@@ -189,12 +189,12 @@
# Example:
#
# Certificate.factory(attrs)
# #=> #<PushCertificate ... >
#
- def factory(attrs, existing_client = nil)
- self.new(attrs, existing_client)
+ def factory(attrs)
+ self.new(attrs)
end
end
##
# @return (Spaceship::Client) The current spaceship client used by the model to make requests.
@@ -208,15 +208,15 @@
##
# The initialize method accepts a parsed response from Apple and sets all
# attributes that are defined by `attr_mapping`
#
# Do not override `initialize` in your own models.
- def initialize(attrs = {}, existing_client = nil)
+ def initialize(attrs = {})
attrs.each do |key, val|
self.send("#{key}=", val) if respond_to?("#{key}=")
end
self.raw_data = DataHash.new(attrs)
- @client = existing_client || self.class.client
+ @client = self.class.client
self.setup
end
# This method can be used by subclasses to do additional initialisation
# using the `raw_data`