Skip to content

Commit 5587df3

Browse files
authored
Merge pull request #4 from gtt-project/feature/support-zeitwerk
Support zeitwerk
2 parents 156e981 + 704d6d1 commit 5587df3

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,17 @@ The GTT Project appreciates any [contributions](https://github.com/gtt-project/.
3636

3737
## Version History
3838

39+
- 2.0.0 Support Redmine 5.0
40+
- 1.1.0 Publish on GitHub
41+
3942
See [all releases](https://github.com/gtt-project/redmine_expo_push/releases) with release notes.
4043

4144
## Authors
4245

4346
- [Jens Kraemer](https://github.com/jkraemer)
4447
- [Thibault Mutabazi](https://github.com/eyewritecode)
4548
- [Ko Nagase](https://github.com/sanak)
49+
- [Daniel Kastl](https://github.com/dkastl)
4650
- ... [and others](https://github.com/gtt-project/redmine_expo_push/graphs/contributors)
4751

4852
## LICENSE

init.rb

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1-
require 'redmine'
1+
require File.expand_path('../lib/redmine_expo_push/hooks', __FILE__)
22

3-
require 'redmine_expo_push'
4-
require 'redmine_expo_push/hooks'
5-
6-
Rails.configuration.to_prepare do
7-
RedmineExpoPush.setup
3+
if Rails.version > '6.0' && Rails.autoloaders.zeitwerk_enabled?
4+
Rails.application.config.after_initialize do
5+
RedmineExpoPush.setup
6+
end
7+
else
8+
require 'redmine_expo_push'
9+
Rails.configuration.to_prepare do
10+
RedmineExpoPush.setup
11+
end
812
end
913

1014
Redmine::Plugin.register :redmine_expo_push do
@@ -13,7 +17,7 @@
1317
author_url 'https://github.com/georepublic'
1418
url 'https://github.com/gtt-project/redmine_expo_push'
1519
description 'Notify mobile app users through push notifications'
16-
version '1.1.0'
20+
version '2.0.0'
1721

1822
requires_redmine version_or_higher: '4.0.0'
1923

0 commit comments

Comments
 (0)