Skip to content

Instantly share code, notes, and snippets.

targets.find_all do |t|
remote = t.repo.cache['config']['branch.' + t.branch + '.remote']
if remote
push_target = t.repo.cache['config']['branch.' + t.branch + '.push'] || t.repo.cache['config']['branch.' + t.branch + '.merge']
push_target.gsub!(/^refs\/heads\//, '')
r_ref_file = File.join(t.repo.repo.dir.path, '.git', 'refs', 'remotes', remote, push_target)
File.exist?(r_ref_file)
end
Loading Redcar SCM modules...
Found Redcar::Scm::Subversion::Manager.
Subversion support is currently unimplemented
but discarding because it isn't supported on the current system.
Found Redcar::Scm::Mercurial::Manager.
Mercurial support is currently unimplemented
but discarding because it isn't supported on the current system.
Found Redcar::Scm::Git::Manager.
1 SCM modules loaded.
Checking if /Users/danlucraft/Redcar/redcar is a git repository...
Ambiguous match of "I should see "bin,lib,redcar.rb,plugins" in the tree":
plugins/application/features/step_definitions/tree_steps.rb:9:in `/^I should (not )?see "([^\"]*)" in the tree$/'
plugins/textmate/features/step_definitions/tree_steps.rb:43:in `/^I should (see|not see) "([^"]*)" in the tree$/'
You can run again with --guess to make Cucumber be more smart about it (Cucumber::Ambiguous)
./plugins/application_swt/lib/application_swt/cucumber_patches.rb:11:in `invoke'
./plugins/application_swt/lib/application_swt/swt_wrapper.rb:129:in `call'
./plugins/application_swt/lib/application_swt/swt_wrapper.rb:129:in `run'
./plugins/application_swt/lib/application_swt/event_loop.rb:14:in `start'
./plugins/core/lib/core/gui.rb:39:in `start'
~/Programs/jruby-1.5.1
$ time java -jar lib/jruby.jar -e "puts :hi"
hi
real 0m1.528s
user 0m1.619s
sys 0m0.147s
{
"commands" : [
{
"name": "Up / of1-dev-dan",
"command": "rsync -rulz --delete --delete-excluded --exclude=\".git\" . of1-dev-dan:/home/dan/development/skweb",
"description": "Rsyncs up",
"type": "task/rsync"
},
{
"name": "Down / of1-dev-dan",
JUNK_FILES=book-final.* *.aux *.log styles/*.aux book-final*
SOURCE=book
WEBSITE=zedshaw.com:/usr/local/nginx/html/projects/build_your_own_mongrel
draft: book-final.dvi
htlatex book-final.tex
tidy -quiet -ashtml -omit -ic -m book-final.html
sed -f clean.sed book-final.html > book.wiki
book-final.dvi:
JUNK_FILES=book-final.* *.aux *.log styles/*.aux book-final*
SOURCE=book
WEBSITE=zedshaw.com:/usr/local/nginx/html/projects/build_your_own_mongrel
draft: book-final.dvi
htlatex book-final.tex
tidy -quiet -ashtml -omit -ic -m book-final.html
sed -f clean.sed book-final.html > book.wiki
book-final.dvi:
Java:
Image image = new Image(display,"C:/...");
GC gc = new GC(image);
Rectangle bounds = image.getBounds();
gc.drawLine(0,0,bounds.width,bounds.height);
gc.drawLine(0,bounds.height,bounds.width,0);
gc.dispose();
image.dispose();
Menu::Builder.build do
sub_menu "File", :priority => 1000 do
item "New", NewCommand
item "New Window", NewWindowCommand
item "Open", Project::FileOpenCommand
separator
item "Quit", QuitCommand, :priority => 1000
end

How Redcar uses Gecko on Windows

When Redcar first runs, it downloads the xulrunner dist file [1] to somewhere, and uses the rubyzip [2] gem to unzip it.

Then the JRuby to create a browser instance looks like this, which should be readily translateable to Java or whatever since the JRuby Swt API is auto-translated from the Java API. The xulrunner directory is the result of unzipping the .zip file.

if Redcar.platform == :windows
  xulrunner_path = (Redcar.root + "/vendor/xulrunner").gsub("/", "\\")

java.lang.System.setProperty(