lib/spaceship/portal/certificate.rb in spaceship-0.4.0 vs lib/spaceship/portal/certificate.rb in spaceship-0.5.0

- old
+ new

@@ -128,11 +128,11 @@ "3T2ZP62QW8" => WebsitePush, "E5D663CMZW" => WebsitePush, "4APLUP237T" => ApplePay } - #class methods + # Class methods class << self # Create a new code signing request that can be used to # generate a new certificate # @example # Create a new certificate signing request @@ -179,12 +179,14 @@ attrs.merge!(attrs['certificateType']) attrs.delete('certificateType') end # Parse the dates + # rubocop:disable Style/RescueModifier attrs['expirationDate'] = (Time.parse(attrs['expirationDate']) rescue attrs['expirationDate']) attrs['dateCreated'] = (Time.parse(attrs['dateCreated']) rescue attrs['dateCreated']) + # rubocop:enable Style/RescueModifier # Here we go klass = CERTIFICATE_TYPE_IDS[attrs['certificateTypeDisplayId']] klass ||= Certificate klass.client = @client @@ -263,11 +265,13 @@ def revoke! client.revoke_certificate!(id, type_display_id) end # @return (Bool): Is this certificate a push profile for apps? + # rubocop:disable Style/PredicateName def is_push? self.kind_of? PushCertificate end + # rubocop:enable Style/PredicateName end end end