|
From: <luk...@us...> - 2006-09-06 15:30:31
|
Revision: 89
http://svn.sourceforge.net/asunit/?rev=89&view=rev
Author: lukebayes
Date: 2006-09-06 08:30:26 -0700 (Wed, 06 Sep 2006)
Log Message:
-----------
extracted application feattures to asunit file
Modified Paths:
--------------
trunk/ruby/src/asunit.rb
Added Paths:
-----------
trunk/ruby/src/asunit
Added: trunk/ruby/src/asunit
===================================================================
--- trunk/ruby/src/asunit (rev 0)
+++ trunk/ruby/src/asunit 2006-09-06 15:30:26 UTC (rev 89)
@@ -0,0 +1,53 @@
+#!/bin/ruby
+
+module AsUnit
+ # ------------------------------------------------------------------
+ # COPIED FROM RAKE! Rake module singleton methods.
+ #
+ class << self
+ # Current Rake Application
+ def application
+ @application ||= AsUnit::Application.new
+ end
+
+ # Set the current Rake application object.
+ def application=(app)
+ @application = app
+ end
+
+ # Return the original directory where the Rake application was
+ # started.
+ def original_dir
+ application.original_dir
+ end
+
+ ####################################################################
+ # Mixin for creating easily cloned objects.
+ #
+ module Cloneable
+ # Clone an object by making a new object and setting all the
+ # instance variables to the same values.
+ 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
+end
+
+class String
+ def ends_with? str
+ return false
+ end
+end
+
+require 'asunit.rb'
+
+if __FILE__ == $0 then
+ AsUnit::Application.new
+end
Modified: trunk/ruby/src/asunit.rb
===================================================================
--- trunk/ruby/src/asunit.rb 2006-09-06 15:23:22 UTC (rev 88)
+++ trunk/ruby/src/asunit.rb 2006-09-06 15:30:26 UTC (rev 89)
@@ -5,44 +5,6 @@
TEST_TEMPLATE = 'TestCase.erb'
PROJECT_FILE_NAME = '.asunit'
- # ------------------------------------------------------------------
- # COPIED FROM RAKE! Rake module singleton methods.
- #
- class << self
- # Current Rake Application
- def application
- @application ||= AsUnit::Application.new
- end
-
- # Set the current Rake application object.
- def application=(app)
- @application = app
- end
-
- # Return the original directory where the Rake application was
- # started.
- def original_dir
- application.original_dir
- end
-
- ####################################################################
- # Mixin for creating easily cloned objects.
- #
- module Cloneable
- # Clone an object by making a new object and setting all the
- # instance variables to the same values.
- 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
-
require 'yaml'
require 'optparse'
require 'settings'
@@ -105,16 +67,5 @@
end
get_project_file(File.dirname(dir))
end
- end
-
+ end
end
-
-class String
- def ends_with? str
- return false
- end
-end
-
-if __FILE__ == $0 then
- AsUnit::Application.new
-end
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|