redmine-more_view_hooks 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +4 -0
- data/lib/more_view_hooks/default_additional_hooks.rb +5 -5
- data/lib/more_view_hooks/engine.rb +15 -0
- data/lib/more_view_hooks/version.rb +1 -1
- data/redmine-more_view_hooks.gemspec +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 23b73e266afc79db3818b2db8fa11f8e48cbe087
|
|
4
|
+
data.tar.gz: dab83206fcba8865922b03e19e01ecd9a53610d3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6d2c8feefe95c3a1b05daf034aded280103cc3420b8ad3e81be5aa7eda4ac64ed5be90963814bcd12d199d92db9917f6c8facd9d9e0e5507ad779c1786a9a41e
|
|
7
|
+
data.tar.gz: 5b4f681ad1fd5622adb527521b4025922069a82f6aea417bd7543c96a8f48c8451e029d92774a3af7fcd1d1d6570f42c9370aaf0a741fffe93f0c02db2b89df9
|
data/.rubocop.yml
CHANGED
|
@@ -2,27 +2,27 @@ MoreViewHooks.instance_eval do
|
|
|
2
2
|
add(:view_projects_contextual,
|
|
3
3
|
virtual_path: "projects/show",
|
|
4
4
|
insert_top: "div.contextual"
|
|
5
|
-
|
|
5
|
+
)
|
|
6
6
|
|
|
7
7
|
add(:view_projects_show_top,
|
|
8
8
|
virtual_path: "projects/show",
|
|
9
9
|
insert_before: "div.splitcontentleft"
|
|
10
|
-
|
|
10
|
+
)
|
|
11
11
|
|
|
12
12
|
add(:view_projects_show_bottom,
|
|
13
13
|
virtual_path: "projects/show",
|
|
14
14
|
insert_after: "div.splitcontentright"
|
|
15
|
-
|
|
15
|
+
)
|
|
16
16
|
|
|
17
17
|
if redmine_version_at_least?("3.1")
|
|
18
18
|
add(:view_projects_show_sidebar_top,
|
|
19
19
|
virtual_path: "projects/_sidebar",
|
|
20
20
|
insert_before: "erb[silent]:contains('if User.current.allowed_to?(:view_time_entries, @project)')"
|
|
21
|
-
|
|
21
|
+
)
|
|
22
22
|
else
|
|
23
23
|
add(:view_projects_show_sidebar_top,
|
|
24
24
|
virtual_path: "projects/_sidebar",
|
|
25
25
|
insert_before: "erb[silent]:contains('if @total_hours.present?')"
|
|
26
|
-
|
|
26
|
+
)
|
|
27
27
|
end
|
|
28
28
|
end
|
|
@@ -6,5 +6,20 @@ module MoreViewHooks
|
|
|
6
6
|
config.to_prepare do
|
|
7
7
|
RedminePlugin.new
|
|
8
8
|
end
|
|
9
|
+
|
|
10
|
+
initializer "hotfix.redmine_plugins_eager_load_paths",
|
|
11
|
+
before: "deface.tweak_eager_loading" do |app|
|
|
12
|
+
patch_redmine_plugins_eager_load_paths!(app)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
private
|
|
16
|
+
|
|
17
|
+
def patch_redmine_plugins_eager_load_paths!(app)
|
|
18
|
+
app.railties._all.each do |railtie|
|
|
19
|
+
next unless railtie.respond_to?(:root) &&
|
|
20
|
+
railtie.config.respond_to?(:eager_load_paths)
|
|
21
|
+
railtie.config.eager_load_paths.map!(&:to_s)
|
|
22
|
+
end
|
|
23
|
+
end
|
|
9
24
|
end
|
|
10
25
|
end
|
|
@@ -15,8 +15,8 @@ Gem::Specification.new do |spec|
|
|
|
15
15
|
spec.license = MoreViewHooks::Infos::LICENSE
|
|
16
16
|
|
|
17
17
|
spec.files = `git ls-files -z`.split("\x0")
|
|
18
|
-
spec.executables = spec.files.grep(
|
|
19
|
-
spec.test_files = spec.files.grep(
|
|
18
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
|
19
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
|
20
20
|
spec.require_paths = ["lib"]
|
|
21
21
|
|
|
22
22
|
spec.add_dependency "rails", "~> 4.2.0"
|