cc.rb under JRuby

View: New views
1 Messages — Rating Filter:   Alert me  

cc.rb under JRuby

by Dmitry Verkhovsky :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi All,

I just finished tweaking JRuby to get 100% of cc.rb test passed.
Since my patches were accepted and applied, cc.rb should be now working under JRuby starting from trunk revision 4135. Ta-da!

However, there is one small patch to be applied to cc.rb itself, see the attachment.


It works well on my mac, so far. Haven't tried with any other os yes.


Cheers,
D.

Index: app/models/build.rb
===================================================================
--- app/models/build.rb (revision 523)
+++ app/models/build.rb (working copy)
@@ -140,7 +140,7 @@
     # in_clean_environment__with_local_copy() changes current working directory. Replacing it with RAILS_ROOT doesn't
     # fail any tests, because in test environment (unlike production) RAILS_ROOT is already absolute.
     # --nosearch flag here prevents CC.rb from building itself when a project has no Rakefile
-    %{ruby -e "require 'rubygems' rescue nil; require 'rake'; load '#{ABSOLUTE_RAILS_ROOT}/tasks/cc_build.rake'; ARGV << '--nosearch'#{CruiseControl::Log.verbose? ? " << '--trace'" : ""} << 'cc:build'; Rake.application.run"}
+    %{#{Config::CONFIG['RUBY_INSTALL_NAME']} -e "require 'rubygems' rescue nil; require 'rake'; load '#{ABSOLUTE_RAILS_ROOT}/tasks/cc_build.rake'; ARGV << '--nosearch'#{CruiseControl::Log.verbose? ? " << '--trace'" : ""} << 'cc:build'; Rake.application.run"}
   end
 
   def in_clean_environment_on_local_copy(&block)
Index: test/integration/builder_integration_test.rb
===================================================================
--- test/integration/builder_integration_test.rb (revision 523)
+++ test/integration/builder_integration_test.rb (working copy)
@@ -145,7 +145,7 @@
 
   def test_builder_should_be_transparent_to_RAILS_ENV
     with_project('project_with_cruise_and_default_tasks') do |project, sandbox|
-      project.build_command = 'rake cruise RAILS_ENV=foo'
+      project.build_command = "#{Config::CONFIG['RUBY_INSTALL_NAME']} -S rake cruise RAILS_ENV=foo"
       build = project.build
       build_log = File.read("#{build.artifacts_directory}/build.log")
 

_______________________________________________
Cruisecontrolrb-developers mailing list
Cruisecontrolrb-developers@...
http://rubyforge.org/mailman/listinfo/cruisecontrolrb-developers