Skip to content

Commit

Permalink
Merge pull request #332 from gtt-project/fix/deface-overrides
Browse files Browse the repository at this point in the history
Fix deface overrides for zeitwerk reload
  • Loading branch information
sanak authored Aug 9, 2024
2 parents 8bca6e2 + cd07727 commit a824233
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 62 deletions.
33 changes: 0 additions & 33 deletions app/overrides/issues.rb

This file was deleted.

15 changes: 15 additions & 0 deletions app/overrides/issues/index.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Deface::Override.new(
:virtual_path => "issues/index",
:name => "deface_view_issues_index_map",
:insert_after => "h2",
:original => 'b807967c7184cb012c4bd5ccce90893349bc66e3',
:partial => "issues/index/map"
)

Deface::Override.new(
:virtual_path => "issues/index",
:name => "deface_view_issues_index_format_geojson",
:insert_after => "erb[loud]:contains('PDF')",
:original => '2b4102bf118f0a9866cf50477dce9cc7a78da6d5',
:partial => "issues/index/geojson"
)
15 changes: 15 additions & 0 deletions app/overrides/issues/show.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Deface::Override.new(
:virtual_path => "issues/show",
:name => "deface_view_issues_show_map",
:insert_before => "div.attributes",
:original => 'c56981aa84b0fee66ff43ea773cf1444193a2862',
:partial => "issues/show/map"
)

Deface::Override.new(
:virtual_path => "issues/show",
:name => "deface_view_issues_show_format_geojson",
:insert_after => "erb[loud]:contains('PDF')",
:original => '1419e0dcba37f62ff95372d41d9b73845889d826',
:partial => "issues/show/geojson"
)
17 changes: 0 additions & 17 deletions app/overrides/projects.rb

This file was deleted.

15 changes: 15 additions & 0 deletions app/overrides/projects/show.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Deface::Override.new(
:virtual_path => "projects/show",
:name => "deface_view_projects_show_map",
:insert_bottom => "div.splitcontentright",
:original => 'b939fb5ea208476399dbfb4b253dcff0ab1ace91',
:partial => "projects/show/map"
)

Deface::Override.new(
:virtual_path => "projects/show",
:name => "deface_view_projects_show_other_formats",
:insert_bottom => "div.splitcontentright",
:original => '1d2f0cb0b1439dddc34ac9c50b6b1b111fe702ce',
:partial => "projects/show/other_formats"
)
9 changes: 0 additions & 9 deletions app/overrides/users.rb

This file was deleted.

7 changes: 7 additions & 0 deletions app/overrides/users/show.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Deface::Override.new(
:virtual_path => "users/show",
:name => "deface_view_users_show_other_formats",
:insert_bottom => "div.splitcontentleft",
:original => 'abe916df0691ebe8848cfc0dde536abd3bfe39b8',
:partial => "users/show/other_formats"
)
7 changes: 4 additions & 3 deletions init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,10 @@
end

if Rails.version > '6.0' && Rails.autoloaders.zeitwerk_enabled?
require File.expand_path('../app/overrides/issues', __FILE__)
require File.expand_path('../app/overrides/projects', __FILE__)
require File.expand_path('../app/overrides/users', __FILE__)
Dir.glob("#{Rails.root}/plugins/redmine_gtt/app/overrides/**/*.rb").each do |path|
Rails.autoloaders.main.ignore(path)
require path
end
RedmineGtt.setup_normal_patches
Rails.application.config.after_initialize do
RedmineGtt.setup_controller_patches
Expand Down

0 comments on commit a824233

Please sign in to comment.