activity_notification 2.3.0 → 2.3.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
  SHA256:
3
- metadata.gz: f3601a2256b7e6c6d029c5eaa66474a1786e590e09e461a01b25359a53a62fff
4
- data.tar.gz: 1531fc01a13f15e74cecf7466b2cbfa365c70172fe5c25659f138ce01d0cf537
3
+ metadata.gz: 3756e6a1dde16b628911625689f64a6514c7c43f42964453dcb04511f5cc6d5b
4
+ data.tar.gz: 1964bd54d6a1521f8224bbc4dcc27fbefcf2bd9ca95090e45dfbbc2d2f38bba6
5
5
  SHA512:
6
- metadata.gz: aaaad2eda74f02ad52c3cfc7ad34c3b1ecd43367ae6431d64dac8c13461c8764917db6a3a64a2059e3a2ce0ab5e2400e6ec7f7662cbbde4d41521077aae4aa89
7
- data.tar.gz: eaded5b0d4c439e618c70a57e9ec6d868917819006c32923dde11c419a86d082d2ba7c2183037d094a59ff60dc1a9fdad97514aaf44337ae22130bfc1f8a43d1
6
+ metadata.gz: 92289fad6ce9f245663fa01b2335a486e3cde53c9e50ec2be2161fc1fefbe2953898530fa7a1c94522adc60f7e523ccea1bc1bce14808c9ae6bb2ca9cc750302
7
+ data.tar.gz: dca9ddbd8d069b44848266a51346355fe382008b0deb61085903b334c39404935cff93a7a3118dd52ba9f89aa09e176f7beeba358ee4b4dd3fa5763dcd96c0d2
@@ -24,6 +24,7 @@ jobs:
24
24
  - gemfiles/Gemfile.rails-6.1
25
25
  - gemfiles/Gemfile.rails-7.0
26
26
  - gemfiles/Gemfile.rails-7.1
27
+ - gemfiles/Gemfile.rails-7.2
27
28
  orm:
28
29
  - active_record
29
30
  - mongoid
@@ -44,6 +45,8 @@ jobs:
44
45
  ruby-version: 3.1.6
45
46
  - gemfile: gemfiles/Gemfile.rails-7.1
46
47
  ruby-version: 3.2.4
48
+ - gemfile: gemfiles/Gemfile.rails-7.2
49
+ ruby-version: 3.3.4
47
50
  - gemfile: Gemfile
48
51
  ruby-version: 3.3.3
49
52
  orm: active_record
@@ -69,6 +72,8 @@ jobs:
69
72
  orm: dynamoid
70
73
  - gemfile: gemfiles/Gemfile.rails-7.1
71
74
  orm: dynamoid
75
+ - gemfile: gemfiles/Gemfile.rails-7.2
76
+ orm: dynamoid
72
77
 
73
78
  env:
74
79
  RAILS_ENV: test
@@ -119,3 +124,5 @@ jobs:
119
124
  - name: Run tests with RSpec
120
125
  run: bundle exec rspec
121
126
  continue-on-error: ${{ matrix.allow_failures == 'true' }}
127
+ - name: Coveralls
128
+ uses: coverallsapp/github-action@v2
data/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## 2.3.2 / 2024-09-23
2
+ [Full Changelog](http://github.com/simukappu/activity_notification/compare/v2.3.0...v2.3.1)
3
+
4
+ Enhancements:
5
+
6
+ * Allow use with Rails 7.2 - [#180](https://github.com/simukappu/activity_notification/pull/180) [#181](https://github.com/simukappu/activity_notification/issues/181)
7
+
8
+ ## 2.3.1 / 2024-07-23
9
+ [Full Changelog](http://github.com/simukappu/activity_notification/compare/v2.3.0...v2.3.1)
10
+
11
+ Bug Fixes:
12
+
13
+ * Fix serialize arguments for Rails 7.1 - [#178](https://github.com/simukappu/activity_notification/issues/178) [#179](https://github.com/simukappu/activity_notification/pull/179)
14
+
1
15
  ## 2.3.0 / 2024-06-02
2
16
  [Full Changelog](http://github.com/simukappu/activity_notification/compare/v2.2.4...v2.3.0)
3
17
 
data/Rakefile CHANGED
@@ -24,5 +24,5 @@ end
24
24
 
25
25
  Bundler::GemHelper.install_tasks
26
26
 
27
- #require File.expand_path('../spec/rails_app/config/application', __FILE__)
28
- #Rails.application.load_tasks
27
+ require File.expand_path('../spec/rails_app/config/application', __FILE__)
28
+ Rails.application.load_tasks
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
20
20
  s.require_paths = ["lib"]
21
21
  s.required_ruby_version = '>= 2.1.0'
22
22
 
23
- s.add_dependency 'railties', '>= 5.0.0', '< 7.2'
23
+ s.add_dependency 'railties', '>= 5.0.0', '< 7.3'
24
24
  s.add_dependency 'i18n', '>= 0.5.0'
25
25
  s.add_dependency 'jquery-rails', '>= 3.1.1'
26
26
  s.add_dependency 'swagger-blocks', '>= 3.0.0'
@@ -0,0 +1,25 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec path: '../'
4
+
5
+ gem 'rails', '~> 7.2.0'
6
+ gem 'sprockets-rails'
7
+ # https://github.com/lynndylanhurley/devise_token_auth/pull/1632
8
+ gem 'devise_token_auth', git: 'https://github.com/lynndylanhurley/devise_token_auth.git'
9
+
10
+ group :development do
11
+ gem 'bullet'
12
+ gem 'rack-cors'
13
+ end
14
+
15
+ group :test do
16
+ gem 'rails-controller-testing'
17
+ gem 'ammeter'
18
+ gem 'timecop'
19
+ gem 'committee'
20
+ gem 'committee-rails', '< 0.6'
21
+ # gem 'coveralls', require: false
22
+ gem 'coveralls_reborn', require: false
23
+ end
24
+
25
+ gem 'dotenv-rails', groups: [:development, :test]
@@ -22,6 +22,7 @@ if defined?(ActiveRecord::Base)
22
22
 
23
23
  # https://github.com/simukappu/activity_notification/issues/166
24
24
  # https://discuss.rubyonrails.org/t/cve-2022-32224-possible-rce-escalation-bug-with-serialized-columns-in-active-record/81017
25
+ # :nocov:
25
26
  if (Gem::Version.new("5.2.8.1") <= Rails.gem_version && Rails.gem_version < Gem::Version.new("6.0")) ||
26
27
  (Gem::Version.new("6.0.5.1") <= Rails.gem_version && Rails.gem_version < Gem::Version.new("6.1")) ||
27
28
  (Gem::Version.new("6.1.6.1") <= Rails.gem_version && Rails.gem_version < Gem::Version.new("7.0"))
@@ -39,4 +40,5 @@ if defined?(ActiveRecord::Base)
39
40
  ActiveRecord.yaml_column_permitted_classes << Symbol
40
41
  ActiveRecord.yaml_column_permitted_classes << Time
41
42
  end
43
+ # :nocov:
42
44
  end
@@ -45,7 +45,13 @@ module ActivityNotification
45
45
  belongs_to :notifier, polymorphic: true, optional: true
46
46
 
47
47
  # Serialize parameters Hash
48
- serialize :parameters, Hash
48
+ # :nocov:
49
+ if Rails.gem_version >= Gem::Version.new('7.1')
50
+ serialize :parameters, type: Hash, coder: YAML
51
+ else
52
+ serialize :parameters, Hash
53
+ end
54
+ # :nocov:
49
55
 
50
56
  validates :target, presence: true
51
57
  validates :notifiable, presence: true
@@ -14,7 +14,13 @@ module ActivityNotification
14
14
  belongs_to :target, polymorphic: true
15
15
 
16
16
  # Serialize parameters Hash
17
- serialize :optional_targets, Hash
17
+ # :nocov:
18
+ if Rails.gem_version >= Gem::Version.new('7.1')
19
+ serialize :optional_targets, type: Hash, coder: YAML
20
+ else
21
+ serialize :optional_targets, Hash
22
+ end
23
+ # :nocov:
18
24
 
19
25
  validates :target, presence: true
20
26
  validates :key, presence: true, uniqueness: { scope: :target }
@@ -1,3 +1,3 @@
1
1
  module ActivityNotification
2
- VERSION = "2.3.0"
2
+ VERSION = "2.3.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activity_notification
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shota Yamazaki
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-02 00:00:00.000000000 Z
11
+ date: 2024-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: 5.0.0
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '7.2'
22
+ version: '7.3'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: 5.0.0
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '7.2'
32
+ version: '7.3'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: i18n
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -404,6 +404,7 @@ files:
404
404
  - gemfiles/Gemfile.rails-6.1
405
405
  - gemfiles/Gemfile.rails-7.0
406
406
  - gemfiles/Gemfile.rails-7.1
407
+ - gemfiles/Gemfile.rails-7.2
407
408
  - lib/activity_notification.rb
408
409
  - lib/activity_notification/apis/notification_api.rb
409
410
  - lib/activity_notification/apis/subscription_api.rb