activity_notification 2.2.4 → 2.3.1

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: 86e614046f4d79bd83248b78e66855f7fe8269985676b2afd95389b29e56e25f
4
- data.tar.gz: 7a0e82b085c744a2f3197bd530b69b4ed708d93dcaa6f74ad9854afbf5ecc6a2
3
+ metadata.gz: 8a2728ee85f5c8cb39d25c2ea3a600a3a7f2e6b9d0f7ba47ca0003543971a1a6
4
+ data.tar.gz: 5a6cd5ee3ae4fdb8755b9150267cf95ffdbce31161bb4520a2e0ab38f43dc1e0
5
5
  SHA512:
6
- metadata.gz: c0dbbb13396e89d5bbfc8f0fc034fb4c1ad1f02e8ceb8ed1e9b6b8beb8c66e55e72c2e23fcd4383564321992f7fd3fe7f7b6dc3c85ddb338ff7cf43639306f15
7
- data.tar.gz: d972a277eabf7256deff36129a8253a423603333deebd96686d7305a9febcb7b19e85f7ea78b48655326899b06aa1535dc85f01bfb6b340df52a56db583f0336
6
+ metadata.gz: d4c65d449669e383d09b32405b64e71b07db574da6be60f110f1ba7d23b53f75ed755d88780c570ba608200dc55c8b773b162123e077f48acb843bb52547a705
7
+ data.tar.gz: c0200e5c40ce6c324a2f47beb243f47cf0dcb16c223484b14551cb49d29aceff22e9cfa276b66f8db3fe965c6d72174e2b479664b20b36fab13593a30f18f929
@@ -3,8 +3,8 @@ name: build
3
3
  on:
4
4
  push:
5
5
  branches:
6
- - '**'
7
- - '!images'
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
@@ -36,21 +37,23 @@ jobs:
36
37
  - gemfile: gemfiles/Gemfile.rails-5.2
37
38
  ruby-version: 2.7.7
38
39
  - gemfile: gemfiles/Gemfile.rails-6.0
39
- ruby-version: 3.2.1
40
+ ruby-version: 2.7.7
40
41
  - gemfile: gemfiles/Gemfile.rails-6.1
41
- ruby-version: 3.2.1
42
+ ruby-version: 2.7.7
42
43
  - gemfile: gemfiles/Gemfile.rails-7.0
43
- ruby-version: 3.2.1
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.2.1
48
+ ruby-version: 3.3.3
46
49
  orm: active_record
47
50
  test-db: mysql
48
51
  - gemfile: Gemfile
49
- ruby-version: 3.2.1
52
+ ruby-version: 3.3.3
50
53
  orm: active_record
51
54
  test-db: postgresql
52
55
  - gemfile: Gemfile
53
- ruby-version: 3.2.1
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
@@ -100,7 +105,7 @@ jobs:
100
105
  options: --health-cmd mongosh --health-interval 10s --health-timeout 5s --health-retries 5
101
106
 
102
107
  steps:
103
- - uses: actions/checkout@v2
108
+ - uses: actions/checkout@v4
104
109
  - name: Set up Ruby
105
110
  uses: ruby/setup-ruby@v1
106
111
  with:
data/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## 2.3.1 / 2024-07-23
2
+ [Full Changelog](http://github.com/simukappu/activity_notification/compare/v2.3.0...v2.3.1)
3
+
4
+ Bug Fixes:
5
+
6
+ * 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)
7
+
8
+ ## 2.3.0 / 2024-06-02
9
+ [Full Changelog](http://github.com/simukappu/activity_notification/compare/v2.2.4...v2.3.0)
10
+
11
+ Enhancements:
12
+
13
+ * Allow use with Rails 7.1 - [#173](https://github.com/simukappu/activity_notification/issues/173) [#177](https://github.com/simukappu/activity_notification/pull/177)
14
+
1
15
  ## 2.2.4 / 2023-03-20
2
16
  [Full Changelog](http://github.com/simukappu/activity_notification/compare/v2.2.3...v2.2.4)
3
17
 
data/Gemfile CHANGED
@@ -2,16 +2,14 @@ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
5
- gem 'rails', '~> 7.0.0'
5
+ gem 'rails', '~> 7.1.0'
6
6
 
7
7
  group :production do
8
8
  gem 'sprockets-rails'
9
9
  gem 'puma'
10
10
  gem 'pg'
11
11
  gem 'devise'
12
- # gem 'devise_token_auth'
13
- # https://github.com/lynndylanhurley/devise_token_auth/pull/1517
14
- gem 'devise_token_auth', git: 'https://github.com/lynndylanhurley/devise_token_auth.git'
12
+ gem 'devise_token_auth'
15
13
  end
16
14
 
17
15
  group :development do
@@ -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.1'
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'
@@ -19,6 +19,7 @@ group :test do
19
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]
@@ -4,8 +4,6 @@ gemspec path: '../'
4
4
 
5
5
  gem 'rails', '~> 7.0.0'
6
6
  gem 'sprockets-rails'
7
- # https://github.com/lynndylanhurley/devise_token_auth/pull/1517
8
- gem 'devise_token_auth', git: 'https://github.com/lynndylanhurley/devise_token_auth.git'
9
7
 
10
8
  group :development do
11
9
  gem 'bullet'
@@ -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]
@@ -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.2.4"
2
+ VERSION = "2.3.1"
3
3
  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("translation missing: en.notification.admin.#{simple_text_key}.text")
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
@@ -46,6 +46,7 @@ def clean_database
46
46
  end
47
47
 
48
48
  RSpec.configure do |config|
49
+ config.expect_with :minitest, :rspec
49
50
  config.include FactoryBot::Syntax::Methods
50
51
  config.before(:each) do
51
52
  FactoryBot.reload
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.2.4
4
+ version: 2.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shota Yamazaki
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-20 00:00:00.000000000 Z
11
+ date: 2024-07-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.1'
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.1'
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.2.33
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