diff --git a/tracks/app/controllers/login_controller.rb b/tracks/app/controllers/login_controller.rb
index ed3f74f5..d1df2ae9 100644
--- a/tracks/app/controllers/login_controller.rb
+++ b/tracks/app/controllers/login_controller.rb
@@ -20,7 +20,7 @@ class LoginController < ApplicationController
redirect_back_or_default :controller => "todo", :action => "list"
else
@login = @params['user_login']
- @message = "Login unsuccessful"
+ flash['warning'] = "Login unsuccessful"
end
end
end
@@ -51,13 +51,13 @@ class LoginController < ApplicationController
return
end
- user.is_admin = 1 if User.find_all.empty?
+ user.is_admin = true if User.find_all.empty?
if user.save
- @session['user'] = User.authenticate(user.login, @params['user']['password'])
- @user = @session['user']
+ #@session['user'] = User.authenticate(user.login, @params['user']['password'])
+ @user = User.authenticate(user.login, @params['user']['password'])
@user.preferences = { "date_format" => "%d/%m/%Y", "week_starts" => "1", "no_completed" => "5", "staleness_starts" => "7", "due_style" => "1", "admin_email" => "butshesagirl@rousette.org.uk"}
@user.save
- flash['notice'] = "Signup successful"
+ flash['notice'] = "Signup successful for user #{@user.login}."
redirect_back_or_default :controller => "todo", :action => "list"
end
end
diff --git a/tracks/app/controllers/user_controller.rb b/tracks/app/controllers/user_controller.rb
index 8c85c86c..1d2940b6 100644
--- a/tracks/app/controllers/user_controller.rb
+++ b/tracks/app/controllers/user_controller.rb
@@ -1,5 +1,6 @@
class UserController < ApplicationController
layout 'standard'
+ before_filter :login_required
def index
render_text "This will be our jumping-off point for managing user functions!"
@@ -37,7 +38,7 @@ class UserController < ApplicationController
end
def change_password
- @page_title = "Change password"
+ @page_title = "TRACKS::Change password"
@user = @session['user']
end
diff --git a/tracks/app/models/user.rb b/tracks/app/models/user.rb
index 6e0afe22..aa3b059c 100644
--- a/tracks/app/models/user.rb
+++ b/tracks/app/models/user.rb
@@ -18,8 +18,6 @@ class User < ActiveRecord::Base
def change_password(pass,pass_confirm)
self.password = pass
self.password_confirmation = pass_confirm
-# update_attribute("password", self.class.sha1(pass)) if pass == pass_confirm
-# update_attribute("word", self.class.sha1(login + Time.now.to_i.to_s + rand.to_s))
end
protected
@@ -29,8 +27,9 @@ protected
Digest::SHA1.hexdigest("#{SALT}--#{pass}--")
end
- after_validation :crypt_password_and_word
-
+ before_create :crypt_password_and_word
+ before_update :crypt_password_and_word
+
def crypt_password_and_word
write_attribute("password", self.class.sha1(password)) if password == @password_confirmation
write_attribute("word", self.class.sha1(login + Time.now.to_i.to_s + rand.to_s))
diff --git a/tracks/app/views/user/change_password.rhtml b/tracks/app/views/user/change_password.rhtml
new file mode 100644
index 00000000..14ffc6de
--- /dev/null
+++ b/tracks/app/views/user/change_password.rhtml
@@ -0,0 +1,32 @@
+
+
+
<%= @page_title %>
+
+<% for name in ["notice", "warning", "message"] %>
+ <% if flash[name] %>
+ <%= "
#{flash[name]}
" %>
+ <% end %>
+<% end %>
+
+<%= error_messages_for 'user' %>
+
+
Enter your new password in the fields below and click 'Change Password' to replace your current password with your new one (note that this will also change the URL you use to subscribe to your RSS or text field).
\ No newline at end of file
diff --git a/tracks/config/environments/test.rb b/tracks/config/environments/test.rb
index 66b823dc..e1b7a879 100644
--- a/tracks/config/environments/test.rb
+++ b/tracks/config/environments/test.rb
@@ -20,4 +20,5 @@ config.action_mailer.delivery_method = :test
# for more details about these settings.
# config.transactional_fixtures = true
# config.instantiated_fixtures = false
-# config.pre_loaded_fixtures = false
\ No newline at end of file
+# config.pre_loaded_fixtures = false
+SALT = "change-me" unless defined?( SALT ).nil?
\ No newline at end of file
diff --git a/tracks/public/stylesheets/scaffold.css b/tracks/public/stylesheets/scaffold.css
index 41c56569..74c6ffab 100644
--- a/tracks/public/stylesheets/scaffold.css
+++ b/tracks/public/stylesheets/scaffold.css
@@ -78,7 +78,25 @@ div.memo {
margin: 20px auto;
padding: 0px;
}
-
+
+#warning {
+ padding: 2px;
+ border: 1px solid #ED2E38;
+ background-color: #F6979C;
+ color: #000000;
+ margin: 15px 5px;
+ text-align: center;
+ }
+
+#message {
+ padding: 2px;
+ border: 1px solid #CCC;
+ background-color: #D2D3D6;
+ color: #666;
+ margin: 15px 5px;
+ text-align: center;
+ }
+
/* Error message styles */
.fieldWithErrors {
padding: 2px;
diff --git a/tracks/public/stylesheets/standard.css b/tracks/public/stylesheets/standard.css
index 264b66f2..646b5762 100644
--- a/tracks/public/stylesheets/standard.css
+++ b/tracks/public/stylesheets/standard.css
@@ -286,7 +286,7 @@ a.footer_link:hover {color: #fff; background-color: #cc3334 !important;}
padding: 2px;
border: 1px solid #ED2E38;
background-color: #F6979C;
- color: #FFFFFF;
+ color: #000000;
margin: 15px 5px;
text-align: center;
}
diff --git a/tracks/vendor/rails/activerecord/test/debug.log b/tracks/vendor/rails/activerecord/test/debug.log
new file mode 100644
index 00000000..626fc31a
--- /dev/null
+++ b/tracks/vendor/rails/activerecord/test/debug.log
@@ -0,0 +1,437 @@
+# Logfile created on Wed Feb 22 09:02:35 GMT 2006 by logger.rb/1.5.2.4
+ [4;36;1mSQL (0.364451)[0m [0;1mCREATE TABLE 'accounts' (
+ 'id' INTEGER PRIMARY KEY NOT NULL,
+ 'firm_id' INTEGER DEFAULT NULL,
+ 'credit_limit' INTEGER DEFAULT NULL
+)[0m
+ [4;35;1mSQL (0.311816)[0m [0m
+
+CREATE TABLE 'companies' (
+ 'id' INTEGER PRIMARY KEY NOT NULL,
+ 'type' VARCHAR(255) DEFAULT NULL,
+ 'ruby_type' VARCHAR(255) DEFAULT NULL,
+ 'firm_id' INTEGER DEFAULT NULL,
+ 'name' TEXT DEFAULT NULL,
+ 'client_of' INTEGER DEFAULT NULL,
+ 'rating' INTEGER DEFAULT 1
+)[0m
+ [4;36;1mSQL (0.327027)[0m [0;1m
+
+
+CREATE TABLE 'topics' (
+ 'id' INTEGER PRIMARY KEY NOT NULL,
+ 'title' VARCHAR(255) DEFAULT NULL,
+ 'author_name' VARCHAR(255) DEFAULT NULL,
+ 'author_email_address' VARCHAR(255) DEFAULT NULL,
+ 'written_on' DATETIME DEFAULT NULL,
+ 'bonus_time' TIME DEFAULT NULL,
+ 'last_read' DATE DEFAULT NULL,
+ 'content' TEXT,
+ 'approved' boolean DEFAULT 't',
+ 'replies_count' INTEGER DEFAULT 0,
+ 'parent_id' INTEGER DEFAULT NULL,
+ 'type' VARCHAR(255) DEFAULT NULL
+)[0m
+ [4;35;1mSQL (0.356027)[0m [0m
+
+CREATE TABLE 'developers' (
+ 'id' INTEGER PRIMARY KEY NOT NULL,
+ 'name' TEXT DEFAULT NULL,
+ 'salary' INTEGER DEFAULT 70000,
+ 'created_at' DATETIME DEFAULT NULL,
+ 'updated_at' DATETIME DEFAULT NULL
+)[0m
+ [4;36;1mSQL (0.327498)[0m [0;1m
+
+CREATE TABLE 'projects' (
+ 'id' INTEGER PRIMARY KEY NOT NULL,
+ 'name' TEXT DEFAULT NULL,
+ 'type' VARCHAR(255) DEFAULT NULL
+)[0m
+ [4;35;1mSQL (0.327152)[0m [0m
+
+CREATE TABLE 'developers_projects' (
+ 'developer_id' INTEGER NOT NULL,
+ 'project_id' INTEGER NOT NULL,
+ 'joined_on' DATE DEFAULT NULL,
+ 'access_level' INTEGER DEFAULT 1
+)[0m
+ [4;36;1mSQL (0.326826)[0m [0;1m
+
+
+CREATE TABLE 'orders' (
+ 'id' INTEGER PRIMARY KEY NOT NULL,
+ 'name' VARCHAR(255) DEFAULT NULL,
+ 'billing_customer_id' INTEGER DEFAULT NULL,
+ 'shipping_customer_id' INTEGER DEFAULT NULL
+)[0m
+ [4;35;1mSQL (0.356291)[0m [0m
+
+CREATE TABLE 'customers' (
+ 'id' INTEGER PRIMARY KEY NOT NULL,
+ 'name' VARCHAR(255) DEFAULT NULL,
+ 'balance' INTEGER DEFAULT 0,
+ 'address_street' TEXT DEFAULT NULL,
+ 'address_city' TEXT DEFAULT NULL,
+ 'address_country' TEXT DEFAULT NULL,
+ 'gps_location' TEXT DEFAULT NULL
+)[0m
+ [4;36;1mSQL (0.313541)[0m [0;1m
+
+CREATE TABLE 'movies' (
+ 'movieid' INTEGER PRIMARY KEY NOT NULL,
+ 'name' VARCHAR(255) DEFAULT NULL
+)[0m
+ [4;35;1mSQL (0.341444)[0m [0m
+
+CREATE TABLE subscribers (
+ 'nick' VARCHAR(255) PRIMARY KEY NOT NULL,
+ 'name' VARCHAR(255) DEFAULT NULL
+)[0m
+ [4;36;1mSQL (0.356109)[0m [0;1m
+
+CREATE TABLE 'booleantests' (
+ 'id' INTEGER PRIMARY KEY NOT NULL,
+ 'value' INTEGER DEFAULT NULL
+)[0m
+ [4;35;1mSQL (0.299288)[0m [0m
+
+CREATE TABLE 'auto_id_tests' (
+ 'auto_id' INTEGER PRIMARY KEY NOT NULL,
+ 'value' INTEGER DEFAULT NULL
+)[0m
+ [4;36;1mSQL (0.327438)[0m [0;1m
+
+CREATE TABLE 'entrants' (
+ 'id' INTEGER NOT NULL PRIMARY KEY,
+ 'name' VARCHAR(255) NOT NULL,
+ 'course_id' INTEGER NOT NULL
+)[0m
+ [4;35;1mSQL (0.342461)[0m [0m
+
+CREATE TABLE 'colnametests' (
+ 'id' INTEGER NOT NULL PRIMARY KEY,
+ 'references' INTEGER NOT NULL
+)[0m
+ [4;36;1mSQL (0.326617)[0m [0;1m
+
+CREATE TABLE 'mixins' (
+ 'id' INTEGER NOT NULL PRIMARY KEY,
+ 'parent_id' INTEGER DEFAULT NULL,
+ 'type' VARCHAR(40) DEFAULT NULL,
+ 'pos' INTEGER DEFAULT NULL,
+ 'lft' INTEGER DEFAULT NULL,
+ 'rgt' INTEGER DEFAULT NULL,
+ 'root_id' INTEGER DEFAULT NULL,
+ 'created_at' DATETIME DEFAULT NULL,
+ 'updated_at' DATETIME DEFAULT NULL
+)[0m
+ [4;35;1mSQL (0.298901)[0m [0m
+
+CREATE TABLE 'people' (
+ 'id' INTEGER NOT NULL PRIMARY KEY,
+ 'first_name' VARCHAR(40) DEFAULT NULL,
+ 'lock_version' INTEGER NOT NULL DEFAULT 0
+)[0m
+ [4;36;1mSQL (0.383537)[0m [0;1m
+
+CREATE TABLE 'binaries' (
+ 'id' INTEGER NOT NULL PRIMARY KEY,
+ 'data' BLOB DEFAULT NULL
+)[0m
+ [4;35;1mSQL (0.314553)[0m [0m
+
+CREATE TABLE 'computers' (
+ 'id' INTEGER NOT NULL PRIMARY KEY,
+ 'developer' INTEGER NOT NULL,
+ 'extendedWarranty' INTEGER NOT NULL
+)[0m
+ [4;36;1mSQL (0.313509)[0m [0;1m
+
+CREATE TABLE 'posts' (
+ 'id' INTEGER NOT NULL PRIMARY KEY,
+ 'author_id' INTEGER,
+ 'title' VARCHAR(255) NOT NULL,
+ 'type' VARCHAR(255) NOT NULL,
+ 'body' TEXT NOT NULL
+)[0m
+ [4;35;1mSQL (0.312656)[0m [0m
+
+CREATE TABLE 'comments' (
+ 'id' INTEGER NOT NULL PRIMARY KEY,
+ 'post_id' INTEGER NOT NULL,
+ 'type' VARCHAR(255) NOT NULL,
+ 'body' TEXT NOT NULL
+)[0m
+ [4;36;1mSQL (0.370833)[0m [0;1m
+
+CREATE TABLE 'authors' (
+ 'id' INTEGER NOT NULL PRIMARY KEY,
+ 'name' VARCHAR(255) NOT NULL
+)[0m
+ [4;35;1mSQL (0.341725)[0m [0m
+
+CREATE TABLE 'tasks' (
+ 'id' INTEGER NOT NULL PRIMARY KEY,
+ 'starting' DATETIME DEFAULT NULL,
+ 'ending' DATETIME DEFAULT NULL
+)[0m
+ [4;36;1mSQL (0.313227)[0m [0;1m
+
+CREATE TABLE 'categories' (
+ 'id' INTEGER NOT NULL PRIMARY KEY,
+ 'name' VARCHAR(255) NOT NULL,
+ 'type' VARCHAR(255) DEFAULT NULL
+)[0m
+ [4;35;1mSQL (0.342654)[0m [0m
+
+CREATE TABLE 'categories_posts' (
+ 'category_id' INTEGER NOT NULL,
+ 'post_id' INTEGER NOT NULL
+)[0m
+ [4;36;1mSQL (0.355434)[0m [0;1m
+
+CREATE TABLE 'fk_test_has_pk' (
+ 'id' INTEGER NOT NULL PRIMARY KEY
+)[0m
+ [4;35;1mSQL (0.313012)[0m [0m
+
+CREATE TABLE 'fk_test_has_fk' (
+ 'id' INTEGER NOT NULL PRIMARY KEY,
+ 'fk_id' INTEGER NOT NULL,
+
+ FOREIGN KEY ('fk_id') REFERENCES 'fk_test_has_pk'('id')
+)[0m
+ [4;36;1mSQL (0.327909)[0m [0;1m
+
+CREATE TABLE 'keyboards' (
+ 'key_number' INTEGER PRIMARY KEY NOT NULL,
+ 'name' VARCHAR(255) DEFAULT NULL
+)[0m
+ [4;35;1mSQL (0.354369)[0m [0mCREATE TABLE 'courses' (
+ 'id' INTEGER NOT NULL PRIMARY KEY,
+ 'name' VARCHAR(255) NOT NULL
+)[0m
+ [4;36;1mSQL (0.008238)[0m [0;1mPRAGMA table_info(topics)[0m
+ [4;35;1mSQL (0.001936)[0m [0mINSERT INTO topics ("author_name", "title", "type", "approved", "bonus_time", "replies_count", "author_email_address", "content", "written_on", "last_read", "parent_id") VALUES(NULL, NULL, NULL, 't', NULL, 0, NULL, '---
+- one
+- two
+- three', '2006-02-22 09:02:48', NULL, NULL)[0m
+ [4;36;1mTopic Load (0.000691)[0m [0;1mSELECT * FROM topics WHERE (topics.id = 0) LIMIT 1[0m
+ [4;35;1mTopic Load (0.004732)[0m [0mSELECT * FROM topics WHERE (topics.id = 1) LIMIT 1[0m
+ [4;36;1mSQL (0.021708)[0m [0;1mPRAGMA table_info(auto_id_tests)[0m
+ [4;35;1mSQL (0.001471)[0m [0mINSERT INTO auto_id_tests ("value") VALUES(NULL)[0m
+ [4;36;1mCompany Load (0.004551)[0m [0;1mSELECT * FROM companies WHERE (companies.id = 1) LIMIT 1[0m
+ [4;35;1mSQL (0.011168)[0m [0mPRAGMA table_info(companies)[0m
+ [4;36;1mFirm Update (0.002707)[0m [0;1mUPDATE companies SET "name" = '37signals', "client_of" = NULL, "rating" = 2147483647, "firm_id" = NULL, "ruby_type" = 'Firm', "type" = 'Firm' WHERE id = 1[0m
+ [4;35;1mCompany Load (0.002322)[0m [0mSELECT * FROM companies WHERE (companies.id = 1) LIMIT 1[0m
+ [4;36;1mSQL (0.011983)[0m [0;1mPRAGMA table_info(booleantests)[0m
+ [4;35;1mSQL (0.001625)[0m [0mINSERT INTO booleantests ("value") VALUES(0)[0m
+ [4;36;1mSQL (0.000608)[0m [0;1mINSERT INTO booleantests ("value") VALUES(1)[0m
+ [4;35;1mBooleantest Load (0.000551)[0m [0mSELECT * FROM booleantests WHERE (booleantests.id = 0) LIMIT 1[0m
+ [4;36;1mTopic Load (0.004215)[0m [0;1mSELECT * FROM topics WHERE (topics.id = 1) LIMIT 1[0m
+ [4;35;1mTopic Load (0.002738)[0m [0mSELECT * FROM topics WHERE (topics.id = 2) LIMIT 1[0m
+ [4;36;1mComputer Load (0.004049)[0m [0;1mSELECT * FROM computers LIMIT 1[0m
+ [4;35;1mSQL (0.007553)[0m [0mPRAGMA table_info(computers)[0m
+ [4;36;1mSQL (0.018187)[0m [0;1mPRAGMA table_info(topics)[0m
+ [4;35;1mSQL (0.004108)[0m [0mINSERT INTO topics ("author_name", "title", "type", "approved", "bonus_time", "replies_count", "author_email_address", "content", "written_on", "last_read", "parent_id") VALUES(NULL, 'hello', 'Reply', 't', NULL, 0, NULL, 'world', '2006-02-22 09:02:48', NULL, NULL)[0m
+ [4;36;1mTopic Load (0.002219)[0m [0;1mSELECT * FROM topics WHERE (topics.id = 1) LIMIT 1[0m
+ [4;35;1mReply Load (0.000843)[0m [0mSELECT * FROM topics WHERE (topics.parent_id = 1) AND ( (topics."type" = 'Reply' OR topics."type" = 'SillyReply' ) ) [0m
+ [4;36;1mReply Update (0.002640)[0m [0;1mUPDATE topics SET "bonus_time" = NULL, "approved" = 't', "written_on" = '2006-02-22 09:02:48', "author_email_address" = NULL, "content" = 'world', "replies_count" = 0, "title" = 'hello', "author_name" = NULL, "parent_id" = 1, "last_read" = NULL, "type" = 'Reply' WHERE id = 0[0m
+ [4;35;1mTopic Delete all (0.000936)[0m [0mDELETE FROM topics WHERE (id IN (1)) [0m
+ [4;36;1mTopic Load (0.000583)[0m [0;1mSELECT * FROM topics WHERE (topics.id = 1) LIMIT 1[0m
+ [4;35;1mReply Load (0.000979)[0m [0mSELECT * FROM topics WHERE (topics.id = 0) AND ( (topics."type" = 'Reply' OR topics."type" = 'SillyReply' ) ) LIMIT 1[0m
+ [4;36;1mSQL (0.003438)[0m [0;1mINSERT INTO topics ("author_name", "title", "type", "approved", "bonus_time", "replies_count", "author_email_address", "content", "written_on", "last_read", "parent_id") VALUES(NULL, 'hello', 'Reply', 't', NULL, 0, NULL, 'world', '2006-02-22 09:02:48', NULL, NULL)[0m
+ [4;35;1mTopic Load (0.002749)[0m [0mSELECT * FROM topics WHERE (topics.id = 1) LIMIT 1[0m
+ [4;36;1mReply Load (0.000902)[0m [0;1mSELECT * FROM topics WHERE (topics.parent_id = 1) AND ( (topics."type" = 'Reply' OR topics."type" = 'SillyReply' ) ) [0m
+ [4;35;1mReply Update (0.001912)[0m [0mUPDATE topics SET "bonus_time" = NULL, "approved" = 't', "written_on" = '2006-02-22 09:02:48', "author_email_address" = NULL, "content" = 'world', "replies_count" = 0, "title" = 'hello', "author_name" = NULL, "parent_id" = 1, "last_read" = NULL, "type" = 'Reply' WHERE id = 0[0m
+ [4;36;1mTopic Load (0.002545)[0m [0;1mSELECT * FROM topics WHERE (topics.id = 1) LIMIT 1[0m
+ [4;35;1mReply Load (0.000860)[0m [0mSELECT * FROM topics WHERE (topics.parent_id = 1) AND ( (topics."type" = 'Reply' OR topics."type" = 'SillyReply' ) ) [0m
+ [4;36;1mTopic Delete all (0.000451)[0m [0;1mDELETE FROM topics WHERE (parent_id = 1) [0m
+ [4;35;1mTopic Destroy (0.000557)[0m [0m DELETE FROM topics
+ WHERE id = 1
+[0m
+ [4;36;1mTopic Load (0.001116)[0m [0;1mSELECT * FROM topics WHERE (topics.id = 1) LIMIT 1[0m
+ [4;35;1mReply Load (0.000589)[0m [0mSELECT * FROM topics WHERE (topics.id = 0) AND ( (topics."type" = 'Reply' OR topics."type" = 'SillyReply' ) ) LIMIT 1[0m
+ [4;36;1mSQL (0.011551)[0m [0;1mPRAGMA table_info(companies)[0m
+ [4;35;1mClient Load (0.004009)[0m [0mSELECT * FROM companies WHERE (companies.id = 3) AND ( (companies."type" = 'Client' OR companies."type" = 'SpecialClient' OR companies."type" = 'VerySpecialClient' ) ) LIMIT 1[0m
+ [4;36;1mFirm Load (0.007877)[0m [0;1mSELECT * FROM companies WHERE (companies.id = 1) AND ( (companies."type" = 'Firm' ) ) LIMIT 1[0m
+ [4;35;1mFirm Load (0.002278)[0m [0mSELECT * FROM companies WHERE (companies.id = 1) AND ( (companies."type" = 'Firm' ) ) LIMIT 1[0m
+ [4;36;1mClient Load (0.003355)[0m [0;1mSELECT * FROM companies WHERE (companies.firm_id = 1) AND ( (companies."type" = 'Client' OR companies."type" = 'SpecialClient' OR companies."type" = 'VerySpecialClient' ) ) ORDER BY id [0m
+ [4;35;1mClient Load (0.005013)[0m [0mSELECT * FROM companies WHERE (companies.firm_id = 1) AND ( (companies."type" = 'Client' OR companies."type" = 'SpecialClient' OR companies."type" = 'VerySpecialClient' ) ) ORDER BY id [0m
+ [4;36;1mTopic Load (0.010690)[0m [0;1mSELECT * FROM topics WHERE (topics.id = 1) LIMIT 1[0m
+ [4;35;1mSQL (0.001431)[0m [0mINSERT INTO topics ("author_name", "title", "type", "approved", "bonus_time", "replies_count", "author_email_address", "content", "written_on", "last_read", "parent_id") VALUES('David', '---
+a: c', NULL, 'f', '2000-01-01 14:28:00', 0, 'david@loudthinking.com', 'Have a nice day', '2003-07-16 15:28:00', '2004-04-15', NULL)[0m
+ [4;36;1mCompany Load (0.008524)[0m [0;1mSELECT * FROM companies WHERE (companies.id = 3) LIMIT 1[0m
+ [4;35;1mDeveloperWithAggregate Load (0.008655)[0m [0mSELECT * FROM developers WHERE (developers.id = 1) LIMIT 1[0m
+ [4;36;1mSQL (0.005846)[0m [0;1mPRAGMA table_info(developers)[0m
+ [4;35;1mSQL (0.002019)[0m [0mINSERT INTO developers ("name", "updated_at", "salary", "created_at") VALUES('David', '2006-02-22 09:02:49', 80000, '2006-02-22 09:02:49')[0m
+ [4;36;1mSQL (0.004239)[0m [0;1mPRAGMA table_info(colnametests)[0m
+ [4;35;1mSQL (0.002245)[0m [0mINSERT INTO colnametests ("references") VALUES(40)[0m
+ [4;36;1mColumnName Update (0.002336)[0m [0;1mUPDATE colnametests SET "references" = 41 WHERE id = 0[0m
+ [4;35;1mColumnName Load (0.001016)[0m [0mSELECT * FROM colnametests WHERE (colnametests.id = 0) LIMIT 1[0m
+ [4;36;1mPost Count (0.003503)[0m [0;1mSELECT COUNT(*) FROM posts LEFT JOIN comments ON posts.id=comments.post_id WHERE posts."type" = 'Post'[0m
+ [4;35;1mPost Count (0.001267)[0m [0mSELECT COUNT(*) FROM posts LEFT JOIN comments ON posts.id=comments.post_id WHERE (posts."type" = 'Post') [0m
+ [4;36;1mSQL (0.003124)[0m [0;1mINSERT INTO topics ("author_name", "title", "type", "approved", "bonus_time", "replies_count", "author_email_address", "content", "written_on", "last_read", "parent_id") VALUES(NULL, 'New Topic', NULL, 't', NULL, 0, NULL, NULL, '2006-02-22 09:02:49', NULL, NULL)[0m
+ [4;35;1mTopic Load (0.000694)[0m [0mSELECT * FROM topics WHERE (topics.id = 0) LIMIT 1[0m
+ [4;36;1mSQL (0.003434)[0m [0;1mINSERT INTO topics ("author_name", "title", "type", "approved", "bonus_time", "replies_count", "author_email_address", "content", "written_on", "last_read", "parent_id") VALUES(NULL, 'Another New Topic', NULL, 't', NULL, 0, NULL, NULL, '2006-02-22 09:02:49', NULL, NULL)[0m
+ [4;35;1mSQL (0.003293)[0m [0mINSERT INTO topics ("author_name", "title", "type", "approved", "bonus_time", "replies_count", "author_email_address", "content", "written_on", "last_read", "parent_id") VALUES(NULL, 'first', NULL, 't', NULL, 0, NULL, NULL, '2006-02-22 09:02:49', NULL, NULL)[0m
+ [4;36;1mSQL (0.000571)[0m [0;1mINSERT INTO topics ("author_name", "title", "type", "approved", "bonus_time", "replies_count", "author_email_address", "content", "written_on", "last_read", "parent_id") VALUES(NULL, 'second', NULL, 't', NULL, 0, NULL, NULL, '2006-02-22 09:02:49', NULL, NULL)[0m
+ [4;35;1mSQL (0.003338)[0m [0mINSERT INTO topics ("author_name", "title", "type", "approved", "bonus_time", "replies_count", "author_email_address", "content", "written_on", "last_read", "parent_id") VALUES(NULL, 'New Topic', NULL, 't', NULL, 0, NULL, NULL, '2006-02-22 09:02:49', NULL, NULL)[0m
+ [4;36;1mTopic Load (0.000593)[0m [0;1mSELECT * FROM topics WHERE (topics.id = 0) LIMIT 1[0m
+ [4;35;1mSQL (0.006616)[0m [0mPRAGMA table_info(subscribers)[0m
+ [4;36;1mSQL (0.002865)[0m [0;1mPRAGMA table_info(keyboards)[0m
+ [4;35;1mTopic Load (0.004479)[0m [0mSELECT * FROM topics WHERE (topics.id = 1) LIMIT 1[0m
+ [4;36;1mTopic Update (0.002569)[0m [0;1mUPDATE topics SET "bonus_time" = '2000-01-01 14:28:00', "approved" = 'f', "written_on" = '2003-07-16 15:28:00', "author_email_address" = 'david@loudthinking.com', "content" = 'Have a nice day', "replies_count" = 2, "title" = 'The First Topic', "author_name" = 'David', "parent_id" = NULL, "last_read" = '2004-04-15', "type" = NULL WHERE id = 1[0m
+ [4;35;1mTopic Update (0.000962)[0m [0mUPDATE topics SET "bonus_time" = '2000-01-01 14:28:00', "approved" = 'f', "written_on" = '2003-07-16 15:28:00', "author_email_address" = 'david@loudthinking.com', "content" = 'Have a nice day', "replies_count" = 1, "title" = 'The First Topic', "author_name" = 'David', "parent_id" = NULL, "last_read" = '2004-04-15', "type" = NULL WHERE id = 1[0m
+ [4;36;1mReply Load (0.000735)[0m [0;1mSELECT * FROM topics WHERE (topics.parent_id = 1) AND ( (topics."type" = 'Reply' OR topics."type" = 'SillyReply' ) ) [0m
+ [4;35;1mTopic Load (0.002504)[0m [0mSELECT * FROM topics WHERE (topics.id = 1) LIMIT 1[0m
+ [4;36;1mTopic Update (0.000755)[0m [0;1mUPDATE topics SET "bonus_time" = '2000-01-01 14:28:00', "approved" = 'f', "written_on" = '2003-07-16 15:28:00', "author_email_address" = 'david@loudthinking.com', "content" = 'Have a nice day', "replies_count" = -1, "title" = 'The First Topic', "author_name" = 'David', "parent_id" = NULL, "last_read" = '2004-04-15', "type" = NULL WHERE id = 1[0m
+ [4;35;1mReply Load (0.000948)[0m [0mSELECT * FROM topics WHERE (topics.parent_id = 1) AND ( (topics."type" = 'Reply' OR topics."type" = 'SillyReply' ) ) [0m
+ [4;36;1mTopic Load (0.002257)[0m [0;1mSELECT * FROM topics WHERE (topics.id = 1) LIMIT 1[0m
+ [4;35;1mTopic Update (0.010406)[0m [0mUPDATE topics SET replies_count = replies_count - 1 WHERE (id = 2) [0m
+ [4;36;1mTopic Load (0.002498)[0m [0;1mSELECT * FROM topics WHERE (topics.id = 2) LIMIT 1[0m
+ [4;35;1mTopic Update (0.001241)[0m [0mUPDATE topics SET replies_count = replies_count - 1 WHERE (id = 2) [0m
+ [4;36;1mTopic Load (0.002399)[0m [0;1mSELECT * FROM topics WHERE (topics.id = 1) LIMIT 1[0m
+ [4;35;1mSQL (0.003381)[0m [0mINSERT INTO topics ("author_name", "title", "type", "approved", "bonus_time", "replies_count", "author_email_address", "content", "written_on", "last_read", "parent_id") VALUES(NULL, NULL, NULL, 't', NULL, 0, NULL, NULL, '2006-02-22 09:02:49', NULL, NULL)[0m
+ [4;36;1mTopic Load (0.001056)[0m [0;1mSELECT * FROM topics WHERE (topics.id = 0) LIMIT 1[0m
+ [4;35;1mSQL (0.002852)[0m [0mINSERT INTO topics ("author_name", "title", "type", "approved", "bonus_time", "replies_count", "author_email_address", "content", "written_on", "last_read", "parent_id") VALUES(NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, '2006-02-22 09:02:49', NULL, NULL)[0m
+ [4;36;1mTopic Load (0.000600)[0m [0;1mSELECT * FROM topics WHERE (topics.id = 0) LIMIT 1[0m
+ [4;35;1mTopic Delete all (0.040234)[0m [0mDELETE FROM topics WHERE 1=1[0m
+ [4;36;1mTopic Delete all (0.003659)[0m [0;1mDELETE FROM topics WHERE (id IN (1,2)) [0m
+ [4;35;1mTopic Count (0.001563)[0m [0mSELECT COUNT(*) FROM topics [0m
+ [4;36;1mSQL (0.003603)[0m [0;1mINSERT INTO topics ("author_name", "title", "type", "approved", "bonus_time", "replies_count", "author_email_address", "content", "written_on", "last_read", "parent_id") VALUES(NULL, 'Yet Another New Topic', NULL, 't', NULL, 0, NULL, NULL, '2003-12-12 23:23:00', NULL, NULL)[0m
+ [4;35;1mReply Load (0.003346)[0m [0mSELECT * FROM topics WHERE (topics.parent_id = 0) AND ( (topics."type" = 'Reply' OR topics."type" = 'SillyReply' ) ) [0m
+ [4;36;1mTopic Delete all (0.000497)[0m [0;1mDELETE FROM topics WHERE (parent_id = 0) [0m
+ [4;35;1mTopic Destroy (0.000409)[0m [0m DELETE FROM topics
+ WHERE id = 0
+[0m
+ [4;36;1mTopic Load (0.001023)[0m [0;1mSELECT * FROM topics WHERE (topics.id = 0) LIMIT 1[0m
+ [4;35;1mTopic Count (0.003070)[0m [0mSELECT COUNT(*) FROM topics [0m
+ [4;36;1mTopic Load (0.002273)[0m [0;1mSELECT * FROM topics WHERE (author_name = 'Mary') [0m
+ [4;35;1mReply Load (0.001030)[0m [0mSELECT * FROM topics WHERE (topics.parent_id = 2) AND ( (topics."type" = 'Reply' OR topics."type" = 'SillyReply' ) ) [0m
+ [4;36;1mTopic Delete all (0.001630)[0m [0;1mDELETE FROM topics WHERE (parent_id = 2) [0m
+ [4;35;1mTopic Destroy (0.000750)[0m [0m DELETE FROM topics
+ WHERE id = 2
+[0m
+ [4;36;1mTopic Count (0.001248)[0m [0;1mSELECT COUNT(*) FROM topics [0m
+ [4;35;1mClient Count (0.003684)[0m [0mSELECT COUNT(*) FROM companies WHERE ( (companies."type" = 'Client' OR companies."type" = 'SpecialClient' OR companies."type" = 'VerySpecialClient' ) ) [0m
+ [4;36;1mClient Load (0.007093)[0m [0;1mSELECT * FROM companies WHERE (companies.id = 2) AND ( (companies."type" = 'Client' OR companies."type" = 'SpecialClient' OR companies."type" = 'VerySpecialClient' ) ) LIMIT 1[0m
+ [4;35;1mFirm Load (0.000661)[0m [0mSELECT * FROM companies WHERE (companies.id = 2) AND ( (companies."type" = 'Firm' ) ) LIMIT 1[0m
+ [4;36;1mClient Destroy (0.001917)[0m [0;1m DELETE FROM companies
+ WHERE id = 2
+[0m
+ [4;35;1mClient Load (0.001796)[0m [0mSELECT * FROM companies WHERE (companies.id = 3) AND ( (companies."type" = 'Client' OR companies."type" = 'SpecialClient' OR companies."type" = 'VerySpecialClient' ) ) LIMIT 1[0m
+ [4;36;1mFirm Load (0.002688)[0m [0;1mSELECT * FROM companies WHERE (companies.id = 1) AND ( (companies."type" = 'Firm' ) ) LIMIT 1[0m
+ [4;35;1mClient Destroy (0.000853)[0m [0m DELETE FROM companies
+ WHERE id = 3
+[0m
+ [4;36;1mClient Count (0.001605)[0m [0;1mSELECT COUNT(*) FROM companies WHERE ( (companies."type" = 'Client' OR companies."type" = 'SpecialClient' OR companies."type" = 'VerySpecialClient' ) ) [0m
+ [4;35;1mClient Load (0.005973)[0m [0mSELECT * FROM companies WHERE (companies.id = 3) AND ( (companies."type" = 'Client' OR companies."type" = 'SpecialClient' OR companies."type" = 'VerySpecialClient' ) ) LIMIT 1[0m
+ [4;36;1mFirm Load (0.002549)[0m [0;1mSELECT * FROM companies WHERE (companies.id = 1) AND ( (companies."type" = 'Firm' ) ) LIMIT 1[0m
+ [4;35;1mClient Destroy (0.001864)[0m [0m DELETE FROM companies
+ WHERE id = 3
+[0m
+ [4;36;1mSQL (0.003713)[0m [0;1mINSERT INTO topics ("author_name", "title", "type", "approved", "bonus_time", "replies_count", "author_email_address", "content", "written_on", "last_read", "parent_id") VALUES(NULL, 'Yet Another Title', NULL, 't', NULL, 0, NULL, NULL, '2006-02-22 09:02:49', NULL, NULL)[0m
+ [4;35;1mReply Load (0.001058)[0m [0mSELECT * FROM topics WHERE (topics.parent_id = 0) AND ( (topics."type" = 'Reply' OR topics."type" = 'SillyReply' ) ) [0m
+ [4;36;1mTopic Delete all (0.000551)[0m [0;1mDELETE FROM topics WHERE (parent_id = 0) [0m
+ [4;35;1mTopic Destroy (0.000773)[0m [0m DELETE FROM topics
+ WHERE id = 0
+[0m
+ [4;36;1mTopic Load (0.008984)[0m [0;1mSELECT * FROM topics WHERE (topics.id = 1) LIMIT 1[0m
+ [4;35;1mTopic Load (0.002726)[0m [0mSELECT * FROM topics WHERE (topics.id = 2) LIMIT 1[0m
+ [4;36;1mTopic Load (0.002896)[0m [0;1mSELECT * FROM topics WHERE (topics.id = 1) LIMIT 1[0m
+ [4;35;1mSQL (0.003320)[0m [0mINSERT INTO topics ("author_name", "title", "type", "approved", "bonus_time", "replies_count", "author_email_address", "content", "written_on", "last_read", "parent_id") VALUES(NULL, NULL, NULL, 't', NULL, 0, NULL, '---
+two: 2
+one: 1', '2006-02-22 09:02:49', NULL, NULL)[0m
+ [4;36;1mTopic Load (0.000604)[0m [0;1mSELECT * FROM topics WHERE (topics.id = 0) LIMIT 1[0m
+ [4;35;1mTopic Load (0.009243)[0m [0mSELECT * FROM topics WHERE (topics.id = 1) LIMIT 1[0m
+ [4;36;1mTopic Load (0.002759)[0m [0;1mSELECT * FROM topics WHERE (topics.id = 2) LIMIT 1[0m
+ [4;35;1mTopic Load (0.005795)[0m [0mSELECT * FROM topics WHERE (topics.id = 1) LIMIT 1[0m
+ [4;36;1mTopic Load (0.002667)[0m [0;1mSELECT * FROM topics WHERE (topics.id = 1) LIMIT 1[0m
+ [4;35;1mTopic Load (0.008666)[0m [0mSELECT * FROM topics WHERE (topics.id = 1) LIMIT 1[0m
+ [4;36;1mTopic Update (0.002875)[0m [0;1mUPDATE topics SET "bonus_time" = '2000-01-01 14:28:00', "approved" = 'f', "written_on" = '2003-07-16 15:28:00', "author_email_address" = 'david@loudthinking.com', "content" = 'Have a nice day', "replies_count" = 1, "title" = 'The First Topic', "author_name" = 'David', "parent_id" = NULL, "last_read" = '2004-04-15', "type" = NULL WHERE id = 1[0m
+ [4;35;1mTopic Load (0.003552)[0m [0mSELECT * FROM topics WHERE (topics.id = 1) LIMIT 1[0m
+ [4;36;1mTopic Update (0.001403)[0m [0;1mUPDATE topics SET "bonus_time" = '2000-01-01 14:28:00', "approved" = 'f', "written_on" = '2003-07-16 15:28:00', "author_email_address" = 'david@loudthinking.com', "content" = 'Have a nice day', "replies_count" = 3, "title" = 'The First Topic', "author_name" = 'David', "parent_id" = NULL, "last_read" = '2004-04-15', "type" = NULL WHERE id = 1[0m
+ [4;35;1mReply Load (0.000694)[0m [0mSELECT * FROM topics WHERE (topics.parent_id = 1) AND ( (topics."type" = 'Reply' OR topics."type" = 'SillyReply' ) ) [0m
+ [4;36;1mTopic Load (0.002520)[0m [0;1mSELECT * FROM topics WHERE (topics.id = 1) LIMIT 1[0m
+ [4;35;1mTopic Update (0.009274)[0m [0mUPDATE topics SET replies_count = replies_count + 1 WHERE (id = 1) [0m
+ [4;36;1mTopic Load (0.002998)[0m [0;1mSELECT * FROM topics WHERE (topics.id = 1) LIMIT 1[0m
+ [4;35;1mTopic Update (0.000938)[0m [0mUPDATE topics SET replies_count = replies_count + 1 WHERE (id = 1) [0m
+ [4;36;1mTopic Load (0.002618)[0m [0;1mSELECT * FROM topics WHERE (topics.id = 1) LIMIT 1[0m
+ [4;35;1mTopic Load (0.009468)[0m [0mSELECT * FROM topics WHERE (topics.id = 1) LIMIT 1[0m
+ [4;36;1mTopic Update (0.005177)[0m [0;1mUPDATE topics SET "bonus_time" = '2000-01-01 14:28:00', "approved" = 'f', "written_on" = '2003-07-16 15:28:00', "author_email_address" = 'david@loudthinking.com', "content" = 'Have a nice day', "replies_count" = 0, "title" = 'The First Topic', "author_name" = 'David', "parent_id" = 1, "last_read" = '2004-04-15', "type" = NULL WHERE id = 1[0m
+ [4;35;1mSQL (0.010030)[0m [0mINSERT INTO auto_id_tests ("value") VALUES(NULL)[0m
+ [4;36;1mAutoId Load (0.000585)[0m [0;1mSELECT * FROM auto_id_tests WHERE (auto_id_tests.auto_id = 0) LIMIT 1[0m
+ [4;35;1mSQL (0.006707)[0m [0mPRAGMA table_info(categories)[0m
+ [4;36;1mTopic Load (0.012476)[0m [0;1mSELECT * FROM topics ORDER BY id [0m
+ [4;35;1mTopic Load (0.002900)[0m [0mSELECT * FROM topics WHERE (topics.id = 1) LIMIT 1[0m
+ [4;36;1mTopic Load (0.009610)[0m [0;1mSELECT * FROM topics WHERE (author_name = 'Mary') [0m
+ [4;35;1mTopic Load (0.002122)[0m [0mSELECT * FROM topics WHERE (topics.id = 2) LIMIT 1[0m
+ [4;36;1mSQL (0.006091)[0m [0;1mINSERT INTO topics ("author_name", "title", "type", "approved", "bonus_time", "replies_count", "author_email_address", "content", "written_on", "last_read", "parent_id") VALUES(NULL, 'hello', 'Reply', 't', NULL, 0, NULL, 'world', '2006-02-22 09:02:50', NULL, NULL)[0m
+ [4;35;1mReply Update (0.002221)[0m [0mUPDATE topics SET "bonus_time" = NULL, "approved" = 'f', "written_on" = '2006-02-22 09:02:50', "author_email_address" = NULL, "content" = 'world', "replies_count" = 0, "title" = 'hello', "author_name" = NULL, "parent_id" = NULL, "last_read" = NULL, "type" = 'Reply' WHERE id = 0[0m
+ [4;36;1mTopic Load (0.004532)[0m [0;1mSELECT * FROM topics WHERE (topics.id = 1) LIMIT 1[0m
+ [4;35;1mTopic Load (0.011355)[0m [0mSELECT * FROM topics WHERE (topics.id = 1) LIMIT 1[0m
+ [4;36;1mTopic Load (0.003861)[0m [0;1mSELECT * FROM topics WHERE (topics.id = 1) LIMIT 1[0m
+ [4;35;1mTopic Load (0.004536)[0m [0mSELECT * FROM topics WHERE (topics.id = 1) LIMIT 1[0m
+ [4;36;1mTopic Load (0.009412)[0m [0;1mSELECT * FROM topics WHERE (topics.id = 1) LIMIT 1[0m
+ [4;35;1mSQL (0.012033)[0m [0mPRAGMA table_info(tasks)[0m
+ [4;36;1mTopic Load (0.003992)[0m [0;1mSELECT * FROM topics WHERE (topics.id = 1) LIMIT 1[0m
+ [4;35;1mSQL (0.002058)[0m [0mINSERT INTO topics ("author_name", "title", "type", "approved", "bonus_time", "replies_count", "author_email_address", "content", "written_on", "last_read", "parent_id") VALUES(NULL, 'Hey you', NULL, 't', NULL, 0, NULL, NULL, '2006-02-22 09:02:50', NULL, NULL)[0m
+ [4;36;1mTopic Load (0.013915)[0m [0;1mSELECT * FROM topics WHERE (topics.id = 1) LIMIT 1[0m
+ [4;35;1mTopic Load (0.004504)[0m [0mSELECT * FROM topics WHERE (topics.id = 1) LIMIT 1[0m
+ [4;36;1mTopic Load (0.002590)[0m [0;1mSELECT * FROM topics WHERE (topics.id = 1) LIMIT 1[0m
+ [4;35;1mSQL (0.003083)[0m [0mINSERT INTO topics ("author_name", "title", "type", "approved", "bonus_time", "replies_count", "author_email_address", "content", "written_on", "last_read", "parent_id") VALUES('\ ''
+ \n "', NULL, NULL, 't', NULL, 0, NULL, NULL, '2006-02-22 09:02:50', NULL, NULL)[0m
+ [4;36;1mTopic Load (0.000578)[0m [0;1mSELECT * FROM topics WHERE (topics.id = 0) LIMIT 1[0m
+ [4;35;1mTopic Load (0.006271)[0m [0mSELECT * FROM topics WHERE (topics.id = 1) LIMIT 1[0m
+ [4;36;1mTopic Load (0.012460)[0m [0;1mSELECT * FROM topics WHERE (topics.id = 1) LIMIT 1[0m
+ [4;35;1mTopic Load (0.005476)[0m [0mSELECT * FROM topics LIMIT 1[0m
+Exception occured during reader method compilation.
+Maybe mumub-jumbo is not a valid Ruby identifier?
+(eval):1:in `class_eval': compile error
+(eval):1: syntax error
+def mumub-jumbo; raise NoMethodError, 'missing attribute: mumub-jumbo', caller unless @attributes.has_key?('mumub-jumbo'); @attributes['mumub-jumbo']; end
+ ^
+(eval):1: syntax error
+def mumub-jumbo; raise NoMethodError, 'missing attribute: mumub-jumbo', caller unless @attributes.has_key?('mumub-jumbo'); @attributes['mumub-jumbo']; end
+ ^
+ [4;36;1mTopic Load (0.010857)[0m [0;1mSELECT * FROM topics LIMIT 1[0m
+ [4;35;1mFirm Load (0.002415)[0m [0mSELECT * FROM companies WHERE ( (companies."type" = 'Firm' ) ) LIMIT 1[0m
+ [4;36;1mClient Load (0.001866)[0m [0;1mSELECT * FROM companies WHERE ( (companies."type" = 'Client' OR companies."type" = 'SpecialClient' OR companies."type" = 'VerySpecialClient' ) ) LIMIT 1[0m
+ [4;35;1mTopic Load (0.002584)[0m [0mSELECT * FROM topics WHERE (topics.id = 99999) LIMIT 1[0m
+ [4;36;1mTopic Load (0.011069)[0m [0;1mSELECT * FROM topics WHERE (topics.id = 1) LIMIT 1[0m
+ [4;35;1mTopic Load (0.002149)[0m [0mSELECT * FROM topics WHERE (topics.id = 1) LIMIT 1[0m
+ [4;36;1mTopic Update (0.003213)[0m [0;1mUPDATE topics SET "bonus_time" = '2000-01-01 14:28:00', "approved" = 'f', "written_on" = '2003-07-16 15:28:00', "author_email_address" = 'david@loudthinking.com', "content" = 'Have a nice day', "replies_count" = 0, "title" = 'something else', "author_name" = 'David', "parent_id" = NULL, "last_read" = '2004-04-15', "type" = NULL WHERE id = 1[0m
+ [4;35;1mTopic Load (0.002511)[0m [0mSELECT * FROM topics WHERE (topics.id = 1) LIMIT 1[0m
+ [4;36;1mTopic Load (0.004236)[0m [0;1mSELECT * FROM topics WHERE (topics.id = 1) LIMIT 1[0m
+ [4;35;1mDeveloper Load (0.003825)[0m [0mSELECT * FROM developers WHERE (salary > 90000) AND (id < 5) [0m
+ [4;36;1mDeveloper Load (0.001538)[0m [0;1mSELECT * FROM developers WHERE (developers.id = 1) LIMIT 1[0m
+ [4;35;1mSQL (0.003689)[0m [0mPRAGMA table_info(developers)[0m
+ [4;36;1mDeveloper Load (0.012198)[0m [0;1mSELECT * FROM developers ORDER BY id LIMIT 3 OFFSET 2[0m
+ [4;35;1mDeveloper Load (0.001852)[0m [0mSELECT * FROM developers WHERE (developers.id = 1) LIMIT 1[0m
+ [4;36;1mDeveloper Load (0.003312)[0m [0;1mSELECT * FROM developers WHERE (developers.id = 1) LIMIT 1[0m
+ [4;35;1mDeveloper Load (0.005539)[0m [0mSELECT * FROM developers ORDER BY id [0m
+ [4;36;1mSQL (0.003824)[0m [0;1mINSERT INTO topics ("author_name", "title", "type", "approved", "bonus_time", "replies_count", "author_email_address", "content", "written_on", "last_read", "parent_id") VALUES(NULL, NULL, NULL, 't', NULL, 0, NULL, '--- !ruby/struct:BasicsTest::MyObject
+attribute1: value1
+attribute2: value2', '2006-02-22 09:02:50', NULL, NULL)[0m
+ [4;35;1mSQL (0.003664)[0m [0mINSERT INTO topics ("author_name", "title", "type", "approved", "bonus_time", "replies_count", "author_email_address", "content", "written_on", "last_read", "parent_id") VALUES(NULL, NULL, NULL, 't', NULL, 0, NULL, '--- !ruby/struct:BasicsTest::MyObject
+attribute1: value1
+attribute2: value2', '2006-02-22 09:02:50', NULL, NULL)[0m
+ [4;36;1mTopic Load (0.000653)[0m [0;1mSELECT * FROM topics WHERE (topics.id = 0) LIMIT 1[0m
+ [4;35;1mTopic Load (0.004584)[0m [0mSELECT * FROM topics WHERE (topics.id = 1) LIMIT 1[0m
+ [4;36;1mSQL (0.011570)[0m [0;1mSELECT name FROM sqlite_master WHERE type = 'table'[0m
+ [4;35;1mSQL (0.013690)[0m [0mSELECT name FROM sqlite_master WHERE type = 'table'[0m
+ [4;36;1mTopic Load (0.004343)[0m [0;1mSELECT * FROM topics WHERE (topics.id = 1) LIMIT 1[0m
+ [4;35;1mSQL (0.003293)[0m [0mINSERT INTO topics ("author_name", "title", "type", "approved", "bonus_time", "replies_count", "author_email_address", "content", "written_on", "last_read", "parent_id") VALUES(NULL, 'Another New Topic', NULL, 't', NULL, 0, NULL, NULL, '2003-12-12 23:23:00', NULL, NULL)[0m
+ [4;36;1mTopic Load (0.000615)[0m [0;1mSELECT * FROM topics WHERE (topics.id = 0) LIMIT 1[0m
+ [4;35;1mTopic Update (0.004120)[0m [0mUPDATE topics SET content = 'bulk updated!' [0m
+ [4;36;1mTopic Load (0.002553)[0m [0;1mSELECT * FROM topics WHERE (topics.id = 1) LIMIT 1[0m
+ [4;35;1mTopic Load (0.004413)[0m [0mSELECT * FROM topics WHERE (topics.id = 1) LIMIT 1[0m
+ [4;36;1mTopic Load (0.002548)[0m [0;1mSELECT * FROM topics WHERE (topics.id = 1) LIMIT 1[0m
+ [4;35;1mTopic Update (0.004526)[0m [0mUPDATE topics SET content = 'bulk updated!' WHERE (approved = 't') [0m
+ [4;36;1mTopic Load (0.002641)[0m [0;1mSELECT * FROM topics WHERE (topics.id = 1) LIMIT 1[0m
+ [4;35;1mSQL (0.003577)[0m [0mINSERT INTO topics ("author_name", "title", "type", "approved", "bonus_time", "replies_count", "author_email_address", "content", "written_on", "last_read", "parent_id") VALUES(NULL, 'Still another topic', NULL, 't', NULL, 0, NULL, NULL, '2006-02-22 09:02:51', NULL, NULL)[0m
+ [4;36;1mTopic Load (0.000582)[0m [0;1mSELECT * FROM topics WHERE (topics.id = 0) LIMIT 1[0m
+ [4;35;1mTopic Load (0.004113)[0m [0mSELECT * FROM topics WHERE (topics.id = 1) LIMIT 1[0m
+ [4;36;1mTopic Load (0.011675)[0m [0;1mSELECT * FROM topics WHERE (topics.id = 1) LIMIT 1[0m
diff --git a/tracks/vendor/rails/activerecord/test/fixtures/fixture_database.sqlite3 b/tracks/vendor/rails/activerecord/test/fixtures/fixture_database.sqlite3
new file mode 100644
index 00000000..eefbb826
Binary files /dev/null and b/tracks/vendor/rails/activerecord/test/fixtures/fixture_database.sqlite3 differ
diff --git a/tracks/vendor/rails/activerecord/test/fixtures/fixture_database_2.sqlite3 b/tracks/vendor/rails/activerecord/test/fixtures/fixture_database_2.sqlite3
new file mode 100644
index 00000000..1cbbd446
Binary files /dev/null and b/tracks/vendor/rails/activerecord/test/fixtures/fixture_database_2.sqlite3 differ
diff --git a/tracks/vendor/rake-0.6.2/CHANGES b/tracks/vendor/rake-0.6.2/CHANGES
deleted file mode 100644
index 6ef512b0..00000000
--- a/tracks/vendor/rake-0.6.2/CHANGES
+++ /dev/null
@@ -1,234 +0,0 @@
-= Rake Changelog
-
-== PreVersion 0.5.5
-
-* Fixed file creation bug in the unit tests (caused infinite loop on
- windows).
-* Fixed bug where session based functional tests were run under
- windows.
-* Fixed bug in directory tasks so that updating a directory will not
- retrigger file tasks depending on the directory (see
- FileCreationTask and EarlyTime).
-* Added egrep to FileList
-* ruby command now runs same ruby version as rake.
-* Added investigation to task object. (suggested by Martin Fowler)
-* Added ruby_opts to the test task to allow arbitrary ruby options to
- be passed to the test script. (Greg Fast)
-* Fixed the test loader to ignore options. (Greg Fast)
-* Moved Task, FileTask, FileCreationTask and RakeApp into the Rake
- module namespace. Old style namespace behavior can be invoked via
- the --classic-namespace option. (requested by Kelly Felkins).
-* GemTask is now sensitive to the gem platform (Masao Mutoh).
-* A non-existing file prerequisite will no longer cause an exception
- (Philipp Neubeck).
-* Multiple prerequisites on Rake rules now allowed (initial patch
- supplied by Stuart Jansen).
-
-== Version 0.5.4
-
-* Added double quotes to the test runner.
-* Added .svn to default ignore list.
-* Updated FileList#include to support nested arrays and filelists.
-
-== Version 0.5.3
-
-* Added support for importing Rakefile and other dependencies.
-* Fixed bug so that now rules can chain off of existing tasks as well
- as existing files.
-* Fixed verbose flag bug in the testing task. Shortened some failure
- messages.
-* Make FileUtils methods private at the top level module to avoid
- accidental method leaking into other objects.
-* Added test loader option to test task. "testrb" is no longer the
- default test loader. It is now eating syntax errors that should
- halt the unit tests.
-* Revamped FileList so that it works more like and array (addressed
- flatten bug). Added many tests around file list.
-* Added +ext+ method to both String and FileList.
-
-== Version 0.5.0
-
-* Fixed documentation that was lacking the Rake module name (Tilman
- Sauerbeck).
-* Added tar.gz and tar.bz2 support to package task (Tilman Sauerbeck).
-* Recursive rules are now supported (Tilman Sauerbeck).
-* Added warning option for the Test Task (requested by Eric Hodel).
-* The jamis rdoc template is only used if it exists.
-* Added fix for Ruby 1.8.2 test/unit and rails problem.
-* Added contributed rake man file (Jani Monoses).
-* Added Brian Candler's fix for problems in --trace and --dry-run
- mode.
-
-== Version 0.4.15
-
-* Fixed a bug that prevented the TESTOPTS flag from working with the
- revised for 1.8.2 test task.
-* Updated the docs on --trace to indicate that it also enables a full
- backtrace on errors.
-
-== Version 0.4.14
-
-* Modified the TestTask to workaround the Ruby 1.8.2 change in
- autoexecuting unit tests.
-
-== Version 0.4.13
-
-* Fixed the dry-run flag so it is operating again.
-* Multiple arguments to sh and ruby commands will not be interpreted
- by the shell (patch provided by Jonathan Paisley).
-
-== Version 0.4.12
-
-* Added --silent (-s) to suppress the (in directory) rake message.
-
-== Version 0.4.11
-
-* Changed the "don't know how to rake" message (finally)
-* Changes references to a literal "Rakefile" to reference the global
- variable $rakefile (which contains the actual name of the rakefile).
-
-== Version 0.4.10
-
-* Added block support to the "sh" command, allowing users to take
- special actions on the result of the system call. E.g.
-
- sh "shell_command" do |ok, res|
- puts "Program returned #{res.exitstatus}" if ! ok
- end
-
-== Version 0.4.9
-
-* Switched to Jamis Buck's RDoc template.
-* Removed autorequire from Rake's gem spec. This prevents the Rake
- libraries from loading while using rails.
-
-== Version 0.4.8
-
-* Added support for .rb versions of Rakefile.
-* Removed \\\n's from test task.
-* Fixed Ruby 1.9 compatibility issue with FileList.
-
-== Version 0.4.7
-
-* Fixed problem in FileList that caused Ruby 1.9 to go into infinite
- recursion. Since to_a was removed from Object, it does not need to
- added back into the list of methods to rewrite in FileList. (Thanks
- to Kent Sibilev for pointing this out).
-
-== Version 0.4.6
-* Removed test version of ln in FileUtils that prevented safe_ln from
- using ln.
-
-== Version 0.4.5
-* Upgraded comments in TestTask.
-* FileList to_s and inspect now automatically resolve pending changes.
-* FileList#exclude properly returns the FileList.
-
-== Version 0.4.4
-* Fixed initialization problem with @comment.
-* Now using multi -r technique in TestTask. Switch Rakefile back to
- using the built-in test task macros because the rake runtime is no
- longer needed.
-* Added 'TEST=filename' and 'TESTOPTS=options' to the Test Task
- macros.
-* Allow a +test_files+ attribute in test tasks. This allows more
- flexibility in specifying test files.
-
-== Version 0.4.3
-* Fixed Comment leakage.
-
-== Version 0.4.2
-* Added safe_ln that falls back to a copy if a file link is not supported.
-* Package builder now uses safe_ln.
-
-== Version 0.4.1
-* Task comments are now additive, combined with "/".
-* Works with (soon to be released) rubygems 0.6.2 (or 0.7.0)
-
-== Version 0.4.0
-* FileList now uses deferred loading. The file system is not searched
- until the first call that needs the file names.
-* VAR=VALUE options are now accepted on the command line and are
- treated like environment variables. The values may be tested in a
- Rakefile by referencing ENV['VAR'].
-* File.mtime is now used (instead of File.new().mtime).
-
-== Version 0.3.2.x
-
-* Removed some hidden dependencies on rubygems. Tests now will test
- gems only if they are installed.
-* Removed Sys from some example files. I believe that is that last
- reference to Sys outside of the contrib area.
-* Updated all copyright notices to include 2004.
-
-== Version 0.3.2
-
-* GEM Installation now works with the application stub.
-
-== Version 0.3.1
-
-* FileLists now automatically ignore CVS, .bak, !
-* GEM Installation now works.
-
-== Version 0.3.0
-
-Promoted 0.2.10.
-
-== Version 0.2.10
-General
-
-* Added title to Rake's rdocs
-* Contrib packages are no longer included in the documentation.
-
-RDoc Issues
-
-* Removed default for the '--main' option
-* Fixed rendering of the rdoc options
-* Fixed clean/clobber confusion with rerdoc
-* 'title' attribute added
-
-Package Task Library Issues
-
-* Version (or explicit :noversion) is required.
-* +package_file+ attribute is now writable
-
-FileList Issues
-
-* Dropped bang version of exclude. Now using ant-like include/exclude semantics.
-* Enabled the "yield self" idiom in FileList#initialize.
-
-== Version 0.2.9
-
-This version contains numerous changes as the RubyConf.new(2003)
-presentation was being prepared. The changes include:
-
-* The monolithic rubyapp task library is in the process of being
- dropped in favor of lighter weight task libraries.
-
-== Version 0.2.7
-
-* Added "desc" for task descriptions.
-* -T will now display tasks with descriptions.
-* -P will display tasks and prerequisites.
-* Dropped the Sys module in favor of the 1.8.x FileUtils module. Sys
- is still supported in the contrib area.
-
-== Version 0.2.6
-
-* Moved to RubyForge
-
-== Version 0.2.5
-
-* Switched to standard ruby app builder.
-* Added no_match option to file matcher.
-
-== Version 0.2.4
-
-* Fixed indir, which neglected to actually change directories.
-
-== Version 0.2.3
-
-* Added rake module for a help target
-* Added 'for_files' to Sys
-* Added a $rakefile constant
-* Added test for selecting proper rule with multiple targets.
diff --git a/tracks/vendor/rake-0.6.2/MIT-LICENSE b/tracks/vendor/rake-0.6.2/MIT-LICENSE
deleted file mode 100644
index 72734753..00000000
--- a/tracks/vendor/rake-0.6.2/MIT-LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-Copyright (c) 2003, 2004 Jim Weirich
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
diff --git a/tracks/vendor/rake-0.6.2/README b/tracks/vendor/rake-0.6.2/README
deleted file mode 100644
index 3789f579..00000000
--- a/tracks/vendor/rake-0.6.2/README
+++ /dev/null
@@ -1,228 +0,0 @@
-= RAKE -- Ruby Make
-
-Supporting Rake version: 0.6
-
-This package contains Rake, a simple ruby build program with
-capabilities similar to make.
-
-Rake has the following features:
-
-* Rakefiles (rake's version of Makefiles) are completely defined in
- standard Ruby syntax. No XML files to edit. No quirky Makefile
- syntax to worry about (is that a tab or a space?)
-
-* Users can specify tasks with prerequisites.
-
-* Rake supports rule patterns to sythesize implicit tasks.
-
-* Flexible FileLists that act like arrays but know about manipulating
- file names and paths.
-
-* A library of prepackaged tasks to make building rakefiles easier.
-
-
-== Download
-
-The latest version of rake can be found at
-
-* http://rubyforge.org/project/showfiles.php?group_id=50
-
-== Installation
-
-=== Normal Installation
-
-You can install rake with the following command.
-
- % ruby install.rb
-
-from its distribution directory.
-
-=== GEM Installation
-
-Download and install rake with the following.
-
- gem install --remote rake
-
-== Online Resources
-
-== Rake References
-
-* Rake Documentation Home: http://docs.rubyrake.org
-* Rake Project Page: http://rubyforge.org/projects/rake
-* Rake API Documents: http://rake.rubyforge.org
-
-== Presentations and Articles about Rake
-
-* Jim Weirich\u2019s 2003 RubyConf presentation: http://onestepback.org/articles/buildingwithrake/
-* Martin Fowler\u2019s article on Rake: http://martinfowler.com/articles/rake.html
-
-=== Road Map
-
-* If you want to see how to invoke rake to build your projects, read on.
-* If you want to see the format of a Rakefile, see
- doc/rakefile.rdoc[http://rake.rubyforge.org/files/doc/rakefile_rdoc.html].
-* If you want to see the original announcement of rake, see
- doc/rational.rdoc[http://rake.rubyforge.org/files/doc/rational_rdoc.html].
-* If you want to see a glossary of terms, see
- doc/glossary.rdoc[http://rake.rubyforge.org/files/doc/glossary_rdoc.html].
-
-== Simple Example
-
-Once installed, you can run rake as follows ...
-
- % rake [options ...] [VAR=VALUE ...] [tasks...]
-
-Type "rake --help" for an up-to-date option summary.
-
-Invoking rake without any options or targets causes rake to
-look for a rakefile and invoke the default task in that rakefile.
-
-For example, given a simple rakefile like this ...
-
- task :default => [:test]
-
- task :test do
- ruby "test/unittest.rb"
- end
-
-The command
-
- $ rake
-
-will invoke the +default+ task. As +default+ satisfies its
-prerequisites, the +test+ task will run the unit tests for the
-package.
-
-== Other Make Reinvisionings ...
-
-Rake is a late entry in the make replacement field. Here are links to
-other projects with similar (and not so similar) goals.
-
-* http://www.a-a-p.org -- Make in Python
-* http://www.aromatic.com/tools/jam.txt -- JAM, Java Automated Make
-* http://ant.apache.org -- The Ant project
-* http://www.perl.com/language/ppt/src/make/index.html -- Make from
- the Perl Power Tools implementation.
-
-== Credits
-
-[Ryan Dlugosz] For the initial conversation that sparked Rake.
-
-[nobu.nokada@softhome.net] For the initial patch for rule support.
-
-[Tilman Sauerbeck ] For the recursive rule patch.
-
-== License
-
-Rake is available under an MIT-style license.
-
-:include: MIT-LICENSE
-
-== Support
-
-The Rake homepage is http://rake.rubyforge.org. You can find the Rake
-RubyForge page at http://rubyforge.org/projects/rake.
-
-Feel free to submit commits or feature requests. If you send a patch,
-remember to update the corresponding unit tests. If fact, I prefer
-new feature to be submitted in the form of new unit tests.
-
-For other information, feel free to ask on the ruby-talk mailing list
-(which is mirrored to comp.lang.ruby) or contact
-mailto:jim@weirichhouse.org.
-
-----
-
-= Usage
-
-Rake is invoked from the command line using:
-
- % rake [options ...] [VAR=VALUE] [targets ...]
-
-Options are:
-
-[name=value]
- Set the environment variable name to value
- during the execution of the rake command. You can access
- the value by using ENV['name'].
-
-[--classic-namespace (-n)]
- Import the Task, FileTask, and FileCreateTask into the top-level
- scope to be compatible with older versions of Rake. Alternatively
- you can include the line require
- 'rake/classic_namespace' in your Rakefile to get the
- classic behavior.
-
-[--dry-run (-n)]
- Do a dry run. Print the tasks invoked and executed, but do not
- actually execute any of the actions.
-
-[--help (-H)]
- Display some help text and exit.
-
-[--libdir _directory_ (-I)]
- Add _directory_ to the list of directories searched for require.
-
-[--nosearch (-N)]
- Do not search for a Rakefile in parent directories.
-
-[--prereqs (-P)]
- Display a list of all tasks and their immediate prerequisites.
-
-[--quiet (-q)]
- Do not echo commands from FileUtils.
-
-[--rakefile _filename_ (-f)]
- Use _filename_ as the name of the rakefile. The default rakefile
- names are +rakefile+ and +Rakefile+ (with +rakefile+ taking
- precedence). If the rakefile is not found in the current
- directory, +rake+ will search parent directories for a match. The
- directory where the Rakefile is found will become the current
- directory for the actions executed in the Rakefile.
-
-[--require _name_ (-r)]
- Require _name_ before executing the Rakefile.
-
-[--tasks (-T)]
- Display a list of the major tasks and their comments. Comments
- are defined using the "desc" command.
-
-[--trace (-t)]
- Turn on invoke/execute tracing. Also enable full backtrace on errors.
-
-[--usage (-h)]
- Display a usage message and exit.
-
-[--verbose (-v)]
- Echo the Sys commands to standard output.
-
-[--version (-V)]
- Display the program version and exit.
-
-In addition, any command line option of the form
-VAR=VALUE will be added to the environment hash
-ENV and may be tested in the Rakefile.
-
----
-
-= Rakefile Format
-
-See doc/rakefile.rdoc[http://rake.rubyforge.org/files/doc/rakefile_rdoc.html]
-for details on the Rakefile format.
-
----
-
-= Other stuff
-
-Author:: Jim Weirich
-Requires:: Ruby 1.8.0 or later
-License:: Copyright 2003, 2004 by Jim Weirich.
- Released under an MIT-style license. See the LICENSE file
- included in the distribution.
-
-== Warranty
-
-This software is provided "as is" and without any express or
-implied warranties, including, without limitation, the implied
-warranties of merchantibility and fitness for a particular
-purpose.
diff --git a/tracks/vendor/rake-0.6.2/Rakefile b/tracks/vendor/rake-0.6.2/Rakefile
deleted file mode 100644
index 2f243551..00000000
--- a/tracks/vendor/rake-0.6.2/Rakefile
+++ /dev/null
@@ -1,353 +0,0 @@
-# Rakefile for rake -*- ruby -*-
-
-# Copyright 2003, 2004 by Jim Weirich (jim@weirichhouse.org)
-# All rights reserved.
-
-# This file is may be distributed under an MIT style license. See
-# MIT-LICENSE for details.
-
-begin
- require 'rubygems'
- require 'rake/gempackagetask'
-rescue Exception
- nil
-end
-require 'rake/clean'
-require 'rake/testtask'
-require 'rake/rdoctask'
-
-CLEAN.include('**/*.o')
-CLOBBER.include('doc/example/main', 'testdata')
-CLOBBER.include('test/data/**/temp_*')
-CLOBBER.include('test/data/chains/play.*')
-CLOBBER.include('test/data/file_creation_task/build')
-CLOBBER.include('test/data/file_creation_task/src')
-CLOBBER.include('TAGS')
-
-def announce(msg='')
- STDERR.puts msg
-end
-
-# Determine the current version of the software
-
-if `ruby -Ilib ./bin/rake --version` =~ /\S+$/
- CURRENT_VERSION = $&
-else
- CURRENT_VERSION = "0.0.0"
-end
-
-if ENV['REL']
- PKG_VERSION = ENV['REL']
-else
- PKG_VERSION = CURRENT_VERSION
-end
-
-
-SRC_RB = FileList['lib/**/*.rb']
-
-# The default task is run if rake is given no explicit arguments.
-
-desc "Default Task"
-task :default => :alltests
-
-# Test Tasks ---------------------------------------------------------
-
-task :ta => :alltests
-task :tf => :funtests
-task :tu => :unittests
-task :tc => :contribtests
-task :test => :unittests
-
-Rake::TestTask.new(:alltests) do |t|
- t.test_files = FileList[
- 'test/test*.rb',
- 'test/contrib/test*.rb',
- 'test/fun*.rb'
- ]
- t.warning = true
- t.verbose = true
-end
-
-Rake::TestTask.new(:unittests) do |t|
- t.test_files = FileList['test/test*.rb']
- t.warning = true
- t.verbose = false
-end
-
-Rake::TestTask.new(:funtests) do |t|
- t.test_files = FileList['test/fun*.rb']
- t.warning = true
- t.warning = true
-end
-
-Rake::TestTask.new(:contribtests) do |t|
- t.test_files = FileList['test/contrib/test*.rb']
- t.verbose = false
- t.warning = true
-end
-
-directory 'testdata'
-[:alltests, :unittests, :contribtests, :funtests].each do |t|
- task t => ['testdata']
-end
-
-# CVS Tasks ----------------------------------------------------------
-
-# Install rake using the standard install.rb script.
-
-desc "Install the application"
-task :install do
- ruby "install.rb"
-end
-
-# Create a task to build the RDOC documentation tree.
-
-rd = Rake::RDocTask.new("rdoc") { |rdoc|
- rdoc.rdoc_dir = 'html'
-# rdoc.template = 'kilmer'
-# rdoc.template = 'css2'
- rdoc.template = 'doc/jamis.rb'
- rdoc.title = "Rake -- Ruby Make"
- rdoc.options << '--line-numbers' << '--inline-source' << '--main' << 'README'
- rdoc.rdoc_files.include('README', 'MIT-LICENSE', 'TODO', 'CHANGES')
- rdoc.rdoc_files.include('lib/**/*.rb', 'doc/**/*.rdoc')
- rdoc.rdoc_files.exclude(/\bcontrib\b/)
-}
-
-# ====================================================================
-# Create a task that will package the Rake software into distributable
-# tar, zip and gem files.
-
-PKG_FILES = FileList[
- 'install.rb',
- '[A-Z]*',
- 'bin/**/*',
- 'lib/**/*.rb',
- 'test/**/*.rb',
- 'test/**/*.rf',
- 'test/**/*.mf',
- 'test/**/Rakefile',
- 'doc/**/*'
-]
-PKG_FILES.exclude('doc/example/*.o')
-PKG_FILES.exclude(%r{doc/example/main$})
-
-if ! defined?(Gem)
- puts "Package Target requires RubyGEMs"
-else
- spec = Gem::Specification.new do |s|
-
- #### Basic information.
-
- s.name = 'rake'
- s.version = PKG_VERSION
- s.summary = "Ruby based make-like utility."
- s.description = <<-EOF
- Rake is a Make-like program implemented in Ruby. Tasks
- and dependencies are specified in standard Ruby syntax.
- EOF
-
- #### Dependencies and requirements.
-
- #s.add_dependency('log4r', '> 1.0.4')
- #s.requirements << ""
-
- #### Which files are to be included in this gem? Everything! (Except CVS directories.)
-
- s.files = PKG_FILES.to_a
-
- #### C code extensions.
-
- #s.extensions << "ext/rmagic/extconf.rb"
-
- #### Load-time details: library and application (you will need one or both).
-
- s.require_path = 'lib' # Use these for libraries.
-
- s.bindir = "bin" # Use these for applications.
- s.executables = ["rake"]
- s.default_executable = "rake"
-
- #### Documentation and testing.
-
- s.has_rdoc = true
- s.extra_rdoc_files = rd.rdoc_files.reject { |fn| fn =~ /\.rb$/ }.to_a
- s.rdoc_options <<
- '--title' << 'Rake -- Ruby Make' <<
- '--main' << 'README' <<
- '--line-numbers'
-
- #### Author and project details.
-
- s.author = "Jim Weirich"
- s.email = "jim@weirichhouse.org"
- s.homepage = "http://rake.rubyforge.org"
- s.rubyforge_project = "rake"
-# if ENV['CERT_DIR']
-# s.signing_key = File.join(ENV['CERT_DIR'], 'gem-private_key.pem')
-# s.cert_chain = [File.join(ENV['CERT_DIR'], 'gem-public_cert.pem')]
-# end
- end
-
- package_task = Rake::GemPackageTask.new(spec) do |pkg|
- pkg.need_zip = true
- pkg.need_tar = true
- end
-end
-
-# Misc tasks =========================================================
-
-def count_lines(filename)
- lines = 0
- codelines = 0
- open(filename) { |f|
- f.each do |line|
- lines += 1
- next if line =~ /^\s*$/
- next if line =~ /^\s*#/
- codelines += 1
- end
- }
- [lines, codelines]
-end
-
-def show_line(msg, lines, loc)
- printf "%6s %6s %s\n", lines.to_s, loc.to_s, msg
-end
-
-desc "Count lines in the main rake file"
-task :lines do
- total_lines = 0
- total_code = 0
- show_line("File Name", "LINES", "LOC")
- SRC_RB.each do |fn|
- lines, codelines = count_lines(fn)
- show_line(fn, lines, codelines)
- total_lines += lines
- total_code += codelines
- end
- show_line("TOTAL", total_lines, total_code)
-end
-
-ARCHIVEDIR = '/mnt/usb'
-
-task :archive => [:package] do
- cp FileList["pkg/*.tgz", "pkg/*.zip", "pkg/*.gem"], ARCHIVEDIR
-end
-
-# Define an optional publish target in an external file. If the
-# publish.rf file is not found, the publish targets won't be defined.
-
-load "publish.rf" if File.exist? "publish.rf"
-
-# Support Tasks ------------------------------------------------------
-
-desc "Look for TODO and FIXME tags in the code"
-task :todo do
- FileList['**/*.rb'].egrep /#.*(FIXME|TODO|TBD)/
-end
-
-desc "Look for Debugging print lines"
-task :dbg do
- FileList['**/*.rb'].egrep /\bDBG|\bbreakpoint\b/
-end
-
-desc "List all ruby files"
-task :rubyfiles do
- puts Dir['**/*.rb'].reject { |fn| fn =~ /^pkg/ }
- puts Dir['bin/*'].reject { |fn| fn =~ /CVS|(~$)|(\.rb$)/ }
-end
-
-# --------------------------------------------------------------------
-# Creating a release
-
-desc "Make a new release"
-task :release => [
- :prerelease,
- :clobber,
- :alltests,
- :update_version,
- :package,
- :tag] do
-
- announce
- announce "**************************************************************"
- announce "* Release #{PKG_VERSION} Complete."
- announce "* Packages ready to upload."
- announce "**************************************************************"
- announce
-end
-
-# Validate that everything is ready to go for a release.
-task :prerelease do
- announce
- announce "**************************************************************"
- announce "* Making RubyGem Release #{PKG_VERSION}"
- announce "* (current version #{CURRENT_VERSION})"
- announce "**************************************************************"
- announce
-
- # Is a release number supplied?
- unless ENV['REL']
- fail "Usage: rake release REL=x.y.z [REUSE=tag_suffix]"
- end
-
- # Is the release different than the current release.
- # (or is REUSE set?)
- if PKG_VERSION == CURRENT_VERSION && ! ENV['REUSE']
- fail "Current version is #{PKG_VERSION}, must specify REUSE=tag_suffix to reuse version"
- end
-
- # Are all source files checked in?
- if ENV['RELTEST']
- announce "Release Task Testing, skipping checked-in file test"
- else
- announce "Checking for unchecked-in files..."
- data = `cvs -q update`
- unless data =~ /^$/
- fail "CVS update is not clean ... do you have unchecked-in files?"
- end
- announce "No outstanding checkins found ... OK"
- end
-end
-
-task :update_version => [:prerelease] do
- if PKG_VERSION == CURRENT_VERSION
- announce "No version change ... skipping version update"
- else
- announce "Updating Rake version to #{PKG_VERSION}"
- open("lib/rake.rb") do |rakein|
- open("lib/rake.rb.new", "w") do |rakeout|
- rakein.each do |line|
- if line =~ /^RAKEVERSION\s*=\s*/
- rakeout.puts "RAKEVERSION = '#{PKG_VERSION}'"
- else
- rakeout.puts line
- end
- end
- end
- end
- mv "lib/rake.rb.new", "lib/rake.rb"
- if ENV['RELTEST']
- announce "Release Task Testing, skipping commiting of new version"
- else
- sh %{cvs commit -m "Updated to version #{PKG_VERSION}" lib/rake.rb}
- end
- end
-end
-
-desc "Tag all the CVS files with the latest release number (REL=x.y.z)"
-task :tag => [:prerelease] do
- reltag = "REL_#{PKG_VERSION.gsub(/\./, '_')}"
- reltag << ENV['REUSE'].gsub(/\./, '_') if ENV['REUSE']
- announce "Tagging CVS with [#{reltag}]"
- if ENV['RELTEST']
- announce "Release Task Testing, skipping CVS tagging"
- else
- sh %{cvs tag #{reltag}}
- end
-end
-
-# Require experimental XForge/Metaproject support.
-
-load 'xforge.rf' if File.exist?('xforge.rf')
diff --git a/tracks/vendor/rake-0.6.2/TODO b/tracks/vendor/rake-0.6.2/TODO
deleted file mode 100644
index 644a23ae..00000000
--- a/tracks/vendor/rake-0.6.2/TODO
+++ /dev/null
@@ -1,19 +0,0 @@
-= Rake Project -- To Do List
-
-Send suggestions for this list to mailto:jim@weirichhouse.org or on
-the rake-devel@rubyforge.org mailing list.
-
-=== To Do
-* Provide a way to disable -w warning mode.
-* Define a set of default rules that work in the absense of any Rakefile
-* What about cyclic dependencies?
-* Java support utilities
-* Installation support utilities
- * Check out installpkg.rb
-* Autogenerate Dependencies
-* Rules should apply to existing tasks if no actions are defined.
-* How to create multiple package tasks without task name collision?
-* Trap "ln -s" commands that fail and use "cp" instead (SMB mounted
- drives have problems with "ln -s".
-
-(moved DONE list to CHANGES file)
diff --git a/tracks/vendor/rake-0.6.2/bin/rake b/tracks/vendor/rake-0.6.2/bin/rake
deleted file mode 100644
index 3ebdd8bd..00000000
--- a/tracks/vendor/rake-0.6.2/bin/rake
+++ /dev/null
@@ -1,8 +0,0 @@
-begin
- require 'rake'
-rescue LoadError
- require 'rubygems'
- require_gem 'rake'
-end
-Rake::Application.new.run
-
diff --git a/tracks/vendor/rake-0.6.2/doc/example/Rakefile1 b/tracks/vendor/rake-0.6.2/doc/example/Rakefile1
deleted file mode 100644
index 39f8bcce..00000000
--- a/tracks/vendor/rake-0.6.2/doc/example/Rakefile1
+++ /dev/null
@@ -1,38 +0,0 @@
-# Example Rakefile -*- ruby -*-
-
-task :default => [:main]
-
-file "a.o" => ["a.c"] do |t|
- src = t.name.sub(/\.o$/, '.c')
- sh "gcc #{src} -c -o #{t.name}"
-end
-
-file "b.o" => ["b.c"] do |t|
- src = t.name.sub(/\.o$/, '.c')
- sh "gcc #{src} -c -o #{t.name}"
-end
-
-file "main.o" => ["main.c"] do |t|
- src = t.name.sub(/\.o$/, '.c')
- sh "gcc #{src} -c -o #{t.name}"
-end
-
-OBJFILES = ["a.o", "b.o", "main.o"]
-task :obj => OBJFILES
-
-file "main" => OBJFILES do |t|
- sh "gcc -o #{t.name} main.o a.o b.o"
-end
-
-task :clean do
- rm_f FileList['*.o']
- Dir['*~'].each { |fn| rm_f fn }
-end
-
-task :clobber => [:clean] do
- rm_f "main"
-end
-
-task :run => ["main"] do
- sh "./main"
-end
diff --git a/tracks/vendor/rake-0.6.2/doc/example/Rakefile2 b/tracks/vendor/rake-0.6.2/doc/example/Rakefile2
deleted file mode 100644
index 35310ece..00000000
--- a/tracks/vendor/rake-0.6.2/doc/example/Rakefile2
+++ /dev/null
@@ -1,35 +0,0 @@
-# Example Rakefile -*- ruby -*-
-# Using the power of Ruby
-
-task :default => [:main]
-
-def ext(fn, newext)
- fn.sub(/\.[^.]+$/, newext)
-end
-
-SRCFILES = Dir['*.c']
-OBJFILES = SRCFILES.collect { |fn| ext(fn,".o") }
-
-OBJFILES.each do |objfile|
- srcfile = ext(objfile, ".c")
- file objfile => [srcfile] do |t|
- sh "gcc #{srcfile} -c -o #{t.name}"
- end
-end
-
-file "main" => OBJFILES do |t|
- sh "gcc -o #{t.name} main.o a.o b.o"
-end
-
-task :clean do
- rm_f FileList['*.o']
- Dir['*~'].each { |fn| rm_f fn }
-end
-
-task :clobber => [:clean] do
- rm_f "main"
-end
-
-task :run => ["main"] do
- sh "./main"
-end
diff --git a/tracks/vendor/rake-0.6.2/doc/example/a.c b/tracks/vendor/rake-0.6.2/doc/example/a.c
deleted file mode 100644
index 620e6f80..00000000
--- a/tracks/vendor/rake-0.6.2/doc/example/a.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#include
-
-void a()
-{
- printf ("In function a\n");
-}
diff --git a/tracks/vendor/rake-0.6.2/doc/example/b.c b/tracks/vendor/rake-0.6.2/doc/example/b.c
deleted file mode 100644
index 9b24aa12..00000000
--- a/tracks/vendor/rake-0.6.2/doc/example/b.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#include
-
-void b()
-{
- printf ("In function b\n");
-}
diff --git a/tracks/vendor/rake-0.6.2/doc/example/main.c b/tracks/vendor/rake-0.6.2/doc/example/main.c
deleted file mode 100644
index a04558a2..00000000
--- a/tracks/vendor/rake-0.6.2/doc/example/main.c
+++ /dev/null
@@ -1,11 +0,0 @@
-#include
-
-extern void a();
-extern void b();
-
-int main ()
-{
- a();
- b();
- return 0;
-}
diff --git a/tracks/vendor/rake-0.6.2/doc/glossary.rdoc b/tracks/vendor/rake-0.6.2/doc/glossary.rdoc
deleted file mode 100644
index 0ca18693..00000000
--- a/tracks/vendor/rake-0.6.2/doc/glossary.rdoc
+++ /dev/null
@@ -1,51 +0,0 @@
-= Glossary
-
-[action]
- Code to be executed in order to perform a task. Actions in a
- rakefile are specified in a code block (usually delimited by
- +do+/+end+ pairs.
-
-[execute]
- When a task is executed, all of its actions are performed, in
- the order they were defined. Note that unlike
- invoke, execute always executes the actions
- (without invoking or executing the prerequisites).
-
-[file task (FileTask)]
- A file task is a task whose purpose is to create a file
- (which has the same name as the task). When invoked, a file
- task will only execute if one or more of the following
- conditions are true.
-
- 1. The associated file does not exist.
- 2. A prerequisite has a later time stamp than the existing file.
-
- Because normal Tasks always have the current time as
- timestamp, a FileTask that has a normal Task prerequisite
- will always execute.
-
-[invoke]
- When a task is invoked, first we check to see if it has been
- invoked before. if it has been, then nothing else is done.
- If this is the first time its been invoked, then we invoke
- each of its prerequisites. Finally, we check to see if we
- need to execute the actions of this task by calling
- needed?. Finally, if the task is needed, we execute
- its actions.
-
- NOTE: Currently prerequisites are invoked even if the task is
- not needed. This may change in the future.
-
-[prerequisites]
- Every task has a set (possiblity empty) of prerequisites. A
- prerequisite P to Task T is itself a task that must be invoked
- before Task T.
-
-[rule]
- A rule is a recipe for synthesizing a task when no task is
- explicitly defined. Rules generally synthesize file tasks.
-
-[task (Task)]
- Basic unit of work in a rakefile. A task has a name, a set of
- prerequisites and a list of actions to be performed.
-
diff --git a/tracks/vendor/rake-0.6.2/doc/jamis.rb b/tracks/vendor/rake-0.6.2/doc/jamis.rb
deleted file mode 100644
index a00b5834..00000000
--- a/tracks/vendor/rake-0.6.2/doc/jamis.rb
+++ /dev/null
@@ -1,591 +0,0 @@
-module RDoc
-module Page
-
-FONTS = "\"Bitstream Vera Sans\", Verdana, Arial, Helvetica, sans-serif"
-
-STYLE = < pre {
- padding: 0.5em;
- border: 1px dotted black;
- background: #FFE;
-}
-
-CSS
-
-XHTML_PREAMBLE = %{
-
-}
-
-HEADER = XHTML_PREAMBLE + <
-
- %title%
-
-
-
-
-
-
-
-ENDHEADER
-
-FILE_PAGE = <
-
-
-HTML
-
-CLASS_INDEX = FILE_INDEX
-METHOD_INDEX = FILE_INDEX
-
-INDEX = XHTML_PREAMBLE + <
-
- %title%
-
-
-
-
-
-
-HTML
-
-end
-end
-
-
diff --git a/tracks/vendor/rake-0.6.2/doc/proto_rake.rdoc b/tracks/vendor/rake-0.6.2/doc/proto_rake.rdoc
deleted file mode 100644
index 39b9b88c..00000000
--- a/tracks/vendor/rake-0.6.2/doc/proto_rake.rdoc
+++ /dev/null
@@ -1,127 +0,0 @@
-= Original Prototype Rake
-
-This is the original 100 line prototype rake program.
-
----
- #!/usr/bin/env ruby
-
- require 'ftools'
-
- class Task
- TASKS = Hash.new
-
- attr_reader :prerequisites
-
- def initialize(task_name)
- @name = task_name
- @prerequisites = []
- @actions = []
- end
-
- def enhance(deps=nil, &block)
- @prerequisites |= deps if deps
- @actions << block if block_given?
- self
- end
-
- def name
- @name.to_s
- end
-
- def invoke
- @prerequisites.each { |n| Task[n].invoke }
- execute if needed?
- end
-
- def execute
- return if @triggered
- @triggered = true
- @actions.collect { |act| result = act.call(self) }.last
- end
-
- def needed?
- true
- end
-
- def timestamp
- Time.now
- end
-
- class << self
- def [](task_name)
- TASKS[intern(task_name)] or fail "Don't know how to rake #{task_name}"
- end
-
- def define_task(args, &block)
- case args
- when Hash
- fail "Too Many Target Names: #{args.keys.join(' ')}" if args.size > 1
- fail "No Task Name Given" if args.size < 1
- task_name = args.keys[0]
- deps = args[task_name]
- else
- task_name = args
- deps = []
- end
- deps = deps.collect {|d| intern(d) }
- get(task_name).enhance(deps, &block)
- end
-
- def get(task_name)
- name = intern(task_name)
- TASKS[name] ||= self.new(name)
- end
-
- def intern(task_name)
- (Symbol === task_name) ? task_name : task_name.intern
- end
- end
- end
-
- class FileTask < Task
- def needed?
- return true unless File.exist?(name)
- latest_prereq = @prerequisites.collect{|n| Task[n].timestamp}.max
- return false if latest_prereq.nil?
- timestamp < latest_prereq
- end
-
- def timestamp
- File.new(name.to_s).mtime
- end
- end
-
- def task(args, &block)
- Task.define_task(args, &block)
- end
-
- def file(args, &block)
- FileTask.define_task(args, &block)
- end
-
- def sys(cmd)
- puts cmd
- system(cmd) or fail "Command Failed: [#{cmd}]"
- end
-
- def rake
- begin
- here = Dir.pwd
- while ! File.exist?("Rakefile")
- Dir.chdir("..")
- fail "No Rakefile found" if Dir.pwd == here
- here = Dir.pwd
- end
- puts "(in #{Dir.pwd})"
- load "./Rakefile"
- ARGV.push("default") if ARGV.size == 0
- ARGV.each { |task_name| Task[task_name].invoke }
- rescue Exception => ex
- puts "rake aborted ... #{ex.message}"
- puts ex.backtrace.find {|str| str =~ /Rakefile/ } || ""
- end
- end
-
- if __FILE__ == $0 then
- rake
- end
diff --git a/tracks/vendor/rake-0.6.2/doc/rake.1.gz b/tracks/vendor/rake-0.6.2/doc/rake.1.gz
deleted file mode 100644
index 02af4de4..00000000
Binary files a/tracks/vendor/rake-0.6.2/doc/rake.1.gz and /dev/null differ
diff --git a/tracks/vendor/rake-0.6.2/doc/rakefile.rdoc b/tracks/vendor/rake-0.6.2/doc/rakefile.rdoc
deleted file mode 100644
index dd182278..00000000
--- a/tracks/vendor/rake-0.6.2/doc/rakefile.rdoc
+++ /dev/null
@@ -1,267 +0,0 @@
-= Rakefile Format
-
-First of all, there is no special format for a Rakefile. A Rakefile
-contains executable Ruby code. Anything legal in a ruby script is
-allowed in a Rakefile.
-
-Now that we understand there is no special syntax in a Rakefile, there
-are some conventions that are used in a Rakefile that are a little
-unusual in a typical Ruby program. Since a Rakefile is tailored to
-specifying tasks and actions, the idioms used in a Rakefile are
-designed to support that.
-
-So, what goes into a Rakefile?
-
-== Tasks
-
-Tasks are the main unit of work in a Rakefile. Tasks have a name
-(usually given as a symbol or a string), a list of prerequisites (more
-symbols or strings) and a list of actions (given as a block).
-
-=== Simple Tasks
-
-A task is declared by using the +task+ method. +task+ takes a single
-parameter that is the name of the task.
-
- task :name
-
-=== Tasks with Prerequisites
-
-Any prerequisites are given as a list (inclosed in square brackets)
-following the name and an arrow (=>).
-
- task :name => [:prereq1, :prereq2]
-
-NOTE: Although this syntax looks a little funky, it is legal
-Ruby. We are constructing a hash where the key is :name and the value
-for that key is the list of prerequisites. It is equivalent to the
-following ...
-
- hash = Hash.new
- hash[:name] = [:prereq1, :prereq2]
- task(hash)
-
-=== Tasks with Actions
-
-Actions are defined by passing a block to the +task+ method. Any Ruby
-code can be placed in the block. The block may reference the task
-object via the block paramter..
-
- task :name => [:prereq1, :prereq2] do |t|
- # actions (may reference t)
- end
-
-=== Multiple Definitions
-
-A task may be specified more than once. Each specification adds its
-prerequisites and actions to the existing definition. This allows one
-part of a rakefile to specify the actions and a different rakefile
-(perhaps separately generated) to specify the dependencies.
-
-For example, the following is equivalent to the single task
-specification given above.
-
- task :name
- task :name => [:prereq1]
- task :name => [:prereq2]
- task :name do |t|
- # actions
- end
-
-== File Tasks
-
-Some tasks are designed to create a file from one or more other files.
-Tasks that generate these files may be skipped if the file already
-exists. File tasks are used to specify file creation tasks.
-
-File tasks are declared using the +file+ method (instead of the +task+
-method). In addition, file tasks are usually named with a string
-rather than a symbol.
-
-The following file task creates a executable program (named +prog+)
-given two object files name a.o and b.o. The tasks
-for creating a.o and b.o are not shown.
-
- file "prog" => ["a.o", "b.o"] do |t|
- sh "cc -o #{t.name} #{t.prerequisites.join(' ')}"
- end
-
-== Directory Tasks
-
-It is common to need to create directories upon demand. The
-+directory+ convenience method is a short-hand for creating a FileTask
-that creates the directory. For example, the following declaration
-...
-
- directory "testdata/examples/doc"
-
-is equivalent to ...
-
- file "testdata" do |t| mkdir t.name end
- file "testdata/examples" do |t| mkdir t.name end
- file "testdata/examples/doc" do |t| mkdir t.name end
-
-The +directory+ method does not accept prerequisites or actions, but
-both prerequisites and actions can be added later. For example ...
-
- directory "testdata"
- file "testdata" => ["otherdata"]
- file "testdata" do
- cp Dir["standard_data/*.data"], "testdata"
- end
-
-== Rules
-
-When a file is named as a prerequisite, but does not have a file task
-defined for it, Rake will attempt to synthesize a task by looking at a
-list of rules supplied in the Rakefile.
-
-Suppose we were trying to invoke task "mycode.o", but no task is
-defined for it. But the rakefile has a rule that look like this ...
-
- rule '.o' => ['.c'] do |t|
- sh "cc #{t.source} -c -o #{t.name}"
- end
-
-This rule will synthesize any task that ends in ".o". It has a
-prerequisite a source file with an extension of ".c" must exist. If
-Rake is able to find a file named "mycode.c", it will automatically
-create a task that builds "mycode.o" from "mycode.c".
-
-If the file "mycode.c" does not exist, rake will attempt
-to recursively synthesize a rule for it.
-
-When a task is synthesized from a rule, the +source+ attribute of the
-task is set to the matching source file. This allows us to write
-rules with actions that reference the source file.
-
-=== Advanced Rules
-
-Any regular expression may be used as the rule pattern. Additionally,
-a proc may be used to calculate the name of the source file. This
-allows for complex patterns and sources.
-
-The following rule is equivalent to the example above.
-
- rule( /\.o$/ => [
- proc {|task_name| task_name.sub(/\.[^.]+$/, '.c') }
- ]) do |t|
- sh "cc #{t.source} -c -o #{t.name}"
- end
-
-NOTE: Because of a _quirk_ in Ruby syntax, parenthesis are
-required on *rule* when the first argument is a regular expression.
-
-The following rule might be used for Java files ...
-
- rule '.java' => [
- proc { |tn| tn.sub(/\.class$/, '.java').sub(/^classes\//, 'src/') }
- ] do |t|
- java_compile(t.source, t.name)
- end
-
-NOTE: +java_compile+ is a hypothetical method that invokes the
-java compiler.
-
-== Importing Dependencies
-
-Any ruby file (including other rakefiles) can be included with a
-standard Ruby +require+ command. The rules and declarations in the
-required file are just added to the definitions already accumulated.
-
-Because the files are loaded _before_ the rake targets are evaluated,
-the loaded files must be "ready to go" when the rake command is
-invoked. This make generated dependency files difficult to use. By
-the time rake gets around to updating the dependencies file, it is too
-late to load it.
-
-The +import+ command addresses this by specifying a file to be loaded
-_after_ the main rakefile is loaded, but _before_ any targets on the
-command line are specified. In addition, if the file name matches an
-explicit task, that task is invoked before loading the file. This
-allows dependency files to be generated and used in a single rake
-command invocation.
-
-=== Example:
-
- require 'rake/loaders/makefile'
-
- file ".depends.mf" => [SRC_LIST] do |t|
- sh "makedepend -f- -- #{CFLAGS} -- #{t.prerequisites} > #{t.name}"
- end
-
- import ".depends.mf"
-
-If ".depends" does not exist, or is out of date w.r.t. the source
-files, a new ".depends" file is generated using +makedepend+ before
-loading.
-
-== Comments
-
-Standard Ruby comments (beginning with "#") can be used anywhere it is
-legal in Ruby source code, including comments for tasks and rules.
-However, if you wish a task to be described using the "-T" switch,
-then you need to use the +desc+ command to describe the task.
-
-=== Example:
-
- desc "Create a distribution package"
- task :package => [ ... ] do ... end
-
-The "-T" switch (or "--tasks" if you like to spell things out) will
-display a list of tasks that have a defined comment. If you use
-+desc+ to describe your major tasks, you have a semi-automatic way of
-generating a summary of your Rake file.
-
- traken$ rake -T
- (in /home/.../rake)
- rake clean # Remove any temporary products.
- rake clobber # Remove any generated file.
- rake clobber_rdoc # Remove rdoc products
- rake contrib_test # Run tests for contrib_test
- rake default # Default Task
- rake install # Install the application
- rake lines # Count lines in the main rake file
- rake rdoc # Build the rdoc HTML Files
- rake rerdoc # Force a rebuild of the RDOC files
- rake test # Run tests
- rake testall # Run all test targets
-
-Only tasks with descriptions will be displayed with the "-T" switch.
-Use "-P" (or "--prereqs") to get a list of all tasks and their
-prerequisites.
-
-== Odds and Ends
-
-=== do/end verses { }
-
-Blocks may be specified with either a +do+/+end+ pair, or with curly
-braces in Ruby. We _strongly_ recommend using +do+/+end+ to specify the
-actions for tasks and rules. Because the rakefile idiom tends to
-leave off parenthesis on the task/file/rule methods, unusual
-ambiguities can arise when using curly braces.
-
-For example, suppose that the method +object_files+ returns a list of
-object files in a project. Now we use +object_files+ as the
-prerequistes in a rule specified with actions in curly braces.
-
- # DON'T DO THIS!
- file "prog" => object_files {
- # Actions are expected here (but it doesn't work)!
- }
-
-Because curly braces have a higher precedence than +do+/+end+, the
-block is associated with the +object_files+ method rather than the
-+file+ method.
-
-This is the proper way to specify the task ...
-
- # THIS IS FINE
- file "prog" => object_files do
- # Actions go here
- end
-
-----
-== See
-
-* README -- Main documentation for Rake.
diff --git a/tracks/vendor/rake-0.6.2/doc/rational.rdoc b/tracks/vendor/rake-0.6.2/doc/rational.rdoc
deleted file mode 100644
index f741e65b..00000000
--- a/tracks/vendor/rake-0.6.2/doc/rational.rdoc
+++ /dev/null
@@ -1,151 +0,0 @@
-= Why rake?
-
-Ok, let me state from the beginning that I never intended to write this
-code. I'm not convinced it is useful, and I'm not convinced anyone
-would even be interested in it. All I can say is that Why's onion truck
-must by been passing through the Ohio valley.
-
-What am I talking about? ... A Ruby version of Make.
-
-See, I can sense you cringing already, and I agree. The world certainly
-doesn't need yet another reworking of the "make" program. I mean, we
-already have "ant". Isn't that enough?
-
-It started yesterday. I was helping a coworker fix a problem in one of
-the Makefiles we use in our project. Not a particularly tough problem,
-but during the course of the conversation I began lamenting some of the
-shortcomings of make. In particular, in one of my makefiles I wanted to
-determine the name of a file dynamically and had to resort to some
-simple scripting (in Ruby) to make it work. "Wouldn't it be nice if you
-could just use Ruby inside a Makefile" I said.
-
-My coworker (a recent convert to Ruby) agreed, but wondered what it
-would look like. So I sketched the following on the whiteboard...
-
- "What if you could specify the make tasks in Ruby, like this ..."
-
- task "build" do
- java_compile(...args, etc ...)
- end
-
- "The task function would register "build" as a target to be made,
- and the block would be the action executed whenever the build
- system determined that it was time to do the build target."
-
-We agreed that would be cool, but writing make from scratch would be WAY
-too much work. And that was the end of that!
-
-... Except I couldn't get the thought out of my head. What exactly
-would be needed to make the about syntax work as a make file? Hmmm, you
-would need to register the tasks, you need some way of specifying
-dependencies between tasks, and some way of kicking off the process.
-Hey! What if we did ... and fifteen minutes later I had a working
-prototype of Ruby make, complete with dependencies and actions.
-
-I showed the code to my coworker and we had a good laugh. It was just
-about a page worth of code that reproduced an amazing amount of the
-functionality of make. We were both truely stunned with the power of
-Ruby.
-
-But it didn't do everything make did. In particular, it didn't have
-timestamp based file dependencies (where a file is rebuilt if any of its
-prerequisite files have a later timestamp). Obviously THAT would be a
-pain to add and so Ruby Make would remain an interesting experiment.
-
-... Except as I walked back to my desk, I started thinking about what
-file based dependecies would really need. Rats! I was hooked again,
-and by adding a new class and two new methods, file/timestamp
-dependencies were implemented.
-
-Ok, now I was really hooked. Last night (during CSI!) I massaged the
-code and cleaned it up a bit. The result is a bare-bones replacement
-for make in exactly 100 lines of code.
-
-For the curious, you can see it at ...
-* doc/proto_rake.rdoc
-
-Oh, about the name. When I wrote the example Ruby Make task on my
-whiteboard, my coworker exclaimed "Oh! I have the perfect name: Rake ...
-Get it? Ruby-Make. Rake!" He said he envisioned the tasks as leaves
-and Rake would clean them up ... or something like that. Anyways, the
-name stuck.
-
-Some quick examples ...
-
-A simple task to delete backup files ...
-
- task :clean do
- Dir['*~'].each {|fn| rm fn rescue nil}
- end
-
-Note that task names are symbols (they are slightly easier to type
-than quoted strings ... but you may use quoted string if you would
-rather). Rake makes the methods of the FileUtils module directly
-available, so we take advantage of the rm command. Also note
-the use of "rescue nil" to trap and ignore errors in the rm
-command.
-
-To run it, just type "rake clean". Rake will automatically find a
-Rakefile in the current directory (or above!) and will invoke the
-targets named on the command line. If there are no targets explicitly
-named, rake will invoke the task "default".
-
-Here's another task with dependencies ...
-
- task :clobber => [:clean] do
- rm_r "tempdir"
- end
-
-Task :clobber depends upon task :clean, so :clean will be run before
-:clobber is executed.
-
-Files are specified by using the "file" command. It is similar to the
-task command, except that the task name represents a file, and the task
-will be run only if the file doesn't exist, or if its modification time
-is earlier than any of its prerequisites.
-
-Here is a file based dependency that will compile "hello.cc" to
-"hello.o".
-
- file "hello.cc"
- file "hello.o" => ["hello.cc"] do |t|
- srcfile = t.name.sub(/\.o$/, ".cc")
- sh %{g++ #{srcfile} -c -o #{t.name}}
- end
-
-I normally specify file tasks with string (rather than symbols). Some
-file names can't be represented by symbols. Plus it makes the
-distinction between them more clear to the casual reader.
-
-Currently writing a task for each and every file in the project would be
-tedious at best. I envision a set of libraries to make this job
-easier. For instance, perhaps something like this ...
-
- require 'rake/ctools'
- Dir['*.c'].each do |fn|
- c_source_file(fn)
- end
-
-where "c_source_file" will create all the tasks need to compile all the
-C source files in a directory. Any number of useful libraries could be
-created for rake.
-
-That's it. There's no documentation (other than whats in this
-message). Does this sound interesting to anyone? If so, I'll continue
-to clean it up and write it up and publish it on RAA. Otherwise, I'll
-leave it as an interesting excerise and a tribute to the power of Ruby.
-
-Why /might/ rake be interesting to Ruby programmers. I don't know,
-perhaps ...
-
-* No weird make syntax (only weird Ruby syntax :-)
-* No need to edit or read XML (a la ant)
-* Platform independent build scripts.
-* Will run anywhere Ruby exists, so no need to have "make" installed.
- If you stay away from the "sys" command and use things like
- 'ftools', you can have a perfectly platform independent
- build script. Also rake is only 100 lines of code, so it can
- easily be packaged along with the rest of your code.
-
-So ... Sorry for the long rambling message. Like I said, I never
-intended to write this code at all.
diff --git a/tracks/vendor/rake-0.6.2/doc/release_notes/rake-0.4.14.rdoc b/tracks/vendor/rake-0.6.2/doc/release_notes/rake-0.4.14.rdoc
deleted file mode 100644
index b2f1f84f..00000000
--- a/tracks/vendor/rake-0.6.2/doc/release_notes/rake-0.4.14.rdoc
+++ /dev/null
@@ -1,23 +0,0 @@
-= Rake 0.4.14 Released
-
-== Changes
-
-Version 0.4.14 is a compatibility fix to allow Rake's test task to
-work under Ruby 1.8.2. A change in the Test::Unit autorun feature
-prevented Rake from running any tests. This release fixes the
-problem.
-
-Rake 0.4.14 is the recommended release for anyone using Ruby 1.8.2.
-
-== What is Rake
-
-Rake is a build tool similar to the make program in many ways. But
-instead of cryptic make recipes, Rake uses standard Ruby code to
-declare tasks and dependencies. You have the full power of a modern
-scripting language built right into your build tool.
-
-== Availability
-
-Home Page:: http://rake.rubyforge.org/
-Download:: http://rubyforge.org/project/showfiles.php?group_id=50
-
diff --git a/tracks/vendor/rake-0.6.2/doc/release_notes/rake-0.4.15.rdoc b/tracks/vendor/rake-0.6.2/doc/release_notes/rake-0.4.15.rdoc
deleted file mode 100644
index 1d8afd94..00000000
--- a/tracks/vendor/rake-0.6.2/doc/release_notes/rake-0.4.15.rdoc
+++ /dev/null
@@ -1,35 +0,0 @@
-= Rake 0.4.15 Released
-
-== Changes
-
-Version 0.4.15 is a bug fix update for the Ruby 1.8.2 compatibility
-changes. This release includes:
-
-* Fixed a bug that prevented the TESTOPTS flag from working with the
- revised for 1.8.2 test task.
-
-* Updated the docs on --trace to indicate that it also enables a full
- backtrace on errors.
-
-* Several fixes for new warnings generated.
-
-== Mini-Roadmap
-
-I will continue to issue Rake updates in the 0.4.xx series as new
-Ruby-1.8.2 issues become manifest. Once the codebase stabilizes, I
-will release a 0.5.0 version incorporating all the changes. If you
-are not using Ruby-1.8.2 and wish to avoid version churn, I recommend
-staying with a release prior to Rake-0.4.14.
-
-== What is Rake
-
-Rake is a build tool similar to the make program in many ways. But
-instead of cryptic make recipes, Rake uses standard Ruby code to
-declare tasks and dependencies. You have the full power of a modern
-scripting language built right into your build tool.
-
-== Availability
-
-Home Page:: http://rake.rubyforge.org/
-Download:: http://rubyforge.org/project/showfiles.php?group_id=50
-
diff --git a/tracks/vendor/rake-0.6.2/doc/release_notes/rake-0.5.0.rdoc b/tracks/vendor/rake-0.6.2/doc/release_notes/rake-0.5.0.rdoc
deleted file mode 100644
index 6b49d2a6..00000000
--- a/tracks/vendor/rake-0.6.2/doc/release_notes/rake-0.5.0.rdoc
+++ /dev/null
@@ -1,53 +0,0 @@
-= Rake 0.5.0 Released
-
-It has been a long time in coming, but we finally have a new version
-of Rake available.
-
-== Changes
-
-* Fixed bug where missing intermediate file dependencies could cause
- an abort with --trace or --dry-run. (Brian Candler)
-
-* Recursive rules are now supported (Tilman Sauerbeck).
-
-* Added tar.gz and tar.bz2 support to package task (Tilman Sauerbeck).
-
-* Added warning option for the Test Task (requested by Eric Hodel).
-
-* The jamis rdoc template is only used if it exists.
-
-* Added fix for Ruby 1.8.2 test/unit and rails problem.
-
-* Added contributed rake man file. (Jani Monoses)
-
-* Fixed documentation that was lacking the Rake module name (Tilman
- Sauerbeck).
-
-== What is Rake
-
-Rake is a build tool similar to the make program in many ways. But
-instead of cryptic make recipes, Rake uses standard Ruby code to
-declare tasks and dependencies. You have the full power of a modern
-scripting language built right into your build tool.
-
-== Availability
-
-The easiest way to get and install rake is via RubyGems ...
-
- gem install rake (you may need root/admin privileges)
-
-Otherwise, you can get it from the more traditional places:
-
-Home Page:: http://rake.rubyforge.org/
-Download:: http://rubyforge.org/project/showfiles.php?group_id=50
-
-== Thanks
-
-Lots of people provided input to this release. Thanks to Tilman
-Sauerbeck for numerous patches, documentation fixes and suggestions.
-And for also pushing me to get this release out. Also, thanks to
-Brian Candler for the finding and fixing --trace/dry-run fix. That
-was an obscure bug. Also to Eric Hodel for some good suggestions.
-
--- Jim Weirich
-
diff --git a/tracks/vendor/rake-0.6.2/doc/release_notes/rake-0.5.3.rdoc b/tracks/vendor/rake-0.6.2/doc/release_notes/rake-0.5.3.rdoc
deleted file mode 100644
index be2919f5..00000000
--- a/tracks/vendor/rake-0.6.2/doc/release_notes/rake-0.5.3.rdoc
+++ /dev/null
@@ -1,78 +0,0 @@
-= Rake 0.5.0 Released
-
-Although it has only been two weeks since the last release, we have
-enough updates to the Rake program to make it time for another
-release.
-
-== Changes
-
-Here are the changes for version 0.5.3 ...
-
-* FileLists have been extensively changed so that they mimic the
- behavior of real arrays even more closely. In particular,
- operations on FileLists that return a new collection (e.g. collect,
- reject) will now return a FileList rather than an array. In
- addition, several places where FileLists were not properly expanded
- before use have been fixed.
-
-* A method (+ext+) to simplify the handling of file extensions was
- added to String and to Array.
-
-* The 'testrb' script in test/unit tends to silently swallow syntax
- errors in test suites. Because of that, the default test loader is
- now a rake-provided script. You can still use 'testrb' by setting
- the loader flag in the test task to :testrb. (See the API documents
- for TestTask for all the loader flag values).
-
-* FileUtil methods (e.g. cp, mv, install) are now declared to be
- private. This will cut down on the interference with user defined
- methods of the same name.
-
-* Fixed the verbose flag in the TestTask so that the test code is
- controlled by the flag. Also shortened up some failure messages.
- (Thanks to Tobias Luetke for the suggestion).
-
-* Rules will now properly detect a task that can generate a source
- file. Previously rules would only consider source files that were
- already present.
-
-* Added an +import+ command that allows Rake to dynamically import
- dependendencies into a running Rake session. The +import+ command
- can run tasks to update the dependency file before loading them.
- Dependency files can be in rake or make format, allowing rake to
- work with tools designed to generate dependencies for make.
-
-== What is Rake
-
-Rake is a build tool similar to the make program in many ways. But
-instead of cryptic make recipes, Rake uses standard Ruby code to
-declare tasks and dependencies. You have the full power of a modern
-scripting language built right into your build tool.
-
-== Availability
-
-The easiest way to get and install rake is via RubyGems ...
-
- gem install rake (you may need root/admin privileges)
-
-Otherwise, you can get it from the more traditional places:
-
-Home Page:: http://rake.rubyforge.org/
-Download:: http://rubyforge.org/project/showfiles.php?group_id=50
-
-== Thanks
-
-As usual, it was input from users that drove a alot of these changes.
-Thanks to ...
-
-* Brian Gernhardt for the rules fix (especially for the patience to
- explain the problem to me until I got what he was talking about).
-* Stefan Lang for pointing out problems in the dark corners of the
- FileList implementation.
-* Alexey Verkhovsky pointing out the silently swallows syntax errors
- in tests.
-* Tobias Luetke for beautifying the test task output.
-* Sam Roberts for some of the ideas behind dependency loading.
-
--- Jim Weirich
-
diff --git a/tracks/vendor/rake-0.6.2/doc/release_notes/rake-0.5.4.rdoc b/tracks/vendor/rake-0.6.2/doc/release_notes/rake-0.5.4.rdoc
deleted file mode 100644
index 38dfbdda..00000000
--- a/tracks/vendor/rake-0.6.2/doc/release_notes/rake-0.5.4.rdoc
+++ /dev/null
@@ -1,46 +0,0 @@
-= Rake 0.5.4 Released
-
-Time for some minor bug fixes and small enhancements
-
-== Changes
-
-Here are the changes for version 0.5.3 ...
-
-* Added double quotes to the test runner. This allows the location of
- the tests (and runner) to be in a directory path that contains
- spaces (e.g. "C:/Program Files/ruby/bin").
-
-* Added .svn to default ignore list. Now subversion project metadata
- is automatically ignored by Rake's FileList.
-
-* Updated FileList#include to support nested arrays and filelists.
- FileLists are flat lists of file names. Using a FileList in an
- include will flatten out the nested file names.
-
-== What is Rake
-
-Rake is a build tool similar to the make program in many ways. But
-instead of cryptic make recipes, Rake uses standard Ruby code to
-declare tasks and dependencies. You have the full power of a modern
-scripting language built right into your build tool.
-
-== Availability
-
-The easiest way to get and install rake is via RubyGems ...
-
- gem install rake (you may need root/admin privileges)
-
-Otherwise, you can get it from the more traditional places:
-
-Home Page:: http://rake.rubyforge.org/
-Download:: http://rubyforge.org/project/showfiles.php?group_id=50
-
-== Thanks
-
-As usual, it was input from users that drove a alot of these changes.
-Thanks to ...
-
-* Tilman Sauerbeck for the nested FileList suggestion.
-* Josh Knowles for pointing out the spaces in directory name problem.
-
--- Jim Weirich
diff --git a/tracks/vendor/rake-0.6.2/doc/release_notes/rake-0.6.0.rdoc b/tracks/vendor/rake-0.6.2/doc/release_notes/rake-0.6.0.rdoc
deleted file mode 100644
index 340c07bf..00000000
--- a/tracks/vendor/rake-0.6.2/doc/release_notes/rake-0.6.0.rdoc
+++ /dev/null
@@ -1,141 +0,0 @@
-= Rake 0.6.0 Released
-
-Its time for some long requested enhancements and lots of bug fixes
-... And a whole new web page.
-
-== New Web Page
-
-The primary documentation for rake has moved from the RubyForge based
-wiki to its own Hieraki based web site. Constant spam on the wiki
-made it a difficult to keep clean. The new site will be easier to
-update and organize.
-
-Check out the new documentation at: http://docs.rubyrake.org
-
-We will be adding new documentation to the site as time goes on.
-
-In addition to the new docs page, make sure you check out Martin
-Fowlers article on rake at http://martinfowler.com/articles/rake.html
-
-== Changes
-
-=== New Features
-
-* Multiple prerequisites on Rake rules now allowed. However, keep the
- following in mind:
-
- 1. All the prerequisites of a rule must be available before a rule
- is triggered, where "enabled" means (a) an existing file, (b) a
- defined rule, or (c) another rule which also must be
- trigger-able.
- 2. Rules are checked in order of definition, so it is important to
- order your rules properly. If a file can be created by two
- different rules, put the more specific rule first (otherwise the
- more general rule will trigger first and the specific one will
- never be triggered).
- 3. The source method now returns the name of the first
- prerequisite listed in the rule. sources returns the
- names of all the rule prerequisites, ordered as they are defined
- in the rule. If the task has other prerequisites not defined in
- the rule (but defined in an explicit task definition), then they
- will _not_ be included in the sources list.
-
-* FileLists may now use the egrep command. This popular enhancement
- is now a core part of the FileList object. If you want to get a
- list of all your to-dos, fixmes and TBD comments, add the following
- to your Rakefile.
-
- desc "Look for TODO and FIXME tags in the code"
- task :todo do
- FileList['**/*.rb'].egrep /#.*(FIXME|TODO|TBD)/
- end
-
-* The investigation method was added to task object to dump
- out some important values. This makes it a bit easier to debug Rake
- tasks.
-
- For example, if you are having problems with a particular task, just
- print it out:
-
- task :huh do
- puts Rake::Task['huh'].investigation
- end
-
-* The Rake::TestTask class now supports a "ruby_opts" option to pass
- arbitrary ruby options to a test subprocess.
-
-=== Some Incompatibilities
-
-* When using the ruby command to start a Ruby subprocess, the
- Ruby interpreter that is currently running rake is used by default.
- This makes it easier to use rake in an environment with multiple
- ruby installation. (Previously, the first ruby command found in the
- PATH was used).
-
- If you wish to chose a different Ruby interpreter, you can
- explicitly choose the interpreter via the sh command.
-
-* The major rake classes (Task, FileTask, FileCreationTask, RakeApp)
- have been moved out of the toplevel scope and are now accessible as
- Rake::Task, Rake::FileTask, Rake::FileCreationTask and
- Rake::Application. If your Rakefile
- directly references any one of these tasks, you may:
-
- 1. Update your Rakefile to use the new classnames
- 2. Use the --classic-namespace option on the rake command to get the
- old behavior,
- 3. Add require 'rake/classic_namespace' to the
- Rakefile to get the old behavior.
-
- rake will print a rather annoying warning whenever a
- deprecated class name is referenced without enabling classic
- namespace.
-
-=== Bug Fixes
-
-* Several unit tests and functional tests were fixed to run better
- under windows.
-
-* Directory tasks are now a specialized version of a File task. A
- directory task will only be triggered if it doesn't exist. It will
- not be triggered if it is out of date w.r.t. any of its
- prerequisites.
-
-* Fixed a bug in the Rake::GemPackageTask class so that the gem now
- properly contains the platform name.
-
-* Fixed a bug where a prerequisite on a file task would cause
- an exception if the prerequisite did not exist.
-
-== What is Rake
-
-Rake is a build tool similar to the make program in many ways. But
-instead of cryptic make recipes, Rake uses standard Ruby code to
-declare tasks and dependencies. You have the full power of a modern
-scripting language built right into your build tool.
-
-== Availability
-
-The easiest way to get and install rake is via RubyGems ...
-
- gem install rake (you may need root/admin privileges)
-
-Otherwise, you can get it from the more traditional places:
-
-Home Page:: http://rake.rubyforge.org/
-Download:: http://rubyforge.org/project/showfiles.php?group_id=50
-
-== Thanks
-
-As usual, it was input from users that drove a alot of these changes.
-The following people either contributed patches, made suggestions or
-made otherwise helpful comments. Thanks to ...
-
-* Greg Fast (better ruby_opt test options)
-* Kelly Felkins (requested by better namespace support)
-* Martin Fowler (suggested Task.investigation)
-* Stuart Jansen (send initial patch for multiple prerequisites).
-* Masao Mutch (better support for non-ruby Gem platforms)
-* Philipp Neubeck (patch for file task exception fix)
-
--- Jim Weirich
diff --git a/tracks/vendor/rake-0.6.2/install.rb b/tracks/vendor/rake-0.6.2/install.rb
deleted file mode 100644
index 2d0dc619..00000000
--- a/tracks/vendor/rake-0.6.2/install.rb
+++ /dev/null
@@ -1,88 +0,0 @@
-require 'rbconfig'
-require 'find'
-require 'ftools'
-
-include Config
-
-$ruby = CONFIG['ruby_install_name']
-
-##
-# Install a binary file. We patch in on the way through to
-# insert a #! line. If this is a Unix install, we name
-# the command (for example) 'rake' and let the shebang line
-# handle running it. Under windows, we add a '.rb' extension
-# and let file associations to their stuff
-#
-
-def installBIN(from, opfile)
-
- tmp_dir = nil
- for t in [".", "/tmp", "c:/temp", $bindir]
- stat = File.stat(t) rescue next
- if stat.directory? and stat.writable?
- tmp_dir = t
- break
- end
- end
-
- fail "Cannot find a temporary directory" unless tmp_dir
- tmp_file = File.join(tmp_dir, "_tmp")
-
- File.open(from) do |ip|
- File.open(tmp_file, "w") do |op|
- ruby = File.join($realbindir, $ruby)
- op.puts "#!#{ruby} -w"
- op.write ip.read
- end
- end
-
- opfile += ".rb" if CONFIG["target_os"] =~ /mswin/i
- File::install(tmp_file, File.join($bindir, opfile), 0755, true)
- File::unlink(tmp_file)
-end
-
-$sitedir = CONFIG["sitelibdir"]
-unless $sitedir
- version = CONFIG["MAJOR"]+"."+CONFIG["MINOR"]
- $libdir = File.join(CONFIG["libdir"], "ruby", version)
- $sitedir = $:.find {|x| x =~ /site_ruby/}
- if !$sitedir
- $sitedir = File.join($libdir, "site_ruby")
- elsif $sitedir !~ Regexp.quote(version)
- $sitedir = File.join($sitedir, version)
- end
-end
-
-$bindir = CONFIG["bindir"]
-
-$realbindir = $bindir
-
-bindir = CONFIG["bindir"]
-if (destdir = ENV['DESTDIR'])
- $bindir = destdir + $bindir
- $sitedir = destdir + $sitedir
-
- File::makedirs($bindir)
- File::makedirs($sitedir)
-end
-
-rake_dest = File.join($sitedir, "rake")
-File::makedirs(rake_dest, true)
-File::chmod(0755, rake_dest)
-
-# The library files
-
-files = Dir.chdir('lib') { Dir['**/*.rb'] }
-
-for fn in files
- fn_dir = File.dirname(fn)
- target_dir = File.join($sitedir, fn_dir)
- if ! File.exist?(target_dir)
- File.makedirs(target_dir)
- end
- File::install(File.join('lib', fn), File.join($sitedir, fn), 0644, true)
-end
-
-# and the executable
-
-installBIN("bin/rake", "rake")
diff --git a/tracks/vendor/rake-0.6.2/lib/rake.rb b/tracks/vendor/rake-0.6.2/lib/rake.rb
deleted file mode 100644
index d2a5eac8..00000000
--- a/tracks/vendor/rake-0.6.2/lib/rake.rb
+++ /dev/null
@@ -1,1504 +0,0 @@
-#!/usr/bin/env ruby
-
-#--
-# Copyright (c) 2003, 2004 Jim Weirich
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#++
-#
-# = Rake -- Ruby Make
-#
-# This is the main file for the Rake application. Normally it is
-# referenced as a library via a require statement, but it can be
-# distributed independently as an application.
-
-RAKEVERSION = '0.6.2'
-
-require 'rbconfig'
-require 'ftools'
-require 'getoptlong'
-require 'fileutils'
-require 'singleton'
-
-$last_comment = nil
-$show_tasks = nil
-$show_prereqs = nil
-$trace = nil
-$dryrun = nil
-$silent = false
-
-# Some objects are dupable, some are not. So we define a version of
-# dup (called rake_dup) that returns self on the handful of classes
-# that are not dupable.
-
-module Kernel
- # Duplicate an object if it can be duplicated. If it can not be
- # cloned or duplicated, then just return the original object.
- def rake_dup()
- dup
- end
-end
-
-[NilClass, FalseClass, TrueClass, Fixnum, Symbol].each do |clazz|
- clazz.class_eval {
- # Duplicate an object if it can be duplicated. If it can not be
- # cloned or duplicated, then just return the original object.
- def rake_dup() self end
- }
-end
-
-######################################################################
-# User defined methods to be added to String.
-#
-class String
- unless instance_methods.include? "ext"
- # Replace the file extension with +newext+. If there is no
- # extenson on the string, append the new extension to the end. If
- # the new extension is not given, or is the empty string, remove
- # any existing extension.
- #
- # +ext+ is a user added method for the String class.
- def ext(newext='')
- return self.dup if ['.', '..'].include? self
- if newext != ''
- newext = (newext =~ /^\./) ? newext : ("." + newext)
- end
- dup.sub!(%r(([^/\\])\.[^./\\]*$)) { $1 + newext } || self + newext
- end
- end
-end
-
-
-######################################################################
-module Rake
-
- class << self
- # Current Rake Application
- def application
- @application ||= Rake::Application.new
- end
-
- # Set the current Rake application object.
- def application=(app)
- fail "Rake::Application already exists" if defined?(@application)
- @application = app
- end
-
- end
-
- module Cloneable
- def clone
- sibling = self.class.new
- instance_variables.each do |ivar|
- value = self.instance_variable_get(ivar)
- sibling.instance_variable_set(ivar, value.rake_dup)
- end
- sibling
- end
- alias dup clone
- end
-end
-
-module Rake
- ######################################################################
- # A Task is the basic unit of work in a Rakefile. Tasks have
- # associated actions (possibly more than one) and a list of
- # prerequisites. When invoked, a task will first ensure that all of
- # its prerequisites have an opportunity to run and then it will
- # execute its own actions.
- #
- # Tasks are not usually created directly using the new method, but
- # rather use the +file+ and +task+ convenience methods.
- #
- class Task
- TASKS = Hash.new
- RULES = Array.new
-
- # List of prerequisites for a task.
- attr_reader :prerequisites
-
- # Comment for this task.
- attr_accessor :comment
-
- attr_writer :sources
- def sources
- @sources ||= []
- end
-
- # First source from a rule (nil if no sources)
- def source
- @sources.first if defined?(@sources)
- end
-
- # Create a task named +task_name+ with no actions or prerequisites..
- # use +enhance+ to add actions and prerequisites.
- def initialize(task_name)
- @name = task_name
- @prerequisites = FileList[]
- @actions = []
- @already_invoked = false
- @comment = nil
- end
-
- # Enhance a task with prerequisites or actions. Returns self.
- def enhance(deps=nil, &block)
- @prerequisites |= deps if deps
- @actions << block if block_given?
- self
- end
-
- # Name of the task.
- def name
- @name.to_s
- end
-
- # Invoke the task if it is needed. Prerequites are invoked first.
- def invoke
- if $trace
- puts "** Invoke #{name} #{format_trace_flags}"
- end
- return if @already_invoked
- @already_invoked = true
- @prerequisites.each { |n| Rake::Task[n].invoke }
- execute if needed?
- end
-
- # Format the trace flags for display.
- def format_trace_flags
- flags = []
- flags << "first_time" unless @already_invoked
- flags << "not_needed" unless needed?
- flags.empty? ? "" : "(" + flags.join(", ") + ")"
- end
- private :format_trace_flags
-
- # Execute the actions associated with this task.
- def execute
- if $dryrun
- puts "** Execute (dry run) #{name}"
- return
- end
- if $trace
- puts "** Execute #{name}"
- end
- self.class.enhance_with_matching_rule(name) if @actions.empty?
- @actions.each { |act| result = act.call(self) }
- end
-
- # Is this task needed?
- def needed?
- true
- end
-
- # Timestamp for this task. Basic tasks return the current time for
- # their time stamp. Other tasks can be more sophisticated.
- def timestamp
- @prerequisites.collect { |p| Rake::Task[p].timestamp }.max || Time.now
- end
-
- # Add a comment to the task. If a comment alread exists, separate
- # the new comment with " / ".
- def add_comment(comment)
- return if ! $last_comment
- if @comment
- @comment << " / "
- else
- @comment = ''
- end
- @comment << $last_comment
- $last_comment = nil
- end
-
- # Return a string describing the internal state of a task. Useful
- # for debugging.
- def investigation
- result = "------------------------------\n"
- result << "Investigating #{name}\n"
- result << "class: #{self.class}\n"
- result << "task needed: #{needed?}\n"
- result << "timestamp: #{timestamp}\n"
- result << "pre-requisites: \n"
- prereqs = @prerequisites.collect {|name| Rake::Task[name]}
- prereqs.sort! {|a,b| a.timestamp <=> b.timestamp}
- prereqs.each do |p|
- result << "--#{p.name} (#{p.timestamp})\n"
- end
- latest_prereq = @prerequisites.collect{|n| Rake::Task[n].timestamp}.max
- result << "latest-prerequisite time: #{latest_prereq}\n"
- result << "................................\n\n"
- return result
- end
-
- # Rake Module Methods ----------------------------------------------
-
- class << self
-
- # Clear the task list. This cause rake to immediately forget all
- # the tasks that have been assigned. (Normally used in the unit
- # tests.)
- def clear
- TASKS.clear
- RULES.clear
- end
-
- # List of all defined tasks.
- def tasks
- TASKS.keys.sort.collect { |tn| Rake::Task[tn] }
- end
-
- # Return a task with the given name. If the task is not currently
- # known, try to synthesize one from the defined rules. If no
- # rules are found, but an existing file matches the task name,
- # assume it is a file task with no dependencies or actions.
- def [](task_name)
- task_name = task_name.to_s
- if task = TASKS[task_name]
- return task
- end
- if task = enhance_with_matching_rule(task_name)
- return task
- end
- if File.exist?(task_name)
- return Rake::FileTask.define_task(task_name)
- end
- fail "Don't know how to build task '#{task_name}'"
- end
-
- # TRUE if the task name is already defined.
- def task_defined?(task_name)
- task_name = task_name.to_s
- TASKS[task_name]
- end
-
- # Define a task given +args+ and an option block. If a rule with
- # the given name already exists, the prerequisites and actions are
- # added to the existing task. Returns the defined task.
- def define_task(args, &block)
- task_name, deps = resolve_args(args)
- deps = [deps] if (Symbol === deps) || (String === deps)
- deps = deps.collect {|d| d.to_s }
- t = lookup(task_name)
- t.add_comment($last_comment)
- t.enhance(deps, &block)
- end
-
- # Define a rule for synthesizing tasks.
- def create_rule(args, &block)
- pattern, deps = resolve_args(args)
- pattern = Regexp.new(Regexp.quote(pattern) + '$') if String === pattern
- RULES << [pattern, deps, block]
- end
-
- # Lookup a task. Return an existing task if found, otherwise
- # create a task of the current type.
- def lookup(task_name)
- name = task_name.to_s
- TASKS[name] ||= self.new(task_name)
- end
-
- # If a rule can be found that matches the task name, enhance the
- # task with the prerequisites and actions from the rule. Set the
- # source attribute of the task appropriately for the rule. Return
- # the enhanced task or nil of no rule was found.
- def enhance_with_matching_rule(task_name, level=0)
- fail Rake::RuleRecursionOverflowError,
- "Rule Recursion Too Deep" if level >= 16
- RULES.each do |pattern, extensions, block|
- if md = pattern.match(task_name)
- task = attempt_rule(task_name, extensions, block, level)
- return task if task
- end
- end
- nil
- rescue Rake::RuleRecursionOverflowError => ex
- ex.add_target(task_name)
- fail ex
- end
-
- private
-
- # Attempt to create a rule given the list of prerequisites.
- def attempt_rule(task_name, extensions, block, level)
- sources = make_sources(task_name, extensions)
- prereqs = sources.collect { |source|
- if File.exist?(source) || Rake::Task.task_defined?(source)
- source
- elsif parent = enhance_with_matching_rule(sources.first, level+1)
- parent.name
- else
- return nil
- end
- }
- task = FileTask.define_task({task_name => prereqs}, &block)
- task.sources = prereqs
- task
- end
-
- # Make a list of sources from the list of file name extensions /
- # translation procs.
- def make_sources(task_name, extensions)
- extensions.collect { |ext|
- case ext
- when String
- source = task_name.sub(/\.[^.]*$/, ext)
- when Proc
- source = ext.call(task_name)
- else
- fail "Don't know how to handle rule dependent: #{ext.inspect}"
- end
- }
- end
-
- # Resolve the arguments for a task/rule.
- def resolve_args(args)
- case args
- when Hash
- fail "Too Many Task Names: #{args.keys.join(' ')}" if args.size > 1
- fail "No Task Name Given" if args.size < 1
- task_name = args.keys[0]
- deps = args[task_name]
- deps = [deps] if (String===deps) || (Regexp===deps) || (Proc===deps)
- else
- task_name = args
- deps = []
- end
- [task_name, deps]
- end
- end
- end
-
-
- ######################################################################
- # A FileTask is a task that includes time based dependencies. If
- # any of a FileTask's prerequisites have a timestamp that is later
- # than the file represented by this task, then the file must be
- # rebuilt (using the supplied actions).
- #
- class FileTask < Task
-
- # Is this file task needed? Yes if it doesn't exist, or if its time
- # stamp is out of date.
- def needed?
- return true unless File.exist?(name)
- return true if out_of_date?(timestamp)
- false
- end
-
- # Time stamp for file task.
- def timestamp
- if File.exist?(name)
- File.mtime(name.to_s)
- else
- Rake::EARLY
- end
- end
-
- private
-
- # Are there any prerequisites with a later time than the given
- # time stamp?
- def out_of_date?(stamp)
- @prerequisites.any? { |n| Rake::Task[n].timestamp > stamp}
- end
- end
-
- ######################################################################
- # A FileCreationTask is a file task that when used as a dependency
- # will be needed if and only if the file has not been created. Once
- # created, it is not re-triggered if any of its dependencies are
- # newer, nor does trigger any rebuilds of tasks that depend on it
- # whenever it is updated.
- class FileCreationTask < FileTask
- # Is this file task needed? Yes if it doesn't exist.
- def needed?
- ! File.exist?(name)
- end
-
- # Time stamp for file creation task. This time stamp is earlier
- # than any other time stamp.
- def timestamp
- Rake::EARLY
- end
- end
-end
-
-######################################################################
-# Task Definition Functions ...
-
-# Declare a basic task.
-#
-# Example:
-# task :clobber => [:clean] do
-# rm_rf "html"
-# end
-#
-def task(args, &block)
- Rake::Task.define_task(args, &block)
-end
-
-
-# Declare a file task.
-#
-# Example:
-# file "config.cfg" => ["config.template"] do
-# open("config.cfg", "w") do |outfile|
-# open("config.template") do |infile|
-# while line = infile.gets
-# outfile.puts line
-# end
-# end
-# end
-# end
-#
-def file(args, &block)
- Rake::FileTask.define_task(args, &block)
-end
-
-# Declare a file creation task.
-# (Mainly used for the directory command).
-def file_create(args, &block)
- Rake::FileCreationTask.define_task(args, &block)
-end
-
-# Declare a set of files tasks to create the given directories on
-# demand.
-#
-# Example:
-# directory "testdata/doc"
-#
-def directory(dir)
- Rake.each_dir_parent(dir) do |d|
- file_create d do |t|
- mkdir_p t.name if ! File.exist?(t.name)
- end
- end
-end
-
-# Declare a rule for auto-tasks.
-#
-# Example:
-# rule '.o' => '.c' do |t|
-# sh %{cc -o #{t.name} #{t.source}}
-# end
-#
-def rule(args, &block)
- Rake::Task.create_rule(args, &block)
-end
-
-# Describe the next rake task.
-#
-# Example:
-# desc "Run the Unit Tests"
-# task :test => [:build]
-# runtests
-# end
-#
-def desc(comment)
- $last_comment = comment
-end
-
-# Import the partial Rakekfile +fn+.
-#
-# Example:
-# import ".depend"
-#
-def import(fn)
- Rake.application.add_import(fn)
-end
-
-######################################################################
-# This a FileUtils extension that defines several additional commands
-# to be added to the FileUtils utility functions.
-#
-module FileUtils
- RUBY = File.join(Config::CONFIG['bindir'], Config::CONFIG['ruby_install_name'])
-
- OPT_TABLE['sh'] = %w(noop verbose)
- OPT_TABLE['ruby'] = %w(noop verbose)
-
- # Run the system command +cmd+. If multiple arguments are given
- # the command is not run with the shell (same semantics as
- # Kernel::exec and Kernel::system).
- #
- # Example:
- # sh %{ls -ltr}
- #
- # sh 'ls', 'file with spaces'
- #
- # # check exit status after command runs
- # sh %{grep pattern file} do |ok, res|
- # if ! ok
- # puts "pattern not found (status = #{res.exitstatus})"
- # end
- # end
- #
- def sh(*cmd, &block)
- if Hash === cmd.last then
- options = cmd.pop
- else
- options = {}
- end
- unless block_given?
- show_command = cmd.join(" ")
- show_command = show_command[0,42] + "..." if show_command.length > 45
- block = lambda { |ok, status|
- ok or fail "Command failed with status (#{status.exitstatus}): [#{show_command}]"
- }
- end
- fu_check_options options, :noop, :verbose
- fu_output_message cmd.join(" ") if options[:verbose]
- unless options[:noop]
- res = system(*cmd)
- block.call(res, $?)
- end
- end
-
- # Run a Ruby interpreter with the given arguments.
- #
- # Example:
- # ruby %{-pe '$_.upcase!' 1 then
- sh(*([RUBY] + args + [options]), &block)
- else
- sh("#{RUBY} #{args}", options, &block)
- end
- end
-
- LN_SUPPORTED = [true]
-
- # Attempt to do a normal file link, but fall back to a copy if the
- # link fails.
- def safe_ln(*args)
- unless LN_SUPPORTED[0]
- cp(*args)
- else
- begin
- ln(*args)
- rescue Errno::EOPNOTSUPP
- LN_SUPPORTED[0] = false
- cp(*args)
- end
- end
- end
-
- # Split a file path into individual directory names.
- #
- # Example:
- # split_all("a/b/c") => ['a', 'b', 'c']
- #
- def split_all(path)
- head, tail = File.split(path)
- return [tail] if head == '.' || tail == '/'
- return [head, tail] if head == '/'
- return split_all(head) + [tail]
- end
-end
-
-######################################################################
-# RakeFileUtils provides a custom version of the FileUtils methods
-# that respond to the verbose and nowrite commands.
-#
-module RakeFileUtils
- include FileUtils
-
- $fileutils_output = $stderr
- $fileutils_label = ''
- $fileutils_verbose = true
- $fileutils_nowrite = false
-
- FileUtils::OPT_TABLE.each do |name, opts|
- next unless opts.include?('verbose')
- module_eval(<<-EOS, __FILE__, __LINE__ + 1)
- def #{name}( *args, &block )
- super(*fu_merge_option(args,
- :verbose => $fileutils_verbose,
- :noop => $fileutils_nowrite),
- &block)
- end
- EOS
- end
-
- # Get/set the verbose flag controlling output from the FileUtils
- # utilities. If verbose is true, then the utility method is echoed
- # to standard output.
- #
- # Examples:
- # verbose # return the current value of the verbose flag
- # verbose(v) # set the verbose flag to _v_.
- # verbose(v) { code } # Execute code with the verbose flag set temporarily to _v_.
- # # Return to the original value when code is done.
- def verbose(value=nil)
- oldvalue = $fileutils_verbose
- $fileutils_verbose = value unless value.nil?
- if block_given?
- begin
- yield
- ensure
- $fileutils_verbose = oldvalue
- end
- end
- $fileutils_verbose
- end
-
- # Get/set the nowrite flag controlling output from the FileUtils
- # utilities. If verbose is true, then the utility method is echoed
- # to standard output.
- #
- # Examples:
- # nowrite # return the current value of the nowrite flag
- # nowrite(v) # set the nowrite flag to _v_.
- # nowrite(v) { code } # Execute code with the nowrite flag set temporarily to _v_.
- # # Return to the original value when code is done.
- def nowrite(value=nil)
- oldvalue = $fileutils_nowrite
- $fileutils_nowrite = value unless value.nil?
- if block_given?
- begin
- yield
- ensure
- $fileutils_nowrite = oldvalue
- end
- end
- oldvalue
- end
-
- # Use this function to prevent protentially destructive ruby code
- # from running when the :nowrite flag is set.
- #
- # Example:
- #
- # when_writing("Building Project") do
- # project.build
- # end
- #
- # The following code will build the project under normal conditions.
- # If the nowrite(true) flag is set, then the example will print:
- # DRYRUN: Building Project
- # instead of actually building the project.
- #
- def when_writing(msg=nil)
- if $fileutils_nowrite
- puts "DRYRUN: #{msg}" if msg
- else
- yield
- end
- end
-
- # Merge the given options with the default values.
- def fu_merge_option(args, defaults)
- if Hash === args.last
- defaults.update(args.last)
- args.pop
- end
- args.push defaults
- args
- end
- private :fu_merge_option
-
- extend self
-
-end
-
-######################################################################
-# Include the FileUtils file manipulation functions in the top level
-# module, but mark them private so that they don't unintentionally
-# define methods on other objects.
-
-include RakeFileUtils
-private(*FileUtils.instance_methods(false))
-
-######################################################################
-module Rake
-
- class RuleRecursionOverflowError < StandardError
- def initialize(*args)
- super
- @targets = []
- end
-
- def add_target(target)
- @targets << target
- end
-
- def message
- super + ": [" + @targets.reverse.join(' => ') + "]"
- end
- end
-
- ####################################################################
- # A FileList is essentially an array with a few helper methods
- # defined to make file manipulation a bit easier.
- #
- # FileLists are lazy. When given a list of glob patterns for
- # possible files to be included in the file list, instead of
- # searching the file structures to find the files, a FileList holds
- # the pattern for latter use.
- #
- # This allows us to define a number of FileList to match any number of
- # files, but only search out the actual files when then FileList
- # itself is actually used. The key is that the first time an
- # element of the FileList/Array is requested, the pending patterns
- # are resolved into a real list of file names.
- #
- class FileList
-
- include Cloneable
-
- # == Method Delegation
- #
- # The lazy evaluation magic of FileLists happens by implementing
- # all the array specific methods to call +resolve+ before
- # delegating the heavy lifting to an embedded array object
- # (@items).
- #
- # In addition, there are two kinds of delegation calls. The
- # regular kind delegates to the @items array and returns the
- # result directly. Well, almost directly. It checks if the
- # returned value is the @items object itself, and if so will
- # return the FileList object instead.
- #
- # The second kind of delegation call is used in methods that
- # normally return a new Array object. We want to capture the
- # return value of these methods and wrap them in a new FileList
- # object. We enumerate these methods in the +SPECIAL_RETURN+ list
- # below.
-
- # List of array methods (that are not in +Object+) that need to be
- # delegated.
- ARRAY_METHODS = Array.instance_methods - Object.instance_methods
-
- # List of additional methods that must be delegated.
- MUST_DEFINE = %w[to_a inspect]
-
- # List of methods that should not be delegated here (we define
- # special versions of them explicitly below).
- MUST_NOT_DEFINE = %w[to_a to_ary partition *]
-
- # List of delegated methods that return new array values which
- # need wrapping.
- SPECIAL_RETURN = %w[
- map collect sort sort_by select find_all reject grep
- compact flatten uniq values_at
- + - & |
- ]
-
- DELEGATING_METHODS = (ARRAY_METHODS + MUST_DEFINE - MUST_NOT_DEFINE).sort.uniq
-
- # Now do the delegation.
- DELEGATING_METHODS.each_with_index do |sym, i|
- if SPECIAL_RETURN.include?(sym)
- ln = __LINE__+1
- class_eval %{
- def #{sym}(*args, &block)
- resolve if @pending
- result = @items.send(:#{sym}, *args, &block)
- FileList.new.import(result)
- end
- }, __FILE__, ln
- else
- ln = __LINE__+1
- class_eval %{
- def #{sym}(*args, &block)
- resolve if @pending
- result = @items.send(:#{sym}, *args, &block)
- result.object_id == @items.object_id ? self : result
- end
- }, __FILE__, ln
- end
- end
-
- # Create a file list from the globbable patterns given. If you
- # wish to perform multiple includes or excludes at object build
- # time, use the "yield self" pattern.
- #
- # Example:
- # file_list = FileList.new['lib/**/*.rb', 'test/test*.rb']
- #
- # pkg_files = FileList.new['lib/**/*'] do |fl|
- # fl.exclude(/\bCVS\b/)
- # end
- #
- def initialize(*patterns)
- @pending_add = []
- @pending = false
- @exclude_patterns = DEFAULT_IGNORE_PATTERNS.dup
- @exclude_re = nil
- @items = []
- patterns.each { |pattern| include(pattern) }
- yield self if block_given?
- end
-
- # Add file names defined by glob patterns to the file list. If an
- # array is given, add each element of the array.
- #
- # Example:
- # file_list.include("*.java", "*.cfg")
- # file_list.include %w( math.c lib.h *.o )
- #
- def include(*filenames)
- # TODO: check for pending
- filenames.each do |fn|
- if fn.respond_to? :to_ary
- include(*fn.to_ary)
- else
- @pending_add << fn
- end
- end
- @pending = true
- self
- end
- alias :add :include
-
- # Register a list of file name patterns that should be excluded
- # from the list. Patterns may be regular expressions, glob
- # patterns or regular strings.
- #
- # Note that glob patterns are expanded against the file system.
- # If a file is explicitly added to a file list, but does not exist
- # in the file system, then an glob pattern in the exclude list
- # will not exclude the file.
- #
- # Examples:
- # FileList['a.c', 'b.c'].exclude("a.c") => ['b.c']
- # FileList['a.c', 'b.c'].exclude(/^a/) => ['b.c']
- #
- # If "a.c" is a file, then ...
- # FileList['a.c', 'b.c'].exclude("a.*") => ['b.c']
- #
- # If "a.c" is not a file, then ...
- # FileList['a.c', 'b.c'].exclude("a.*") => ['a.c', 'b.c']
- #
- def exclude(*patterns)
- patterns.each do |pat| @exclude_patterns << pat end
- if ! @pending
- calculate_exclude_regexp
- reject! { |fn| fn =~ @exclude_re }
- end
- self
- end
-
-
- # Clear all the exclude patterns so that we exclude nothing.
- def clear_exclude
- @exclude_patterns = []
- calculate_exclude_regexp if ! @pending
- end
-
- # Define equality.
- def ==(array)
- to_ary == array
- end
-
- # Return the internal array object.
- def to_a
- resolve
- @items
- end
-
- # Return the internal array object.
- def to_ary
- resolve
- @items
- end
-
- # Redefine * to return either a string or a new file list.
- def *(other)
- result = @items * other
- case result
- when Array
- FileList.new.import(result)
- else
- result
- end
- end
-
- # Resolve all the pending adds now.
- def resolve
- if @pending
- @pending = false
- @pending_add.each do |fn| resolve_add(fn) end
- @pending_add = []
- resolve_exclude
- end
- self
- end
-
- def calculate_exclude_regexp
- ignores = []
- @exclude_patterns.each do |pat|
- case pat
- when Regexp
- ignores << pat
- when /[*.]/
- Dir[pat].each do |p| ignores << p end
- else
- ignores << Regexp.quote(pat)
- end
- end
- if ignores.empty?
- @exclude_re = /^$/
- else
- re_str = ignores.collect { |p| "(" + p.to_s + ")" }.join("|")
- @exclude_re = Regexp.new(re_str)
- end
- end
-
- def resolve_add(fn)
- case fn
- when Array
- fn.each { |f| self.resolve_add(f) }
- when %r{[*?]}
- add_matching(fn)
- else
- self << fn
- end
- end
-
- def resolve_exclude
- @exclude_patterns.each do |pat|
- case pat
- when Regexp
- reject! { |fn| fn =~ pat }
- when /[*.]/
- reject_list = Dir[pat]
- reject! { |fn| reject_list.include?(fn) }
- else
- reject! { |fn| fn == pat }
- end
- end
- self
- end
-
- # Return a new FileList with the results of running +sub+ against
- # each element of the oringal list.
- #
- # Example:
- # FileList['a.c', 'b.c'].sub(/\.c$/, '.o') => ['a.o', 'b.o']
- #
- def sub(pat, rep)
- inject(FileList.new) { |res, fn| res << fn.sub(pat,rep) }
- end
-
- # Return a new FileList with the results of running +gsub+ against
- # each element of the original list.
- #
- # Example:
- # FileList['lib/test/file', 'x/y'].gsub(/\//, "\\")
- # => ['lib\\test\\file', 'x\\y']
- #
- def gsub(pat, rep)
- inject(FileList.new) { |res, fn| res << fn.gsub(pat,rep) }
- end
-
- # Same as +sub+ except that the oringal file list is modified.
- def sub!(pat, rep)
- each_with_index { |fn, i| self[i] = fn.sub(pat,rep) }
- self
- end
-
- # Same as +gsub+ except that the original file list is modified.
- def gsub!(pat, rep)
- each_with_index { |fn, i| self[i] = fn.gsub(pat,rep) }
- self
- end
-
- # Return a new array with String#ext method applied to
- # each member of the array.
- #
- # This method is a shortcut for:
- #
- # array.collect { |item| item.ext(newext) }
- #
- # +ext+ is a user added method for the Array class.
- def ext(newext='')
- collect { |fn| fn.ext(newext) }
- end
-
-
- # Grep each of the files in the filelist using the given pattern.
- # If a block is given, call the block on each matching line,
- # passing the file name, line number, and the matching line of
- # text. If no block is given, a standard emac style
- # file:linenumber:line message will be printed to standard out.
- def egrep(pattern)
- each do |fn|
- open(fn) do |inf|
- count = 0
- inf.each do |line|
- count += 1
- if pattern.match(line)
- if block_given?
- yield fn, count, line
- else
- puts "#{fn}:#{count}:#{line}"
- end
- end
- end
- end
- end
- end
-
- # FileList version of partition. Needed because the nested arrays
- # should be FileLists in this version.
- def partition(&block) # :nodoc:
- resolve
- result = @items.partition(&block)
- [
- FileList.new.import(result[0]),
- FileList.new.import(result[1]),
- ]
- end
-
- # Convert a FileList to a string by joining all elements with a space.
- def to_s
- resolve if @pending
- self.join(' ')
- end
-
- # Add matching glob patterns.
- def add_matching(pattern)
- Dir[pattern].each do |fn|
- self << fn unless exclude?(fn)
- end
- end
- private :add_matching
-
- # Should the given file name be excluded?
- def exclude?(fn)
- calculate_exclude_regexp unless @exclude_re
- fn =~ @exclude_re
- end
-
- DEFAULT_IGNORE_PATTERNS = [
- /(^|[\/\\])CVS([\/\\]|$)/,
- /(^|[\/\\])\.svn([\/\\]|$)/,
- /\.bak$/,
- /~$/,
- /(^|[\/\\])core$/
- ]
- @exclude_patterns = DEFAULT_IGNORE_PATTERNS.dup
-
- def import(array)
- @items = array
- self
- end
-
- class << self
- # Create a new file list including the files listed. Similar to:
- #
- # FileList.new(*args)
- def [](*args)
- new(*args)
- end
-
- # Set the ignore patterns back to the default value. The
- # default patterns will ignore files
- # * containing "CVS" in the file path
- # * containing ".svn" in the file path
- # * ending with ".bak"
- # * ending with "~"
- # * named "core"
- #
- # Note that file names beginning with "." are automatically
- # ignored by Ruby's glob patterns and are not specifically
- # listed in the ignore patterns.
- def select_default_ignore_patterns
- @exclude_patterns = DEFAULT_IGNORE_PATTERNS.dup
- end
-
- # Clear the ignore patterns.
- def clear_ignore_patterns
- @exclude_patterns = [ /^$/ ]
- end
- end
- end # FileList
-end
-
-module Rake
- class << self
-
- # Yield each file or directory component.
- def each_dir_parent(dir)
- old_length = nil
- while dir != '.' && dir.length != old_length
- yield(dir)
- old_length = dir.length
- dir = File.dirname(dir)
- end
- end
- end
-end
-
-# Alias FileList to be available at the top level.
-FileList = Rake::FileList
-
-######################################################################
-module Rake
-
- # Default Rakefile loader used by +import+.
- class DefaultLoader
- def load(fn)
- Kernel.load fn
- end
- end
-
- # EarlyTime is a fake timestamp that occurs _before_ any other time
- # value.
- class EarlyTime
- include Comparable
- include Singleton
-
- def <=>(other)
- -1
- end
-
- def to_s
- ""
- end
- end
-
- EARLY = EarlyTime.instance
-end
-
-######################################################################
-# Extensions to time to allow comparisons with an early time class.
-class Time
- alias pre_early_time_compare :<=>
- def <=>(other)
- if Rake::EarlyTime === other
- - other.<=>(self)
- else
- pre_early_time_compare(other)
- end
- end
-end
-
-module Rake
-
- ######################################################################
- # Rake main application object. When invoking +rake+ from the
- # command line, a Rake::Application object is created and run.
- #
- class Application
- RAKEFILES = ['rakefile', 'Rakefile', 'rakefile.rb', 'Rakefile.rb']
-
- OPTIONS = [
- ['--dry-run', '-n', GetoptLong::NO_ARGUMENT,
- "Do a dry run without executing actions."],
- ['--help', '-H', GetoptLong::NO_ARGUMENT,
- "Display this help message."],
- ['--libdir', '-I', GetoptLong::REQUIRED_ARGUMENT,
- "Include LIBDIR in the search path for required modules."],
- ['--nosearch', '-N', GetoptLong::NO_ARGUMENT,
- "Do not search parent directories for the Rakefile."],
- ['--prereqs', '-P', GetoptLong::NO_ARGUMENT,
- "Display the tasks and dependencies, then exit."],
- ['--quiet', '-q', GetoptLong::NO_ARGUMENT,
- "Do not log messages to standard output."],
- ['--rakefile', '-f', GetoptLong::REQUIRED_ARGUMENT,
- "Use FILE as the rakefile."],
- ['--require', '-r', GetoptLong::REQUIRED_ARGUMENT,
- "Require MODULE before executing rakefile."],
- ['--silent', '-s', GetoptLong::NO_ARGUMENT,
- "Like --quiet, but also suppresses the 'in directory' announcement."],
- ['--tasks', '-T', GetoptLong::NO_ARGUMENT,
- "Display the tasks and dependencies, then exit."],
- ['--trace', '-t', GetoptLong::NO_ARGUMENT,
- "Turn on invoke/execute tracing, enable full backtrace."],
- ['--usage', '-h', GetoptLong::NO_ARGUMENT,
- "Display usage."],
- ['--verbose', '-v', GetoptLong::NO_ARGUMENT,
- "Log message to standard output (default)."],
- ['--version', '-V', GetoptLong::NO_ARGUMENT,
- "Display the program version."],
- ['--classic-namespace', '-C', GetoptLong::NO_ARGUMENT,
- "Put Task and FileTask in the top level namespace"],
- ]
-
- # Create a Rake::Application object.
- def initialize
- @rakefile = nil
- @pending_imports = []
- @imported = []
- @nosearch = false
- @loaders = {}
- @default_loader = Rake::DefaultLoader.new
- Rake.application = self
- end
-
- # True if one of the files in RAKEFILES is in the current directory.
- # If a match is found, it is copied into @rakefile.
- def have_rakefile
- RAKEFILES.each do |fn|
- if File.exist?(fn)
- @rakefile = fn
- return true
- end
- end
- return false
- end
-
- # Display the program usage line.
- def usage
- puts "rake [-f rakefile] {options} targets..."
- end
-
- # Display the rake command line help.
- def help
- usage
- puts
- puts "Options are ..."
- puts
- OPTIONS.sort.each do |long, short, mode, desc|
- if mode == GetoptLong::REQUIRED_ARGUMENT
- if desc =~ /\b([A-Z]{2,})\b/
- long = long + "=#{$1}"
- end
- end
- printf " %-20s (%s)\n", long, short
- printf " %s\n", desc
- end
- end
-
- # Display the tasks and dependencies.
- def display_tasks_and_comments
- width = Rake::Task.tasks.select { |t|
- t.comment
- }.collect { |t|
- t.name.length
- }.max
- Rake::Task.tasks.each do |t|
- if t.comment
- printf "rake %-#{width}s # %s\n", t.name, t.comment
- end
- end
- end
-
- # Display the tasks and prerequisites
- def display_prerequisites
- Rake::Task.tasks.each do |t|
- puts "rake #{t.name}"
- t.prerequisites.each { |pre| puts " #{pre}" }
- end
- end
-
- # Return a list of the command line options supported by the
- # program.
- def command_line_options
- OPTIONS.collect { |lst| lst[0..-2] }
- end
-
- # Do the option defined by +opt+ and +value+.
- def do_option(opt, value)
- case opt
- when '--dry-run'
- verbose(true)
- nowrite(true)
- $dryrun = true
- $trace = true
- when '--help'
- help
- exit
- when '--libdir'
- $:.push(value)
- when '--nosearch'
- @nosearch = true
- when '--prereqs'
- $show_prereqs = true
- when '--quiet'
- verbose(false)
- when '--rakefile'
- RAKEFILES.clear
- RAKEFILES << value
- when '--require'
- require value
- when '--silent'
- verbose(false)
- $silent = true
- when '--tasks'
- $show_tasks = true
- when '--trace'
- $trace = true
- verbose(true)
- when '--usage'
- usage
- exit
- when '--verbose'
- verbose(true)
- when '--version'
- puts "rake, version #{RAKEVERSION}"
- exit
- when '--classic-namespace'
- require 'rake/classic_namespace'
- else
- fail "Unknown option: #{opt}"
- end
- end
-
- # Read and handle the command line options.
- def handle_options
- opts = GetoptLong.new(*command_line_options)
- opts.each { |opt, value| do_option(opt, value) }
- end
-
- def load_rakefile
- here = Dir.pwd
- while ! have_rakefile
- Dir.chdir("..")
- if Dir.pwd == here || @nosearch
- fail "No Rakefile found (looking for: #{RAKEFILES.join(', ')})"
- end
- here = Dir.pwd
- end
- puts "(in #{Dir.pwd})" unless $silent
- $rakefile = @rakefile
- load @rakefile
- load_imports
- end
-
- # Collect the list of tasks on the command line. If no tasks are
- # give, return a list containing only the default task.
- # Environmental assignments are processed at this time as well.
- def collect_tasks
- tasks = []
- ARGV.each do |arg|
- if arg =~ /^(\w+)=(.*)$/
- ENV[$1] = $2
- else
- tasks << arg
- end
- end
- tasks.push("default") if tasks.size == 0
- tasks
- end
-
- # Add a file to the list of files to be imported.
- def add_import(fn)
- @pending_imports << fn
- end
-
- # Load the pending list of imported files.
- def load_imports
- while fn = @pending_imports.shift
- next if @imported.member?(fn)
- Rake::Task[fn].invoke if Rake::Task.task_defined?(fn)
- ext = File.extname(fn)
- loader = @loaders[ext] || @default_loader
- loader.load(fn)
- @imported << fn
- end
- end
-
- # Add a loader to handle imported files ending in the extension
- # +ext+.
- def add_loader(ext, loader)
- ext = ".#{ext}" unless ext =~ /^\./
- @loaders[ext] = loader
- end
-
- # Warn about deprecated use of top level constant names.
- def const_warning(const_name)
- @const_warning ||= false
- if ! @const_warning
- puts %{WARNING: Deprecated reference to top-level constant '#{const_name}'} +
- %{found at: #{rakefile_location}}
- puts %{ Use --classic-namespace on rake command}
- puts %{ or 'require "rake/classic_namespace"' in Rakefile}
- end
- @const_warning = true
- end
-
- def rakefile_location
- begin
- fail
- rescue RuntimeError => ex
- ex.backtrace.find {|str| str =~ /#{@rakefile}/ } || ""
- end
- end
-
- # Run the +rake+ application.
- def run
- handle_options
- begin
- tasks = collect_tasks
- load_rakefile
- if $show_tasks
- display_tasks_and_comments
- elsif $show_prereqs
- display_prerequisites
- else
- tasks.each { |task_name| Rake::Task[task_name].invoke }
- end
- rescue Exception => ex
- puts "rake aborted!"
- puts ex.message
- if $trace
- puts ex.backtrace.join("\n")
- else
- puts ex.backtrace.find {|str| str =~ /#{@rakefile}/ } || ""
- end
- exit(1)
- end
- end
- end
-
-end
-
-
-class Module
-
- # Rename the original handler to make it available.
- alias :rake_original_const_missing :const_missing
-
- # Check for deprecated uses of top level (i.e. in Object) uses of
- # Rake class names. If someone tries to reference the constant
- # name, display a warning and return the proper object. Using
- # --class-namespace will define these constants in Object and avoid
- # this handler.
- def const_missing(const_name)
- case const_name
- when :Task
- Rake.application.const_warning(const_name)
- Rake::Task
- when :FileTask
- Rake.application.const_warning(const_name)
- Rake::FileTask
- when :FileCreationTask
- Rake.application.const_warning(const_name)
- Rake::FileCreationTask
- when :RakeApp
- Rake.application.const_warning(const_name)
- Rake::Application
- else
- rake_original_const_missing(const_name)
- end
- end
-end
-
-if __FILE__ == $0 then
- Rake::Application.new.run
-end
diff --git a/tracks/vendor/rake-0.6.2/lib/rake/classic_namespace.rb b/tracks/vendor/rake-0.6.2/lib/rake/classic_namespace.rb
deleted file mode 100644
index feb75699..00000000
--- a/tracks/vendor/rake-0.6.2/lib/rake/classic_namespace.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-# The following classes used to be in the top level namespace.
-# Loading this file enables compatibility with older Rakefile that
-# referenced Task from the top level.
-
-Task = Rake::Task
-FileTask = Rake::FileTask
-FileCreationTask = Rake::FileCreationTask
-RakeApp = Rake::Application
diff --git a/tracks/vendor/rake-0.6.2/lib/rake/clean.rb b/tracks/vendor/rake-0.6.2/lib/rake/clean.rb
deleted file mode 100644
index 581daf87..00000000
--- a/tracks/vendor/rake-0.6.2/lib/rake/clean.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/usr/bin/env ruby
-
-# The 'rake/clean' file defines two file lists (CLEAN and CLOBBER) and
-# two rake tasks (:clean and :clobber).
-#
-# [:clean] Clean up the project by deleting scratch files and backup
-# files. Add files to the CLEAN file list to have the :clean
-# target handle them.
-#
-# [:clobber] Clobber all generated and non-source files in a project.
-# The task depends on :clean, so all the clean files will
-# be deleted as well as files in the CLOBBER file list.
-# The intent of this task is to return a project to its
-# pristine, just unpacked state.
-
-require 'rake'
-
-CLEAN = Rake::FileList["**/*~", "**/*.bak", "**/core"]
-CLEAN.clear_exclude
-
-desc "Remove any temporary products."
-task :clean do
- CLEAN.each { |fn| rm_r fn rescue nil }
-end
-
-CLOBBER = Rake::FileList.new
-
-desc "Remove any generated file."
-task :clobber => [:clean] do
- CLOBBER.each { |fn| rm_r fn rescue nil }
-end
diff --git a/tracks/vendor/rake-0.6.2/lib/rake/contrib/compositepublisher.rb b/tracks/vendor/rake-0.6.2/lib/rake/contrib/compositepublisher.rb
deleted file mode 100644
index d771ccce..00000000
--- a/tracks/vendor/rake-0.6.2/lib/rake/contrib/compositepublisher.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/env ruby
-
-module Rake
-
- # Manage several publishers as a single entity.
- class CompositePublisher
- def initialize
- @publishers = []
- end
-
- # Add a publisher to the composite.
- def add(pub)
- @publishers << pub
- end
-
- # Upload all the individual publishers.
- def upload
- @publishers.each { |p| p.upload }
- end
- end
-
-end
-
-
diff --git a/tracks/vendor/rake-0.6.2/lib/rake/contrib/ftptools.rb b/tracks/vendor/rake-0.6.2/lib/rake/contrib/ftptools.rb
deleted file mode 100644
index dfc617d6..00000000
--- a/tracks/vendor/rake-0.6.2/lib/rake/contrib/ftptools.rb
+++ /dev/null
@@ -1,139 +0,0 @@
-#!/usr/bin/env ruby
-
-# = Tools for FTP uploading.
-#
-# This file is still under development and is not released for general
-# use.
-
-require 'date'
-require 'parsedate'
-require 'net/ftp'
-
-module Rake # :nodoc:
-
- ####################################################################
- # Note: Not released for general use.
- class FtpFile
- attr_reader :name, :size, :owner, :group, :time
-
- def self.date
- @date_class ||= Date
- end
-
- def initialize(path, entry)
- @path = path
- @mode, line, @owner, @group, size, d1, d2, d3, @name = entry.split(' ')
- @size = size.to_i
- @time = determine_time(d1, d2, d3)
- end
-
- def path
- File.join(@path, @name)
- end
-
- def directory?
- @mode[0] == ?d
- end
-
- def mode
- parse_mode(@mode)
- end
-
- def symlink?
- @mode[0] == ?l
- end
-
- private # --------------------------------------------------------
-
- def parse_mode(m)
- result = 0
- (1..9).each do |i|
- result = 2*result + ((m[i]==?-) ? 0 : 1)
- end
- result
- end
-
- def determine_time(d1, d2, d3)
- elements = ParseDate.parsedate("#{d1} #{d2} #{d3}")
- if elements[0].nil?
- today = self.class.date.today
- if elements[1] > today.month
- elements[0] = today.year - 1
- else
- elements[0] = today.year
- end
- end
- elements = elements.collect { |el| el.nil? ? 0 : el }
- Time.mktime(*elements[0,7])
- end
- end
-
- ####################################################################
- # Manage the uploading of files to an FTP account.
- class FtpUploader
-
- # Log uploads to standard output when true.
- attr_accessor :verbose
-
- class << FtpUploader
- # Create an uploader and pass it to the given block as +up+.
- # When the block is complete, close the uploader.
- def connect(path, host, account, password)
- up = self.new(path, host, account, password)
- begin
- yield(up)
- ensure
- up.close
- end
- end
- end
-
- # Create an FTP uploader targetting the directory +path+ on +host+
- # using the given account and password. +path+ will be the root
- # path of the uploader.
- def initialize(path, host, account, password)
- @created = Hash.new
- @path = path
- @ftp = Net::FTP.new(host, account, password)
- makedirs(@path)
- @ftp.chdir(@path)
- end
-
- # Create the directory +path+ in the uploader root path.
- def makedirs(path)
- route = []
- File.split(path).each do |dir|
- route << dir
- current_dir = File.join(route)
- if @created[current_dir].nil?
- @created[current_dir] = true
- puts "Creating Directory #{current_dir}" if @verbose
- @ftp.mkdir(current_dir) rescue nil
- end
- end
- end
-
- # Upload all files matching +wildcard+ to the uploader's root
- # path.
- def upload_files(wildcard)
- Dir[wildcard].each do |fn|
- upload(fn)
- end
- end
-
- # Close the uploader.
- def close
- @ftp.close
- end
-
- private # --------------------------------------------------------
-
- # Upload a single file to the uploader's root path.
- def upload(file)
- puts "Uploading #{file}" if @verbose
- dir = File.dirname(file)
- makedirs(dir)
- @ftp.putbinaryfile(file, file) unless File.directory?(file)
- end
- end
-end
diff --git a/tracks/vendor/rake-0.6.2/lib/rake/contrib/publisher.rb b/tracks/vendor/rake-0.6.2/lib/rake/contrib/publisher.rb
deleted file mode 100644
index 6e80eb74..00000000
--- a/tracks/vendor/rake-0.6.2/lib/rake/contrib/publisher.rb
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/usr/bin/env ruby
-
-# Copyright 2003, 2004 by Jim Weirich (jim@weirichhouse.org)
-# All rights reserved.
-
-# Permission is granted for use, copying, modification, distribution,
-# and distribution of modified versions of this work as long as the
-# above copyright notice is included.
-
-# Configuration information about an upload host system.
-# * name :: Name of host system.
-# * webdir :: Base directory for the web information for the
-# application. The application name (APP) is appended to
-# this directory before using.
-# * pkgdir :: Directory on the host system where packages can be
-# placed.
-HostInfo = Struct.new(:name, :webdir, :pkgdir)
-
-# Manage several publishers as a single entity.
-class CompositePublisher
- def initialize
- @publishers = []
- end
-
- # Add a publisher to the composite.
- def add(pub)
- @publishers << pub
- end
-
- # Upload all the individual publishers.
- def upload
- @publishers.each { |p| p.upload }
- end
-end
-
-# Publish an entire directory to an existing remote directory using
-# SSH.
-class SshDirPublisher
- def initialize(host, remote_dir, local_dir)
- @host = host
- @remote_dir = remote_dir
- @local_dir = local_dir
- end
-
- def upload
- run %{scp -rq #{@local_dir}/* #{@host}:#{@remote_dir}}
- end
-end
-
-# Publish an entire directory to a fresh remote directory using SSH.
-class SshFreshDirPublisher < SshDirPublisher
- def upload
- run %{ssh #{@host} rm -rf #{@remote_dir}} rescue nil
- run %{ssh #{@host} mkdir #{@remote_dir}}
- super
- end
-end
-
-# Publish a list of files to an existing remote directory.
-class SshFilePublisher
- # Create a publisher using the give host information.
- def initialize(host, remote_dir, local_dir, *files)
- @host = host
- @remote_dir = remote_dir
- @local_dir = local_dir
- @files = files
- end
-
- # Upload the local directory to the remote directory.
- def upload
- @files.each do |fn|
- run %{scp -q #{@local_dir}/#{fn} #{@host}:#{@remote_dir}}
- end
- end
-end
diff --git a/tracks/vendor/rake-0.6.2/lib/rake/contrib/rubyforgepublisher.rb b/tracks/vendor/rake-0.6.2/lib/rake/contrib/rubyforgepublisher.rb
deleted file mode 100644
index 334d10e7..00000000
--- a/tracks/vendor/rake-0.6.2/lib/rake/contrib/rubyforgepublisher.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'rake/contrib/sshpublisher'
-
-module Rake
-
- class RubyForgePublisher < SshDirPublisher
- attr_reader :project, :proj_id, :user
-
- def initialize(projname, user)
- super(
- "#{user}@rubyforge.org",
- "/var/www/gforge-projects/#{projname}",
- "html")
- end
- end
-
-end
diff --git a/tracks/vendor/rake-0.6.2/lib/rake/contrib/sshpublisher.rb b/tracks/vendor/rake-0.6.2/lib/rake/contrib/sshpublisher.rb
deleted file mode 100644
index f21526e5..00000000
--- a/tracks/vendor/rake-0.6.2/lib/rake/contrib/sshpublisher.rb
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'rake/contrib/compositepublisher'
-
-module Rake
-
- # Publish an entire directory to an existing remote directory using
- # SSH.
- class SshDirPublisher
- def initialize(host, remote_dir, local_dir)
- @host = host
- @remote_dir = remote_dir
- @local_dir = local_dir
- end
-
- def upload
- sh %{scp -rq #{@local_dir}/* #{@host}:#{@remote_dir}}
- end
- end
-
- # Publish an entire directory to a fresh remote directory using SSH.
- class SshFreshDirPublisher < SshDirPublisher
- def upload
- sh %{ssh #{@host} rm -rf #{@remote_dir}} rescue nil
- sh %{ssh #{@host} mkdir #{@remote_dir}}
- super
- end
- end
-
- # Publish a list of files to an existing remote directory.
- class SshFilePublisher
- # Create a publisher using the give host information.
- def initialize(host, remote_dir, local_dir, *files)
- @host = host
- @remote_dir = remote_dir
- @local_dir = local_dir
- @files = files
- end
-
- # Upload the local directory to the remote directory.
- def upload
- @files.each do |fn|
- sh %{scp -q #{@local_dir}/#{fn} #{@host}:#{@remote_dir}}
- end
- end
- end
-end
diff --git a/tracks/vendor/rake-0.6.2/lib/rake/contrib/sys.rb b/tracks/vendor/rake-0.6.2/lib/rake/contrib/sys.rb
deleted file mode 100644
index 2cd823a7..00000000
--- a/tracks/vendor/rake-0.6.2/lib/rake/contrib/sys.rb
+++ /dev/null
@@ -1,207 +0,0 @@
-#!/usr/bin/env ruby
-
-#--
-# Copyright (c) 2003, 2004 Jim Weirich
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#++
-#
-require 'ftools'
-require 'rbconfig'
-
-######################################################################
-# Sys provides a number of file manipulation tools for the convenience
-# of writing Rakefiles. All commands in this module will announce
-# their activity on standard output if the $verbose flag is set
-# ($verbose = true is the default). You can control this by globally
-# setting $verbose or by using the +verbose+ and +quiet+ methods.
-#
-# Sys has been deprecated in favor of the FileUtils module available
-# in Ruby 1.8.
-#
-module Sys
- RUBY = Config::CONFIG['ruby_install_name']
-
- # Install all the files matching +wildcard+ into the +dest_dir+
- # directory. The permission mode is set to +mode+.
- def install(wildcard, dest_dir, mode)
- Dir[wildcard].each do |fn|
- File.install(fn, dest_dir, mode, $verbose)
- end
- end
-
- # Run the system command +cmd+.
- def run(cmd)
- log cmd
- system(cmd) or fail "Command Failed: [#{cmd}]"
- end
-
- # Run a Ruby interpreter with the given arguments.
- def ruby(*args)
- run "#{RUBY} #{args.join(' ')}"
- end
-
- # Copy a single file from +file_name+ to +dest_file+.
- def copy(file_name, dest_file)
- log "Copying file #{file_name} to #{dest_file}"
- File.copy(file_name, dest_file)
- end
-
- # Copy all files matching +wildcard+ into the directory +dest_dir+.
- def copy_files(wildcard, dest_dir)
- for_matching_files(wildcard, dest_dir) { |from, to| copy(from, to) }
- end
-
- # Link +file_name+ to +dest_file+.
- def link(file_name, dest_file)
- log "Linking file #{file_name} to #{dest_file}"
- File.link(file_name, dest_file)
- end
-
- # Link all files matching +wildcard+ into the directory +dest_dir+.
- def link_files(wildcard, dest_dir)
- for_matching_files(wildcard, dest_dir) { |from, to| link(from, to) }
- end
-
- # Symlink +file_name+ to +dest_file+.
- def symlink(file_name, dest_file)
- log "Symlinking file #{file_name} to #{dest_file}"
- File.symlink(file_name, dest_file)
- end
-
- # Symlink all files matching +wildcard+ into the directory +dest_dir+.
- def symlink_files(wildcard, dest_dir)
- for_matching_files(wildcard, dest_dir) { |from, to| link(from, to) }
- end
-
- # Remove all files matching +wildcard+. If a matching file is a
- # directory, it must be empty to be removed. used +delete_all+ to
- # recursively delete directories.
- def delete(*wildcards)
- wildcards.each do |wildcard|
- Dir[wildcard].each do |fn|
- if File.directory?(fn)
- log "Deleting directory #{fn}"
- Dir.delete(fn)
- else
- log "Deleting file #{fn}"
- File.delete(fn)
- end
- end
- end
- end
-
- # Recursively delete all files and directories matching +wildcard+.
- def delete_all(*wildcards)
- wildcards.each do |wildcard|
- Dir[wildcard].each do |fn|
- next if ! File.exist?(fn)
- if File.directory?(fn)
- Dir["#{fn}/*"].each do |subfn|
- next if subfn=='.' || subfn=='..'
- delete_all(subfn)
- end
- log "Deleting directory #{fn}"
- Dir.delete(fn)
- else
- log "Deleting file #{fn}"
- File.delete(fn)
- end
- end
- end
- end
-
- # Make the directories given in +dirs+.
- def makedirs(*dirs)
- dirs.each do |fn|
- log "Making directory #{fn}"
- File.makedirs(fn)
- end
- end
-
- # Make +dir+ the current working directory for the duration of
- # executing the given block.
- def indir(dir)
- olddir = Dir.pwd
- Dir.chdir(dir)
- yield
- ensure
- Dir.chdir(olddir)
- end
-
- # Split a file path into individual directory names.
- #
- # For example:
- # split_all("a/b/c") => ['a', 'b', 'c']
- def split_all(path)
- head, tail = File.split(path)
- return [tail] if head == '.' || tail == '/'
- return [head, tail] if head == '/'
- return split_all(head) + [tail]
- end
-
- # Write a message to standard out if $verbose is enabled.
- def log(msg)
- print " " if $trace && $verbose
- puts msg if $verbose
- end
-
- # Perform a block with $verbose disabled.
- def quiet(&block)
- with_verbose(false, &block)
- end
-
- # Perform a block with $verbose enabled.
- def verbose(&block)
- with_verbose(true, &block)
- end
-
- # Perform a block with each file matching a set of wildcards.
- def for_files(*wildcards)
- wildcards.each do |wildcard|
- Dir[wildcard].each do |fn|
- yield(fn)
- end
- end
- end
-
- extend(self)
-
- private # ----------------------------------------------------------
-
- def for_matching_files(wildcard, dest_dir)
- Dir[wildcard].each do |fn|
- dest_file = File.join(dest_dir, fn)
- parent = File.dirname(dest_file)
- makedirs(parent) if ! File.directory?(parent)
- yield(fn, dest_file)
- end
- end
-
- def with_verbose(v)
- oldverbose = $verbose
- $verbose = v
- yield
- ensure
- $verbose = oldverbose
- end
-
-end
-
diff --git a/tracks/vendor/rake-0.6.2/lib/rake/gempackagetask.rb b/tracks/vendor/rake-0.6.2/lib/rake/gempackagetask.rb
deleted file mode 100644
index 7ce9f439..00000000
--- a/tracks/vendor/rake-0.6.2/lib/rake/gempackagetask.rb
+++ /dev/null
@@ -1,100 +0,0 @@
-#!/usr/bin/env ruby
-
-# Define a package task library to aid in the definition of GEM
-# packages.
-
-require 'rubygems'
-require 'rake'
-require 'rake/packagetask'
-
-begin
- Gem.manage_gems
-rescue NoMethodError => ex
- # Using rubygems prior to 0.6.1
-end
-
-module Rake
-
- # Create a package based upon a Gem spec. Gem packages, as well as
- # zip files and tar/gzipped packages can be produced by this task.
- #
- # In addition to the Rake targets generated by PackageTask, a
- # GemPackageTask will also generate the following tasks:
- #
- # ["package_dir/name-version.gem"]
- # Create a Ruby GEM package with the given name and version.
- #
- # Example using a Ruby GEM spec:
- #
- # require 'rubygems'
- #
- # spec = Gem::Specification.new do |s|
- # s.platform = Gem::Platform::RUBY
- # s.summary = "Ruby based make-like utility."
- # s.name = 'rake'
- # s.version = PKG_VERSION
- # s.requirements << 'none'
- # s.require_path = 'lib'
- # s.autorequire = 'rake'
- # s.files = PKG_FILES
- # s.description = < [:gem]
- task :gem => ["#{package_dir}/#{gem_file}"]
- file "#{package_dir}/#{gem_file}" => [package_dir] + @gem_spec.files do
- when_writing("Creating GEM") {
- Gem::Builder.new(gem_spec).build
- verbose(true) {
- mv gem_file, "#{package_dir}/#{gem_file}"
- }
- }
- end
- end
-
- def gem_file
- if @gem_spec.platform == Gem::Platform::RUBY
- "#{package_name}.gem"
- else
- "#{package_name}-#{@gem_spec.platform}.gem"
- end
- end
-
- end
-end
diff --git a/tracks/vendor/rake-0.6.2/lib/rake/loaders/makefile.rb b/tracks/vendor/rake-0.6.2/lib/rake/loaders/makefile.rb
deleted file mode 100644
index 0491f4e4..00000000
--- a/tracks/vendor/rake-0.6.2/lib/rake/loaders/makefile.rb
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/env ruby
-
-module Rake
-
- # Makefile loader to be used with the import file loader.
- class MakefileLoader
-
- # Load the makefile dependencies in +fn+.
- def load(fn)
- buffer = ''
- open(fn) do |mf|
- mf.each do |line|
- next if line =~ /^\s*#/
- buffer << line
- if buffer =~ /\\$/
- buffer.sub!(/\\\n/, ' ')
- state = :append
- else
- process_line(buffer)
- buffer = ''
- end
- end
- end
- process_line(buffer) if buffer != ''
- end
-
- private
-
- # Process one logical line of makefile data.
- def process_line(line)
- file_task, args = line.split(':')
- return if args.nil?
- dependents = args.split
- file file_task => dependents
- end
- end
-
- # Install the handler
- Rake.application.add_loader('mf', MakefileLoader.new)
-
-end
diff --git a/tracks/vendor/rake-0.6.2/lib/rake/packagetask.rb b/tracks/vendor/rake-0.6.2/lib/rake/packagetask.rb
deleted file mode 100644
index 3d9cc40b..00000000
--- a/tracks/vendor/rake-0.6.2/lib/rake/packagetask.rb
+++ /dev/null
@@ -1,178 +0,0 @@
-#!/usr/bin/env ruby
-
-# Define a package task libarary to aid in the definition of
-# redistributable package files.
-
-require 'rake'
-require 'rake/tasklib'
-
-module Rake
-
- # Create a packaging task that will package the project into
- # distributable files (e.g zip archive or tar files).
- #
- # The PackageTask will create the following targets:
- #
- # [:package]
- # Create all the requested package files.
- #
- # [:clobber_package]
- # Delete all the package files. This target is automatically
- # added to the main clobber target.
- #
- # [:repackage]
- # Rebuild the package files from scratch, even if they are not out
- # of date.
- #
- # ["package_dir/name-version.tgz"]
- # Create a gzipped tar package (if need_tar is true).
- #
- # ["package_dir/name-version.tar.gz"]
- # Create a gzipped tar package (if need_tar_gz is true).
- #
- # ["package_dir/name-version.tar.bz2"]
- # Create a bzip2'd tar package (if need_tar_bz2 is true).
- #
- # ["package_dir/name-version.zip"]
- # Create a zip package archive (if need_zip is true).
- #
- # Example:
- #
- # Rake::PackageTask.new("rake", "1.2.3") do |p|
- # p.need_tar = true
- # p.package_files.include("lib/**/*.rb")
- # end
- #
- class PackageTask < TaskLib
- # Name of the package (from the GEM Spec).
- attr_accessor :name
-
- # Version of the package (e.g. '1.3.2').
- attr_accessor :version
-
- # Directory used to store the package files (default is 'pkg').
- attr_accessor :package_dir
-
- # True if a gzipped tar file (tgz) should be produced (default is false).
- attr_accessor :need_tar
-
- # True if a gzipped tar file (tar.gz) should be produced (default is false).
- attr_accessor :need_tar_gz
-
- # True if a bzip2'd tar file (tar.bz2) should be produced (default is false).
- attr_accessor :need_tar_bz2
-
- # True if a zip file should be produced (default is false)
- attr_accessor :need_zip
-
- # List of files to be included in the package.
- attr_accessor :package_files
-
- # Create a Package Task with the given name and version.
- def initialize(name=nil, version=nil)
- init(name, version)
- yield self if block_given?
- define unless name.nil?
- end
-
- # Initialization that bypasses the "yield self" and "define" step.
- def init(name, version)
- @name = name
- @version = version
- @package_files = Rake::FileList.new
- @package_dir = 'pkg'
- @need_tar = false
- @need_tar_gz = false
- @need_tar_bz2 = false
- @need_zip = false
- end
-
- # Create the tasks defined by this task library.
- def define
- fail "Version required (or :noversion)" if @version.nil?
- @version = nil if :noversion == @version
-
- desc "Build all the packages"
- task :package
-
- desc "Force a rebuild of the package files"
- task :repackage => [:clobber_package, :package]
-
- desc "Remove package products"
- task :clobber_package do
- rm_r package_dir rescue nil
- end
-
- task :clobber => [:clobber_package]
-
- [
- [need_tar, tgz_file, "z"],
- [need_tar_gz, tar_gz_file, "z"],
- [need_tar_bz2, tar_bz2_file, "j"]
- ].each do |(need, file, flag)|
- if need
- task :package => ["#{package_dir}/#{file}"]
- file "#{package_dir}/#{file}" => [package_dir_path] + package_files do
- chdir(package_dir) do
- sh %{tar #{flag}cvf #{file} #{package_name}}
- end
- end
- end
- end
-
- if need_zip
- task :package => ["#{package_dir}/#{zip_file}"]
- file "#{package_dir}/#{zip_file}" => [package_dir_path] + package_files do
- chdir(package_dir) do
- sh %{zip -r #{zip_file} #{package_name}}
- end
- end
- end
-
- directory package_dir
-
- file package_dir_path => @package_files do
- mkdir_p package_dir rescue nil
- @package_files.each do |fn|
- f = File.join(package_dir_path, fn)
- fdir = File.dirname(f)
- mkdir_p(fdir) if !File.exist?(fdir)
- if File.directory?(fn)
- mkdir_p(f)
- else
- rm_f f
- safe_ln(fn, f)
- end
- end
- end
- self
- end
-
- def package_name
- @version ? "#{@name}-#{@version}" : @name
- end
-
- def package_dir_path
- "#{package_dir}/#{package_name}"
- end
-
- def tgz_file
- "#{package_name}.tgz"
- end
-
- def tar_gz_file
- "#{package_name}.tar.gz"
- end
-
- def tar_bz2_file
- "#{package_name}.tar.bz2"
- end
-
- def zip_file
- "#{package_name}.zip"
- end
- end
-
-end
-
-
diff --git a/tracks/vendor/rake-0.6.2/lib/rake/rake_test_loader.rb b/tracks/vendor/rake-0.6.2/lib/rake/rake_test_loader.rb
deleted file mode 100644
index 8d7dad3c..00000000
--- a/tracks/vendor/rake-0.6.2/lib/rake/rake_test_loader.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/usr/bin/env ruby
-
-# Load the test files from the command line.
-
-ARGV.each { |f| load f unless f =~ /^-/ }
diff --git a/tracks/vendor/rake-0.6.2/lib/rake/rdoctask.rb b/tracks/vendor/rake-0.6.2/lib/rake/rdoctask.rb
deleted file mode 100644
index 20db955f..00000000
--- a/tracks/vendor/rake-0.6.2/lib/rake/rdoctask.rb
+++ /dev/null
@@ -1,128 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'rake'
-require 'rake/tasklib'
-
-module Rake
-
- # Create a documentation task that will generate the RDoc files for
- # a project.
- #
- # The RDocTask will create the following targets:
- #
- # [rdoc]
- # Main task for this RDOC task.
- #
- # [:clobber_rdoc]
- # Delete all the rdoc files. This target is automatically
- # added to the main clobber target.
- #
- # [:rerdoc]
- # Rebuild the rdoc files from scratch, even if they are not out
- # of date.
- #
- # Simple Example:
- #
- # Rake::RDocTask.new do |rd|
- # rd.main = "README.rdoc"
- # rd.rdoc_files.include("README.rdoc", "lib/**/*.rb")
- # end
- #
- # You may wish to give the task a different name, such as if you are
- # generating two sets of documentation. For instance, if you want to have a
- # development set of documentation including private methods:
- #
- # Rake::RDocTask.new(:rdoc_dev) do |rd|
- # rd.main = "README.doc"
- # rd.rdoc_files.include("README.rdoc", "lib/**/*.rb")
- # rd.options << "--all"
- # end
- #
- # The tasks would then be named :rdoc_dev, :clobber_rdoc_dev, and
- # :rerdoc_dev.
- #
- class RDocTask < TaskLib
- # Name of the main, top level task. (default is :rdoc)
- attr_accessor :name
-
- # Name of directory to receive the html output files. (default is "html")
- attr_accessor :rdoc_dir
-
- # Title of RDoc documentation. (default is none)
- attr_accessor :title
-
- # Name of file to be used as the main, top level file of the
- # RDoc. (default is none)
- attr_accessor :main
-
- # Name of template to be used by rdoc. (default is 'html')
- attr_accessor :template
-
- # List of files to be included in the rdoc generation. (default is [])
- attr_accessor :rdoc_files
-
- # List of options to be passed rdoc. (default is [])
- attr_accessor :options
-
- # Create an RDoc task named rdoc. Default task name is +rdoc+.
- def initialize(name=:rdoc) # :yield: self
- @name = name
- @rdoc_files = Rake::FileList.new
- @rdoc_dir = 'html'
- @main = nil
- @title = nil
- @template = 'html'
- @options = []
- yield self if block_given?
- define
- end
-
- # Create the tasks defined by this task lib.
- def define
- if name.to_s != "rdoc"
- desc "Build the RDOC HTML Files"
- end
-
- desc "Build the #{name} HTML Files"
- task name
-
- desc "Force a rebuild of the RDOC files"
- task paste("re", name) => [paste("clobber_", name), name]
-
- desc "Remove rdoc products"
- task paste("clobber_", name) do
- rm_r rdoc_dir rescue nil
- end
-
- task :clobber => [paste("clobber_", name)]
-
- directory @rdoc_dir
- task name => [rdoc_target]
- file rdoc_target => @rdoc_files + [$rakefile] do
- rm_r @rdoc_dir rescue nil
- opts = option_list.join(' ')
- sh %{rdoc -o #{@rdoc_dir} #{opts} #{@rdoc_files}}
- end
- self
- end
-
- def option_list
- result = @options.dup
- result << "--main" << "'#{main}'" if main
- result << "--title" << "'#{title}'" if title
- result << "-T" << "'#{template}'" if template
- result
- end
-
- def option_string
- option_list.join(' ')
- end
-
- private
-
- def rdoc_target
- "#{rdoc_dir}/index.html"
- end
-
- end
-end
diff --git a/tracks/vendor/rake-0.6.2/lib/rake/ruby182_test_unit_fix.rb b/tracks/vendor/rake-0.6.2/lib/rake/ruby182_test_unit_fix.rb
deleted file mode 100644
index cb558e8f..00000000
--- a/tracks/vendor/rake-0.6.2/lib/rake/ruby182_test_unit_fix.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-module Test
- module Unit
- module Collector
- class Dir
- undef collect_file
- def collect_file(name, suites, already_gathered)
- # loadpath = $:.dup
- dir = File.dirname(File.expand_path(name))
- $:.unshift(dir) unless $:.first == dir
- if(@req)
- @req.require(name)
- else
- require(name)
- end
- find_test_cases(already_gathered).each{|t| add_suite(suites, t.suite)}
- ensure
- # $:.replace(loadpath)
- $:.delete_at $:.rindex(dir)
- end
- end
- end
- end
-end
diff --git a/tracks/vendor/rake-0.6.2/lib/rake/runtest.rb b/tracks/vendor/rake-0.6.2/lib/rake/runtest.rb
deleted file mode 100644
index f87cacd7..00000000
--- a/tracks/vendor/rake-0.6.2/lib/rake/runtest.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'test/unit'
-require 'test/unit/assertions'
-
-module Rake
- include Test::Unit::Assertions
-
- def run_tests(pattern='test/test*.rb', log_enabled=false)
- Dir["#{pattern}"].each { |fn|
- puts fn if log_enabled
- begin
- load fn
- rescue Exception => ex
- puts "Error in #{fn}: #{ex.message}"
- puts ex.backtrace
- assert false
- end
- }
- end
-
- extend self
-end
diff --git a/tracks/vendor/rake-0.6.2/lib/rake/tasklib.rb b/tracks/vendor/rake-0.6.2/lib/rake/tasklib.rb
deleted file mode 100644
index 465a58a0..00000000
--- a/tracks/vendor/rake-0.6.2/lib/rake/tasklib.rb
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'rake'
-
-module Rake
-
- # Base class for Task Libraries.
- class TaskLib
-
- include Cloneable
-
- # Make a symbol by pasting two strings together.
- def paste(a,b)
- (a.to_s + b.to_s).intern
- end
- end
-
-end
diff --git a/tracks/vendor/rake-0.6.2/lib/rake/testtask.rb b/tracks/vendor/rake-0.6.2/lib/rake/testtask.rb
deleted file mode 100644
index a1d356b9..00000000
--- a/tracks/vendor/rake-0.6.2/lib/rake/testtask.rb
+++ /dev/null
@@ -1,162 +0,0 @@
-#!/usr/bin/env ruby
-
-# Define a task library for running unit tests.
-
-require 'rake'
-require 'rake/tasklib'
-
-module Rake
-
- # Create a task that runs a set of tests.
- #
- # Example:
- #
- # Rake::TestTask.new do |t|
- # t.libs << "test"
- # t.test_files = FileList['test/test*.rb']
- # t.verbose = true
- # end
- #
- # If rake is invoked with a "TEST=filename" command line option,
- # then the list of test files will be overridden to include only the
- # filename specified on the command line. This provides an easy way
- # to run just one test.
- #
- # If rake is invoked with a "TESTOPTS=options" command line option,
- # then the given options are passed to the test process after a
- # '--'. This allows Test::Unit options to be passed to the test
- # suite.
- #
- # Examples:
- #
- # rake test # run tests normally
- # rake test TEST=just_one_file.rb # run just one test file.
- # rake test TESTOPTS="-v" # run in verbose mode
- # rake test TESTOPTS="--runner=fox" # use the fox test runner
- #
- class TestTask < TaskLib
-
- # Name of test task. (default is :test)
- attr_accessor :name
-
- # List of directories to added to $LOAD_PATH before running the
- # tests. (default is 'lib')
- attr_accessor :libs
-
- # True if verbose test output desired. (default is false)
- attr_accessor :verbose
-
- # Test options passed to the test suite. An explicit
- # TESTOPTS=opts on the command line will override this. (default
- # is NONE)
- attr_accessor :options
-
- # Request that the tests be run with the warning flag set.
- # E.g. warning=true implies "ruby -w" used to run the tests.
- attr_accessor :warning
-
- # Glob pattern to match test files. (default is 'test/test*.rb')
- attr_accessor :pattern
-
- # Style of test loader to use. Options are:
- #
- # * :rake -- Rake provided test loading script (default).
- # * :testrb -- Ruby provided test loading script.
- # * :direct -- Load tests using command line loader.
- #
- attr_accessor :loader
-
- # Array of commandline options to pass to ruby when running test loader.
- attr_accessor :ruby_opts
-
- # Explicitly define the list of test files to be included in a
- # test. +list+ is expected to be an array of file names (a
- # FileList is acceptable). If both +pattern+ and +test_files+ are
- # used, then the list of test files is the union of the two.
- def test_files=(list)
- @test_files = list
- end
-
- # Create a testing task.
- def initialize(name=:test)
- @name = name
- @libs = ["lib"]
- @pattern = nil
- @options = nil
- @test_files = nil
- @verbose = false
- @warning = false
- @loader = :rake
- @ruby_opts = []
- yield self if block_given?
- @pattern = 'test/test*.rb' if @pattern.nil? && @test_files.nil?
- define
- end
-
- # Create the tasks defined by this task lib.
- def define
- lib_path = @libs.join(File::PATH_SEPARATOR)
- desc "Run tests" + (@name==:test ? "" : " for #{@name}")
- task @name do
- run_code = ''
- RakeFileUtils.verbose(@verbose) do
- run_code =
- case @loader
- when :direct
- "-e 'ARGV.each{|f| load f}'"
- when :testrb
- "-S testrb #{fix}"
- when :rake
- rake_loader
- end
- @ruby_opts.unshift( "-I#{lib_path}" )
- @ruby_opts.unshift( "-w" ) if @warning
- ruby @ruby_opts.join(" ") +
- " \"#{run_code}\" " +
- file_list.collect { |fn| "\"#{fn}\"" }.join(' ') +
- " #{option_list}"
- end
- end
- self
- end
-
- def option_list # :nodoc:
- ENV['TESTOPTS'] || @options || ""
- end
-
- def file_list # :nodoc:
- if ENV['TEST']
- FileList[ ENV['TEST'] ]
- else
- result = []
- result += @test_files.to_a if @test_files
- result += FileList[ @pattern ].to_a if @pattern
- FileList[result]
- end
- end
-
- def fix # :nodoc:
- case RUBY_VERSION
- when '1.8.2'
- find_file 'rake/ruby182_test_unit_fix'
- else
- nil
- end || ''
- end
-
- def rake_loader # :nodoc:
- find_file('rake/rake_test_loader') or
- fail "unable to find rake test loader"
- end
-
- def find_file(fn) # :nodoc:
- $LOAD_PATH.each do |path|
- file_path = File.join(path, "#{fn}.rb")
- return file_path if File.exist? file_path
- end
- nil
- end
-
- end
-end
-
diff --git a/tracks/vendor/rake-0.6.2/test/contrib/testsys.rb b/tracks/vendor/rake-0.6.2/test/contrib/testsys.rb
deleted file mode 100644
index 37a5dc9f..00000000
--- a/tracks/vendor/rake-0.6.2/test/contrib/testsys.rb
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'test/unit'
-require 'test/filecreation'
-require 'rake/contrib/sys'
-
-class TestSys < Test::Unit::TestCase
- include FileCreation
-
-# def test_delete
-# create_file("testdata/a")
-# Sys.delete_all("testdata/a")
-# assert ! File.exist?("testdata/a")
-# end
-
-# def test_copy
-# create_file("testdata/a")
-# Sys.copy("testdata/a", "testdata/b")
-# assert File.exist?("testdata/b")
-# end
-
-# def test_for_files
-# test_files = ["testdata/a.pl", "testdata/c.pl", "testdata/b.rb"]
-# test_files.each { |fn| create_file(fn) }
-# list = []
-# Sys.for_files("testdata/*.pl", "testdata/*.rb") { |fn|
-# list << fn
-# }
-# assert_equal test_files.sort, list.sort
-# end
-
-# def test_indir
-# here = Dir.pwd
-# Sys.makedirs("testdata/dir")
-# assert_equal "#{here}/testdata/dir", Sys.indir("testdata/dir") { Dir.pwd }
-# assert_equal here, Dir.pwd
-# end
-
- def test_split_all
- assert_equal ['a'], Sys.split_all('a')
- assert_equal ['..'], Sys.split_all('..')
- assert_equal ['/'], Sys.split_all('/')
- assert_equal ['a', 'b'], Sys.split_all('a/b')
- assert_equal ['/', 'a', 'b'], Sys.split_all('/a/b')
- assert_equal ['..', 'a', 'b'], Sys.split_all('../a/b')
- end
-end
diff --git a/tracks/vendor/rake-0.6.2/test/data/chains/Rakefile b/tracks/vendor/rake-0.6.2/test/data/chains/Rakefile
deleted file mode 100644
index 31bdc257..00000000
--- a/tracks/vendor/rake-0.6.2/test/data/chains/Rakefile
+++ /dev/null
@@ -1,15 +0,0 @@
-# -*- ruby -*-
-
-task :default => "play.app"
-
-file "play.scpt" => "base" do |t|
- cp t.prerequisites.first, t.name
-end
-
-rule ".app" => ".scpt" do |t|
- cp t.source, t.name
-end
-
-file 'base' do
- touch 'base'
-end
diff --git a/tracks/vendor/rake-0.6.2/test/data/default/Rakefile b/tracks/vendor/rake-0.6.2/test/data/default/Rakefile
deleted file mode 100644
index 22ed5e0c..00000000
--- a/tracks/vendor/rake-0.6.2/test/data/default/Rakefile
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/usr/bin/env ruby
-
-if ENV['TESTTOPSCOPE']
- puts "TOPSCOPE"
-end
-
-task :default do
- puts "DEFAULT"
-end
-
-task :other => [:default] do
- puts "OTHER"
-end
-
-task :task_scope do
- if ENV['TESTTASKSCOPE']
- puts "TASKSCOPE"
- end
-end
diff --git a/tracks/vendor/rake-0.6.2/test/data/dryrun/Rakefile b/tracks/vendor/rake-0.6.2/test/data/dryrun/Rakefile
deleted file mode 100644
index 0a68a0d6..00000000
--- a/tracks/vendor/rake-0.6.2/test/data/dryrun/Rakefile
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-
-task :default => ["temp_main"]
-
-file "temp_main" => [:all_apps] do touch "temp_main" end
-
-task :all_apps => [:one, :two]
-task :one => ["temp_one"]
-task :two => ["temp_two"]
-
-file "temp_one" do |t|
- touch "temp_one"
-end
-file "temp_two" do |t|
- touch "temp_two"
-end
-
-task :clean do
- ["temp_one", "temp_two", "temp_main"].each do |file|
- rm_f file
- end
-end
diff --git a/tracks/vendor/rake-0.6.2/test/data/file_creation_task/Rakefile b/tracks/vendor/rake-0.6.2/test/data/file_creation_task/Rakefile
deleted file mode 100644
index 9cee521a..00000000
--- a/tracks/vendor/rake-0.6.2/test/data/file_creation_task/Rakefile
+++ /dev/null
@@ -1,30 +0,0 @@
-N = 2
-
-task :default => :run
-
-BUILD_DIR = 'build'
-task :clean do
- rm_rf 'build'
- rm_rf 'src'
-end
-
-task :run
-
-TARGET_DIR = 'build/copies'
-
-FileList['src/*'].each do |src|
- directory TARGET_DIR
- target = File.join TARGET_DIR, File.basename(src)
- file target => [src, TARGET_DIR] do
- cp src, target
- sleep 3 if src !~ /foo#{N-1}$/
- end
- task :run => target
-end
-
-task :prep => :clean do
- mkdir_p 'src'
- N.times do |n|
- touch "src/foo#{n}"
- end
-end
diff --git a/tracks/vendor/rake-0.6.2/test/data/imports/Rakefile b/tracks/vendor/rake-0.6.2/test/data/imports/Rakefile
deleted file mode 100644
index 6a60f612..00000000
--- a/tracks/vendor/rake-0.6.2/test/data/imports/Rakefile
+++ /dev/null
@@ -1,19 +0,0 @@
-# -*- ruby -*-
-
-require 'rake/loaders/makefile'
-
-task :default
-
-task :other do
- puts "OTHER"
-end
-
-file "dynamic_deps" do |t|
- open(t.name, "w") do |f| f.puts "puts 'DYNAMIC'" end
-end
-
-import "dynamic_deps"
-import "static_deps"
-import "static_deps"
-import "deps.mf"
-puts "FIRST"
diff --git a/tracks/vendor/rake-0.6.2/test/data/imports/deps.mf b/tracks/vendor/rake-0.6.2/test/data/imports/deps.mf
deleted file mode 100644
index 04643d0d..00000000
--- a/tracks/vendor/rake-0.6.2/test/data/imports/deps.mf
+++ /dev/null
@@ -1 +0,0 @@
-default: other
diff --git a/tracks/vendor/rake-0.6.2/test/data/multidesc/Rakefile b/tracks/vendor/rake-0.6.2/test/data/multidesc/Rakefile
deleted file mode 100644
index 06b72a29..00000000
--- a/tracks/vendor/rake-0.6.2/test/data/multidesc/Rakefile
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env ruby
-
-task :b
-
-desc "A"
-task :a
-
-desc "B"
-task :b
-
-desc "A2"
-task :a
-
-task :c
diff --git a/tracks/vendor/rake-0.6.2/test/data/rbext/rakefile.rb b/tracks/vendor/rake-0.6.2/test/data/rbext/rakefile.rb
deleted file mode 100644
index 670604d7..00000000
--- a/tracks/vendor/rake-0.6.2/test/data/rbext/rakefile.rb
+++ /dev/null
@@ -1,3 +0,0 @@
-task :default do
- puts "OK"
-end
diff --git a/tracks/vendor/rake-0.6.2/test/data/sample.mf b/tracks/vendor/rake-0.6.2/test/data/sample.mf
deleted file mode 100644
index 75bfedce..00000000
--- a/tracks/vendor/rake-0.6.2/test/data/sample.mf
+++ /dev/null
@@ -1,9 +0,0 @@
-# Comments
-a: a1 a2 a3 a4
-b: b1 b2 b3 \
- b4 b5 b6\
-# Mid: Comment
-b7
-a: a5 a6 a7
-c: c1
-d: d1 d2 \
diff --git a/tracks/vendor/rake-0.6.2/test/filecreation.rb b/tracks/vendor/rake-0.6.2/test/filecreation.rb
deleted file mode 100644
index 9079898c..00000000
--- a/tracks/vendor/rake-0.6.2/test/filecreation.rb
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'ftools'
-
-module FileCreation
- OLDFILE = "testdata/old"
- NEWFILE = "testdata/new"
-
- def create_timed_files(oldfile, *newfiles)
- return if File.exist?(oldfile) && newfiles.all? { |newfile| File.exist?(newfile) }
- old_time = create_file(oldfile)
- newfiles.each do |newfile|
- while create_file(newfile) <= old_time
- sleep(0.1)
- File.delete(newfile) rescue nil
- end
- end
- end
-
- def create_dir(dirname)
- FileUtils.mkdir_p(dirname) unless File.exist?(dirname)
- File.stat(dirname).mtime
- end
-
- def create_file(name)
- create_dir(File.dirname(name))
- FileUtils.touch(name) unless File.exist?(name)
- File.stat(name).mtime
- end
-
- def delete_file(name)
- File.delete(name) rescue nil
- end
-end
-
diff --git a/tracks/vendor/rake-0.6.2/test/functional.rb b/tracks/vendor/rake-0.6.2/test/functional.rb
deleted file mode 100644
index 541c4597..00000000
--- a/tracks/vendor/rake-0.6.2/test/functional.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env ruby
-
-begin
- require 'rubygems'
- require_gem 'session'
-rescue LoadError
- puts "UNABLE TO RUN FUNCTIONAL TESTS"
- puts "No Session Found"
-end
-
-if defined?(Session)
- require 'test/session_functional'
-end
diff --git a/tracks/vendor/rake-0.6.2/test/session_functional.rb b/tracks/vendor/rake-0.6.2/test/session_functional.rb
deleted file mode 100644
index b1e616ee..00000000
--- a/tracks/vendor/rake-0.6.2/test/session_functional.rb
+++ /dev/null
@@ -1,159 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'test/unit'
-require 'fileutils'
-
-# Version 2.1.9 of session has a bug where the @debug instance
-# variable is not initialized, causing warning messages. This snippet
-# of code fixes that problem.
-module Session
- class AbstractSession
- alias old_initialize initialize
- def initialize(*args)
- @debug = nil
- old_initialize(*args)
- end
- end
-end
-
-class FunctionalTest < Test::Unit::TestCase
- def setup
- @rake_path = File.expand_path("bin/rake")
- lib_path = File.expand_path("lib")
- @ruby_options = "-I#{lib_path} -I."
- @verbose = ! ENV['VERBOSE'].nil?
- if @verbose
- puts
- puts
- puts "--------------------------------------------------------------------"
- puts name
- puts "--------------------------------------------------------------------"
- end
- end
-
- def test_rake_default
- Dir.chdir("test/data/default") do rake end
- assert_match(/^DEFAULT$/, @out)
- assert_status
- end
-
- def test_rake_error_on_bad_task
- Dir.chdir("test/data/default") do rake "xyz" end
- assert_match(/rake aborted/, @out)
- assert_status(1)
- end
-
- def test_env_availabe_at_top_scope
- Dir.chdir("test/data/default") do rake "TESTTOPSCOPE=1" end
- assert_match(/^TOPSCOPE$/, @out)
- assert_status
- end
-
- def test_env_availabe_at_task_scope
- Dir.chdir("test/data/default") do rake "TESTTASKSCOPE=1 task_scope" end
- assert_match(/^TASKSCOPE$/, @out)
- assert_status
- end
-
- def test_multi_desc
- Dir.chdir("test/data/multidesc") do rake "-T" end
- assert_match %r{^rake a *# A / A2 *$}, @out
- assert_match %r{^rake b *# B *$}, @out
- assert_no_match %r{^rake c}, @out
- end
-
- def test_rbext
- Dir.chdir("test/data/rbext") do rake "-N" end
- assert_match %r{^OK$}, @out
- end
-
- def test_nosearch
- Dir.chdir("test/data/nosearch") do rake "-N" end
- assert_match %r{^No Rakefile found}, @out
- end
-
- def test_dry_run
- Dir.chdir("test/data/default") do rake "-n", "other" end
- assert_match %r{Execute \(dry run\) default}, @out
- assert_match %r{Execute \(dry run\) other}, @out
- assert_no_match %r{DEFAULT}, @out
- assert_no_match %r{OTHER}, @out
- end
-
- # Test for the trace/dry_run bug found by Brian Chandler
- def test_dry_run_bug
- Dir.chdir("test/data/dryrun") do rake end
- FileUtils.rm_f "test/data/dryrun/temp_one"
- Dir.chdir("test/data/dryrun") do rake "--dry-run" end
- assert_no_match(/No such file/, @out)
- assert_status
- end
-
- # Test for the trace/dry_run bug found by Brian Chandler
- def test_trace_bug
- Dir.chdir("test/data/dryrun") do rake end
- FileUtils.rm_f "test/data/dryrun/temp_one"
- Dir.chdir("test/data/dryrun") do rake "--trace" end
- assert_no_match(/No such file/, @out)
- assert_status
- end
-
- def test_imports
- open("test/data/imports/static_deps", "w") do |f|
- f.puts 'puts "STATIC"'
- end
- FileUtils.rm_f "test/data/imports/dynamic_deps"
- Dir.chdir("test/data/imports") do rake end
- assert File.exist?("test/data/imports/dynamic_deps"),
- "'dynamic_deps' file should exist"
- assert_match(/^FIRST$\s+^DYNAMIC$\s+^STATIC$\s+^OTHER$/, @out)
- assert_status
- FileUtils.rm_f "test/data/imports/dynamic_deps"
- FileUtils.rm_f "test/data/imports/static_deps"
- end
-
- def test_rules_chaining_to_file_task
- remove_chaining_files
- Dir.chdir("test/data/chains") do rake end
- assert File.exist?("test/data/chains/play.app"),
- "'play.app' file should exist"
- assert_status
- remove_chaining_files
- end
-
- def test_file_creation_task
- Dir.chdir("test/data/file_creation_task") do
- rake "prep"
- rake "run"
- rake "run"
- assert(@err !~ /^cp src/, "Should not recopy data")
- end
- end
-
- private
-
- def remove_chaining_files
- %w(play.scpt play.app base).each do |fn|
- FileUtils.rm_f File.join("test/data/chains", fn)
- end
- end
-
- def rake(*option_list)
- options = option_list.join(' ')
- shell = Session::Shell.new
- command = "ruby #{@ruby_options} #{@rake_path} #{options}"
- puts "COMMAND: [#{command}]" if @verbose
- @out, @err = shell.execute command
- @status = shell.exit_status
- puts "STATUS: [#{@status}]" if @verbose
- puts "OUTPUT: [#{@out}]" if @verbose
- puts "ERROR: [#{@err}]" if @verbose
- puts "PWD: [#{Dir.pwd}]" if @verbose
- shell.close
- end
-
- def assert_status(expected_status=0)
- assert_equal expected_status, @status
- end
-
-end
diff --git a/tracks/vendor/rake-0.6.2/test/shellcommand.rb b/tracks/vendor/rake-0.6.2/test/shellcommand.rb
deleted file mode 100644
index 58db8a08..00000000
--- a/tracks/vendor/rake-0.6.2/test/shellcommand.rb
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env ruby
-
-exit((ARGV[0] || "0").to_i)
diff --git a/tracks/vendor/rake-0.6.2/test/test_clean.rb b/tracks/vendor/rake-0.6.2/test/test_clean.rb
deleted file mode 100644
index da04ad14..00000000
--- a/tracks/vendor/rake-0.6.2/test/test_clean.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'test/unit'
-require 'rake/clean'
-
-class TestClean < Test::Unit::TestCase
- include Rake
- def test_clean
- assert Task['clean'], "Should define clean"
- assert Task['clobber'], "Should define clobber"
- assert Task['clobber'].prerequisites.include?("clean"),
- "Clobber should require clean"
- end
-end
diff --git a/tracks/vendor/rake-0.6.2/test/test_definitions.rb b/tracks/vendor/rake-0.6.2/test/test_definitions.rb
deleted file mode 100644
index fe6d42c2..00000000
--- a/tracks/vendor/rake-0.6.2/test/test_definitions.rb
+++ /dev/null
@@ -1,82 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'test/unit'
-require 'fileutils'
-require 'rake'
-require 'test/filecreation'
-
-######################################################################
-class TestDefinitions < Test::Unit::TestCase
- include Rake
- EXISTINGFILE = "testdata/existing"
-
- def setup
- Task.clear
- end
-
- def test_task
- done = false
- task :one => [:two] do done = true end
- task :two
- task :three => [:one, :two]
- check_tasks(:one, :two, :three)
- assert done, "Should be done"
- end
-
- def test_file_task
- done = false
- file "testdata/one" => "testdata/two" do done = true end
- file "testdata/two"
- file "testdata/three" => ["testdata/one", "testdata/two"]
- check_tasks("testdata/one", "testdata/two", "testdata/three")
- assert done, "Should be done"
- end
-
- def check_tasks(n1, n2, n3)
- t = Task[n1]
- assert Task === t, "Should be a Task"
- assert_equal n1.to_s, t.name
- assert_equal [n2.to_s], t.prerequisites.collect{|n| n.to_s}
- t.invoke
- t2 = Task[n2]
- assert_equal FileList[], t2.prerequisites
- t3 = Task[n3]
- assert_equal [n1.to_s, n2.to_s], t3.prerequisites.collect{|n|n.to_s}
- end
-
- def test_incremental_definitions
- runs = []
- task :t1 => [:t2] do runs << "A"; 4321 end
- task :t1 => [:t3] do runs << "B"; 1234 end
- task :t1 => [:t3]
- task :t2
- task :t3
- Task[:t1].invoke
- assert_equal ["A", "B"], runs
- assert_equal ["t2", "t3"], Task[:t1].prerequisites
- end
-
- def test_missing_dependencies
- task :x => ["testdata/missing"]
- assert_raises(RuntimeError) { Task[:x].invoke }
- end
-
- def test_implicit_file_dependencies
- runs = []
- create_existing_file
- task :y => [EXISTINGFILE] do |t| runs << t.name end
- Task[:y].invoke
- assert_equal runs, ['y']
- end
-
- private # ----------------------------------------------------------
-
- def create_existing_file
- Dir.mkdir File.dirname(EXISTINGFILE) unless
- File.exist?(File.dirname(EXISTINGFILE))
- open(EXISTINGFILE, "w") do |f| f.puts "HI" end unless
- File.exist?(EXISTINGFILE)
- end
-
-end
-
diff --git a/tracks/vendor/rake-0.6.2/test/test_earlytime.rb b/tracks/vendor/rake-0.6.2/test/test_earlytime.rb
deleted file mode 100644
index 897fb260..00000000
--- a/tracks/vendor/rake-0.6.2/test/test_earlytime.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'test/unit'
-require 'rake'
-
-class TestEarlyTime < Test::Unit::TestCase
- def test_create
- early = Rake::EarlyTime.instance
- time = Time.mktime(1920, 1, 1, 0, 0, 0)
- assert early <= Time.now
- assert early < Time.now
- assert early != Time.now
- assert Time.now > early
- assert Time.now >= early
- assert Time.now != early
- end
-
- def test_equality
- early = Rake::EarlyTime.instance
- assert_equal early, early, "two early times should be equal"
- end
-
- def test_original_time_compare_is_not_messed_up
- t1 = Time.mktime(1920, 1, 1, 0, 0, 0)
- t2 = Time.now
- assert t1 < t2
- assert t2 > t1
- assert t1 == t1
- assert t2 == t2
- end
-end
diff --git a/tracks/vendor/rake-0.6.2/test/test_file_creation_task.rb b/tracks/vendor/rake-0.6.2/test/test_file_creation_task.rb
deleted file mode 100644
index d6b0b208..00000000
--- a/tracks/vendor/rake-0.6.2/test/test_file_creation_task.rb
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'test/unit'
-require 'fileutils'
-require 'rake'
-require 'test/filecreation'
-
-######################################################################
-class TestFileCreationTask < Test::Unit::TestCase
- include Rake
- include FileCreation
-
- DUMMY_DIR = 'testdata/dummy_dir'
-
- def setup
- Task.clear
- end
-
- def teardown
- FileUtils.rm_rf DUMMY_DIR
- end
-
- def test_file_needed
- create_dir DUMMY_DIR
- fc_task = Task[DUMMY_DIR]
- assert_equal DUMMY_DIR, fc_task.name
- FileUtils.rm_rf fc_task.name
- assert fc_task.needed?, "file should be needed"
- FileUtils.mkdir fc_task.name
- assert_equal nil, fc_task.prerequisites.collect{|n| Task[n].timestamp}.max
- assert ! fc_task.needed?, "file should not be needed"
- end
-
- def test_directory
- directory DUMMY_DIR
- fc_task = Task[DUMMY_DIR]
- assert_equal DUMMY_DIR, fc_task.name
- assert FileCreationTask === fc_task
- end
-
- def test_no_retriggers_on_filecreate_task
- create_timed_files(OLDFILE, NEWFILE)
- t1 = FileCreationTask.lookup(OLDFILE).enhance([NEWFILE])
- t2 = FileCreationTask.lookup(NEWFILE)
- assert ! t2.needed?, "Should not need to build new file"
- assert ! t1.needed?, "Should not need to rebuild old file because of new"
- end
-
- def test_no_retriggers_on_file_task
- create_timed_files(OLDFILE, NEWFILE)
- t1 = FileTask.lookup(OLDFILE).enhance([NEWFILE])
- t2 = FileCreationTask.lookup(NEWFILE)
- assert ! t2.needed?, "Should not need to build new file"
- assert ! t1.needed?, "Should not need to rebuild old file because of new"
- end
-end
diff --git a/tracks/vendor/rake-0.6.2/test/test_file_task.rb b/tracks/vendor/rake-0.6.2/test/test_file_task.rb
deleted file mode 100644
index 890de67b..00000000
--- a/tracks/vendor/rake-0.6.2/test/test_file_task.rb
+++ /dev/null
@@ -1,140 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'test/unit'
-require 'fileutils'
-require 'rake'
-require 'test/filecreation'
-
-######################################################################
-class TestFileTask < Test::Unit::TestCase
- include Rake
- include FileCreation
-
- def setup
- Task.clear
- @runs = Array.new
- FileUtils.rm_f NEWFILE
- FileUtils.rm_f OLDFILE
- end
-
- def test_file_need
- name = "testdata/dummy"
- file name
- ftask = Task[name]
- assert_equal name.to_s, ftask.name
- File.delete(ftask.name) rescue nil
- assert ftask.needed?, "file should be needed"
- open(ftask.name, "w") { |f| f.puts "HI" }
- assert_equal nil, ftask.prerequisites.collect{|n| Task[n].timestamp}.max
- assert ! ftask.needed?, "file should not be needed"
- File.delete(ftask.name) rescue nil
- end
-
- def test_file_times_new_depends_on_old
- create_timed_files(OLDFILE, NEWFILE)
-
- t1 = FileTask.lookup(NEWFILE).enhance([OLDFILE])
- t2 = FileTask.lookup(OLDFILE)
- assert ! t2.needed?, "Should not need to build old file"
- assert ! t1.needed?, "Should not need to rebuild new file because of old"
- end
-
- def test_file_times_old_depends_on_new
- create_timed_files(OLDFILE, NEWFILE)
-
- t1 = FileTask.lookup(OLDFILE).enhance([NEWFILE])
- t2 = FileTask.lookup(NEWFILE)
- assert ! t2.needed?, "Should not need to build new file"
- preq_stamp = t1.prerequisites.collect{|t| Task[t].timestamp}.max
- assert_equal t2.timestamp, preq_stamp
- assert t1.timestamp < preq_stamp, "T1 should be older"
- assert t1.needed?, "Should need to rebuild old file because of new"
- end
-
- def test_file_depends_on_task_depend_on_file
- create_timed_files(OLDFILE, NEWFILE)
-
- file NEWFILE => [:obj] do |t| @runs << t.name end
- task :obj => [OLDFILE] do |t| @runs << t.name end
- file OLDFILE do |t| @runs << t.name end
-
- Task[:obj].invoke
- Task[NEWFILE].invoke
- assert ! @runs.include?(NEWFILE)
- end
-
- def test_existing_file_depends_on_non_existing_file
- create_file(OLDFILE)
- delete_file(NEWFILE)
- file NEWFILE
- file OLDFILE => NEWFILE
- assert_nothing_raised do Task[OLDFILE].invoke end
- end
-
- # I have currently disabled this test. I'm not convinced that
- # deleting the file target on failure is always the proper thing to
- # do. I'm willing to hear input on this topic.
- def ztest_file_deletes_on_failure
- task :obj
- file NEWFILE => [:obj] do |t|
- FileUtils.touch NEWFILE
- fail "Ooops"
- end
- assert Task[NEWFILE]
- begin
- Task[NEWFILE].invoke
- rescue Exception
- end
- assert( ! File.exist?(NEWFILE), "NEWFILE should be deleted")
- end
-
-end
-
-######################################################################
-class TestDirectoryTask < Test::Unit::TestCase
- include Rake
-
- def setup
- rm_rf "testdata", :verbose=>false
- end
-
- def teardown
- rm_rf "testdata", :verbose=>false
- end
-
- def test_directory
- desc "DESC"
- directory "testdata/a/b/c"
- assert_equal FileCreationTask, Task["testdata"].class
- assert_equal FileCreationTask, Task["testdata/a"].class
- assert_equal FileCreationTask, Task["testdata/a/b/c"].class
- assert_nil Task["testdata"].comment
- assert_equal "DESC", Task["testdata/a/b/c"].comment
- assert_nil Task["testdata/a/b"].comment
- verbose(false) {
- Task['testdata/a/b'].invoke
- }
- assert File.exist?("testdata/a/b")
- assert ! File.exist?("testdata/a/b/c")
- end
-
- def test_directory_win32
- desc "WIN32 DESC"
- FileUtils.mkdir_p("testdata")
- Dir.chdir("testdata") do
- directory 'c:/testdata/a/b/c'
- assert_equal FileCreationTask, Task['c:/testdata'].class
- assert_equal FileCreationTask, Task['c:/testdata/a'].class
- assert_equal FileCreationTask, Task['c:/testdata/a/b/c'].class
- assert_nil Task['c:/testdata'].comment
- assert_equal "WIN32 DESC", Task['c:/testdata/a/b/c'].comment
- assert_nil Task['c:/testdata/a/b'].comment
- verbose(false) {
- Task['c:/testdata/a/b'].invoke
- }
- assert File.exist?('c:/testdata/a/b')
- assert ! File.exist?('c:/testdata/a/b/c')
- end
- end
-end
-
diff --git a/tracks/vendor/rake-0.6.2/test/test_filelist.rb b/tracks/vendor/rake-0.6.2/test/test_filelist.rb
deleted file mode 100644
index 9814f76a..00000000
--- a/tracks/vendor/rake-0.6.2/test/test_filelist.rb
+++ /dev/null
@@ -1,480 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'test/unit'
-require 'rake'
-
-class TestFileList < Test::Unit::TestCase
- FileList = Rake::FileList
-
- def setup
- create_test_data
- end
-
- def teardown
- FileList.select_default_ignore_patterns
- FileUtils.rm_rf("testdata")
- end
-
- def test_create
- fl = FileList.new
- assert_equal 0, fl.size
- end
-
- def test_create_with_args
- fl = FileList.new("testdata/*.c", "x")
- assert_equal ["testdata/abc.c", "testdata/x.c", "testdata/xyz.c", "x"].sort,
- fl.sort
- end
-
- def test_create_with_block
- fl = FileList.new { |f| f.include("x") }
- assert_equal ["x"], fl.resolve
- end
-
- def test_create_with_brackets
- fl = FileList["testdata/*.c", "x"]
- assert_equal ["testdata/abc.c", "testdata/x.c", "testdata/xyz.c", "x"].sort,
- fl.sort
- end
-
- def test_create_with_brackets_and_filelist
- fl = FileList[FileList["testdata/*.c", "x"]]
- assert_equal ["testdata/abc.c", "testdata/x.c", "testdata/xyz.c", "x"].sort,
- fl.sort
- end
-
- def test_include_with_another_array
- fl = FileList.new.include(["x", "y", "z"])
- assert_equal ["x", "y", "z"].sort, fl.sort
- end
-
- def test_include_with_another_filelist
- fl = FileList.new.include(FileList["testdata/*.c", "x"])
- assert_equal ["testdata/abc.c", "testdata/x.c", "testdata/xyz.c", "x"].sort,
- fl.sort
- end
-
- def test_append
- fl = FileList.new
- fl << "a.rb" << "b.rb"
- assert_equal ['a.rb', 'b.rb'], fl
- end
-
- def test_add_many
- fl = FileList.new
- fl.include %w(a d c)
- fl.include('x', 'y')
- assert_equal ['a', 'd', 'c', 'x', 'y'], fl
- assert_equal ['a', 'd', 'c', 'x', 'y'], fl.resolve
- end
-
- def test_add_return
- f = FileList.new
- g = f << "x"
- assert_equal f.object_id, g.object_id
- h = f.include("y")
- assert_equal f.object_id, h.object_id
- end
-
- def test_match
- fl = FileList.new
- fl.include('test/test*.rb')
- assert fl.include?("test/test_filelist.rb")
- assert fl.size > 3
- fl.each { |fn| assert_match(/\.rb$/, fn) }
- end
-
- def test_add_matching
- fl = FileList.new
- fl << "a.java"
- fl.include("test/*.rb")
- assert_equal "a.java", fl[0]
- assert fl.size > 2
- assert fl.include?("test/test_filelist.rb")
- end
-
- def test_multiple_patterns
- create_test_data
- fl = FileList.new
- fl.include('*.c', '*xist*')
- assert_equal [], fl
- fl.include('testdata/*.c', 'testdata/*xist*')
- assert_equal [
- 'testdata/x.c', 'testdata/xyz.c', 'testdata/abc.c', 'testdata/existing'
- ].sort, fl.sort
- end
-
- def test_reject
- fl = FileList.new
- fl.include %w(testdata/x.c testdata/abc.c testdata/xyz.c testdata/existing)
- fl.reject! { |fn| fn =~ %r{/x} }
- assert_equal [
- 'testdata/abc.c', 'testdata/existing'
- ], fl
- end
-
- def test_exclude
- fl = FileList['testdata/x.c', 'testdata/abc.c', 'testdata/xyz.c', 'testdata/existing']
- fl.each { |fn| touch fn, :verbose => false }
- x = fl.exclude(%r{/x.+\.})
- assert_equal FileList, x.class
- assert_equal [
- 'testdata/x.c', 'testdata/abc.c', 'testdata/existing'
- ], fl
- assert_equal fl.object_id, x.object_id
- fl.exclude('testdata/*.c')
- assert_equal ['testdata/existing'], fl
- fl.exclude('testdata/existing')
- assert_equal [], fl
- end
-
- def test_exclude_return_on_create
- fl = FileList['testdata/*'].exclude(/.*\.c$/)
- assert_equal FileList, fl.class
- end
-
- def test_default_exclude
- fl = FileList.new
- fl.clear_exclude
- fl.include("**/*~", "**/*.bak", "**/core")
- assert fl.member?("testdata/core"), "Should include core"
- assert fl.member?("testdata/x.bak"), "Should include .bak files"
- end
-
- def test_unique
- fl = FileList.new
- fl << "x.c" << "a.c" << "b.rb" << "a.c"
- assert_equal ['x.c', 'a.c', 'b.rb', 'a.c'], fl
- fl.uniq!
- assert_equal ['x.c', 'a.c', 'b.rb'], fl
- end
-
- def test_to_string
- fl = FileList.new
- fl << "a.java" << "b.java"
- assert_equal "a.java b.java", fl.to_s
- assert_equal "a.java b.java", "#{fl}"
- end
-
- def test_to_array
- fl = FileList['a.java', 'b.java']
- assert_equal ['a.java', 'b.java'], fl.to_a
- assert_equal Array, fl.to_a.class
- assert_equal ['a.java', 'b.java'], fl.to_ary
- assert_equal Array, fl.to_ary.class
- end
-
- def test_to_s_pending
- fl = FileList['testdata/abc.*']
- assert_equal %{testdata/abc.c}, fl.to_s
- end
-
- def test_inspect_pending
- fl = FileList['testdata/abc.*']
- assert_equal %{["testdata/abc.c"]}, fl.inspect
- end
-
- def test_sub
- fl = FileList["testdata/*.c"]
- f2 = fl.sub(/\.c$/, ".o")
- assert_equal FileList, f2.class
- assert_equal ["testdata/abc.o", "testdata/x.o", "testdata/xyz.o"].sort,
- f2.sort
- f3 = fl.gsub(/\.c$/, ".o")
- assert_equal FileList, f3.class
- assert_equal ["testdata/abc.o", "testdata/x.o", "testdata/xyz.o"].sort,
- f3.sort
- end
-
- def test_sub!
- f = "x/a.c"
- fl = FileList[f, "x/b.c"]
- res = fl.sub!(/\.c$/, ".o")
- assert_equal ["x/a.o", "x/b.o"].sort, fl.sort
- assert_equal "x/a.c", f
- assert_equal fl.object_id, res.object_id
- end
-
- def test_sub_with_block
- fl = FileList["src/org/onestepback/a.java", "src/org/onestepback/b.java"]
-# The block version doesn't work the way I want it to ...
-# f2 = fl.sub(%r{^src/(.*)\.java$}) { |x| "classes/" + $1 + ".class" }
- f2 = fl.sub(%r{^src/(.*)\.java$}, "classes/\\1.class")
- assert_equal [
- "classes/org/onestepback/a.class",
- "classes/org/onestepback/b.class"
- ].sort,
- f2.sort
- end
-
- def test_string_ext
- assert_equal "one.net", "one.two".ext("net")
- assert_equal "one.net", "one.two".ext(".net")
- assert_equal "one.net", "one".ext("net")
- assert_equal "one.net", "one".ext(".net")
- assert_equal "one.two.net", "one.two.c".ext(".net")
- assert_equal "one/two.net", "one/two.c".ext(".net")
- assert_equal "one.x/two.net", "one.x/two.c".ext(".net")
- assert_equal "one.x\\two.net", "one.x\\two.c".ext(".net")
- assert_equal "one.x/two.net", "one.x/two".ext(".net")
- assert_equal "one.x\\two.net", "one.x\\two".ext(".net")
- assert_equal ".onerc.net", ".onerc.dot".ext("net")
- assert_equal ".onerc.net", ".onerc".ext("net")
- assert_equal ".a/.onerc.net", ".a/.onerc".ext("net")
- assert_equal "one", "one.two".ext('')
- assert_equal "one", "one.two".ext
- assert_equal ".one", ".one.two".ext
- assert_equal ".one", ".one".ext
- assert_equal ".", ".".ext("c")
- assert_equal "..", "..".ext("c")
- end
-
- def test_filelist_ext
- assert_equal FileList['one.c', '.one.c'],
- FileList['one.net', '.one'].ext('c')
- end
-
- def test_gsub
- create_test_data
- fl = FileList["testdata/*.c"]
- f2 = fl.gsub(/a/, "A")
- assert_equal ["testdAtA/Abc.c", "testdAtA/x.c", "testdAtA/xyz.c"].sort,
- f2.sort
- end
-
- def test_egrep
- files = FileList['test/test*.rb']
- found = false
- the_line_number = __LINE__ + 1
- files.egrep(/XYZZY/) do |fn, ln, line |
- assert_equal 'test/test_filelist.rb', fn
- assert_equal the_line_number, ln
- assert_match(/files\.egrep/, line)
- found = true
- end
- assert found, "should have foudn a matching line"
- end
-
-
- def test_ignore_special
- f = FileList['testdata/*']
- assert ! f.include?("testdata/CVS"), "Should not contain CVS"
- assert ! f.include?("testdata/.svn"), "Should not contain .svn"
- assert ! f.include?("testdata/.dummy"), "Should not contain dot files"
- assert ! f.include?("testdata/x.bak"), "Should not contain .bak files"
- assert ! f.include?("testdata/x~"), "Should not contain ~ files"
- assert ! f.include?("testdata/core"), "Should not contain core files"
- end
-
- def test_clear_ignore_patterns
- f = FileList['testdata/*', 'testdata/.svn']
- f.clear_exclude
- assert f.include?("testdata/abc.c")
- assert f.include?("testdata/xyz.c")
- assert f.include?("testdata/CVS")
- assert f.include?("testdata/.svn")
- assert f.include?("testdata/x.bak")
- assert f.include?("testdata/x~")
- end
-
- def test_exclude_with_alternate_file_seps
- fl = FileList.new
- assert fl.exclude?("x/CVS/y")
- assert fl.exclude?("x\\CVS\\y")
- assert fl.exclude?("x/.svn/y")
- assert fl.exclude?("x\\.svn\\y")
- assert fl.exclude?("x/core")
- assert fl.exclude?("x\\core")
- end
-
- def test_add_default_exclude_list
- fl = FileList.new
- fl.exclude(/~\d+$/)
- assert fl.exclude?("x/CVS/y")
- assert fl.exclude?("x\\CVS\\y")
- assert fl.exclude?("x/.svn/y")
- assert fl.exclude?("x\\.svn\\y")
- assert fl.exclude?("x/core")
- assert fl.exclude?("x\\core")
- assert fl.exclude?("x/abc~1")
- end
-
- def test_basic_array_functions
- f = FileList['b', 'c', 'a']
- assert_equal 'b', f.first
- assert_equal 'b', f[0]
- assert_equal 'a', f.last
- assert_equal 'a', f[2]
- assert_equal 'a', f[-1]
- assert_equal ['a', 'b', 'c'], f.sort
- f.sort!
- assert_equal ['a', 'b', 'c'], f
- end
-
- def test_flatten
- assert_equal ['a', 'testdata/x.c', 'testdata/xyz.c', 'testdata/abc.c'].sort,
- ['a', FileList['testdata/*.c']].flatten.sort
- end
-
- def test_clone
- a = FileList['a', 'b', 'c']
- b = a.clone
- a << 'd'
- assert_equal ['a', 'b', 'c', 'd'], a
- assert_equal ['a', 'b', 'c'], b
- end
-
- def test_array_comparisons
- fl = FileList['b', 'b']
- a = ['b', 'a']
- b = ['b', 'b']
- c = ['b', 'c']
- assert_equal( 1, fl <=> a )
- assert_equal( 0, fl <=> b )
- assert_equal( -1, fl <=> c )
- assert_equal( -1, a <=> fl )
- assert_equal( 0, b <=> fl )
- assert_equal( 1, c <=> fl )
- end
-
- def test_array_equality
- a = FileList['a', 'b']
- b = ['a', 'b']
- assert a == b
- assert b == a
-# assert a.eql?(b)
-# assert b.eql?(a)
- assert ! a.equal?(b)
- assert ! b.equal?(a)
- end
-
- def test_enumeration_methods
- a = FileList['a', 'b']
- b = a.collect { |it| it.upcase }
- assert_equal ['A', 'B'], b
- assert_equal FileList, b.class
-
- b = a.map { |it| it.upcase }
- assert_equal ['A', 'B'], b
- assert_equal FileList, b.class
-
- b = a.sort
- assert_equal ['a', 'b'], b
- assert_equal FileList, b.class
-
- b = a.sort_by { |it| it }
- assert_equal ['a', 'b'], b
- assert_equal FileList, b.class
-
- b = a.find_all { |it| it == 'b'}
- assert_equal ['b'], b
- assert_equal FileList, b.class
-
- b = a.select { |it| it.size == 1 }
- assert_equal ['a', 'b'], b
- assert_equal FileList, b.class
-
- b = a.reject { |it| it == 'b' }
- assert_equal ['a'], b
- assert_equal FileList, b.class
-
- b = a.grep(/./)
- assert_equal ['a', 'b'], b
- assert_equal FileList, b.class
-
- b = a.partition { |it| it == 'b' }
- assert_equal [['b'], ['a']], b
- assert_equal Array, b.class
- assert_equal FileList, b[0].class
- assert_equal FileList, b[1].class
-
- b = a.zip(['x', 'y'])
- assert_equal [['a', 'x'], ['b', 'y']], b
- assert_equal Array, b.class
- assert_equal Array, b[0].class
- assert_equal Array, b[1].class
- end
-
- def test_array_operators
- a = ['a', 'b']
- b = ['c', 'd']
- f = FileList['x', 'y']
- g = FileList['w', 'z']
-
- r = f + g
- assert_equal ['x', 'y', 'w', 'z'], r
- assert_equal FileList, r.class
-
- r = a + g
- assert_equal ['a', 'b', 'w', 'z'], r
- assert_equal Array, r.class
-
- r = f + b
- assert_equal ['x', 'y', 'c', 'd'], r
- assert_equal FileList, r.class
-
- r = FileList['w', 'x', 'y', 'z'] - f
- assert_equal ['w', 'z'], r
- assert_equal FileList, r.class
-
- r = FileList['w', 'x', 'y', 'z'] & f
- assert_equal ['x', 'y'], r
- assert_equal FileList, r.class
-
- r = f * 2
- assert_equal ['x', 'y', 'x', 'y'], r
- assert_equal FileList, r.class
-
- r = f * ','
- assert_equal 'x,y', r
- assert_equal String, r.class
-
- r = f | ['a', 'x']
- assert_equal ['a', 'x', 'y'].sort, r.sort
- assert_equal FileList, r.class
- end
-
- def test_other_array_returning_methods
- f = FileList['a', nil, 'b']
- r = f.compact
- assert_equal ['a', 'b'], r
- assert_equal FileList, r.class
-
- f = FileList['a', 'b']
- r = f.concat(['x', 'y'])
- assert_equal ['a', 'b', 'x', 'y'], r
- assert_equal FileList, r.class
-
- f = FileList['a', ['b', 'c'], FileList['d', 'e']]
- r = f.flatten
- assert_equal ['a', 'b', 'c', 'd', 'e'], r
- assert_equal FileList, r.class
-
- f = FileList['a', 'b', 'a']
- r = f.uniq
- assert_equal ['a', 'b'], r
- assert_equal FileList, r.class
-
- f = FileList['a', 'b', 'c', 'd']
- r = f.values_at(1,3)
- assert_equal ['b', 'd'], r
- assert_equal FileList, r.class
- end
-
- def create_test_data
- verbose(false) do
- mkdir "testdata" unless File.exist? "testdata"
- mkdir "testdata/CVS" rescue nil
- mkdir "testdata/.svn" rescue nil
- touch "testdata/.dummy"
- touch "testdata/x.bak"
- touch "testdata/x~"
- touch "testdata/core"
- touch "testdata/x.c"
- touch "testdata/xyz.c"
- touch "testdata/abc.c"
- touch "testdata/existing"
- end
- end
-
-end
diff --git a/tracks/vendor/rake-0.6.2/test/test_fileutils.rb b/tracks/vendor/rake-0.6.2/test/test_fileutils.rb
deleted file mode 100644
index 794c6f17..00000000
--- a/tracks/vendor/rake-0.6.2/test/test_fileutils.rb
+++ /dev/null
@@ -1,125 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'rake'
-require 'test/unit'
-require 'test/filecreation'
-require 'fileutils'
-
-class TestFileUtils < Test::Unit::TestCase
- include FileCreation
-
- def setup
- File.chmod(0750,"test/shellcommand.rb")
- end
-
- def teardown
- FileUtils.rm_rf("testdata")
- end
-
- def test_rm_one_file
- create_file("testdata/a")
- FileUtils.rm_rf "testdata/a"
- assert ! File.exist?("testdata/a")
- end
-
- def test_rm_two_files
- create_file("testdata/a")
- create_file("testdata/b")
- FileUtils.rm_rf ["testdata/a", "testdata/b"]
- assert ! File.exist?("testdata/a")
- assert ! File.exist?("testdata/b")
- end
-
- def test_rm_filelist
- list = Rake::FileList.new << "testdata/a" << "testdata/b"
- list.each { |fn| create_file(fn) }
- FileUtils.rm_r list
- assert ! File.exist?("testdata/a")
- assert ! File.exist?("testdata/b")
- end
-
- def test_verbose
- verbose true
- assert_equal true, verbose
- verbose false
- assert_equal false, verbose
- verbose(true){
- assert_equal true, verbose
- }
- assert_equal false, verbose
- end
-
- def test_nowrite
- nowrite true
- assert_equal true, nowrite
- nowrite false
- assert_equal false, nowrite
- nowrite(true){
- assert_equal true, nowrite
- }
- assert_equal false, nowrite
- end
-
- def test_sh
- verbose(false) { sh %{test/shellcommand.rb} }
- assert true, "should not fail"
- end
-
- def test_sh_multiple_arguments
- ENV['RAKE_TEST_SH'] = 'someval'
- # This one gets expanded by the shell
- verbose(false) { sh %{test $RAKE_TEST_SH = someval} }
- assert true, "should not fail"
- assert_raises(RuntimeError) {
- # This one does not get expanded
- verbose(false) { sh 'test','$RAKE_TEST_SH', '=', 'someval' }
- }
- end
-
- def test_sh_failure
- assert_raises(RuntimeError) {
- verbose(false) { sh %{test/shellcommand.rb 1} }
- }
- end
-
- def test_sh_special_handling
- count = 0
- verbose(false) {
- sh(%{test/shellcommand.rb}) do |ok, res|
- assert(ok)
- assert_equal 0, res.exitstatus
- count += 1
- end
- sh(%{test/shellcommand.rb 1}) do |ok, res|
- assert(!ok)
- assert_equal 1, res.exitstatus
- count += 1
- end
- }
- assert_equal 2, count, "Block count should be 2"
- end
-
- def test_ruby
- verbose(false) do
- ENV['RAKE_TEST_RUBY'] = "123"
- block_run = false
- # This one gets expanded by the shell
- ruby %{-e "exit $RAKE_TEST_RUBY"} do |ok, status|
- assert(!ok)
- assert_equal 123, status.exitstatus
- block_run = true
- end
- assert block_run, "The block must be run"
-
- # This one does not get expanded
- block_run = false
- ruby '-e', 'exit "$RAKE_TEST_RUBY".length' do |ok, status|
- assert(!ok)
- assert_equal 15, status.exitstatus
- block_run = true
- end
- assert block_run, "The block must be run"
- end
- end
-
-end
diff --git a/tracks/vendor/rake-0.6.2/test/test_ftp.rb b/tracks/vendor/rake-0.6.2/test/test_ftp.rb
deleted file mode 100644
index cb25627a..00000000
--- a/tracks/vendor/rake-0.6.2/test/test_ftp.rb
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'date'
-require 'test/unit'
-require 'rake/contrib/ftptools'
-
-class FakeDate
- def self.today
- Date.new(2003,10,3)
- end
-end
-
-
-class TestFtpFile < Test::Unit::TestCase
-
- def setup
- Rake::FtpFile.class_eval { @date_class = FakeDate }
- end
-
- def test_general
- file = Rake::FtpFile.new("here", "-rw-r--r-- 1 a279376 develop 121770 Mar 6 14:50 wiki.pl")
- assert_equal "wiki.pl", file.name
- assert_equal "here/wiki.pl", file.path
- assert_equal "a279376", file.owner
- assert_equal "develop", file.group
- assert_equal 0644, file.mode
- assert_equal 121770, file.size
- assert_equal Time.mktime(2003,3,6,14,50,0,0), file.time
- assert ! file.directory?
- assert ! file.symlink?
- end
-
- def test_far_date
- file = Rake::FtpFile.new(".", "drwxr-xr-x 3 a279376 develop 4096 Nov 26 2001 vss")
- assert_equal Time.mktime(2001,11,26,0,0,0,0), file.time
- end
-
- def test_close_date
- file = Rake::FtpFile.new(".", "drwxr-xr-x 3 a279376 develop 4096 Nov 26 15:35 vss")
- assert_equal Time.mktime(2002,11,26,15,35,0,0), file.time
- end
-
- def test_directory
- file = Rake::FtpFile.new(".", "drwxrwxr-x 9 a279376 develop 4096 Mar 13 14:32 working")
- assert file.directory?
- assert !file.symlink?
- end
-
- def test_symlink
- file = Rake::FtpFile.new(".", "lrwxrwxrwx 1 a279376 develop 64 Mar 26 2002 xtrac -> /home/a279376/working/ics/development/java/com/fmr/fwp/ics/xtrac")
- assert_equal 'xtrac', file.name
- assert file.symlink?
- assert !file.directory?
- end
-end
diff --git a/tracks/vendor/rake-0.6.2/test/test_makefile_loader.rb b/tracks/vendor/rake-0.6.2/test/test_makefile_loader.rb
deleted file mode 100644
index 76727b87..00000000
--- a/tracks/vendor/rake-0.6.2/test/test_makefile_loader.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'test/unit'
-require 'rake'
-require 'rake/loaders/makefile'
-
-class TestMakefileLoader < Test::Unit::TestCase
- include Rake
-
- def test_create
- Task.clear
- loader = Rake::MakefileLoader.new
- loader.load("test/data/sample.mf")
- %w(a b c d).each do |t|
- assert Task.task_defined?(t), "#{t} should be a defined task"
- end
- assert_equal %w(a1 a2 a3 a4 a5 a6 a7).sort, Task['a'].prerequisites.sort
- assert_equal %w(b1 b2 b3 b4 b5 b6 b7).sort, Task['b'].prerequisites.sort
- assert_equal %w(c1).sort, Task['c'].prerequisites.sort
- assert_equal %w(d1 d2).sort, Task['d'].prerequisites.sort
- assert_equal 4, Task.tasks.size
- end
-end
diff --git a/tracks/vendor/rake-0.6.2/test/test_package_task.rb b/tracks/vendor/rake-0.6.2/test/test_package_task.rb
deleted file mode 100644
index b275b355..00000000
--- a/tracks/vendor/rake-0.6.2/test/test_package_task.rb
+++ /dev/null
@@ -1,130 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'test/unit'
-require 'rake/packagetask'
-
-class TestPackageTask < Test::Unit::TestCase
- include Rake
-
- def test_create
- pkg = Rake::PackageTask.new("pkgr", "1.2.3") { |p|
- p.package_files << "install.rb"
- p.package_files.include(
- '[A-Z]*',
- 'bin/**/*',
- 'lib/**/*.rb',
- 'test/**/*.rb',
- 'doc/**/*',
- 'build/rubyapp.rb',
- '*.blurb')
- p.package_files.exclude(/\bCVS\b/)
- p.package_files.exclude(/~$/)
- p.package_dir = 'pkg'
- p.need_tar = true
- p.need_tar_gz = true
- p.need_tar_bz2 = true
- p.need_zip = true
- }
- assert_equal "pkg", pkg.package_dir
- assert pkg.package_files.include?("bin/rake")
- assert "pkgr", pkg.name
- assert "1.2.3", pkg.version
- assert Task[:package]
- assert Task['pkg/pkgr-1.2.3.tgz']
- assert Task['pkg/pkgr-1.2.3.tar.gz']
- assert Task['pkg/pkgr-1.2.3.tar.bz2']
- assert Task['pkg/pkgr-1.2.3.zip']
- assert Task["pkg/pkgr-1.2.3"]
- assert Task[:clobber_package]
- assert Task[:repackage]
- end
-
- def test_missing_version
- assert_raises(RuntimeError) {
- pkg = Rake::PackageTask.new("pkgr") { |p| }
- }
- end
-
- def test_no_version
- pkg = Rake::PackageTask.new("pkgr", :noversion) { |p| }
- assert "pkgr", pkg.send(:package_name)
- end
-
- def test_clone
- pkg = Rake::PackageTask.new("x", :noversion)
- p2 = pkg.clone
- pkg.package_files << "y"
- p2.package_files << "x"
- assert_equal ["y"], pkg.package_files
- assert_equal ["x"], p2.package_files
- end
-end
-
-
-begin
- require 'rubygems'
- require 'rake/gempackagetask'
-rescue Exception
- puts "WARNING: RubyGems not installed"
-end
-
-if ! defined?(Gem)
- puts "WARNING: Unable to test GemPackaging ... requires RubyGems"
-else
- class TestGemPackageTask < Test::Unit::TestCase
- def test_gem_package
- gem = Gem::Specification.new do |g|
- g.name = "pkgr"
- g.version = "1.2.3"
- g.files = FileList["x"].resolve
- end
- pkg = Rake::GemPackageTask.new(gem) do |p|
- p.package_files << "y"
- end
- assert_equal ["x", "y"], pkg.package_files
- assert_equal "pkgr-1.2.3.gem", pkg.gem_file
- end
-
- def test_gem_package_with_specific_platform
- gem = Gem::Specification.new do |g|
- g.name = "pkgr"
- g.version = "1.2.3"
- g.files = FileList["x"].resolve
- g.platform = Gem::Platform::WIN32
- end
- pkg = Rake::GemPackageTask.new(gem) do |p|
- p.package_files << "y"
- end
- assert_equal ["x", "y"], pkg.package_files
- assert_equal "pkgr-1.2.3-mswin32.gem", pkg.gem_file
- end
-
- def test_gem_package_with_current_platform
- gem = Gem::Specification.new do |g|
- g.name = "pkgr"
- g.version = "1.2.3"
- g.files = FileList["x"].resolve
- g.platform = Gem::Platform::CURRENT
- end
- pkg = Rake::GemPackageTask.new(gem) do |p|
- p.package_files << "y"
- end
- assert_equal ["x", "y"], pkg.package_files
- assert_match(/^pkgr-1\.2\.3-(\S+)\.gem$/, pkg.gem_file)
- end
-
- def test_gem_package_with_ruby_platform
- gem = Gem::Specification.new do |g|
- g.name = "pkgr"
- g.version = "1.2.3"
- g.files = FileList["x"].resolve
- g.platform = Gem::Platform::RUBY
- end
- pkg = Rake::GemPackageTask.new(gem) do |p|
- p.package_files << "y"
- end
- assert_equal ["x", "y"], pkg.package_files
- assert_equal "pkgr-1.2.3.gem", pkg.gem_file
- end
- end
-end
diff --git a/tracks/vendor/rake-0.6.2/test/test_rake.rb b/tracks/vendor/rake-0.6.2/test/test_rake.rb
deleted file mode 100644
index e8e8ad8a..00000000
--- a/tracks/vendor/rake-0.6.2/test/test_rake.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'test/unit'
-require 'rake'
-
-class TestRake < Test::Unit::TestCase
- def test_each_dir_parent
- assert_equal ['a'], alldirs('a')
- assert_equal ['a/b', 'a'], alldirs('a/b')
- assert_equal ['/a/b', '/a', '/'], alldirs('/a/b')
- assert_equal ['c:/a/b', 'c:/a', 'c:'], alldirs('c:/a/b')
- assert_equal ['c:a/b', 'c:a'], alldirs('c:a/b')
- end
-
- def alldirs(fn)
- result = []
- Rake.each_dir_parent(fn) { |d| result << d }
- result
- end
-
-end
diff --git a/tracks/vendor/rake-0.6.2/test/test_rules.rb b/tracks/vendor/rake-0.6.2/test/test_rules.rb
deleted file mode 100644
index d6434100..00000000
--- a/tracks/vendor/rake-0.6.2/test/test_rules.rb
+++ /dev/null
@@ -1,206 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'test/unit'
-require 'fileutils'
-require 'rake'
-require 'test/filecreation'
-
-######################################################################
-class TestRules < Test::Unit::TestCase
- include Rake
- include FileCreation
-
- SRCFILE = "testdata/abc.c"
- SRCFILE2 = "testdata/xyz.c"
- FTNFILE = "testdata/abc.f"
- OBJFILE = "testdata/abc.o"
-
- def setup
- Task.clear
- @runs = []
- end
-
- def teardown
- FileList['testdata/*'].each do |f| rm_r(f, :verbose=>false) end
- end
-
- def test_multiple_rules1
- create_file(FTNFILE)
- delete_file(SRCFILE)
- delete_file(OBJFILE)
- rule(/\.o$/ => ['.c']) do @runs << :C end
- rule(/\.o$/ => ['.f']) do @runs << :F end
- t = Task[OBJFILE]
- t.invoke
- Task[OBJFILE].invoke
- assert_equal [:F], @runs
- end
-
- def test_multiple_rules2
- create_file(FTNFILE)
- delete_file(SRCFILE)
- delete_file(OBJFILE)
- rule(/\.o$/ => ['.f']) do @runs << :F end
- rule(/\.o$/ => ['.c']) do @runs << :C end
- Task[OBJFILE].invoke
- assert_equal [:F], @runs
- end
-
- def test_create_with_source
- create_file(SRCFILE)
- rule(/\.o$/ => ['.c']) do |t|
- @runs << t.name
- assert_equal OBJFILE, t.name
- assert_equal SRCFILE, t.source
- end
- Task[OBJFILE].invoke
- assert_equal [OBJFILE], @runs
- end
-
- def test_single_dependent
- create_file(SRCFILE)
- rule(/\.o$/ => '.c') do |t|
- @runs << t.name
- end
- Task[OBJFILE].invoke
- assert_equal [OBJFILE], @runs
- end
-
- def test_create_by_string
- create_file(SRCFILE)
- rule '.o' => ['.c'] do |t|
- @runs << t.name
- end
- Task[OBJFILE].invoke
- assert_equal [OBJFILE], @runs
- end
-
- def test_rule_and_no_action_task
- create_file(SRCFILE)
- create_file(SRCFILE2)
- delete_file(OBJFILE)
- rule '.o' => '.c' do |t|
- @runs << t.source
- end
- file OBJFILE => [SRCFILE2]
- Task[OBJFILE].invoke
- assert_equal [SRCFILE], @runs
- end
-
- def test_string_close_matches
- create_file("testdata/x.c")
- rule '.o' => ['.c'] do |t|
- @runs << t.name
- end
- assert_raises(RuntimeError) { Task['testdata/x.obj'].invoke }
- assert_raises(RuntimeError) { Task['testdata/x.xyo'].invoke }
- end
-
- def test_precedence_rule_vs_implicit
- create_timed_files(OBJFILE, SRCFILE)
- rule(/\.o$/ => ['.c']) do
- @runs << :RULE
- end
- Task[OBJFILE].invoke
- assert_equal [:RULE], @runs
- end
-
- def test_rule_with_two_sources
- create_timed_files(OBJFILE, SRCFILE, SRCFILE2)
- rule OBJFILE => [lambda{SRCFILE}, lambda{SRCFILE2}] do
- @runs << :RULE
- end
- Task[OBJFILE].invoke
- assert_equal [:RULE], @runs
- end
-
- def test_rule_with_two_sources_but_one_missing
- create_timed_files(OBJFILE, SRCFILE)
- delete_file(SRCFILE2)
- rule OBJFILE => [lambda{SRCFILE}, lambda{SRCFILE2}] do
- @runs << :RULE
- end
- Task[OBJFILE].invoke
- assert_equal [], @runs
- end
-
- def test_rule_ordering_finding_second_rule
- create_timed_files(OBJFILE, SRCFILE)
- delete_file(SRCFILE2)
- rule OBJFILE => [lambda{SRCFILE}, lambda{SRCFILE2}] do
- @runs << :RULE1
- end
- rule OBJFILE => [lambda{SRCFILE}] do
- @runs << :RULE2
- end
- Task[OBJFILE].invoke
- assert_equal [:RULE2], @runs
- end
-
- def test_rule_ordering_finding_first_rule
- create_timed_files(OBJFILE, SRCFILE, SRCFILE2)
- rule OBJFILE => [lambda{SRCFILE}, lambda{SRCFILE2}] do
- @runs << :RULE1
- end
- rule OBJFILE => [lambda{SRCFILE}] do
- @runs << :RULE2
- end
- Task[OBJFILE].invoke
- assert_equal [:RULE1], @runs
- end
-
- def test_rule_ordering_not_finding_second_rule
- create_timed_files(OBJFILE, SRCFILE, SRCFILE2)
- rule OBJFILE => [lambda{SRCFILE}] do
- @runs << :RULE1
- end
- rule OBJFILE => [lambda{SRCFILE}, lambda{SRCFILE2}] do
- @runs << :RULE2
- end
- Task[OBJFILE].invoke
- assert_equal [:RULE1], @runs
- end
-
- def test_proc_dependent
- ran = false
- File.makedirs("testdata/src/jw")
- create_file("testdata/src/jw/X.java")
- rule %r(classes/.*\.class) => [
- proc { |fn| fn.sub(/^classes/, 'testdata/src').sub(/\.class$/, '.java') }
- ] do |task|
- assert_equal task.name, 'classes/jw/X.class'
- assert_equal task.source, 'testdata/src/jw/X.java'
- ran = true
- end
- Task['classes/jw/X.class'].invoke
- assert ran, "Should have triggered rule"
- ensure
- rm_r("testdata/src", :verbose=>false) rescue nil
- end
-
- def test_recursive_rules
- actions = []
- create_file("testdata/abc.xml")
- rule '.y' => '.xml' do actions << 'y' end
- rule '.c' => '.y' do actions << 'c'end
- rule '.o' => '.c' do actions << 'o'end
- rule '.exe' => '.o' do actions << 'exe'end
- Task["testdata/abc.exe"].invoke
- assert_equal ['y', 'c', 'o', 'exe'], actions
- end
-
- def test_recursive_overflow
- create_file("testdata/a.a")
- prev = 'a'
- ('b'..'z').each do |letter|
- rule ".#{letter}" => ".#{prev}" do |t| puts "#{t.name}" end
- prev = letter
- end
- ex = assert_raises(Rake::RuleRecursionOverflowError) {
- Task["testdata/a.z"].invoke
- }
- assert_match(/a\.z => testdata\/a.y/, ex.message)
- end
-
-end
-
diff --git a/tracks/vendor/rake-0.6.2/test/test_tasks.rb b/tracks/vendor/rake-0.6.2/test/test_tasks.rb
deleted file mode 100644
index 3cdb70aa..00000000
--- a/tracks/vendor/rake-0.6.2/test/test_tasks.rb
+++ /dev/null
@@ -1,77 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'test/unit'
-require 'fileutils'
-require 'rake'
-require 'test/filecreation'
-
-######################################################################
-class TestTask < Test::Unit::TestCase
- include Rake
-
- def setup
- Task.clear
- end
-
- def test_create
- arg = nil
- t = Task.lookup(:name).enhance { |task| arg = task; 1234 }
- assert_equal "name", t.name
- assert_equal [], t.prerequisites
- assert t.prerequisites.is_a?(FileList)
- assert t.needed?
- t.execute
- assert_equal t, arg
- assert_nil t.source
- end
-
- def test_invoke
- runlist = []
- t1 = Task.lookup(:t1).enhance([:t2, :t3]) { |t| runlist << t.name; 3321 }
- t2 = Task.lookup(:t2).enhance { |t| runlist << t.name }
- t3 = Task.lookup(:t3).enhance { |t| runlist << t.name }
- assert_equal [:t2, :t3], t1.prerequisites
- t1.invoke
- assert_equal ["t2", "t3", "t1"], runlist
- end
-
- def test_no_double_invoke
- runlist = []
- t1 = Task.lookup(:t1).enhance([:t2, :t3]) { |t| runlist << t.name; 3321 }
- t2 = Task.lookup(:t2).enhance([:t3]) { |t| runlist << t.name }
- t3 = Task.lookup(:t3).enhance { |t| runlist << t.name }
- t1.invoke
- assert_equal ["t3", "t2", "t1"], runlist
- end
-
- def test_find
- task :tfind
- assert_equal "tfind", Task[:tfind].name
- ex = assert_raises(RuntimeError) { Task[:leaves] }
- assert_equal "Don't know how to build task 'leaves'", ex.message
- end
-
- def test_defined
- assert ! Task.task_defined?(:a)
- task :a
- assert Task.task_defined?(:a)
- end
-
- def test_multi_invocations
- runs = []
- p = proc do |t| runs << t.name end
- task({:t1=>[:t2,:t3]}, &p)
- task({:t2=>[:t3]}, &p)
- task(:t3, &p)
- Task[:t1].invoke
- assert_equal ["t1", "t2", "t3"], runs.sort
- end
-
- def test_task_list
- task :t2
- task :t1 => [:t2]
- assert_equal ["t1", "t2"], Task.tasks.collect {|t| t.name}
- end
-
-end
-
diff --git a/tracks/vendor/rake-0.6.2/test/test_test_task.rb b/tracks/vendor/rake-0.6.2/test/test_test_task.rb
deleted file mode 100644
index c97524c3..00000000
--- a/tracks/vendor/rake-0.6.2/test/test_test_task.rb
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/usr/bin/env ruby
-
-require 'test/unit'
-require 'rake/testtask'
-
-class TestTestTask < Test::Unit::TestCase
- include Rake
- def setup
- Task.clear
- ENV['TEST'] = nil
- end
-
- def teardown
- FileUtils.rm_rf("testdata")
- end
-
- def test_no_task
- assert ! Task.task_defined?(:test)
- end
-
- def test_defaults
- tt = Rake::TestTask.new do |t| end
- assert_not_nil tt
- assert_equal :test, tt.name
- assert_equal ['lib'], tt.libs
- assert_equal 'test/test*.rb', tt.pattern
- assert_equal false, tt.verbose
- assert Task.task_defined?(:test)
- end
-
- def test_non_defaults
- tt = Rake::TestTask.new(:example) do |t|
- t.libs = ['src', 'ext']
- t.pattern = 'test/tc_*.rb'
- t.verbose = true
- end
- assert_not_nil tt
- assert_equal :example, tt.name
- assert_equal ['src', 'ext'], tt.libs
- assert_equal 'test/tc_*.rb', tt.pattern
- assert_equal true, tt.verbose
- assert Task.task_defined?(:example)
- end
-
- def test_pattern
- ENV['TEST'] = nil
- tt = Rake::TestTask.new do |t|
- t.pattern = '*.rb'
- end
- assert_equal ['install.rb'], tt.file_list.to_a
- end
-
- def test_env_test
- ENV['TEST'] = 'testfile.rb'
- tt = Rake::TestTask.new do |t|
- t.pattern = '*'
- end
- assert_equal ["testfile.rb"], tt.file_list.to_a
- end
-
- def test_test_files
- tt = Rake::TestTask.new do |t|
- t.test_files = FileList['a.rb', 'b.rb']
- end
- assert_equal ["a.rb", 'b.rb'], tt.file_list.to_a
- end
-
- def test_both_pattern_and_test_files
- tt = Rake::TestTask.new do |t|
- t.test_files = FileList['a.rb', 'b.rb']
- t.pattern = '*.rb'
- end
- assert_equal ['a.rb', 'b.rb', 'install.rb'], tt.file_list.to_a
- end
-
-end