rpush 6.0.1 → 7.0.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: d4f2b9e229e7ebe35f201483f6e959cb317ae7ca97f56b0084ee1543a9bb13b3
4
- data.tar.gz: 23b0ae77b424a34db34eb823b265eedc696f8924216555cc0485cd3d8f4a6a99
3
+ metadata.gz: 92cd836109dce22fe3308276ba9dfef44eb2568199527f152beb848711ad6b07
4
+ data.tar.gz: bd276ebd3983b2f59a2382b02ecb1806bc3dc08996e565c097308abd2809b351
5
5
  SHA512:
6
- metadata.gz: 106f87bc174864adaf3443933ae690312c7f2f16df946accb19c02bfeaff03d9f706a4e9f6f5f164e11a5e027663e46f547713b9ae8dd280e38b4f42ec77eb2b
7
- data.tar.gz: 065b010d2f8af82d86fad787f6fa59441e120d3de987971f131f70d40680cc8c571247b78d25682b16a8e69b2587fa07fa1b91903340b2690565f6863826edae
6
+ metadata.gz: 8971bc32c3b3b9f17a3bfe6d1c4aeb80ca40238d0598061dc6f59eae2f453e3c2cd0cefb2f39092c4842ed220f8c424214d3ce37fa8828b7cd0085324164b061
7
+ data.tar.gz: f825acf76c812b53746c26829206d9c7641566820fb6abdcc1113493bedd0bfe9b511acb13d1175c9024e51c4435d535c2931c72545ec17edf797c62537f1e4e
data/CHANGELOG.md CHANGED
@@ -2,6 +2,23 @@
2
2
 
3
3
  ## [Unreleased](https://github.com/rpush/rpush/tree/HEAD)
4
4
 
5
+ [Full Changelog](https://github.com/rpush/rpush/compare/v7.0.0...HEAD)
6
+
7
+ ## [v7.0.0](https://github.com/rpush/rpush/tree/HEAD)
8
+
9
+ [Full Changelog](https://github.com/rpush/rpush/compare/v6.0.1...v7.0.0)
10
+
11
+ **Merged pull requests:**
12
+
13
+ - Test with Ruby 3.1 [\#632](https://github.com/rpush/rpush/pull/632) ([aried3r](https://github.com/aried3r))
14
+ - Resolves Rails 7 Time.now.to\_s deprecation warning [\#630](https://github.com/rpush/rpush/pull/630) ([gregblake](https://github.com/gregblake))
15
+ - Adds Rails 7 Support [\#629](https://github.com/rpush/rpush/pull/629) ([gregblake](https://github.com/gregblake))
16
+ - Test with Rails 7.0.0.alpha2 [\#626](https://github.com/rpush/rpush/pull/626) ([aried3r](https://github.com/aried3r))
17
+
18
+ **Breaking:**
19
+
20
+ - Drop support for Ruby 2.3 [\#631](https://github.com/rpush/rpush/pull/631) ([aried3r](https://github.com/aried3r))
21
+
5
22
  ## [v6.0.1](https://github.com/rpush/rpush/tree/v6.0.1) (2021-10-08)
6
23
 
7
24
  [Full Changelog](https://github.com/rpush/rpush/compare/v6.0.0...v6.0.1)
@@ -58,7 +58,11 @@ class Rpush200Updates < ActiveRecord::Migration[5.0]
58
58
 
59
59
  def self.adapter_name
60
60
  env = (defined?(Rails) && Rails.env) ? Rails.env : 'development'
61
- Hash[ActiveRecord::Base.configurations[env].map { |k,v| [k.to_sym,v] }][:adapter]
61
+ if ActiveRecord::VERSION::MAJOR > 6
62
+ ActiveRecord::Base.configurations.configs_for(env_name: env).first.configuration_hash[:adapter]
63
+ else
64
+ Hash[ActiveRecord::Base.configurations[env].map { |k,v| [k.to_sym,v] }][:adapter]
65
+ end
62
66
  end
63
67
 
64
68
  def self.postgresql?
@@ -181,6 +181,17 @@ module Rpush
181
181
  id
182
182
  end
183
183
 
184
+ def adapter_name
185
+ env = (defined?(Rails) && Rails.env) ? Rails.env : 'development'
186
+ if ::ActiveRecord::VERSION::MAJOR > 6
187
+ ::ActiveRecord::Base.configurations.configs_for(env_name: env).first.configuration_hash[:adapter]
188
+ else
189
+ config = ::ActiveRecord::Base.configurations[env]
190
+ return '' unless config
191
+ Hash[config.map { |k, v| [k.to_sym, v] }][:adapter]
192
+ end
193
+ end
194
+
184
195
  private
185
196
 
186
197
  def create_gcm_like_notification(notification, attrs, data, registration_ids, deliver_after, app) # rubocop:disable Metrics/ParameterLists
@@ -199,13 +210,6 @@ module Rpush
199
210
  relation = Rpush::Client::ActiveRecord::Notification.where('processing = ? AND delivered = ? AND failed = ? AND (deliver_after IS NULL OR deliver_after < ?)', false, false, false, Time.now)
200
211
  relation.order('deliver_after ASC, created_at ASC')
201
212
  end
202
-
203
- def adapter_name
204
- env = (defined?(Rails) && Rails.env) ? Rails.env : 'development'
205
- config = ::ActiveRecord::Base.configurations[env]
206
- return '' unless config
207
- Hash[config.map { |k, v| [k.to_sym, v] }][:adapter]
208
- end
209
213
  end
210
214
  end
211
215
  end
data/lib/rpush/logger.rb CHANGED
@@ -69,7 +69,7 @@ module Rpush
69
69
  msg = "#{msg.class.name}, #{msg.message}\n#{formatted_backtrace}"
70
70
  end
71
71
 
72
- formatted_msg = "[#{Time.now.to_s(:db)}] "
72
+ formatted_msg = "[#{Time.now.to_formatted_s(:db)}]"
73
73
  formatted_msg << '[rpush] ' if Rpush.config.embedded
74
74
  formatted_msg << "[#{prefix}] " if prefix
75
75
  formatted_msg << msg
data/lib/rpush/version.rb CHANGED
@@ -1,8 +1,8 @@
1
1
  module Rpush
2
2
  module VERSION
3
- MAJOR = 6
3
+ MAJOR = 7
4
4
  MINOR = 0
5
- TINY = 1
5
+ TINY = 0
6
6
  PRE = nil
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".").freeze
@@ -66,4 +66,11 @@ describe Rpush::Daemon::Store::ActiveRecord do
66
66
  expect(store.deliverable_notifications(Rpush.config.batch_size)).to be_empty
67
67
  end
68
68
  end
69
+
70
+ describe "#adapter_name" do
71
+ it "should return the adapter name" do
72
+ adapter = ENV["ADAPTER"] || "postgresql"
73
+ expect(store.adapter_name).to eq(adapter)
74
+ end
75
+ end
69
76
  end if active_record?
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: 6.0.1
4
+ version: 7.0.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: 2021-10-08 00:00:00.000000000 Z
11
+ date: 2022-01-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json
@@ -292,16 +292,16 @@ dependencies:
292
292
  name: rubocop
293
293
  requirement: !ruby/object:Gem::Requirement
294
294
  requirements:
295
- - - ">="
295
+ - - "~>"
296
296
  - !ruby/object:Gem::Version
297
- version: '0'
297
+ version: 1.12.0
298
298
  type: :development
299
299
  prerelease: false
300
300
  version_requirements: !ruby/object:Gem::Requirement
301
301
  requirements:
302
- - - ">="
302
+ - - "~>"
303
303
  - !ruby/object:Gem::Version
304
- version: '0'
304
+ version: 1.12.0
305
305
  - !ruby/object:Gem::Dependency
306
306
  name: rubocop-performance
307
307
  requirement: !ruby/object:Gem::Requirement
@@ -693,6 +693,7 @@ metadata:
693
693
  bug_tracker_uri: https://github.com/rpush/rpush/issues
694
694
  changelog_uri: https://github.com/rpush/rpush/blob/master/CHANGELOG.md
695
695
  source_code_uri: https://github.com/rpush/rpush
696
+ rubygems_mfa_required: 'true'
696
697
  post_install_message: |
697
698
  When upgrading Rpush, don't forget to run `bundle exec rpush init` to get all the latest migrations.
698
699
 
@@ -705,14 +706,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
705
706
  requirements:
706
707
  - - ">="
707
708
  - !ruby/object:Gem::Version
708
- version: 2.3.0
709
+ version: 2.4.0
709
710
  required_rubygems_version: !ruby/object:Gem::Requirement
710
711
  requirements:
711
712
  - - ">="
712
713
  - !ruby/object:Gem::Version
713
714
  version: '0'
714
715
  requirements: []
715
- rubygems_version: 3.1.4
716
+ rubygems_version: 3.3.5
716
717
  signing_key:
717
718
  specification_version: 4
718
719
  summary: The push notification service for Ruby.