action_native_push 0.1.0 → 0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b8f1fadcea0f463b63b7a85e87ca6d46669193b600f087c9e9e4dcae2adf1b0b
4
- data.tar.gz: 5a291eaff514e0c8330f5c962931da6f34a328ef38000a9ba6c7ce5fa26d0e4e
3
+ metadata.gz: a75fba0494a552ca71a3fe1294bf4455123c90ff560ed0d125e05fdfc39c6f99
4
+ data.tar.gz: 170be5a76f7bd8017d5e14ca2bccaad0e5b54ee00670d8ccf3d92ee0875f2b5e
5
5
  SHA512:
6
- metadata.gz: 39d9fd7784d3461ea2da9feca1b9e28afd282efe07524040af8fa2c4529c6cf2d68bd3ea07b7dd8ccd58266d61f45e12fe102cd38690af8c7e19722823220fc9
7
- data.tar.gz: 9433d10faed6dc05460cf0098c3f4313856e6baa968291ddf449bbb1ea9ea5fc0954a98bd5688c53b33e9dc6fb8e0e5207f0b421439fa323e647ee60e5c546c9
6
+ metadata.gz: 7b0e3cfa43a1908ea04dac13e0244aa84f557c2f0c91e6303ecc86204c9d1638784378f1bef5f196e684fcfe179b8c151754a020642c68f7bf712cebfe697f17
7
+ data.tar.gz: 19d2a3f25123fbe5b2f40efd36f83a5f9a6fe55894e438b99f972ec3a587670bc503fc87614a247c9db19c656822470e3943c92eb04d68a64a6e4dff94e37dfc
data/README.md CHANGED
@@ -173,7 +173,7 @@ device = ApplicationPushDevice.create! \
173
173
 
174
174
  notification = ApplicationPushNotification.new \
175
175
  title: "Hello world!",
176
- body: "Welcome to Action Native Push",
176
+ body: "Welcome to Action Native Push"
177
177
 
178
178
  notification.deliver_later_to(device)
179
179
  ```
@@ -211,13 +211,10 @@ need to send additional data that is specific to the platform you are using.
211
211
  You can use `with_apple` for Apple and `with_google` for Google:
212
212
 
213
213
  ```ruby
214
- apple_notification = ApplicationPushNotification
214
+ notification = ApplicationPushNotification
215
215
  .with_apple(category: "observable")
216
- .new(title: "Hi Apple")
217
-
218
- google_notification = ApplicationPushNotification
219
- .with_google({ data: { badge: 1 } })
220
- .new(title: "Hi Google")
216
+ .with_google(data: { badge: 1 })
217
+ .new(title: "Hello world!")
221
218
  ```
222
219
 
223
220
  The platform payload takes precedence over the other fields, and you can use it to override the
@@ -225,7 +222,7 @@ default behaviour:
225
222
 
226
223
  ```ruby
227
224
  notification = ApplicationPushNotification
228
- .with_google({ android: { notification: { notification_count: nil } } })
225
+ .with_google(android: { notification: { notification_count: nil } })
229
226
  .new(title: "Hello world!", body: "Welcome to Action Native Push", badge: 1)
230
227
  ```
231
228
 
@@ -237,7 +234,7 @@ and `body`.
237
234
  You can create a silent notification via the `silent` method:
238
235
 
239
236
  ```ruby
240
- notification = ApplicationPushNotification.silent.with_data({ id: 1 })
237
+ notification = ApplicationPushNotification.silent.with_data(id: 1)
241
238
  ```
242
239
 
243
240
  This will create a silent notification for both Apple and Google platforms and sets an application
@@ -274,9 +271,9 @@ by adding extra arguments to the notification constructor:
274
271
  data = { calendar_id: @calendar.id, identity_id: @identity.id }
275
272
 
276
273
  notification = CalendarPushNotification
277
- .with_apple({ custom_payload: data })
278
- .with_google({ data: data })
279
- .new({ calendar_id: 123 })
274
+ .with_apple(custom_payload: data)
275
+ .with_google(data: data)
276
+ .new(calendar_id: 123)
280
277
 
281
278
  notification.deliver_later_to(device)
282
279
  ```
@@ -309,12 +306,12 @@ end
309
306
  |------------------|------------
310
307
  | :title | The title of the notification.
311
308
  | :body | The body of the notification.
312
- | :badge | The badge number to display on the app icon
309
+ | :badge | The badge number to display on the app icon.
313
310
  | :thread_id | The thread identifier for grouping notifications.
314
311
  | :sound | The sound to play when the notification is received.
315
312
  | :high_priority | Whether the notification should be sent with high priority (default: true).
316
- | :google_data | The Apple-specific payload for the notification.
317
- | :apple_data | The Google-specific payload for the notification.
313
+ | :google_data | The Google-specific payload for the notification.
314
+ | :apple_data | The Apple-specific payload for the notification.
318
315
  | :data | The data payload for the notification, sent to all platforms.
319
316
  | ** | Any additional attributes passed to the constructor will be merged in the `context` hash.
320
317
 
@@ -1,3 +1,3 @@
1
1
  module ActionNativePush
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: action_native_push
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jacopo Beschi
@@ -125,6 +125,13 @@ licenses:
125
125
  metadata:
126
126
  homepage_uri: https://github.com/basecamp/action_native_push
127
127
  source_code_uri: https://github.com/basecamp/action_native_push
128
+ post_install_message: |2+
129
+
130
+ DEPRECATION WARNING:
131
+ ! The "action_native_push" gem has been renamed to "action_push_native".
132
+ ! See: https://rubygems.org/gems/action_push_native
133
+ ! And: https://github.com/rails/action_push_native
134
+
128
135
  rdoc_options: []
129
136
  require_paths:
130
137
  - lib
@@ -143,3 +150,4 @@ rubygems_version: 3.6.9
143
150
  specification_version: 4
144
151
  summary: Send push notifications to mobile apps
145
152
  test_files: []
153
+ ...