diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2004-12-29 21:19:37 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2004-12-29 21:19:37 +0000 |
commit | 595a4a591b6f4f863d52e28046e2fc1c51dfcad5 (patch) | |
tree | 41a0eaabeb5c4b6213373644101228e34da3a657 /activerecord | |
parent | 6b5df896fa59cfbdc6d460c6a6b33ddf7e31fa8d (diff) | |
download | rails-595a4a591b6f4f863d52e28046e2fc1c51dfcad5.tar.gz rails-595a4a591b6f4f863d52e28046e2fc1c51dfcad5.tar.bz2 rails-595a4a591b6f4f863d52e28046e2fc1c51dfcad5.zip |
Rearranging dependencies
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@279 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord')
-rwxr-xr-x | activerecord/Rakefile | 8 | ||||
-rwxr-xr-x | activerecord/lib/active_record.rb | 1 | ||||
-rw-r--r-- | activerecord/test/inflector_test.rb | 122 |
3 files changed, 5 insertions, 126 deletions
diff --git a/activerecord/Rakefile b/activerecord/Rakefile index 76c1ee6748..9352a4b6b8 100755 --- a/activerecord/Rakefile +++ b/activerecord/Rakefile @@ -61,14 +61,14 @@ Rake::RDocTask.new { |rdoc| # Publish beta gem desc "Publish the beta gem" task :pgem => [:package] do - Rake::SshFilePublisher.new("davidhh@one.textdrive.com", "domains/rubyonrails.org/gems/gems", "pkg", "#{PKG_FILE_NAME}.gem").upload - `ssh davidhh@one.textdrive.com './gemupdate.sh'` + 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 # Publish documentation desc "Publish the API documentation" task :pdoc => [:rdoc] do - Rake::SshDirPublisher.new("davidhh@one.textdrive.com", "domains/rubyonrails.org/ar", "doc").upload + Rake::SshDirPublisher.new("davidhh@comox.textdrive.com", "public_html/ar", "doc").upload end @@ -96,7 +96,7 @@ spec = Gem::Specification.new do |s| s.author = "David Heinemeier Hansson" s.email = "david@loudthinking.com" - s.homepage = "http://activerecord.rubyonrails.org" + s.homepage = "http://www.rubyonrails.com" s.rubyforge_project = "activerecord" end diff --git a/activerecord/lib/active_record.rb b/activerecord/lib/active_record.rb index 5c9043b094..ecf8499e16 100755 --- a/activerecord/lib/active_record.rb +++ b/activerecord/lib/active_record.rb @@ -26,6 +26,7 @@ $:.unshift(File.dirname(__FILE__)) require 'active_record/support/clean_logger' require 'active_record/support/misc' +require 'active_record/support/dependencies' require 'active_record/base' require 'active_record/observer' diff --git a/activerecord/test/inflector_test.rb b/activerecord/test/inflector_test.rb deleted file mode 100644 index 7bcff70bdd..0000000000 --- a/activerecord/test/inflector_test.rb +++ /dev/null @@ -1,122 +0,0 @@ -require 'abstract_unit' - -class InflectorTest < Test::Unit::TestCase - SingularToPlural = { - "search" => "searches", - "switch" => "switches", - "fix" => "fixes", - "box" => "boxes", - "process" => "processes", - "address" => "addresses", - "case" => "cases", - "stack" => "stacks", - - "category" => "categories", - "query" => "queries", - "ability" => "abilities", - "agency" => "agencies", - "movie" => "movies", - - "wife" => "wives", - "safe" => "saves", - "half" => "halves", - - "salesperson" => "salespeople", - "person" => "people", - - "spokesman" => "spokesmen", - "man" => "men", - "woman" => "women", - - "basis" => "bases", - "diagnosis" => "diagnoses", - - "datum" => "data", - "medium" => "media", - - "node_child" => "node_children", - "child" => "children", - - "experience" => "experiences", - "day" => "days", - - "comment" => "comments", - "foobar" => "foobars" - } - - CamelToUnderscore = { - "Product" => "product", - "SpecialGuest" => "special_guest", - "ApplicationController" => "application_controller" - } - - ClassNameToForeignKeyWithUnderscore = { - "Person" => "person_id", - "MyApplication::Billing::Account" => "account_id" - } - - ClassNameToForeignKeyWithoutUnderscore = { - "Person" => "personid", - "MyApplication::Billing::Account" => "accountid" - } - - ClassNameToTableName = { - "PrimarySpokesman" => "primary_spokesmen", - "NodeChild" => "node_children" - } - - def test_pluralize - SingularToPlural.each do |singular, plural| - assert_equal(plural, Inflector.pluralize(singular)) - end - - assert_equal("plurals", Inflector.pluralize("plurals")) - end - - def test_singularize - SingularToPlural.each do |singular, plural| - assert_equal(singular, Inflector.singularize(plural)) - end - end - - def test_camelize - CamelToUnderscore.each do |camel, underscore| - assert_equal(camel, Inflector.camelize(underscore)) - end - end - - def test_underscore - CamelToUnderscore.each do |camel, underscore| - assert_equal(underscore, Inflector.underscore(camel)) - end - - assert_equal "html_tidy", Inflector.underscore("HTMLTidy") - assert_equal "html_tidy_generator", Inflector.underscore("HTMLTidyGenerator") - end - - def test_demodulize - assert_equal "Account", Inflector.demodulize("MyApplication::Billing::Account") - end - - def test_foreign_key - ClassNameToForeignKeyWithUnderscore.each do |klass, foreign_key| - assert_equal(foreign_key, Inflector.foreign_key(klass)) - end - - ClassNameToForeignKeyWithoutUnderscore.each do |klass, foreign_key| - assert_equal(foreign_key, Inflector.foreign_key(klass, false)) - end - end - - def test_tableize - ClassNameToTableName.each do |class_name, table_name| - assert_equal(table_name, Inflector.tableize(class_name)) - end - end - - def test_classify - ClassNameToTableName.each do |class_name, table_name| - assert_equal(class_name, Inflector.classify(table_name)) - end - end -end
\ No newline at end of file |