lib/dashx/client.rb in dashx-0.1.2 vs lib/dashx/client.rb in dashx-0.1.3

- old
+ new

@@ -46,15 +46,15 @@ self.class.headers(headers) end def deliver(urn, parcel) - options = if urn.is_a? String && parcel != nil + options = if urn.is_a?(String) && parcel != nil symbolize_keys! parcel check_presence!(parcel[:to], 'Recipient (:to)') - contentTypeIdentifier, contentIdentifier = urn.split('/', 1) + contentTypeIdentifier, contentIdentifier = urn.split(/\//, 2) { contentTypeIdentifier: contentTypeIdentifier, contentIdentifier: contentIdentifier, attachments: [], @@ -72,10 +72,10 @@ end def identify(uid, options) symbolize_keys! options - params = if uid.is_a? String && options != nil + params = if uid.is_a?(String) && options != nil { uid: uid }.merge(options) else { anonymousUid: SecureRandom.uuid }.merge(uid) end