You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by as...@apache.org on 2008/09/30 02:32:18 UTC

svn commit: r700314 - in /incubator/buildr/trunk: Rakefile lib/buildr.rb lib/buildr/core/checks.rb lib/buildr/groovy/bdd.rb lib/buildr/java/ant.rb lib/buildr/java/bdd.rb lib/buildr/java/tests.rb lib/buildr/scala/tests.rb spec/spec_helpers.rb

Author: assaf
Date: Mon Sep 29 17:32:18 2008
New Revision: 700314

URL: http://svn.apache.org/viewvc?rev=700314&view=rev
Log:
Getting rid of const_defined in places that no longer require it.

Modified:
    incubator/buildr/trunk/Rakefile
    incubator/buildr/trunk/lib/buildr.rb
    incubator/buildr/trunk/lib/buildr/core/checks.rb
    incubator/buildr/trunk/lib/buildr/groovy/bdd.rb
    incubator/buildr/trunk/lib/buildr/java/ant.rb
    incubator/buildr/trunk/lib/buildr/java/bdd.rb
    incubator/buildr/trunk/lib/buildr/java/tests.rb
    incubator/buildr/trunk/lib/buildr/scala/tests.rb
    incubator/buildr/trunk/spec/spec_helpers.rb

Modified: incubator/buildr/trunk/Rakefile
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/Rakefile?rev=700314&r1=700313&r2=700314&view=diff
==============================================================================
--- incubator/buildr/trunk/Rakefile (original)
+++ incubator/buildr/trunk/Rakefile Mon Sep 29 17:32:18 2008
@@ -59,6 +59,4 @@
   # run dependency checks with JRuby. (Also, good opportunity to upgrade other
   # platform's dependencies)
   sh RUBY_PLATFORM =~ /java/ ? 'ruby' : 'jruby', '-S', 'rake', 'setup dependency'
-end
-
-
+end
\ No newline at end of file

Modified: incubator/buildr/trunk/lib/buildr.rb
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/lib/buildr.rb?rev=700314&r1=700313&r2=700314&view=diff
==============================================================================
--- incubator/buildr/trunk/lib/buildr.rb (original)
+++ incubator/buildr/trunk/lib/buildr.rb Mon Sep 29 17:32:18 2008
@@ -13,7 +13,6 @@
 # License for the specific language governing permissions and limitations under
 # the License.
 
-
 module Buildr
   VERSION = '1.3.3'.freeze
 end

Modified: incubator/buildr/trunk/lib/buildr/core/checks.rb
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/lib/buildr/core/checks.rb?rev=700314&r1=700313&r2=700314&view=diff
==============================================================================
--- incubator/buildr/trunk/lib/buildr/core/checks.rb (original)
+++ incubator/buildr/trunk/lib/buildr/core/checks.rb Mon Sep 29 17:32:18 2008
@@ -16,7 +16,7 @@
 
 require 'buildr/core/project'
 require 'buildr/packaging/zip'
-require 'test/unit'
+#require 'test/unit'
 require 'spec/matchers'
 require 'spec/expectations'
 

Modified: incubator/buildr/trunk/lib/buildr/groovy/bdd.rb
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/lib/buildr/groovy/bdd.rb?rev=700314&r1=700313&r2=700314&view=diff
==============================================================================
--- incubator/buildr/trunk/lib/buildr/groovy/bdd.rb (original)
+++ incubator/buildr/trunk/lib/buildr/groovy/bdd.rb Mon Sep 29 17:32:18 2008
@@ -32,7 +32,7 @@
     @lang = :groovy
     @bdd_dir = :spec
 
-    VERSION = "0.7" unless const_defined?(:VERSION)
+    VERSION = "0.7"
     TESTS_PATTERN = [ /(Story|Behavior).groovy$/ ]
     OPTIONS = [:format, :properties, :java_args]
 

Modified: incubator/buildr/trunk/lib/buildr/java/ant.rb
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/lib/buildr/java/ant.rb?rev=700314&r1=700313&r2=700314&view=diff
==============================================================================
--- incubator/buildr/trunk/lib/buildr/java/ant.rb (original)
+++ incubator/buildr/trunk/lib/buildr/java/ant.rb Mon Sep 29 17:32:18 2008
@@ -23,7 +23,7 @@
   module Ant
 
     # Which version of Ant we're using by default.
-    VERSION = '1.7.1' unless const_defined?('VERSION')
+    VERSION = '1.7.1'
     
     class << self
       # Current version of Ant being used.

Modified: incubator/buildr/trunk/lib/buildr/java/bdd.rb
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/lib/buildr/java/bdd.rb?rev=700314&r1=700313&r2=700314&view=diff
==============================================================================
--- incubator/buildr/trunk/lib/buildr/java/bdd.rb (original)
+++ incubator/buildr/trunk/lib/buildr/java/bdd.rb Mon Sep 29 17:32:18 2008
@@ -46,7 +46,7 @@
   module TestFramework::JRubyBased
     extend self
 
-    VERSION = '1.1.4' unless const_defined?('VERSION')
+    VERSION = '1.1.4'
 
     class << self
       def version
@@ -297,7 +297,7 @@
 
     include TestFramework::JRubyBased
 
-    VERSION = '0.3.1' unless const_defined?('VERSION')
+    VERSION = '0.3.1'
     
     # pattern for rspec stories
     STORY_PATTERN    = /_(steps|story)\.rb$/
@@ -393,7 +393,7 @@
     @lang = :java
     @bdd_dir = :spec
 
-    VERSION = '1.0.1' unless const_defined?('VERSION')
+    VERSION = '1.0.1'
     TESTS_PATTERN = [ /Behaviou?r$/ ] #:nodoc:
     
     class << self

Modified: incubator/buildr/trunk/lib/buildr/java/tests.rb
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/lib/buildr/java/tests.rb?rev=700314&r1=700313&r2=700314&view=diff
==============================================================================
--- incubator/buildr/trunk/lib/buildr/java/tests.rb (original)
+++ incubator/buildr/trunk/lib/buildr/java/tests.rb Mon Sep 29 17:32:18 2008
@@ -83,7 +83,7 @@
   # JMock is available when using JUnit and TestNG, JBehave.
   module JMock
     
-    VERSION = '1.2.0' unless const_defined?('VERSION')
+    VERSION = '1.2.0'
     
     class << self
       def version
@@ -164,7 +164,7 @@
     end
 
     # JUnit version number.
-    VERSION = '4.4' unless const_defined?('VERSION')
+    VERSION = '4.4'
 
     class << self
       # :call-seq:
@@ -275,7 +275,7 @@
   # * :java_args -- Arguments passed to the JVM.
   class TestNG < TestFramework::Java
 
-    VERSION = '5.7' unless const_defined?('VERSION')
+    VERSION = '5.7'
 
     class << self
       def version

Modified: incubator/buildr/trunk/lib/buildr/scala/tests.rb
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/lib/buildr/scala/tests.rb?rev=700314&r1=700313&r2=700314&view=diff
==============================================================================
--- incubator/buildr/trunk/lib/buildr/scala/tests.rb (original)
+++ incubator/buildr/trunk/lib/buildr/scala/tests.rb Mon Sep 29 17:32:18 2008
@@ -24,7 +24,7 @@
 
   # Scala::Specs is available when using Scala::Test
   module ScalaSpecs
-    VERSION = '1.2.9' unless const_defined?('VERSION')
+    VERSION = '1.2.9'
     
     class << self
       def version
@@ -47,7 +47,7 @@
 
   # Scala::Check is available when using Scala::Test
   module ScalaCheck
-    VERSION = '1.3' unless const_defined?('VERSION')
+    VERSION = '1.3'
     
     class << self
       def version
@@ -76,7 +76,7 @@
   # * :java_args   -- Arguments passed as is to the JVM.
   class ScalaTest < TestFramework::Java
 
-    VERSION = '0.9.3' unless const_defined?('VERSION')
+    VERSION = '0.9.3'
 
     class << self
       def version

Modified: incubator/buildr/trunk/spec/spec_helpers.rb
URL: http://svn.apache.org/viewvc/incubator/buildr/trunk/spec/spec_helpers.rb?rev=700314&r1=700313&r2=700314&view=diff
==============================================================================
--- incubator/buildr/trunk/spec/spec_helpers.rb (original)
+++ incubator/buildr/trunk/spec/spec_helpers.rb Mon Sep 29 17:32:18 2008
@@ -16,7 +16,7 @@
 
 # This file gets loaded twice when running 'spec spec/*' and not with pleasent results,
 # so ignore the second attempt to load it.
-unless self.class.const_defined?('SpecHelpers')
+unless defined?(SpecHelpers)
 
   require 'rubygems'
   $LOAD_PATH.unshift File.expand_path('../lib', File.dirname(__FILE__)), File.expand_path('../addon', File.dirname(__FILE__))