fcm-ruby-push-notifications 1.2.1 → 1.2.2

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
  SHA1:
3
- metadata.gz: 92aaf45d10e7dc812c3615bc4663ec3b87990992
4
- data.tar.gz: 42ed874d7818f715a1b9266f6882a5e0c3ca9a70
3
+ metadata.gz: 2cd6bd6a6efce199c82fddc08b5a145598d95df4
4
+ data.tar.gz: 6b536a5c28af18c0befa52c4226fac9526f6f877
5
5
  SHA512:
6
- metadata.gz: fdac35ac1497021bc52a9c18ff8fc95749e949dbb58ed4b8f7846769c27a4d51881f701a910839d6b84e3301fa0030ecc71000b37fc7280be03509680e8ce550
7
- data.tar.gz: 1b552579192b59827efca222c16a2d420ac4f1fc0c255fcb2d9886780e780dd13a0c63a38a095894066bffa6dfd7a8b535a5067145bc62deb4d2616c50369f3b
6
+ metadata.gz: 9ef7ee841190e461d32daee7af645ab49672b752677c72e641a9415b1247e88ee3429b82ba0e93caf5e09de076dd7a9a198637ab5abe1467c823588790fccbef
7
+ data.tar.gz: e63a08fc2b4863ae48f641e11232a9f121474de0d78ba36a76bcd4bcb8ad226d3d2a024b342e215938d120419adef51c86bf011b0d34a91cb2a0c5c861ab6fac
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Ruby Push Notifications
2
-
3
- [![Build Status](https://travis-ci.org/calonso/ruby-push-notifications.svg)](https://travis-ci.org/calonso/ruby-push-notifications) [![Dependency Status](https://gemnasium.com/calonso/ruby-push-notifications.svg)](https://gemnasium.com/calonso/ruby-push-notifications) [![Code Climate](https://codeclimate.com/github/calonso/ruby-push-notifications/badges/gpa.svg)](https://codeclimate.com/github/calonso/ruby-push-notifications) [![Test Coverage](https://codeclimate.com/github/calonso/ruby-push-notifications/badges/coverage.svg)](https://codeclimate.com/github/calonso/ruby-push-notifications) [![Gem Version](https://badge.fury.io/rb/ruby-push-notifications.svg)](http://badge.fury.io/rb/ruby-push-notifications) [![Join the chat at https://gitter.im/calonso/ruby-push-notifications](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/calonso/ruby-push-notifications?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
2
+ <!--
3
+ [![Build Status](https://travis-ci.org/calonso/ruby-push-notifications.svg)](https://travis-ci.org/calonso/ruby-push-notifications) [![Dependency Status](https://gemnasium.com/calonso/ruby-push-notifications.svg)](https://gemnasium.com/calonso/ruby-push-notifications) [![Code Climate](https://codeclimate.com/github/calonso/ruby-push-notifications/badges/gpa.svg)](https://codeclimate.com/github/calonso/ruby-push-notifications) [![Test Coverage](https://codeclimate.com/github/calonso/ruby-push-notifications/badges/coverage.svg)](https://codeclimate.com/github/calonso/ruby-push-notifications) [![Gem Version](https://badge.fury.io/rb/ruby-push-notifications.svg)](http://badge.fury.io/rb/ruby-push-notifications) [![Join the chat at https://gitter.im/calonso/ruby-push-notifications](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/calonso/ruby-push-notifications?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -->
4
4
 
5
5
  ### iOS, Android and Windows Phone Push Notifications made easy!
6
6
 
@@ -14,7 +14,7 @@
14
14
 
15
15
  Add this line to your application's Gemfile:
16
16
 
17
- gem 'ruby-push-notifications'
17
+ gem 'fcm-ruby-push-notifications', '>= 1.2.1'
18
18
 
19
19
  And then execute:
20
20
 
@@ -22,7 +22,7 @@ And then execute:
22
22
 
23
23
  Or install it yourself as:
24
24
 
25
- $ gem install ruby-push-notifications
25
+ $ gem install fcm-ruby-push-notifications
26
26
 
27
27
  ## Usage
28
28
 
@@ -36,10 +36,11 @@ Or install it yourself as:
36
36
 
37
37
  For completely detailed examples:
38
38
 
39
- 1. [Apple iOS example](https://github.com/calonso/ruby-push-notifications/tree/master/examples/apns.rb)
40
- 2. [Google Android example](https://github.com/calonso/ruby-push-notifications/tree/master/examples/gcm.rb)
41
- 3. [Windows Phone(MPNS) example](https://github.com/calonso/ruby-push-notifications/tree/master/examples/mpns.rb)
42
- 4. [Windows Phone(WNS) example](https://github.com/calonso/ruby-push-notifications/tree/master/examples/wns.rb)
39
+ 1. [Apple iOS example](https://github.com/santhums/ruby-push-notifications/tree/master/examples/apns.rb)
40
+ 2. [Google Android example(GCM)](https://github.com/santhums/ruby-push-notifications/tree/master/examples/gcm.rb)
41
+ 2. [Google Android example(FCM)](https://github.com/santhums/ruby-push-notifications/tree/master/examples/fcm.rb)
42
+ 3. [Windows Phone(MPNS) example](https://github.com/santhums/ruby-push-notifications/tree/master/examples/mpns.rb)
43
+ 4. [Windows Phone(WNS) example](https://github.com/santhums/ruby-push-notifications/tree/master/examples/wns.rb)
43
44
 
44
45
  ## Pending tasks
45
46
 
@@ -57,7 +58,7 @@ Feel free to contribute!!
57
58
 
58
59
  ## Contributing
59
60
 
60
- 1. Fork it ( https://github.com/calonso/ruby-push-notifications/fork )
61
+ 1. Fork it ( https://github.com/santhums/ruby-push-notifications/fork )
61
62
  2. Create your feature branch (`git checkout -b my-new-feature`)
62
63
  3. Commit your changes (`git commit -am 'Add some feature'`)
63
64
  4. Push to the branch (`git push origin my-new-feature`)
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env bundle exec ruby
2
+
3
+ $:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
4
+
5
+ require 'fcm-ruby-push-notifications'
6
+
7
+ registration_ids = [
8
+ 'First registration id here',
9
+ 'Second registration id here'
10
+ ]
11
+
12
+ notification = RubyPushNotifications::FCM::FCMNotification.new registration_ids, { text: 'Hello FCM World!' }
13
+
14
+ pusher = RubyPushNotifications::FCM::FCMPusher.new "Your app's FCM key"
15
+
16
+ pusher.push [notification]
17
+ p 'Notification sending results:'
18
+ p "Success: #{notification.success}, Failed: #{notification.failed}"
19
+ p 'Details:'
20
+ p notification.individual_results
@@ -2,7 +2,7 @@
2
2
 
3
3
  $:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
4
4
 
5
- require 'ruby-push-notifications'
5
+ require 'fcm-ruby-push-notifications'
6
6
 
7
7
  registration_ids = [
8
8
  'First registration id here',
@@ -2,7 +2,7 @@
2
2
 
3
3
  $:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
4
4
 
5
- require 'ruby-push-notifications'
5
+ require 'fcm-ruby-push-notifications'
6
6
 
7
7
  device_urls = [
8
8
  'First device url here',
@@ -2,7 +2,7 @@
2
2
 
3
3
  $:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
4
4
 
5
- require 'ruby-push-notifications'
5
+ require 'fcm-ruby-push-notifications'
6
6
 
7
7
  sid = "ms-app://...."
8
8
  secret = "..."
@@ -1,7 +1,7 @@
1
1
  # coding: utf-8
2
2
  Gem::Specification.new do |spec|
3
3
  spec.name = "fcm-ruby-push-notifications"
4
- spec.version = "1.2.1"
4
+ spec.version = "1.2.2"
5
5
  spec.authors = ['Santhu MS']
6
6
  spec.email = ['santhu.ms83@gmail.com']
7
7
  spec.summary = %q{iOS, Android and Windows Phone Push Notifications made easy!}
@@ -38,7 +38,7 @@ module RubyPushNotifications
38
38
  CONTENT_TYPE_HEADER => JSON_CONTENT_TYPE,
39
39
  AUTHORIZATION_HEADER => "key=#{key}"
40
40
  }
41
- # TODO: remove to_json if causing error
41
+
42
42
  params = {
43
43
  body: notification,
44
44
  headers: {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fcm-ruby-push-notifications
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Santhu MS
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-25 00:00:00.000000000 Z
11
+ date: 2018-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: builder
@@ -138,11 +138,13 @@ files:
138
138
  - README.md
139
139
  - Rakefile
140
140
  - examples/apns.rb
141
+ - examples/fcm.rb
141
142
  - examples/gcm.rb
142
143
  - examples/mpns.rb
143
144
  - examples/wns.rb
145
+ - fcm-ruby-push-notifications.gemspec
144
146
  - gemfiles/Gemfile-legacy
145
- - lib/ruby-push-notifications.rb
147
+ - lib/fcm-ruby-push-notifications.rb
146
148
  - lib/ruby-push-notifications/apns.rb
147
149
  - lib/ruby-push-notifications/apns/apns_connection.rb
148
150
  - lib/ruby-push-notifications/apns/apns_notification.rb
@@ -177,7 +179,6 @@ files:
177
179
  - lib/ruby-push-notifications/wns/wns_pusher.rb
178
180
  - lib/ruby-push-notifications/wns/wns_response.rb
179
181
  - lib/ruby-push-notifications/wns/wns_result.rb
180
- - ruby-push-notifications.gemspec
181
182
  - spec/factories.rb
182
183
  - spec/factories/notifications.rb
183
184
  - spec/ruby-push-notifications/apns/apns_connection_spec.rb