pusher-push-notifications 0.1.1 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: db852b70b38413d31efa6a9fafcf568cd90d6f45ed49e85c15842a2c91d6326d
4
- data.tar.gz: b1c5ed5819dfb4148f0c6eda2de19de01a3c07c13ea331b21235576bcf894249
3
+ metadata.gz: d6ff4e86ac0167280f704f95a610bfbd31c64627737b59a2a9b5878478274948
4
+ data.tar.gz: c851cab622b3308cbafef96e3a789e7810dfe4a6c80d5096495e9226fdd33bb0
5
5
  SHA512:
6
- metadata.gz: 40a25d1bef1af373138c548e28becc9997ae5437104102ba6e8e55609c8a86a236d52c771462802f85a1d6e5fa3fb71f3ba48ac6618fe2c9158d948b90798efc
7
- data.tar.gz: 59e7b02423b3eca0365901b85784ed1e3f6a56a39dca98d6eb52c82a3899e89bfeed115b8f825c5ab555726b4629031240f41b061af214544887414a900b868d
6
+ metadata.gz: 3bf6832119bb99c1e6737b641d601d205e1c10dc3b507318d9cd000d1e3b84bd7d8af990aeeb7a007c9c4352df0a565797ec57d6becb5e5674c90e1557211e4c
7
+ data.tar.gz: 783a9e20816c8968ccbf09ffa3a8514c515e04202acd6c5d536ee5f49ffe8e64460b07f4a4e3c622e98a8e380fe53b9d1cd845bf6a0045451f8e35ebd4284d62
data/.coveralls.yml CHANGED
@@ -1 +1 @@
1
- repo_token: SvS3UyLJls0uc3J7nJgti4ypWxKosxo7U
1
+ repo_token: uaAoIkOEP9l7PCLENpJSSVVrcm94JDNYO
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pusher-push-notifications (0.1.1)
4
+ pusher-push-notifications (0.2.1)
5
5
  caze
6
6
  rest-client
7
7
 
data/README.md CHANGED
@@ -1,17 +1,16 @@
1
- # PushNotifications [![Build Status](https://travis-ci.org/lucasmedeirosleite/push-notifications-ruby.svg)](https://travis-ci.org/lucasmedeirosleite/push-notifications-ruby) [![Coverage Status](https://coveralls.io/repos/github/lucasmedeirosleite/push-notifications-ruby/badge.svg?branch=master)](https://coveralls.io/github/lucasmedeirosleite/push-notifications-ruby?branch=master)
1
+ # Pusher Push Notifications Ruby Server SDK
2
2
 
3
- Push notifications using the Pusher system.
4
-
5
- ## Getting started
3
+ [![Build Status](https://travis-ci.org/pusher/push-notifications-ruby.svg?branch=master)](https://travis-ci.org/pusher/push-notifications-ruby) [![![Coverage Status](https://coveralls.io/repos/github/pusher/push-notifications-ruby/badge.svg?branch=master)](https://coveralls.io/github/pusher/push-notifications-ruby?branch=master)
6
4
 
7
- The Push notifications system is still in BETA and it's free, but first you need to create an account on pusher (click [here](https://dash.pusher.com)).
8
- With an account created you can create a new push notification instance (you will need to upload the apns certificates for apple and the server keys for Google's Firebase Cloud Messaging). Also you will need the `instance id` and `secret key` so the gem can be configured properly.
9
-
10
- **NOTE**: The official Pusher [gem](https://github.com/pusher/pusher-http-ruby) currently does not support push notifications (probably because they moved it to another dashboard), you need to rely on the WEB API (that's why this gem was created).
5
+ Push notifications using the Pusher system.
11
6
 
12
7
  ## Installation
13
8
 
14
- Add this line to your application's Gemfile:
9
+ ```bash
10
+ gem install pusher-push-notifications
11
+ ```
12
+
13
+ Or add this line to your application's Gemfile:
15
14
 
16
15
  ```ruby
17
16
  gem 'pusher-push-notifications'
@@ -23,7 +22,7 @@ This configuration can be done anywhere you want, but if you are using rails the
23
22
 
24
23
  ```ruby
25
24
  Pusher::PushNotifications.configure do |config|
26
-  config.instance_id = ENV['PUSHER_INSTANCE_ID'] # or the value directly :)
25
+  config.instance_id = ENV['PUSHER_INSTANCE_ID'] # or the value directly
27
26
   config.secret_key = ENV['PUSHER_SECRET_KEY']
28
27
  end
29
28
  ```
@@ -52,7 +51,7 @@ data = {
52
51
  }
53
52
  }
54
53
 
55
- Pusher::PushNotifications.notify(interests: ['my-interest'], payload: data)
54
+ Pusher::PushNotifications.publish(interests: ['hello'], payload: data)
56
55
  ```
57
56
 
58
57
  The return of this call is a ruby struct containing the http status code (`status`) the response body (`content`) and an `ok?` attribute saying if the notification was successful or not.
@@ -70,10 +69,6 @@ HTTP Status | Reason
70
69
  404 | Instance not found
71
70
  500 | Internal server error
72
71
 
73
- ## TODO
74
-
75
- Add an optional parameter containing the webhook url to be send together with the payload.
76
-
77
72
  ## Development
78
73
 
79
74
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -82,7 +77,9 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
82
77
 
83
78
  ## Contributing
84
79
 
85
- Bug reports and pull requests are welcome on GitHub at https://github.com/lucasmedeirosleite/push-notifications-ruby.
80
+ - Found a bug? Please open an [issue](https://github.com/pusher/push-notifications-ruby/issues).
81
+ - Have a feature request. Please open an [issue](https://github.com/pusher/push-notifications-ruby/issues).
82
+ - If you want to contribute, please submit a [pull request](https://github.com/pusher/push-notifications-ruby/pulls) (preferrably with some tests).
86
83
 
87
84
  ## License
88
85
 
@@ -3,7 +3,7 @@
3
3
  require 'caze'
4
4
 
5
5
  require_relative './push_notifications/client'
6
- require_relative './push_notifications/use_cases/notify'
6
+ require_relative './push_notifications/use_cases/publish'
7
7
  require_relative './push_notifications/version'
8
8
 
9
9
  module Pusher
@@ -12,7 +12,7 @@ module Pusher
12
12
 
13
13
  class PushError < RuntimeError; end
14
14
 
15
- has_use_case :notify, UseCases::Notify
15
+ has_use_case :publish, UseCases::Publish
16
16
 
17
17
  class << self
18
18
  attr_reader :instance_id, :secret_key
@@ -5,10 +5,10 @@ require 'caze'
5
5
  module Pusher
6
6
  module PushNotifications
7
7
  module UseCases
8
- class Notify
8
+ class Publish
9
9
  include Caze
10
10
 
11
- export :call, as: :notify
11
+ export :call, as: :publish
12
12
 
13
13
  def initialize(interests:, payload: {})
14
14
  @interests = interests
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Pusher
4
4
  module PushNotifications
5
- VERSION = '0.1.1'
5
+ VERSION = '0.2.1'
6
6
  end
7
7
  end
@@ -8,12 +8,11 @@ require 'pusher/push_notifications/version'
8
8
  Gem::Specification.new do |spec|
9
9
  spec.name = 'pusher-push-notifications'
10
10
  spec.version = Pusher::PushNotifications::VERSION
11
- spec.authors = ['Lucas Medeiros', 'Luka Bratos']
12
- spec.email = ['lucastoc@gmail.com', 'luka@pusher.com']
11
+ spec.authors = ['Lucas Medeiros', 'Pusher']
12
+ spec.email = ['lucastoc@gmail.com', 'support@pusher.com']
13
13
 
14
- spec.summary = 'PushNotifications pusher product'
15
- spec.description = 'A gem to use the Pusher BETA product Push Notifications'
16
- spec.homepage = 'https://github.com/lucasmedeirosleite/push-notifications-ruby'
14
+ spec.summary = 'Pusher Push Notifications Ruby server SDK'
15
+ spec.homepage = 'https://github.com/pusher/push-notifications-ruby'
17
16
  spec.license = 'MIT'
18
17
 
19
18
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pusher-push-notifications
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lucas Medeiros
8
- - Luka Bratos
8
+ - Pusher
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2018-02-19 00:00:00.000000000 Z
12
+ date: 2018-02-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: caze
@@ -183,10 +183,10 @@ dependencies:
183
183
  - - ">="
184
184
  - !ruby/object:Gem::Version
185
185
  version: 3.0.1
186
- description: A gem to use the Pusher BETA product Push Notifications
186
+ description:
187
187
  email:
188
188
  - lucastoc@gmail.com
189
- - luka@pusher.com
189
+ - support@pusher.com
190
190
  executables: []
191
191
  extensions: []
192
192
  extra_rdoc_files: []
@@ -207,10 +207,10 @@ files:
207
207
  - lib/pusher.rb
208
208
  - lib/pusher/push_notifications.rb
209
209
  - lib/pusher/push_notifications/client.rb
210
- - lib/pusher/push_notifications/use_cases/notify.rb
210
+ - lib/pusher/push_notifications/use_cases/publish.rb
211
211
  - lib/pusher/push_notifications/version.rb
212
212
  - pusher-push-notifications.gemspec
213
- homepage: https://github.com/lucasmedeirosleite/push-notifications-ruby
213
+ homepage: https://github.com/pusher/push-notifications-ruby
214
214
  licenses:
215
215
  - MIT
216
216
  metadata: {}
@@ -230,8 +230,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
230
230
  version: '0'
231
231
  requirements: []
232
232
  rubyforge_project:
233
- rubygems_version: 2.7.4
233
+ rubygems_version: 2.7.6
234
234
  signing_key:
235
235
  specification_version: 4
236
- summary: PushNotifications pusher product
236
+ summary: Pusher Push Notifications Ruby server SDK
237
237
  test_files: []