Skip to content

Commit 3d4d2d2

Browse files
committed
Fix deface overrides for zeitwerk reload
1 parent d91131b commit 3d4d2d2

File tree

8 files changed

+56
-62
lines changed

8 files changed

+56
-62
lines changed

app/overrides/issues.rb

Lines changed: 0 additions & 33 deletions
This file was deleted.

app/overrides/issues/index.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Deface::Override.new(
2+
:virtual_path => "issues/index",
3+
:name => "deface_view_issues_index_map",
4+
:insert_after => "h2",
5+
:original => 'b807967c7184cb012c4bd5ccce90893349bc66e3',
6+
:partial => "issues/index/map"
7+
)
8+
9+
Deface::Override.new(
10+
:virtual_path => "issues/index",
11+
:name => "deface_view_issues_index_format_geojson",
12+
:insert_after => "erb[loud]:contains('PDF')",
13+
:original => '2b4102bf118f0a9866cf50477dce9cc7a78da6d5',
14+
:partial => "issues/index/geojson"
15+
)

app/overrides/issues/show.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Deface::Override.new(
2+
:virtual_path => "issues/show",
3+
:name => "deface_view_issues_show_map",
4+
:insert_before => "div.attributes",
5+
:original => 'c56981aa84b0fee66ff43ea773cf1444193a2862',
6+
:partial => "issues/show/map"
7+
)
8+
9+
Deface::Override.new(
10+
:virtual_path => "issues/show",
11+
:name => "deface_view_issues_show_format_geojson",
12+
:insert_after => "erb[loud]:contains('PDF')",
13+
:original => '1419e0dcba37f62ff95372d41d9b73845889d826',
14+
:partial => "issues/show/geojson"
15+
)

app/overrides/projects.rb

Lines changed: 0 additions & 17 deletions
This file was deleted.

app/overrides/projects/show.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Deface::Override.new(
2+
:virtual_path => "projects/show",
3+
:name => "deface_view_projects_show_map",
4+
:insert_bottom => "div.splitcontentright",
5+
:original => 'b939fb5ea208476399dbfb4b253dcff0ab1ace91',
6+
:partial => "projects/show/map"
7+
)
8+
9+
Deface::Override.new(
10+
:virtual_path => "projects/show",
11+
:name => "deface_view_projects_show_other_formats",
12+
:insert_bottom => "div.splitcontentright",
13+
:original => '1d2f0cb0b1439dddc34ac9c50b6b1b111fe702ce',
14+
:partial => "projects/show/other_formats"
15+
)

app/overrides/users.rb

Lines changed: 0 additions & 9 deletions
This file was deleted.

app/overrides/users/show.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Deface::Override.new(
2+
:virtual_path => "users/show",
3+
:name => "deface_view_users_show_other_formats",
4+
:insert_bottom => "div.splitcontentleft",
5+
:original => 'abe916df0691ebe8848cfc0dde536abd3bfe39b8',
6+
:partial => "users/show/other_formats"
7+
)

init.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,10 @@
5858
end
5959

6060
if Rails.version > '6.0' && Rails.autoloaders.zeitwerk_enabled?
61-
require File.expand_path('../app/overrides/issues', __FILE__)
62-
require File.expand_path('../app/overrides/projects', __FILE__)
63-
require File.expand_path('../app/overrides/users', __FILE__)
61+
Dir.glob("#{Rails.root}/plugins/redmine_gtt/app/overrides/**/*.rb").each do |path|
62+
Rails.autoloaders.main.ignore(path)
63+
load File.expand_path(path, __FILE__)
64+
end
6465
RedmineGtt.setup_normal_patches
6566
Rails.application.config.after_initialize do
6667
RedmineGtt.setup_controller_patches

0 commit comments

Comments
 (0)