Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redmine 5.0 and zeitwerk compatibility #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# You should have received a copy of the GNU General Public License
# along with redmine_custom_css. If not, see <http://www.gnu.org/licenses/>.
#
require_dependency 'hooks'
require File.expand_path 'lib/redmine_custom_css/hook_listener', __dir__

Redmine::Plugin.register :redmine_custom_css do
name 'Redmine Custom CSS plugin'
Expand Down
2 changes: 2 additions & 0 deletions lib/redmine_custom_css.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module RedmineCustomCss
end
2 changes: 1 addition & 1 deletion lib/hooks.rb → lib/redmine_custom_css/hook_listener.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# along with redmine_custom_css. If not, see <http://www.gnu.org/licenses/>.
#
module RedmineCustomCss
class RedmineCustomCssHookListener < Redmine::Hook::ViewListener
class HookListener < Redmine::Hook::ViewListener
def view_layouts_base_html_head(context)
css = Setting.plugin_redmine_custom_css['css']
"<style type=\"text/css\">#{css}</style>" unless css.nil? or css.empty?
Expand Down