deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject [8/65] git commit: Core: Fixed 'singularize' helper in String to singularize 'properties'
Date Fri, 20 Jul 2012 09:59:21 GMT
Core: Fixed 'singularize' helper in String to singularize 'properties'


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/5db302cf
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/5db302cf
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/5db302cf

Branch: refs/heads/master
Commit: 5db302cfa32beb9b8e0e883aa64aa6660377ab73
Parents: 425f9c5
Author: Michal Fojtik <mfojtik@redhat.com>
Authored: Thu Jul 19 14:56:41 2012 +0200
Committer: Michal fojtik <mfojtik@redhat.com>
Committed: Fri Jul 20 11:59:09 2012 +0200

----------------------------------------------------------------------
 server/lib/deltacloud/core_ext/string.rb |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/5db302cf/server/lib/deltacloud/core_ext/string.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/core_ext/string.rb b/server/lib/deltacloud/core_ext/string.rb
index abf4a28..bc382ed 100644
--- a/server/lib/deltacloud/core_ext/string.rb
+++ b/server/lib/deltacloud/core_ext/string.rb
@@ -40,6 +40,7 @@ class String
   end
 
   def singularize
+    return self.gsub(/ies$/, 'y') if self =~ /ies$/
     return self.gsub(/es$/, '') if self =~ /sses$/
     self.gsub(/s$/, '')
   end


Mime
View raw message