activity_notification 2.2.3 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/build.yml +18 -17
- data/CHANGELOG.md +14 -0
- data/Gemfile +3 -2
- data/Rakefile +2 -2
- data/activity_notification.gemspec +3 -3
- data/docs/Setup.md +16 -0
- data/gemfiles/Gemfile.rails-5.0 +1 -1
- data/gemfiles/Gemfile.rails-5.1 +2 -1
- data/gemfiles/Gemfile.rails-5.2 +1 -1
- data/gemfiles/Gemfile.rails-6.0 +2 -1
- data/gemfiles/Gemfile.rails-6.1 +1 -1
- data/gemfiles/Gemfile.rails-7.0 +1 -6
- data/gemfiles/Gemfile.rails-7.1 +23 -0
- data/lib/activity_notification/models.rb +23 -1
- data/lib/activity_notification/version.rb +1 -1
- data/spec/concerns/renderable_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -0
- metadata +18 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f3601a2256b7e6c6d029c5eaa66474a1786e590e09e461a01b25359a53a62fff
|
4
|
+
data.tar.gz: 1531fc01a13f15e74cecf7466b2cbfa365c70172fe5c25659f138ce01d0cf537
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aaaad2eda74f02ad52c3cfc7ad34c3b1ecd43367ae6431d64dac8c13461c8764917db6a3a64a2059e3a2ce0ab5e2400e6ec7f7662cbbde4d41521077aae4aa89
|
7
|
+
data.tar.gz: eaded5b0d4c439e618c70a57e9ec6d868917819006c32923dde11c419a86d082d2ba7c2183037d094a59ff60dc1a9fdad97514aaf44337ae22130bfc1f8a43d1
|
data/.github/workflows/build.yml
CHANGED
@@ -3,8 +3,8 @@ name: build
|
|
3
3
|
on:
|
4
4
|
push:
|
5
5
|
branches:
|
6
|
-
- '
|
7
|
-
- '
|
6
|
+
- 'master'
|
7
|
+
- 'development'
|
8
8
|
pull_request:
|
9
9
|
branches:
|
10
10
|
- '**'
|
@@ -23,6 +23,7 @@ jobs:
|
|
23
23
|
- gemfiles/Gemfile.rails-6.0
|
24
24
|
- gemfiles/Gemfile.rails-6.1
|
25
25
|
- gemfiles/Gemfile.rails-7.0
|
26
|
+
- gemfiles/Gemfile.rails-7.1
|
26
27
|
orm:
|
27
28
|
- active_record
|
28
29
|
- mongoid
|
@@ -30,27 +31,29 @@ jobs:
|
|
30
31
|
include:
|
31
32
|
# https://www.ruby-lang.org/en/downloads
|
32
33
|
- gemfile: gemfiles/Gemfile.rails-5.0
|
33
|
-
ruby-version: 2.7.
|
34
|
+
ruby-version: 2.7.7
|
34
35
|
- gemfile: gemfiles/Gemfile.rails-5.1
|
35
|
-
ruby-version: 2.7.
|
36
|
+
ruby-version: 2.7.7
|
36
37
|
- gemfile: gemfiles/Gemfile.rails-5.2
|
37
|
-
ruby-version: 2.7.
|
38
|
+
ruby-version: 2.7.7
|
38
39
|
- gemfile: gemfiles/Gemfile.rails-6.0
|
39
|
-
ruby-version:
|
40
|
+
ruby-version: 2.7.7
|
40
41
|
- gemfile: gemfiles/Gemfile.rails-6.1
|
41
|
-
ruby-version:
|
42
|
+
ruby-version: 2.7.7
|
42
43
|
- gemfile: gemfiles/Gemfile.rails-7.0
|
43
|
-
ruby-version: 3.
|
44
|
+
ruby-version: 3.1.6
|
45
|
+
- gemfile: gemfiles/Gemfile.rails-7.1
|
46
|
+
ruby-version: 3.2.4
|
44
47
|
- gemfile: Gemfile
|
45
|
-
ruby-version: 3.
|
48
|
+
ruby-version: 3.3.3
|
46
49
|
orm: active_record
|
47
50
|
test-db: mysql
|
48
51
|
- gemfile: Gemfile
|
49
|
-
ruby-version: 3.
|
52
|
+
ruby-version: 3.3.3
|
50
53
|
orm: active_record
|
51
54
|
test-db: postgresql
|
52
55
|
- gemfile: Gemfile
|
53
|
-
ruby-version: 3.
|
56
|
+
ruby-version: 3.3.3
|
54
57
|
orm: mongoid
|
55
58
|
test-db: mongodb
|
56
59
|
- gemfile: Gemfile
|
@@ -64,6 +67,8 @@ jobs:
|
|
64
67
|
orm: dynamoid
|
65
68
|
- gemfile: gemfiles/Gemfile.rails-7.0
|
66
69
|
orm: dynamoid
|
70
|
+
- gemfile: gemfiles/Gemfile.rails-7.1
|
71
|
+
orm: dynamoid
|
67
72
|
|
68
73
|
env:
|
69
74
|
RAILS_ENV: test
|
@@ -97,19 +102,15 @@ jobs:
|
|
97
102
|
- 27017:27017
|
98
103
|
env:
|
99
104
|
MONGO_INITDB_DATABASE: activity_notification_test
|
100
|
-
options: --health-cmd
|
105
|
+
options: --health-cmd mongosh --health-interval 10s --health-timeout 5s --health-retries 5
|
101
106
|
|
102
107
|
steps:
|
103
|
-
- uses: actions/checkout@
|
108
|
+
- uses: actions/checkout@v4
|
104
109
|
- name: Set up Ruby
|
105
110
|
uses: ruby/setup-ruby@v1
|
106
111
|
with:
|
107
112
|
ruby-version: ${{ matrix.ruby-version }}
|
108
113
|
bundler-cache: true
|
109
|
-
- name: Install dependencies
|
110
|
-
run: |
|
111
|
-
bundle install
|
112
|
-
bundle update
|
113
114
|
- name: Setup Amazon DynamoDB Local
|
114
115
|
if: matrix.orm == 'dynamoid'
|
115
116
|
run: |
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
## 2.3.0 / 2024-06-02
|
2
|
+
[Full Changelog](http://github.com/simukappu/activity_notification/compare/v2.2.4...v2.3.0)
|
3
|
+
|
4
|
+
Enhancements:
|
5
|
+
|
6
|
+
* Allow use with Rails 7.1 - [#173](https://github.com/simukappu/activity_notification/issues/173) [#177](https://github.com/simukappu/activity_notification/pull/177)
|
7
|
+
|
8
|
+
## 2.2.4 / 2023-03-20
|
9
|
+
[Full Changelog](http://github.com/simukappu/activity_notification/compare/v2.2.3...v2.2.4)
|
10
|
+
|
11
|
+
Bug Fixes:
|
12
|
+
|
13
|
+
* Fix broken serialization with Rails security patch - [#166](https://github.com/simukappu/activity_notification/issues/166) [#167](https://github.com/simukappu/activity_notification/pull/167)
|
14
|
+
|
1
15
|
## 2.2.3 / 2022-02-12
|
2
16
|
[Full Changelog](http://github.com/simukappu/activity_notification/compare/v2.2.2...v2.2.3)
|
3
17
|
|
data/Gemfile
CHANGED
@@ -2,9 +2,10 @@ source 'https://rubygems.org'
|
|
2
2
|
|
3
3
|
gemspec
|
4
4
|
|
5
|
-
gem 'rails', '~>
|
5
|
+
gem 'rails', '~> 7.1.0'
|
6
6
|
|
7
7
|
group :production do
|
8
|
+
gem 'sprockets-rails'
|
8
9
|
gem 'puma'
|
9
10
|
gem 'pg'
|
10
11
|
gem 'devise'
|
@@ -20,7 +21,7 @@ group :test do
|
|
20
21
|
gem 'ammeter'
|
21
22
|
gem 'timecop'
|
22
23
|
gem 'committee'
|
23
|
-
gem 'committee-rails'
|
24
|
+
gem 'committee-rails', '< 0.6'
|
24
25
|
# gem 'coveralls', require: false
|
25
26
|
gem 'coveralls_reborn', require: false
|
26
27
|
end
|
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,16 +20,16 @@ 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.
|
23
|
+
s.add_dependency 'railties', '>= 5.0.0', '< 7.2'
|
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'
|
27
27
|
|
28
28
|
s.add_development_dependency 'puma', '>= 3.12.0'
|
29
|
-
s.add_development_dependency 'sqlite3', '>= 1.3.13'
|
29
|
+
s.add_development_dependency 'sqlite3', '>= 1.3.13', '< 2.0'
|
30
30
|
s.add_development_dependency 'mysql2', '>= 0.5.2'
|
31
31
|
s.add_development_dependency 'pg', '>= 1.0.0'
|
32
|
-
s.add_development_dependency 'mongoid', '>= 4.0.0'
|
32
|
+
s.add_development_dependency 'mongoid', '>= 4.0.0', '< 9.0'
|
33
33
|
s.add_development_dependency 'dynamoid', '3.1.0'
|
34
34
|
s.add_development_dependency 'rspec-rails', '>= 3.8.0'
|
35
35
|
s.add_development_dependency 'factory_bot_rails', '>= 4.11.0', '< 5.0.0'
|
data/docs/Setup.md
CHANGED
@@ -46,6 +46,22 @@ The same can be done for the subscription table name, e.g., if you're using the
|
|
46
46
|
config.subscription_table_name = "notifications_subscriptions"
|
47
47
|
```
|
48
48
|
|
49
|
+
If you're redefining `yaml_column_permitted_classes` in *config/application.rb*, then you need to add a few classes to the whitelist to make sure *activity_notification* still works as expected.
|
50
|
+
|
51
|
+
```ruby
|
52
|
+
config.active_record.yaml_column_permitted_classes ||= []
|
53
|
+
|
54
|
+
# your override(s), e.g: MyWhitelistedClass
|
55
|
+
config.active_record.yaml_column_permitted_classes << MyWhitelistedClass
|
56
|
+
|
57
|
+
# overrides required for activity_notification to work
|
58
|
+
config.yaml_column_permitted_classes << ActiveSupport::HashWithIndifferentAccess
|
59
|
+
config.yaml_column_permitted_classes << ActiveSupport::TimeWithZone
|
60
|
+
config.yaml_column_permitted_classes << ActiveSupport::TimeZone
|
61
|
+
config.yaml_column_permitted_classes << Symbol
|
62
|
+
config.yaml_column_permitted_classes << Time
|
63
|
+
```
|
64
|
+
|
49
65
|
#### Using Mongoid ORM
|
50
66
|
|
51
67
|
When you use *activity_notification* with [Mongoid](http://mongoid.org) ORM, set **AN_ORM** environment variable to **mongoid**:
|
data/gemfiles/Gemfile.rails-5.0
CHANGED
data/gemfiles/Gemfile.rails-5.1
CHANGED
@@ -16,9 +16,10 @@ group :test do
|
|
16
16
|
gem 'ammeter'
|
17
17
|
gem 'timecop'
|
18
18
|
gem 'committee'
|
19
|
-
gem 'committee-rails'
|
19
|
+
gem 'committee-rails', '< 0.6'
|
20
20
|
# gem 'coveralls', require: false
|
21
21
|
gem 'coveralls_reborn', require: false
|
22
|
+
gem 'mongoid', '>= 4.0.0', '< 8.0'
|
22
23
|
end
|
23
24
|
|
24
25
|
gem 'dotenv-rails', groups: [:development, :test]
|
data/gemfiles/Gemfile.rails-5.2
CHANGED
data/gemfiles/Gemfile.rails-6.0
CHANGED
@@ -3,6 +3,7 @@ source 'https://rubygems.org'
|
|
3
3
|
gemspec path: '../'
|
4
4
|
|
5
5
|
gem 'rails', '~> 6.0.0'
|
6
|
+
gem 'psych', '< 4'
|
6
7
|
|
7
8
|
group :development do
|
8
9
|
gem 'bullet'
|
@@ -14,7 +15,7 @@ group :test do
|
|
14
15
|
gem 'ammeter'
|
15
16
|
gem 'timecop'
|
16
17
|
gem 'committee'
|
17
|
-
gem 'committee-rails'
|
18
|
+
gem 'committee-rails', '< 0.6'
|
18
19
|
# gem 'coveralls', require: false
|
19
20
|
gem 'coveralls_reborn', require: false
|
20
21
|
end
|
data/gemfiles/Gemfile.rails-6.1
CHANGED
data/gemfiles/Gemfile.rails-7.0
CHANGED
@@ -3,11 +3,6 @@ source 'https://rubygems.org'
|
|
3
3
|
gemspec path: '../'
|
4
4
|
|
5
5
|
gem 'rails', '~> 7.0.0'
|
6
|
-
# https://github.com/lynndylanhurley/devise_token_auth/pull/1517
|
7
|
-
gem 'devise_token_auth', git: 'https://github.com/lynndylanhurley/devise_token_auth.git'
|
8
|
-
# https://jira.mongodb.org/browse/MONGOID-5193
|
9
|
-
gem 'mongoid', git: 'https://github.com/mongodb/mongoid.git'
|
10
|
-
|
11
6
|
gem 'sprockets-rails'
|
12
7
|
|
13
8
|
group :development do
|
@@ -20,7 +15,7 @@ group :test do
|
|
20
15
|
gem 'ammeter'
|
21
16
|
gem 'timecop'
|
22
17
|
gem 'committee'
|
23
|
-
gem 'committee-rails'
|
18
|
+
gem 'committee-rails', '< 0.6'
|
24
19
|
# gem 'coveralls', require: false
|
25
20
|
gem 'coveralls_reborn', require: false
|
26
21
|
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
gemspec path: '../'
|
4
|
+
|
5
|
+
gem 'rails', '~> 7.1.0'
|
6
|
+
gem 'sprockets-rails'
|
7
|
+
|
8
|
+
group :development do
|
9
|
+
gem 'bullet'
|
10
|
+
gem 'rack-cors'
|
11
|
+
end
|
12
|
+
|
13
|
+
group :test do
|
14
|
+
gem 'rails-controller-testing'
|
15
|
+
gem 'ammeter'
|
16
|
+
gem 'timecop'
|
17
|
+
gem 'committee'
|
18
|
+
gem 'committee-rails', '< 0.6'
|
19
|
+
# gem 'coveralls', require: false
|
20
|
+
gem 'coveralls_reborn', require: false
|
21
|
+
end
|
22
|
+
|
23
|
+
gem 'dotenv-rails', groups: [:development, :test]
|
@@ -17,4 +17,26 @@ module ActivityNotification
|
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
|
-
|
20
|
+
if defined?(ActiveRecord::Base)
|
21
|
+
ActiveRecord::Base.class_eval { include ActivityNotification::Models }
|
22
|
+
|
23
|
+
# https://github.com/simukappu/activity_notification/issues/166
|
24
|
+
# https://discuss.rubyonrails.org/t/cve-2022-32224-possible-rce-escalation-bug-with-serialized-columns-in-active-record/81017
|
25
|
+
if (Gem::Version.new("5.2.8.1") <= Rails.gem_version && Rails.gem_version < Gem::Version.new("6.0")) ||
|
26
|
+
(Gem::Version.new("6.0.5.1") <= Rails.gem_version && Rails.gem_version < Gem::Version.new("6.1")) ||
|
27
|
+
(Gem::Version.new("6.1.6.1") <= Rails.gem_version && Rails.gem_version < Gem::Version.new("7.0"))
|
28
|
+
ActiveRecord::Base.yaml_column_permitted_classes ||= []
|
29
|
+
ActiveRecord::Base.yaml_column_permitted_classes << ActiveSupport::HashWithIndifferentAccess
|
30
|
+
ActiveRecord::Base.yaml_column_permitted_classes << ActiveSupport::TimeWithZone
|
31
|
+
ActiveRecord::Base.yaml_column_permitted_classes << ActiveSupport::TimeZone
|
32
|
+
ActiveRecord::Base.yaml_column_permitted_classes << Symbol
|
33
|
+
ActiveRecord::Base.yaml_column_permitted_classes << Time
|
34
|
+
elsif Gem::Version.new("7.0.3.1") <= Rails.gem_version
|
35
|
+
ActiveRecord.yaml_column_permitted_classes ||= []
|
36
|
+
ActiveRecord.yaml_column_permitted_classes << ActiveSupport::HashWithIndifferentAccess
|
37
|
+
ActiveRecord.yaml_column_permitted_classes << ActiveSupport::TimeWithZone
|
38
|
+
ActiveRecord.yaml_column_permitted_classes << ActiveSupport::TimeZone
|
39
|
+
ActiveRecord.yaml_column_permitted_classes << Symbol
|
40
|
+
ActiveRecord.yaml_column_permitted_classes << Time
|
41
|
+
end
|
42
|
+
end
|
@@ -77,7 +77,7 @@ shared_examples_for :renderable do
|
|
77
77
|
test_instance.target = create(:admin)
|
78
78
|
test_instance.key = "notification.#{simple_text_key}"
|
79
79
|
expect(test_instance.text)
|
80
|
-
.to eq("
|
80
|
+
.to eq("Translation missing: en.notification.admin.#{simple_text_key}.text")
|
81
81
|
end
|
82
82
|
end
|
83
83
|
|
data/spec/spec_helper.rb
CHANGED
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.
|
4
|
+
version: 2.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shota Yamazaki
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-07-02 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.
|
22
|
+
version: '7.2'
|
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.
|
32
|
+
version: '7.2'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: i18n
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -93,6 +93,9 @@ dependencies:
|
|
93
93
|
- - ">="
|
94
94
|
- !ruby/object:Gem::Version
|
95
95
|
version: 1.3.13
|
96
|
+
- - "<"
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: '2.0'
|
96
99
|
type: :development
|
97
100
|
prerelease: false
|
98
101
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -100,6 +103,9 @@ dependencies:
|
|
100
103
|
- - ">="
|
101
104
|
- !ruby/object:Gem::Version
|
102
105
|
version: 1.3.13
|
106
|
+
- - "<"
|
107
|
+
- !ruby/object:Gem::Version
|
108
|
+
version: '2.0'
|
103
109
|
- !ruby/object:Gem::Dependency
|
104
110
|
name: mysql2
|
105
111
|
requirement: !ruby/object:Gem::Requirement
|
@@ -135,6 +141,9 @@ dependencies:
|
|
135
141
|
- - ">="
|
136
142
|
- !ruby/object:Gem::Version
|
137
143
|
version: 4.0.0
|
144
|
+
- - "<"
|
145
|
+
- !ruby/object:Gem::Version
|
146
|
+
version: '9.0'
|
138
147
|
type: :development
|
139
148
|
prerelease: false
|
140
149
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -142,6 +151,9 @@ dependencies:
|
|
142
151
|
- - ">="
|
143
152
|
- !ruby/object:Gem::Version
|
144
153
|
version: 4.0.0
|
154
|
+
- - "<"
|
155
|
+
- !ruby/object:Gem::Version
|
156
|
+
version: '9.0'
|
145
157
|
- !ruby/object:Gem::Dependency
|
146
158
|
name: dynamoid
|
147
159
|
requirement: !ruby/object:Gem::Requirement
|
@@ -391,6 +403,7 @@ files:
|
|
391
403
|
- gemfiles/Gemfile.rails-6.0
|
392
404
|
- gemfiles/Gemfile.rails-6.1
|
393
405
|
- gemfiles/Gemfile.rails-7.0
|
406
|
+
- gemfiles/Gemfile.rails-7.1
|
394
407
|
- lib/activity_notification.rb
|
395
408
|
- lib/activity_notification/apis/notification_api.rb
|
396
409
|
- lib/activity_notification/apis/subscription_api.rb
|
@@ -683,7 +696,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
683
696
|
- !ruby/object:Gem::Version
|
684
697
|
version: '0'
|
685
698
|
requirements: []
|
686
|
-
rubygems_version: 3.
|
699
|
+
rubygems_version: 3.4.6
|
687
700
|
signing_key:
|
688
701
|
specification_version: 4
|
689
702
|
summary: Integrated user activity notifications for Ruby on Rails
|