Skip to content

Commit

Permalink
remove activesupport pluralize in favor of poor-mans version
Browse files Browse the repository at this point in the history
  • Loading branch information
ehutzelman committed Oct 2, 2010
1 parent 500c1c7 commit 7fc14e2
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 5 deletions.
3 changes: 0 additions & 3 deletions Gemfile.lock
Expand Up @@ -2,15 +2,13 @@ PATH
remote: .
specs:
gowalla (0.4.0)
activesupport (~> 3.0.0)
faraday (~> 0.4.5)
faraday_middleware (~> 0.0.5)
oauth2

GEM
remote: http://rubygems.org/
specs:
activesupport (3.0.0)
addressable (2.2.1)
fakeweb (1.3.0)
faraday (0.4.6)
Expand All @@ -34,7 +32,6 @@ PLATFORMS
ruby

DEPENDENCIES
activesupport (~> 3.0.0)
bundler (>= 1.0.0)
fakeweb
faraday (~> 0.4.5)
Expand Down
1 change: 0 additions & 1 deletion gowalla.gemspec
Expand Up @@ -13,7 +13,6 @@ Gem::Specification.new do |s|
s.add_dependency 'oauth2'
s.add_dependency 'faraday', '~> 0.4.5'
s.add_dependency 'faraday_middleware', '~> 0.0.5'
s.add_dependency 'activesupport', '~> 3.0.0'

s.add_development_dependency 'shoulda', '~> 2.11.3'
s.add_development_dependency 'jnunemaker-matchy', '~> 0.4.0'
Expand Down
1 change: 0 additions & 1 deletion lib/gowalla.rb
@@ -1,7 +1,6 @@
require 'faraday'
require 'faraday_middleware'
require 'oauth2'
require 'active_support/inflector'

require 'gowalla/client'

Expand Down
1 change: 1 addition & 0 deletions lib/gowalla/client.rb
@@ -1,6 +1,7 @@
require 'forwardable'
require 'gowalla/generic_request'
require 'gowalla/post_methods'
require 'gowalla/pluralizer'

module Gowalla
class Client
Expand Down
14 changes: 14 additions & 0 deletions lib/gowalla/pluralizer.rb
@@ -0,0 +1,14 @@
if !String.method_defined?(:pluralize)

class String
puts 'defining pluralize'
def pluralize
case self[self.length - 1]
when 'y' then self[0..self.length - 2] + 'ies'
when 's' then self
else self + 's'
end
end
end

end

0 comments on commit 7fc14e2

Please sign in to comment.