rpush 9.0.0 → 9.1.0

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: e4ab9013682357312b9f5050d6c466c62866f78c68cc0fcb72ad89ccdc4409e0
4
- data.tar.gz: ab086d28a744140499a6434c5fcec99b6c77c4cd929163a02ac4d9d77f94bb99
3
+ metadata.gz: b02e373adcce6e8800e2f1634ed284150dcc3f3505b5d68574474e2bba73927f
4
+ data.tar.gz: 84eebc2aa1ae92e22425eb14da4d2f6c847263089d921f240bd529555f436ff5
5
5
  SHA512:
6
- metadata.gz: 862a057ab8cce2f73eff784838302ac0128214e0f744ed108b91afb33dce0867f7e7f06e131a29b46f6f49be7cca4e809f317ed37c50d1512eaa480a8ad7532d
7
- data.tar.gz: 2f2d5cd377c79a1ec1ada2677f5c409d58d27d40a90b899b7fd43b98f122148623a0a78ca17c862b18b38245fe2df9a2f1cc7c68f25dc8cbe3dfa48a1f779c1f
6
+ metadata.gz: 8cd570ac39d8258139610d79084b6019481124c5207b872eda4162e0383c0ecdea23e029a88df8264b132608e4e80dc32acb64b5dd2a57d58f093fe516c263a0
7
+ data.tar.gz: 5ae2934a5116d89a3b4dd367d7603c5ac03aed6a3bbecbdd842a37c6bfe287477a22b091db6aa6cb3e71f83e5b0935b8a30f9020099d60caff5bbac6e45d9c60
data/CHANGELOG.md CHANGED
@@ -2,9 +2,17 @@
2
2
 
3
3
  ## [Unreleased](https://github.com/rpush/rpush/tree/HEAD)
4
4
 
5
+ [Full Changelog](https://github.com/rpush/rpush/compare/v9.1.0...HEAD)
6
+
7
+ ## [v9.1.0](https://github.com/rpush/rpush/tree/v9.1.0) (2024-09-24)
8
+
5
9
  **Merged pull requests:**
6
10
 
7
- [Full Changelog](https://github.com/rpush/rpush/compare/v9.0.0...HEAD)
11
+ * Add support for FSM iOS badges [\#704](https://github.com/rpush/rpush/pull/704) ([WoutDev](https://github.com/WoutDev))
12
+ * Support for Rails 7.1 [\#675](https://github.com/rpush/rpush/pull/675) ([benlangfeld](https://github.com/benlangfeld))
13
+ * Enable running tests on sqlite3 [\#705](https://github.com/rpush/rpush/pull/705) ([benlangfeld](https://github.com/benlangfeld))
14
+
15
+ [Full Changelog](https://github.com/rpush/rpush/compare/v9.0.0...v9.1.0)
8
16
 
9
17
  ## [v9.0.0](https://github.com/rpush/rpush/tree/v9.0.0) (2024-09-09)
10
18
 
@@ -77,6 +77,7 @@ module Rpush
77
77
  aps['mutable-content'] = 1 if mutable_content
78
78
  aps['content-available'] = 1 if content_available
79
79
  aps['sound'] = 'default' if sound == 'default'
80
+ aps['badge'] = badge if badge
80
81
 
81
82
  json['payload']['aps'] = aps
82
83
 
@@ -7,6 +7,8 @@ module Rpush
7
7
 
8
8
  self.table_name = 'rpush_notifications'
9
9
 
10
+ self.default_column_serializer = YAML if respond_to?(:default_column_serializer)
11
+
10
12
  serialize :registration_ids
11
13
  serialize :url_args
12
14
 
data/lib/rpush/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module Rpush
2
2
  module VERSION
3
3
  MAJOR = 9
4
- MINOR = 0
4
+ MINOR = 1
5
5
  TINY = 0
6
6
  PRE = nil
7
7
 
data/spec/spec_helper.rb CHANGED
@@ -17,13 +17,6 @@ require 'debug'
17
17
  require 'timecop'
18
18
  require 'activerecord-jdbc-adapter' if defined? JRUBY_VERSION
19
19
 
20
- require 'rpush'
21
- require 'rpush/daemon'
22
- require 'rpush/client/redis'
23
- require 'rpush/client/active_record'
24
- require 'rpush/daemon/store/active_record'
25
- require 'rpush/daemon/store/redis'
26
-
27
20
  def active_record?
28
21
  client == :active_record
29
22
  end
@@ -32,6 +25,21 @@ def redis?
32
25
  client == :redis
33
26
  end
34
27
 
28
+ if active_record?
29
+ require 'active_record'
30
+ if ActiveRecord::Base.respond_to?(:default_column_serializer)
31
+ # New default in Rails 7.1: https://github.com/rails/rails/pull/47422
32
+ ActiveRecord::Base.default_column_serializer = nil
33
+ end
34
+ end
35
+
36
+ require 'rpush'
37
+ require 'rpush/daemon'
38
+ require 'rpush/client/redis'
39
+ require 'rpush/client/active_record'
40
+ require 'rpush/daemon/store/active_record'
41
+ require 'rpush/daemon/store/redis'
42
+
35
43
  require 'support/active_record_setup' if active_record?
36
44
 
37
45
  RPUSH_ROOT = '/tmp/rails_root'
@@ -26,7 +26,7 @@ shared_examples 'Rpush::Client::Fcm::Notification' do
26
26
  expect(notification.as_json['message']['notification']).to eq({"title"=>"title", "body"=>"body"})
27
27
  end
28
28
 
29
- it "moves notification keys to the correcdt location" do
29
+ it "moves notification keys to the correct location" do
30
30
  notification.app = app
31
31
  notification.device_token = "valid"
32
32
  notification.notification = { "title" => "valid", "body" => "valid", "color" => "valid for android" }
@@ -82,6 +82,11 @@ shared_examples 'Rpush::Client::Fcm::Notification' do
82
82
  expect(notification.as_json['message']).to have_key 'notification'
83
83
  end
84
84
 
85
+ it 'includes the badge if defined' do
86
+ notification.badge = 3
87
+ expect(notification.as_json['message']['apns']['payload']['aps']['badge']).to eq(3)
88
+ end
89
+
85
90
  it 'excludes the notification payload if undefined' do
86
91
  expect(notification.as_json['message']).not_to have_key 'notification'
87
92
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rpush
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.0.0
4
+ version: 9.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ian Leitch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-09 00:00:00.000000000 Z
11
+ date: 2024-09-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json
@@ -79,9 +79,12 @@ dependencies:
79
79
  - - ">="
80
80
  - !ruby/object:Gem::Version
81
81
  version: '6.0'
82
+ - - "!="
83
+ - !ruby/object:Gem::Version
84
+ version: 7.1.4
82
85
  - - "<"
83
86
  - !ruby/object:Gem::Version
84
- version: 7.1.0
87
+ version: 7.2.0
85
88
  type: :runtime
86
89
  prerelease: false
87
90
  version_requirements: !ruby/object:Gem::Requirement
@@ -89,9 +92,12 @@ dependencies:
89
92
  - - ">="
90
93
  - !ruby/object:Gem::Version
91
94
  version: '6.0'
95
+ - - "!="
96
+ - !ruby/object:Gem::Version
97
+ version: 7.1.4
92
98
  - - "<"
93
99
  - !ruby/object:Gem::Version
94
- version: 7.1.0
100
+ version: 7.2.0
95
101
  - !ruby/object:Gem::Dependency
96
102
  name: thor
97
103
  requirement: !ruby/object:Gem::Requirement
@@ -438,16 +444,16 @@ dependencies:
438
444
  name: sqlite3
439
445
  requirement: !ruby/object:Gem::Requirement
440
446
  requirements:
441
- - - ">="
447
+ - - "~>"
442
448
  - !ruby/object:Gem::Version
443
- version: '0'
449
+ version: '1.4'
444
450
  type: :development
445
451
  prerelease: false
446
452
  version_requirements: !ruby/object:Gem::Requirement
447
453
  requirements:
448
- - - ">="
454
+ - - "~>"
449
455
  - !ruby/object:Gem::Version
450
- version: '0'
456
+ version: '1.4'
451
457
  description: The push notification service for Ruby.
452
458
  email:
453
459
  - port001@gmail.com