notifiable-core 0.1.2 → 0.1.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 984fc84ebc977d8c8fa0cb5e4136619c0701efd5c122dad1e3e2f7d67e256b9c
4
- data.tar.gz: 1966c421a2c3f7f146b1b6232755e59d0011276e92fbde6299056399eddf1e9a
3
+ metadata.gz: 168bcc6951c9034d4d764b3450636ad3d29d2b9b0ef2f3c6006540ee14b5ad98
4
+ data.tar.gz: 113f00a07fcec019617f374397e61364d54547370455ac9e8449d729595a57e8
5
5
  SHA512:
6
- metadata.gz: 4d6a71178f525ba4565ff504baf9691865229339f8142cfd5be0d1611e794b5aff17b2ec0cbf6a2e4ff06ca6bf11beefb15e099ba648171fdad9c011ea974b3b
7
- data.tar.gz: d3281079cf2d906c29df4f1d9eb9d7ab7eb48643c8777483bfc934796f56d7afccc89d027b985020093f64f5779adf237432c30ca88bbf3037187de79841f09b
6
+ metadata.gz: 205fea17555043f1bae8572a3857ce4f8415c4fb6fd5421433047b3df15bb04234f07c7381d6f9fc39dacf70aab14c32bbade60032599bcce8712f012441bd43
7
+ data.tar.gz: f0fdfec5cc6ee40a34e3af5d9c8fc4986369ddc9201f9f8bdab59cc1b58fb89f57e1510b273962beee4983d9271855c6ffa04e5d4e7653414b16a3c47d65a9be
@@ -3,6 +3,8 @@ require 'logger'
3
3
 
4
4
  module Notifiable
5
5
  class NotifierBase
6
+ OK_STATUS = 0
7
+
6
8
  attr_reader :env, :notification
7
9
 
8
10
  def self.notifier_attribute(*vars)
@@ -41,7 +43,7 @@ module Notifiable
41
43
 
42
44
  def flush; end
43
45
 
44
- def processed(device_token, status, error_message = nil)
46
+ def processed(device_token, status = OK_STATUS, error_message = nil)
45
47
  if @notification.app.save_notification_statuses
46
48
  receipts << { notification_id: notification.id, device_token_id: device_token.id, status: status, created_at: DateTime.now, error_message: error_message }
47
49
  save_receipts if receipts.count >= Notifiable.notification_status_batch_size
@@ -1,3 +1,3 @@
1
1
  module Notifiable
2
- VERSION = '0.1.2'.freeze
2
+ VERSION = '0.1.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: notifiable-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Brooke-Smith