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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 36a45bd7ab30331d67d0c2862e7f49632f35e807
4
- data.tar.gz: e1553577e226189fe1bd9d94dcce99adbbd291f1
3
+ metadata.gz: 23b73e266afc79db3818b2db8fa11f8e48cbe087
4
+ data.tar.gz: dab83206fcba8865922b03e19e01ecd9a53610d3
5
5
  SHA512:
6
- metadata.gz: 96257c2dbcdb8b10a2448b73f0890b5da7fd6f06f385de6754e3e477a46d91792617defb67a692060115ffe40fd0a7286cc4d02bb5faf300e0b1338d91e20c08
7
- data.tar.gz: 3e0767cfae4bfa9b04a3960fd8e886fa9b57f809ecc9a948c991892ccb040e25a36ebcda0af2e99e3965d4ee3187663f2f1f9b7fc7c6adf45850b85ca6c1afed
6
+ metadata.gz: 6d2c8feefe95c3a1b05daf034aded280103cc3420b8ad3e81be5aa7eda4ac64ed5be90963814bcd12d199d92db9917f6c8facd9d9e0e5507ad779c1786a9a41e
7
+ data.tar.gz: 5b4f681ad1fd5622adb527521b4025922069a82f6aea417bd7543c96a8f48c8451e029d92774a3af7fcd1d1d6570f42c9370aaf0a741fffe93f0c02db2b89df9
data/.rubocop.yml CHANGED
@@ -10,3 +10,7 @@ Documentation:
10
10
  Lint/HandleExceptions:
11
11
  Exclude:
12
12
  - rakelib/rubocop.rake
13
+
14
+ Metrics/LineLength:
15
+ Exclude:
16
+ - lib/more_view_hooks/default_additional_hooks.rb
@@ -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
@@ -1,3 +1,3 @@
1
1
  module MoreViewHooks
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  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(/^bin\//) { |f| File.basename(f) }
19
- spec.test_files = spec.files.grep(/^(test|spec|features)\//)
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"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redmine-more_view_hooks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Thiel