diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-08-17 16:32:24 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2009-08-17 16:32:24 +0000 |
commit | e10577e9ed482433ad1d80b321b89e8cc72f4c1c (patch) | |
tree | 9e9b8a9200f449d4cc3edd9b1df4a3826d8ef1e7 /lib | |
parent | a4d7a03b142889510c910cfb983a818f61653c11 (diff) | |
download | redmine-e10577e9ed482433ad1d80b321b89e8cc72f4c1c.tar.gz redmine-e10577e9ed482433ad1d80b321b89e8cc72f4c1c.zip |
SCM:
* Fixes file log for non-Git repositories (Repository#latest_changesets ignores path argument)
* No longer used Repository#changesets_for_path method removed
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2844 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r-- | lib/redmine/core_ext/string.rb | 2 | ||||
-rw-r--r-- | lib/redmine/core_ext/string/inflections.rb | 29 |
2 files changed, 31 insertions, 0 deletions
diff --git a/lib/redmine/core_ext/string.rb b/lib/redmine/core_ext/string.rb index ce2646fb9..2da5ffef9 100644 --- a/lib/redmine/core_ext/string.rb +++ b/lib/redmine/core_ext/string.rb @@ -1,5 +1,7 @@ require File.dirname(__FILE__) + '/string/conversions' +require File.dirname(__FILE__) + '/string/inflections' class String #:nodoc: include Redmine::CoreExtensions::String::Conversions + include Redmine::CoreExtensions::String::Inflections end diff --git a/lib/redmine/core_ext/string/inflections.rb b/lib/redmine/core_ext/string/inflections.rb new file mode 100644 index 000000000..a59f268fa --- /dev/null +++ b/lib/redmine/core_ext/string/inflections.rb @@ -0,0 +1,29 @@ +# Redmine - project management software +# Copyright (C) 2009 Jean-Philippe Lang +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +module Redmine #:nodoc: + module CoreExtensions #:nodoc: + module String #:nodoc: + # Custom string inflections + module Inflections + def with_leading_slash + starts_with?('/') ? self : "/#{ self }" + end + end + end + end +end |