mirror of
https://github.com/meineerde/redmine.git
synced 2026-03-04 16:23:06 +00:00
Remove deprecated methods in Repository and AbstractAdapter (#39558).
Patch by Go MAEDA. git-svn-id: https://svn.redmine.org/redmine/trunk@22457 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
72dcb6a570
commit
b7a190399f
@ -186,11 +186,6 @@ class Repository < ActiveRecord::Base
|
|||||||
scm.supports_annotate?
|
scm.supports_annotate?
|
||||||
end
|
end
|
||||||
|
|
||||||
def supports_all_revisions?
|
|
||||||
ActiveSupport::Deprecation.warn 'Repository#supports_all_revisions? is deprecated and will be removed in Redmine 6.0. Please use #supports_history instead.'
|
|
||||||
supports_history?
|
|
||||||
end
|
|
||||||
|
|
||||||
def supports_history?
|
def supports_history?
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|||||||
@ -167,12 +167,6 @@ module Redmine
|
|||||||
path.end_with?('/') ? path : "#{path}/"
|
path.end_with?('/') ? path : "#{path}/"
|
||||||
end
|
end
|
||||||
|
|
||||||
def with_trailling_slash(path)
|
|
||||||
ActiveSupport::Deprecation.warn 'Redmine::Scm::Adapters::AbstractAdapter#with_trailling_slash is ' \
|
|
||||||
'deprecated and will be removed in Redmine 6.0. Please use #with_trailing_slash instead.'
|
|
||||||
with_trailing_slash(path)
|
|
||||||
end
|
|
||||||
|
|
||||||
def without_leading_slash(path)
|
def without_leading_slash(path)
|
||||||
path ||= ''
|
path ||= ''
|
||||||
path.gsub(%r{^/+}, '')
|
path.gsub(%r{^/+}, '')
|
||||||
@ -183,12 +177,6 @@ module Redmine
|
|||||||
path.end_with?('/') ? path[0..-2] : path
|
path.end_with?('/') ? path[0..-2] : path
|
||||||
end
|
end
|
||||||
|
|
||||||
def without_trailling_slash(path)
|
|
||||||
ActiveSupport::Deprecation.warn 'Redmine::Scm::Adapters::AbstractAdapter#without_trailling_slash is ' \
|
|
||||||
'deprecated and will be removed in Redmine 6.0. Please use #without_trailing_slash instead.'
|
|
||||||
without_trailing_slash(path)
|
|
||||||
end
|
|
||||||
|
|
||||||
def valid_name?(name)
|
def valid_name?(name)
|
||||||
return true if name.nil?
|
return true if name.nil?
|
||||||
return true if name.is_a?(Integer) && name > 0
|
return true if name.is_a?(Integer) && name > 0
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user