summaryrefslogtreecommitdiffstats
path: root/lib/plugins
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2023-01-16 21:55:30 +0000
committerGo MAEDA <maeda@farend.jp>2023-01-16 21:55:30 +0000
commit25a4be7269daba9cf03f943a91c502e716235aca (patch)
treeda7a171411208a577f024e9f8c287931220450b8 /lib/plugins
parent5ebcddc023b753fb631d604365a6bae15af482bc (diff)
downloadredmine-25a4be7269daba9cf03f943a91c502e716235aca.tar.gz
redmine-25a4be7269daba9cf03f943a91c502e716235aca.zip
Use `require_relative` instead of `File.dirname(__FILE__) + ...` (#38093).
Patch by Go MAEDA. git-svn-id: https://svn.redmine.org/redmine/trunk@22052 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/plugins')
-rw-r--r--lib/plugins/acts_as_activity_provider/init.rb2
-rw-r--r--lib/plugins/acts_as_attachable/init.rb2
-rw-r--r--lib/plugins/acts_as_customizable/init.rb2
-rw-r--r--lib/plugins/acts_as_event/init.rb2
-rw-r--r--lib/plugins/acts_as_searchable/init.rb2
-rw-r--r--lib/plugins/acts_as_tree/init.rb2
-rw-r--r--lib/plugins/acts_as_watchable/init.rb2
-rw-r--r--lib/plugins/gravatar/init.rb2
8 files changed, 8 insertions, 8 deletions
diff --git a/lib/plugins/acts_as_activity_provider/init.rb b/lib/plugins/acts_as_activity_provider/init.rb
index 465ab3b9b..cfd1a5141 100644
--- a/lib/plugins/acts_as_activity_provider/init.rb
+++ b/lib/plugins/acts_as_activity_provider/init.rb
@@ -1,4 +1,4 @@
# frozen_string_literal: true
-require File.dirname(__FILE__) + '/lib/acts_as_activity_provider'
+require_relative 'lib/acts_as_activity_provider'
ActiveRecord::Base.send(:include, Redmine::Acts::ActivityProvider)
diff --git a/lib/plugins/acts_as_attachable/init.rb b/lib/plugins/acts_as_attachable/init.rb
index fad72214c..16ca1a207 100644
--- a/lib/plugins/acts_as_attachable/init.rb
+++ b/lib/plugins/acts_as_attachable/init.rb
@@ -1,4 +1,4 @@
# frozen_string_literal: true
-require File.dirname(__FILE__) + '/lib/acts_as_attachable'
+require_relative 'lib/acts_as_attachable'
ActiveRecord::Base.send(:include, Redmine::Acts::Attachable)
diff --git a/lib/plugins/acts_as_customizable/init.rb b/lib/plugins/acts_as_customizable/init.rb
index c44db3df0..8b04bf4ca 100644
--- a/lib/plugins/acts_as_customizable/init.rb
+++ b/lib/plugins/acts_as_customizable/init.rb
@@ -1,4 +1,4 @@
# frozen_string_literal: true
-require File.dirname(__FILE__) + '/lib/acts_as_customizable'
+require_relative 'lib/acts_as_customizable'
ActiveRecord::Base.send(:include, Redmine::Acts::Customizable)
diff --git a/lib/plugins/acts_as_event/init.rb b/lib/plugins/acts_as_event/init.rb
index 2c025f2c0..2ac430796 100644
--- a/lib/plugins/acts_as_event/init.rb
+++ b/lib/plugins/acts_as_event/init.rb
@@ -1,4 +1,4 @@
# frozen_string_literal: true
-require File.dirname(__FILE__) + '/lib/acts_as_event'
+require_relative 'lib/acts_as_event'
ActiveRecord::Base.send(:include, Redmine::Acts::Event)
diff --git a/lib/plugins/acts_as_searchable/init.rb b/lib/plugins/acts_as_searchable/init.rb
index 661b0203d..54f8616a5 100644
--- a/lib/plugins/acts_as_searchable/init.rb
+++ b/lib/plugins/acts_as_searchable/init.rb
@@ -1,4 +1,4 @@
# frozen_string_literal: true
-require File.dirname(__FILE__) + '/lib/acts_as_searchable'
+require_relative 'lib/acts_as_searchable'
ActiveRecord::Base.send(:include, Redmine::Acts::Searchable)
diff --git a/lib/plugins/acts_as_tree/init.rb b/lib/plugins/acts_as_tree/init.rb
index cb8394e97..36d1193d0 100644
--- a/lib/plugins/acts_as_tree/init.rb
+++ b/lib/plugins/acts_as_tree/init.rb
@@ -1,4 +1,4 @@
# frozen_string_literal: true
-require File.dirname(__FILE__) + '/lib/active_record/acts/tree'
+require_relative 'lib/active_record/acts/tree'
ActiveRecord::Base.send :include, ActiveRecord::Acts::Tree
diff --git a/lib/plugins/acts_as_watchable/init.rb b/lib/plugins/acts_as_watchable/init.rb
index d91feec41..49f50a022 100644
--- a/lib/plugins/acts_as_watchable/init.rb
+++ b/lib/plugins/acts_as_watchable/init.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true
# Include hook code here
-require File.dirname(__FILE__) + '/lib/acts_as_watchable'
+require_relative 'lib/acts_as_watchable'
ActiveRecord::Base.send(:include, Redmine::Acts::Watchable)
diff --git a/lib/plugins/gravatar/init.rb b/lib/plugins/gravatar/init.rb
index aafad7613..a312000f5 100644
--- a/lib/plugins/gravatar/init.rb
+++ b/lib/plugins/gravatar/init.rb
@@ -1,4 +1,4 @@
# frozen_string_literal: true
-require File.dirname(__FILE__) + '/lib/gravatar'
+require_relative 'lib/gravatar'
ActionView::Base.send :include, GravatarHelper::PublicMethods