diff --git a/Gemfile.lock b/Gemfile.lock index 4339ddd..230dc92 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,7 +2,6 @@ PATH remote: . specs: gowalla (0.4.0) - activesupport (~> 3.0.0) faraday (~> 0.4.5) faraday_middleware (~> 0.0.5) oauth2 @@ -10,7 +9,6 @@ PATH GEM remote: http://rubygems.org/ specs: - activesupport (3.0.0) addressable (2.2.1) fakeweb (1.3.0) faraday (0.4.6) @@ -34,7 +32,6 @@ PLATFORMS ruby DEPENDENCIES - activesupport (~> 3.0.0) bundler (>= 1.0.0) fakeweb faraday (~> 0.4.5) diff --git a/gowalla.gemspec b/gowalla.gemspec index a83056d..0055bd3 100644 --- a/gowalla.gemspec +++ b/gowalla.gemspec @@ -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' diff --git a/lib/gowalla.rb b/lib/gowalla.rb index fc786d4..b8cbda2 100644 --- a/lib/gowalla.rb +++ b/lib/gowalla.rb @@ -1,7 +1,6 @@ require 'faraday' require 'faraday_middleware' require 'oauth2' -require 'active_support/inflector' require 'gowalla/client' diff --git a/lib/gowalla/client.rb b/lib/gowalla/client.rb index a5938d4..0a544b2 100644 --- a/lib/gowalla/client.rb +++ b/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 diff --git a/lib/gowalla/pluralizer.rb b/lib/gowalla/pluralizer.rb new file mode 100644 index 0000000..53e28b5 --- /dev/null +++ b/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