ts_p8push 1.1.0 → 1.1.1
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 +4 -4
 - data/lib/p8push/client.rb +1 -1
 - data/lib/p8push/notification.rb +2 -5
 - data/lib/p8push/version.rb +1 -1
 - data/ts_p8push-1.1.0.gem +0 -0
 - metadata +2 -1
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: cc7e5c00d962713f16f0311086658d77ae9166564b86c2e20f57788c81fb7ef0
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 0700a0a33f24d259cebec7b0462db717be39fd688cb8595c2b30ce48cba05a53
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 838dbcc895fe5dd98c16bd8d87226f7c1b88e3e557172d692192660eff4153ac6abf49b752f1a5009bbc5987682cdb21d311e0862463b4e2c4bdd13e483f2302
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: fb650a5297aa0848de7a21cc7ddbca8d7d0c123aba950f383dd6527d6bc0453e0f5203ccb75c3aca2d6220b785429a9e013c959590968186226feda09087a783
         
     | 
    
        data/lib/p8push/client.rb
    CHANGED
    
    
    
        data/lib/p8push/notification.rb
    CHANGED
    
    | 
         @@ -29,7 +29,7 @@ module P8push 
     | 
|
| 
       29 
29 
     | 
    
         
             
                MAXIMUM_PAYLOAD_SIZE = 2048
         
     | 
| 
       30 
30 
     | 
    
         | 
| 
       31 
31 
     | 
    
         
             
                attr_accessor :topic, :token, :alert, :badge, :sound, :category, :content_available, :mutable_content,
         
     | 
| 
       32 
     | 
    
         
            -
                              :custom_data, :id, :expiry, :priority 
     | 
| 
      
 32 
     | 
    
         
            +
                              :custom_data, :id, :expiry, :priority
         
     | 
| 
       33 
33 
     | 
    
         
             
                attr_reader :sent_at
         
     | 
| 
       34 
34 
     | 
    
         
             
                attr_writer :apns_error_code
         
     | 
| 
       35 
35 
     | 
    
         | 
| 
         @@ -39,8 +39,6 @@ module P8push 
     | 
|
| 
       39 
39 
     | 
    
         
             
                def initialize(options = {})
         
     | 
| 
       40 
40 
     | 
    
         
             
                  @token = options.delete(:token) || options.delete(:device)
         
     | 
| 
       41 
41 
     | 
    
         
             
                  @alert = options.delete(:alert)
         
     | 
| 
       42 
     | 
    
         
            -
                  @title = options.delete(:title)
         
     | 
| 
       43 
     | 
    
         
            -
                  @body = options.delete(:body)
         
     | 
| 
       44 
42 
     | 
    
         
             
                  @topic = options.delete(:topic) || ENV['APN_BUNDLE_ID']
         
     | 
| 
       45 
43 
     | 
    
         
             
                  @badge = options.delete(:badge)
         
     | 
| 
       46 
44 
     | 
    
         
             
                  @sound = options.delete(:sound)
         
     | 
| 
         @@ -58,8 +56,7 @@ module P8push 
     | 
|
| 
       58 
56 
     | 
    
         
             
                  json = {}.merge(@custom_data || {}).inject({}) { |h, (k, v)| h[k.to_s] = v; h }
         
     | 
| 
       59 
57 
     | 
    
         | 
| 
       60 
58 
     | 
    
         
             
                  json['aps'] ||= {}
         
     | 
| 
       61 
     | 
    
         
            -
                   
     | 
| 
       62 
     | 
    
         
            -
                  json['aps']['alert'] = {'title': @title, 'body': @body}
         
     | 
| 
      
 59 
     | 
    
         
            +
                  json['aps']['alert'] = @alert if @alert
         
     | 
| 
       63 
60 
     | 
    
         
             
                  json['aps']['badge'] = @badge.to_i rescue 0 if @badge
         
     | 
| 
       64 
61 
     | 
    
         
             
                  json['aps']['sound'] = @sound if @sound
         
     | 
| 
       65 
62 
     | 
    
         
             
                  json['aps']['category'] = @category if @category
         
     | 
    
        data/lib/p8push/version.rb
    CHANGED
    
    
    
        data/ts_p8push-1.1.0.gem
    ADDED
    
    | 
         Binary file 
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: ts_p8push
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 1.1. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 1.1.1
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Andrew Arrow
         
     | 
| 
         @@ -88,6 +88,7 @@ files: 
     | 
|
| 
       88 
88 
     | 
    
         
             
            - "./ts_p8push-1.0.7.gem"
         
     | 
| 
       89 
89 
     | 
    
         
             
            - "./ts_p8push-1.0.8.gem"
         
     | 
| 
       90 
90 
     | 
    
         
             
            - "./ts_p8push-1.0.9.gem"
         
     | 
| 
      
 91 
     | 
    
         
            +
            - "./ts_p8push-1.1.0.gem"
         
     | 
| 
       91 
92 
     | 
    
         
             
            homepage: https://talhashoaib.me
         
     | 
| 
       92 
93 
     | 
    
         
             
            licenses:
         
     | 
| 
       93 
94 
     | 
    
         
             
            - MIT
         
     |