lib/common_name.rb in common_name-0.1.5 vs lib/common_name.rb in common_name-0.1.6
- old
+ new
@@ -1,16 +1,25 @@
+require 'active_support'
+require 'active_support/version'
+%w{
+ active_support/inflector
+}.each do |active_support_3_requirement|
+ require active_support_3_requirement
+end if ::ActiveSupport::VERSION::MAJOR == 3
+
+if defined?(::Rails)
+ require 'common_name/railtie'
+end
+
# This library comes out of my frustration with seeing lines like
#
# BusCompany.name.underscore.humanize.downcase.pluralize #=> "bus companies"
#
# all over my application.
#
# See <tt>README</tt> for more information.
#
# Copyright (c) 2009 Seamus Abshere. See LICENSE for details.
-
-require 'active_support'
-
module CommonName
def self.included(klass)
klass.extend ClassMethods
end