buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From boisv...@apache.org
Subject svn commit: r917094 - in /buildr/trunk: CHANGELOG addon/buildr/nailgun.rb lib/buildr/core/application.rb spec/core/application_spec.rb
Date Sun, 28 Feb 2010 02:23:19 GMT
Author: boisvert
Date: Sun Feb 28 02:23:18 2010
New Revision: 917094

URL: http://svn.apache.org/viewvc?rev=917094&view=rev
Log:
BUILDR-386 Display JRuby version in buildr -V (Antoine Toulme)

Modified:
    buildr/trunk/CHANGELOG
    buildr/trunk/addon/buildr/nailgun.rb
    buildr/trunk/lib/buildr/core/application.rb
    buildr/trunk/spec/core/application_spec.rb

Modified: buildr/trunk/CHANGELOG
URL: http://svn.apache.org/viewvc/buildr/trunk/CHANGELOG?rev=917094&r1=917093&r2=917094&view=diff
==============================================================================
--- buildr/trunk/CHANGELOG (original)
+++ buildr/trunk/CHANGELOG Sun Feb 28 02:23:18 2010
@@ -58,6 +58,7 @@
 * Fixed:  BUILDR-383 artifact().from(task_dependency) should not trigger 
           task_dependency if artifact exists
 * Fixed:  BUILDR-384 Buildr fails with rubygems 1.3.6
+* Fixed:  BUILDR-386 Display JRuby version in buildr -V (Antoine Toulme)
 * Fixed:  Fail-fast if package.with() or include() called with nil values
 * Fixed:  Failures not reported correctly for ScalaTest (Alex Eagle)
 * Fixed:  Test dependencies should include test compile dependencies

Modified: buildr/trunk/addon/buildr/nailgun.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/addon/buildr/nailgun.rb?rev=917094&r1=917093&r2=917094&view=diff
==============================================================================
--- buildr/trunk/addon/buildr/nailgun.rb (original)
+++ buildr/trunk/addon/buildr/nailgun.rb Sun Feb 28 02:23:18 2010
@@ -148,7 +148,7 @@
       end
 
       def to_s
-        version = "Buildr #{Buildr::VERSION} #{RUBY_PLATFORM[/java/] && '(JRuby '+JRUBY_VERSION+')'}"
+        version = "Buildr #{Buildr::VERSION} #{RUBY_PLATFORM[/java/] && '(JRuby '+
(Buildr.settings.build['jruby'] || JRUBY_VERSION) +')'}"
         self.class.name+'('+[version, @host, @port].join(', ')+')'
       end
     end # Server

Modified: buildr/trunk/lib/buildr/core/application.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/core/application.rb?rev=917094&r1=917093&r2=917094&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/core/application.rb (original)
+++ buildr/trunk/lib/buildr/core/application.rb Sun Feb 28 02:23:18 2010
@@ -354,7 +354,7 @@
         ],
         ['--version', '-V', "Display the program version.",
           lambda { |value|
-            puts "Buildr #{Buildr::VERSION} #{RUBY_PLATFORM[/java/] && '(JRuby '+JRUBY_VERSION+')'}"
+            puts "Buildr #{Buildr::VERSION} #{RUBY_PLATFORM[/java/] && '(JRuby '+
(Buildr.settings.build['jruby'] || JRUBY_VERSION) +')'}"
             exit
           }
         ]

Modified: buildr/trunk/spec/core/application_spec.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/spec/core/application_spec.rb?rev=917094&r1=917093&r2=917094&view=diff
==============================================================================
--- buildr/trunk/spec/core/application_spec.rb (original)
+++ buildr/trunk/spec/core/application_spec.rb Sun Feb 28 02:23:18 2010
@@ -86,6 +86,16 @@
       Buildr.application.send(:handle_options)
       Buildr.application.options.rakelib.should == ['tasks']
     end
+    
+    it 'should show the version when prompted with -V' do
+      ARGV.push('-V')
+      test_exit(0) { Buildr.application.send(:handle_options) }.should show(/Buildr #{Buildr::VERSION}.*/)
+    end
+    
+    it 'should show the version when prompted with --version' do
+      ARGV.push('--version')
+      test_exit(0) { Buildr.application.send(:handle_options) }.should show(/Buildr #{Buildr::VERSION}.*/)
+    end
   end
 
   describe 'gems' do



Mime
View raw message