public
Description: Code as Art, Art as Code. Processing and Ruby are meant for each other.
Homepage: http://github.com/jashkenas/ruby-processing/wikis
Clone URL: git://github.com/jashkenas/ruby-processing.git
Search Repo:
Specs are running better. Better script/open (sorry, windows).
jashkenas (author)
Fri Apr 25 07:29:13 -0700 2008
commit  6d73c7d99ee94cf4c1d4052c4155c9a2b3a4da00
tree    7cca58f581a4c56a738f5d2ec604c03957bf5780
parent  1de46930a34b0f8714b9900db5fa9c11978eb2f8
...
210
211
212
213
214
215
216
217
218
219
 
 
 
 
220
221
222
...
210
211
212
 
 
 
213
 
 
 
214
215
216
217
218
219
220
0
@@ -210,13 +210,11 @@
0
       size(@width, @height, mode_const)
0
     end
0
     
0
- def mouse_x
0
- mouseX
0
- end
0
     
0
- def mouse_y
0
- mouseY
0
- end
0
+ def mouse_x; mouseX; end
0
+ def mouse_y; mouseY; end
0
+ def pmouse_x; pmouseX; end
0
+ def pmouse_y; pmouseY; end
0
     
0
     
0
     private
...
1
 
2
3
4
5
6
7
8
 
 
 
 
 
 
9
10
11
12
13
14
15
16
 
...
 
1
2
3
4
5
 
 
 
6
7
8
9
10
11
12
 
 
 
 
 
 
 
13
0
@@ -1,17 +1,14 @@
0
-#!/usr/bin/env ruby
0
+#!/bin/bash
0
 
0
 # This script lets you open up Ruby-Processing sketches
0
 # without having to install JRuby.
0
 
0
-path = ARGV[0]
0
-unless path
0
- puts "Usage: script/open path/to/my_sketch.rb"
0
+if [ -e "$1" ]
0
+then
0
+ java -cp script/base_files/jruby-complete.jar org.jruby.Main "$1"
0
+else
0
+ echo "Couldn't find that sketch."
0
+ echo "Usage: script/open path/to/my_sketch.rb"
0
   exit
0
-end
0
-unless File.exists? path
0
- puts "Couldn't find: #{path}"
0
- exit
0
-end
0
-
0
-`java -cp "script/base_files/jruby-complete.jar" org.jruby.Main #{path}`
0
+fi
...
1
2
3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
0
@@ -1,4 +1,15 @@
0
-#!/usr/bin/env ruby
0
-home = File.dirname(File.dirname(`which jruby`))
0
-puts `java -cp script/base_files/jruby-complete.jar -Djruby.lib=#{home}/lib -Djruby.home=#{home} org.jruby.Main #{home}/bin/spec #{ARGV.join(" ")}`
0
+#!/bin/bash
0
+
0
+# Here's the script to run the specs. It's a sketchy way to go.
0
+
0
+JRUBY=`which jruby`
0
+JRUBY=`ruby -e "puts File.dirname(File.dirname('$JRUBY'))"`
0
+
0
+if [ -e "$JRUBY" ]
0
+then
0
+ java -cp script/base_files/jruby-complete.jar -Djruby.lib=$JRUBY/lib -Djruby.home=$JRUBY org.jruby.Main $JRUBY/bin/spec $* -f s
0
+else
0
+ echo "You'll need to have a real JRuby install to run the specs."
0
+ exit
0
+fi
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0
@@ -1,17 +1 @@
0
-# Make sure that the .jars are signed proper.
0
-# -- omygawshkenas
0
-
0
-describe "Signed Jars" do
0
-
0
- it "should verify core.jar" do
0
- s = `jarsigner -verify -certs core.jar`
0
- s.should =~ /jar verified/
0
- end
0
-
0
- it "should verify jruby-complete.jar" do
0
- s = `jarsigner -verify -certs script/base_files/jruby-complete.jar`
0
- s.should =~ /jar verified/
0
- end
0
-
0
-end

Comments

    No one has commented yet.