README.md in fcm-1.0.1 vs README.md in fcm-1.0.2

- old
+ new

@@ -1,8 +1,8 @@ # Firebase Cloud Messaging (FCM) for Android and iOS -[![Gem Version](https://badge.fury.io/rb/fcm.svg)](http://badge.fury.io/rb/fcm) [![Build Status](https://secure.travis-ci.org/spacialdb/fcm.png?branch=master)](http://travis-ci.org/spacialdb/fcm) +[![Gem Version](https://badge.fury.io/rb/fcm.svg)](http://badge.fury.io/rb/fcm) [![Build Status](https://secure.travis-ci.org/spacialdb/fcm.svg?branch=master)](http://travis-ci.org/spacialdb/fcm) The FCM gem lets your ruby backend send notifications to Android and iOS devices via [ Firebase Cloud Messaging](https://firebase.google.com/docs/cloud-messaging/). ## Installation @@ -99,18 +99,18 @@ FCM [topic messaging](https://firebase.google.com/docs/cloud-messaging/topic-messaging) allows your app server to send a message to multiple devices that have opted in to a particular topic. Based on the publish/subscribe model, topic messaging supports unlimited subscriptions per app. Sending to a topic is very similar to sending to an individual device or to a user group, in the sense that you can use the `fcm.send_with_notification_key()` method where the `notification_key` matches the regular expression `"/topics/[a-zA-Z0-9-_.~%]+"`: ```ruby response = fcm.send_with_notification_key("/topics/yourTopic", - data: {message: "This is a FCM Topic Message!"}) + notification: {body: "This is a FCM Topic Message!"}) ``` Or you can use the helper: ```ruby response = fcm.send_to_topic("yourTopic", - data: {message: "This is a FCM Topic Message!"}) + notification: {body: "This is a FCM Topic Message!"}) ``` ### Sending to Multiple Topics To send to combinations of multiple topics, the FCM [docs](https://firebase.google.com/docs/cloud-messaging/send-message#send_messages_to_topics_2) require that you set a **condition** key (instead of the `to:` key) to a boolean condition that specifies the target topics. For example, to send messages to devices that subscribed to _TopicA_ and either _TopicB_ or _TopicC_: @@ -135,12 +135,12 @@ The `send_to_topic_condition` method within this library allows you to specicy a condition of multiple topics to which to send to the data payload. ```ruby response = fcm.send_to_topic_condition( "'TopicA' in topics && ('TopicB' in topics || 'TopicC' in topics)", - data: { - message: "This is an FCM Topic Message sent to a condition!" + notification: { + body: "This is an FCM Topic Message sent to a condition!" } ) ``` ## Subscribe the client app to a topic @@ -168,11 +168,14 @@ You can find a guide to implement an Android Client app to receive notifications here: [Set up a FCM Client App on Android](https://firebase.google.com/docs/cloud-messaging/android/client). The guide to set up an iOS app to get notifications is here: [Setting up a FCM Client App on iOS](https://firebase.google.com/docs/cloud-messaging/ios/client). ## ChangeLog +### 1.0.2 +- Bug fix: retrieve notification key" params: https://github.com/spacialdb/fcm/commit/b328a75c11d779a06d0ceda83527e26aa0495774 + ### 1.0.0 - Bumped supported ruby to `>= 2.4` - Fix deprecation warnings from `faraday` by changing dependency version to `faraday 1.0.0` @@ -195,10 +198,17 @@ ## Many thanks to all the contributors - [Contributors](https://github.com/spacialdb/fcm/contributors) -## Donations +## Cutting a release -We accept tips through [Gratipay](https://gratipay.com/spacialdb/). +Update version in `fcm.gemspec` with `VERSION` and update `README.md` `## ChangeLog` section. -[![Gratipay](https://img.shields.io/gratipay/spacialdb.svg)](https://www.gittip.com/spacialdb/) +```bash +# set the version +# VERSION="1.0.2" +gem build fcm.gemspec +gem push fcm-${VERSION}.gem +git tag -a v${VERSION} -m "Releasing version v${VERSION}" +git push origin --tags +``` \ No newline at end of file