aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-02-15 15:57:44 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-02-15 15:57:44 +0000
commitdc3d6eb9b4aaed051dd6d5a5a07f6c66b72da4c4 (patch)
tree1d77afa3e7a5af3d3d89c2121b5cecf6423d666d /activesupport
parent45caae41c3fbfc7ba77c5e2dc70734fa80501828 (diff)
downloadrails-dc3d6eb9b4aaed051dd6d5a5a07f6c66b72da4c4.tar.gz
rails-dc3d6eb9b4aaed051dd6d5a5a07f6c66b72da4c4.tar.bz2
rails-dc3d6eb9b4aaed051dd6d5a5a07f6c66b72da4c4.zip
Moved Active Support into its own gem
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@624 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/Rakefile39
-rw-r--r--activesupport/lib/active_support/binding_of_caller.rb (renamed from activesupport/lib/binding_of_caller.rb)0
-rwxr-xr-xactivesupport/lib/active_support/breakpoint.rb (renamed from activesupport/lib/breakpoint.rb)0
-rw-r--r--activesupport/lib/active_support/class_attribute_accessors.rb (renamed from activesupport/lib/class_attribute_accessors.rb)0
-rw-r--r--activesupport/lib/active_support/class_inheritable_attributes.rb (renamed from activesupport/lib/class_inheritable_attributes.rb)0
-rw-r--r--activesupport/lib/active_support/clean_logger.rb (renamed from activesupport/lib/clean_logger.rb)0
-rw-r--r--activesupport/lib/active_support/core_ext.rb (renamed from activesupport/lib/core_ext.rb)0
-rw-r--r--activesupport/lib/active_support/core_ext/hash.rb (renamed from activesupport/lib/core_ext/hash.rb)0
-rw-r--r--activesupport/lib/active_support/core_ext/hash/indifferent_access.rb (renamed from activesupport/lib/core_ext/hash/indifferent_access.rb)0
-rw-r--r--activesupport/lib/active_support/core_ext/hash/keys.rb (renamed from activesupport/lib/core_ext/hash/keys.rb)0
-rw-r--r--activesupport/lib/active_support/core_ext/numeric.rb (renamed from activesupport/lib/core_ext/numeric.rb)0
-rw-r--r--activesupport/lib/active_support/core_ext/numeric/bytes.rb (renamed from activesupport/lib/core_ext/numeric/bytes.rb)0
-rw-r--r--activesupport/lib/active_support/core_ext/numeric/time.rb (renamed from activesupport/lib/core_ext/numeric/time.rb)0
-rw-r--r--activesupport/lib/active_support/core_ext/object_and_class.rb (renamed from activesupport/lib/core_ext/object_and_class.rb)0
-rw-r--r--activesupport/lib/active_support/core_ext/string.rb (renamed from activesupport/lib/core_ext/string.rb)0
-rw-r--r--activesupport/lib/active_support/core_ext/string/inflections.rb (renamed from activesupport/lib/core_ext/string/inflections.rb)0
-rw-r--r--activesupport/lib/active_support/dependencies.rb (renamed from activesupport/lib/dependencies.rb)0
-rw-r--r--activesupport/lib/active_support/inflector.rb (renamed from activesupport/lib/inflector.rb)0
-rw-r--r--activesupport/lib/active_support/misc.rb (renamed from activesupport/lib/misc.rb)0
-rw-r--r--activesupport/lib/active_support/module_attribute_accessors.rb (renamed from activesupport/lib/module_attribute_accessors.rb)0
-rw-r--r--activesupport/test/class_inheritable_attributes_test.rb2
-rw-r--r--activesupport/test/core_ext/hash_ext_test.rb2
-rw-r--r--activesupport/test/core_ext/numeric_ext_test.rb2
-rw-r--r--activesupport/test/core_ext/object_and_class_ext_test.rb24
-rw-r--r--activesupport/test/core_ext/string_ext_test.rb4
-rw-r--r--activesupport/test/dependencies_test.rb2
-rw-r--r--activesupport/test/inflector_test.rb2
-rw-r--r--activesupport/test/misc_test.rb2
28 files changed, 59 insertions, 20 deletions
diff --git a/activesupport/Rakefile b/activesupport/Rakefile
index 4f58b89a20..39d20dcbee 100644
--- a/activesupport/Rakefile
+++ b/activesupport/Rakefile
@@ -1,6 +1,45 @@
require 'rake/testtask'
+require 'rake/gempackagetask'
+require 'rake/contrib/rubyforgepublisher'
+
+PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
+PKG_NAME = 'activesupport'
+PKG_VERSION = '1.0.0' + PKG_BUILD
+PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
task :default => :test
Rake::TestTask.new { |t|
t.pattern = 'test/**/*_test.rb'
}
+
+# Create compressed packages
+dist_dirs = [ "lib", "test"]
+
+spec = Gem::Specification.new do |s|
+ s.name = PKG_NAME
+ s.version = PKG_VERSION
+ s.summary = "Support and utility classes."
+ s.description = %q{Utility library which carries commonly used classes and goodies from the rails project}
+
+ s.files = [ "CHANGELOG" ] + Dir.glob( "lib/**/*" ).delete_if { |item| item.include?( "\.svn" ) }
+ s.require_path = 'lib'
+ s.has_rdoc = true
+
+ s.author = "David Heinemeier Hansson"
+ s.email = "david@loudthinking.com"
+ s.homepage = "http://www.rubyonrails.com"
+ s.rubyforge_project = "activesupport"
+end
+
+Rake::GemPackageTask.new(spec) do |p|
+ p.gem_spec = spec
+ p.need_tar = true
+ p.need_zip = true
+end
+
+# Publish beta gem
+desc "Publish the beta gem"
+task :pgem => [:package] do
+ Rake::SshFilePublisher.new("davidhh@comox.textdrive.com", "public_html/gems/gems", "pkg", "#{PKG_FILE_NAME}.gem").upload
+ `ssh davidhh@comox.textdrive.com './gemupdate.sh'`
+end
diff --git a/activesupport/lib/binding_of_caller.rb b/activesupport/lib/active_support/binding_of_caller.rb
index d18fbdef3d..d18fbdef3d 100644
--- a/activesupport/lib/binding_of_caller.rb
+++ b/activesupport/lib/active_support/binding_of_caller.rb
diff --git a/activesupport/lib/breakpoint.rb b/activesupport/lib/active_support/breakpoint.rb
index 1c171e2ee6..1c171e2ee6 100755
--- a/activesupport/lib/breakpoint.rb
+++ b/activesupport/lib/active_support/breakpoint.rb
diff --git a/activesupport/lib/class_attribute_accessors.rb b/activesupport/lib/active_support/class_attribute_accessors.rb
index 786dcf98cb..786dcf98cb 100644
--- a/activesupport/lib/class_attribute_accessors.rb
+++ b/activesupport/lib/active_support/class_attribute_accessors.rb
diff --git a/activesupport/lib/class_inheritable_attributes.rb b/activesupport/lib/active_support/class_inheritable_attributes.rb
index f9ca7af7b2..f9ca7af7b2 100644
--- a/activesupport/lib/class_inheritable_attributes.rb
+++ b/activesupport/lib/active_support/class_inheritable_attributes.rb
diff --git a/activesupport/lib/clean_logger.rb b/activesupport/lib/active_support/clean_logger.rb
index 1a36562892..1a36562892 100644
--- a/activesupport/lib/clean_logger.rb
+++ b/activesupport/lib/active_support/clean_logger.rb
diff --git a/activesupport/lib/core_ext.rb b/activesupport/lib/active_support/core_ext.rb
index 573313e741..573313e741 100644
--- a/activesupport/lib/core_ext.rb
+++ b/activesupport/lib/active_support/core_ext.rb
diff --git a/activesupport/lib/core_ext/hash.rb b/activesupport/lib/active_support/core_ext/hash.rb
index e899d3e1e2..e899d3e1e2 100644
--- a/activesupport/lib/core_ext/hash.rb
+++ b/activesupport/lib/active_support/core_ext/hash.rb
diff --git a/activesupport/lib/core_ext/hash/indifferent_access.rb b/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb
index 2353cfaf3b..2353cfaf3b 100644
--- a/activesupport/lib/core_ext/hash/indifferent_access.rb
+++ b/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb
diff --git a/activesupport/lib/core_ext/hash/keys.rb b/activesupport/lib/active_support/core_ext/hash/keys.rb
index 8725138856..8725138856 100644
--- a/activesupport/lib/core_ext/hash/keys.rb
+++ b/activesupport/lib/active_support/core_ext/hash/keys.rb
diff --git a/activesupport/lib/core_ext/numeric.rb b/activesupport/lib/active_support/core_ext/numeric.rb
index 88fead7aa4..88fead7aa4 100644
--- a/activesupport/lib/core_ext/numeric.rb
+++ b/activesupport/lib/active_support/core_ext/numeric.rb
diff --git a/activesupport/lib/core_ext/numeric/bytes.rb b/activesupport/lib/active_support/core_ext/numeric/bytes.rb
index 98e5e13abb..98e5e13abb 100644
--- a/activesupport/lib/core_ext/numeric/bytes.rb
+++ b/activesupport/lib/active_support/core_ext/numeric/bytes.rb
diff --git a/activesupport/lib/core_ext/numeric/time.rb b/activesupport/lib/active_support/core_ext/numeric/time.rb
index 43c0425b00..43c0425b00 100644
--- a/activesupport/lib/core_ext/numeric/time.rb
+++ b/activesupport/lib/active_support/core_ext/numeric/time.rb
diff --git a/activesupport/lib/core_ext/object_and_class.rb b/activesupport/lib/active_support/core_ext/object_and_class.rb
index 59a463ae29..59a463ae29 100644
--- a/activesupport/lib/core_ext/object_and_class.rb
+++ b/activesupport/lib/active_support/core_ext/object_and_class.rb
diff --git a/activesupport/lib/core_ext/string.rb b/activesupport/lib/active_support/core_ext/string.rb
index 6d554b483c..6d554b483c 100644
--- a/activesupport/lib/core_ext/string.rb
+++ b/activesupport/lib/active_support/core_ext/string.rb
diff --git a/activesupport/lib/core_ext/string/inflections.rb b/activesupport/lib/active_support/core_ext/string/inflections.rb
index aa4ff3a74d..aa4ff3a74d 100644
--- a/activesupport/lib/core_ext/string/inflections.rb
+++ b/activesupport/lib/active_support/core_ext/string/inflections.rb
diff --git a/activesupport/lib/dependencies.rb b/activesupport/lib/active_support/dependencies.rb
index 0a9b8e1d3d..0a9b8e1d3d 100644
--- a/activesupport/lib/dependencies.rb
+++ b/activesupport/lib/active_support/dependencies.rb
diff --git a/activesupport/lib/inflector.rb b/activesupport/lib/active_support/inflector.rb
index e09208dd4f..e09208dd4f 100644
--- a/activesupport/lib/inflector.rb
+++ b/activesupport/lib/active_support/inflector.rb
diff --git a/activesupport/lib/misc.rb b/activesupport/lib/active_support/misc.rb
index 1ca00db1e7..1ca00db1e7 100644
--- a/activesupport/lib/misc.rb
+++ b/activesupport/lib/active_support/misc.rb
diff --git a/activesupport/lib/module_attribute_accessors.rb b/activesupport/lib/active_support/module_attribute_accessors.rb
index 3d466e4493..3d466e4493 100644
--- a/activesupport/lib/module_attribute_accessors.rb
+++ b/activesupport/lib/active_support/module_attribute_accessors.rb
diff --git a/activesupport/test/class_inheritable_attributes_test.rb b/activesupport/test/class_inheritable_attributes_test.rb
index 6157d70649..9a472eacd2 100644
--- a/activesupport/test/class_inheritable_attributes_test.rb
+++ b/activesupport/test/class_inheritable_attributes_test.rb
@@ -1,5 +1,5 @@
require 'test/unit'
-require File.dirname(__FILE__) + '/../lib/class_inheritable_attributes'
+require File.dirname(__FILE__) + '/../lib/active_support/class_inheritable_attributes'
class ClassInheritableAttributesTest < Test::Unit::TestCase
def setup
diff --git a/activesupport/test/core_ext/hash_ext_test.rb b/activesupport/test/core_ext/hash_ext_test.rb
index 14f2b901b4..f5ace81927 100644
--- a/activesupport/test/core_ext/hash_ext_test.rb
+++ b/activesupport/test/core_ext/hash_ext_test.rb
@@ -1,5 +1,5 @@
require 'test/unit'
-require File.dirname(__FILE__) + '/../../lib/core_ext/hash'
+require File.dirname(__FILE__) + '/../../lib/active_support/core_ext/hash'
class HashExtTest < Test::Unit::TestCase
def setup
diff --git a/activesupport/test/core_ext/numeric_ext_test.rb b/activesupport/test/core_ext/numeric_ext_test.rb
index a83c472b84..0bcb8a2b51 100644
--- a/activesupport/test/core_ext/numeric_ext_test.rb
+++ b/activesupport/test/core_ext/numeric_ext_test.rb
@@ -1,5 +1,5 @@
require 'test/unit'
-require File.dirname(__FILE__) + '/../../lib/core_ext/numeric'
+require File.dirname(__FILE__) + '/../../lib/active_support/core_ext/numeric'
class NumericExtTimeTest < Test::Unit::TestCase
def setup
diff --git a/activesupport/test/core_ext/object_and_class_ext_test.rb b/activesupport/test/core_ext/object_and_class_ext_test.rb
index 5a0ae58837..71eeb4bdb8 100644
--- a/activesupport/test/core_ext/object_and_class_ext_test.rb
+++ b/activesupport/test/core_ext/object_and_class_ext_test.rb
@@ -1,21 +1,21 @@
require 'test/unit'
-require File.dirname(__FILE__) + '/../../lib/core_ext/object_and_class'
+require File.dirname(__FILE__) + '/../../lib/active_support/core_ext/object_and_class'
-class A; end
-class B < A; end
-class C < B; end
-class D < A; end
+class ClassA; end
+class ClassB < ClassA; end
+class ClassC < ClassB; end
+class ClassD < ClassA; end
class ClassExtTest < Test::Unit::TestCase
def test_methods
- assert defined?(B)
- assert defined?(C)
- assert defined?(D)
+ assert defined?(ClassB)
+ assert defined?(ClassC)
+ assert defined?(ClassD)
- A.remove_subclasses
+ ClassA.remove_subclasses
- assert !defined?(B)
- assert !defined?(C)
- assert !defined?(D)
+ assert !defined?(ClassB)
+ assert !defined?(ClassC)
+ assert !defined?(ClassD)
end
end
diff --git a/activesupport/test/core_ext/string_ext_test.rb b/activesupport/test/core_ext/string_ext_test.rb
index 317dbcf711..74a4010f91 100644
--- a/activesupport/test/core_ext/string_ext_test.rb
+++ b/activesupport/test/core_ext/string_ext_test.rb
@@ -1,6 +1,6 @@
require 'test/unit'
-require File.dirname(__FILE__) + '/../../lib/core_ext/string'
-require File.dirname(__FILE__) + '/../../lib/misc'
+require File.dirname(__FILE__) + '/../../lib/active_support/core_ext/string'
+require File.dirname(__FILE__) + '/../../lib/active_support/misc'
silence_warnings do
require File.dirname(__FILE__) + '/../inflector_test'
diff --git a/activesupport/test/dependencies_test.rb b/activesupport/test/dependencies_test.rb
index b6aeca27b3..1af960ee36 100644
--- a/activesupport/test/dependencies_test.rb
+++ b/activesupport/test/dependencies_test.rb
@@ -1,5 +1,5 @@
require 'test/unit'
-$LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib'
+$LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib/active_support/'
require 'misc'
require 'dependencies'
diff --git a/activesupport/test/inflector_test.rb b/activesupport/test/inflector_test.rb
index 2f4174beca..6723313046 100644
--- a/activesupport/test/inflector_test.rb
+++ b/activesupport/test/inflector_test.rb
@@ -1,5 +1,5 @@
require 'test/unit'
-require File.dirname(__FILE__) + '/../lib/inflector'
+require File.dirname(__FILE__) + '/../lib/active_support/inflector'
module Ace
module Base
diff --git a/activesupport/test/misc_test.rb b/activesupport/test/misc_test.rb
index 5a2d1d33e8..cfd54c0ad0 100644
--- a/activesupport/test/misc_test.rb
+++ b/activesupport/test/misc_test.rb
@@ -1,5 +1,5 @@
require 'test/unit'
-require File.dirname(__FILE__) + '/../lib/misc'
+require File.dirname(__FILE__) + '/../lib/active_support/misc'
class MiscTest < Test::Unit::TestCase
def test_silence_warnings