ruby-processing 2.4.1 → 2.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +5 -3
- data/LICENSE.md +1 -1
- data/README.md +7 -4
- data/lib/ruby-processing/exporters/application_exporter.rb +2 -2
- data/lib/ruby-processing/exporters/base_exporter.rb +1 -1
- data/lib/ruby-processing/exporters/creator.rb +1 -1
- data/lib/ruby-processing/library_loader.rb +1 -1
- data/lib/ruby-processing/runner.rb +3 -3
- data/lib/ruby-processing/runners/live.rb +2 -1
- data/lib/ruby-processing/runners/watch.rb +1 -1
- data/lib/ruby-processing/version.rb +1 -1
- data/ruby-processing.gemspec +2 -2
- data/samples/contributed/jwishy.rb +0 -1
- data/samples/processing_app/topics/file_io/save_frames.rb +1 -1
- data/test/rp5_test.rb +10 -1
- data/vendors/Rakefile +2 -2
- metadata +11 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9941a815cfe461f91e8276a38dc04b779e6a5433
|
4
|
+
data.tar.gz: 2f8a60fa95307af91dc82c5e7cc0a87cbf68f7d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf0f7703d59a95ad938025098a3407b9f5a7b6d2640830e7750c9d3ddd3219912117d33de94c8cf474fd5c2978644307a8bb9370243020592ad13a3f662450b2
|
7
|
+
data.tar.gz: c60b0d6ebce9418fe2ced947505fa1f717a1fd44891ccb3a2cbd5f22655e97995e1be7a21fd7b249b7f3f52fda241e8c2a510cd9dd116927056d5e7c7e211582
|
data/CHANGELOG
CHANGED
@@ -1,10 +1,12 @@
|
|
1
|
-
v2.4.2
|
1
|
+
v2.4.2 Update to JRuby-1.7.10
|
2
|
+
* Revised suggestions for PROCESSING_ROOT on MacOSX
|
3
|
+
|
4
|
+
v2.4.1 First release to return to rubygems since processing 1.0.11
|
2
5
|
* Features a post-install download of jruby-complete (version 1.7.9)
|
3
6
|
* Features use of jars from an installed version of vanilla processing,
|
4
7
|
* on linux and windows use version 2.1.0 (later versions may also work).
|
5
8
|
* For Mac, especially if you are using Mac "java" stick with version 2.0.3
|
6
|
-
|
7
|
-
v2.4.1 Update gemspec to match modern expectations
|
9
|
+
* Update gemspec to match modern expectations
|
8
10
|
|
9
11
|
v2.4.0 Returning to rubygems distribution, by not including any jars
|
10
12
|
* Use jars from an installed version of vanilla processing-2.0.3 (or version 2.1.0 linux and windows)
|
data/LICENSE.md
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# Ruby-Processing
|
2
|
+
[![Gem Version](https://badge.fury.io/rb/ruby-processing.png)](http://badge.fury.io/rb/ruby-processing)
|
2
3
|
|
3
4
|
Is a ruby wrapper around the [Processing][] code art framework, built using [JRuby][].
|
4
5
|
|
@@ -11,17 +12,19 @@ Is a ruby wrapper around the [Processing][] code art framework, built using [JRu
|
|
11
12
|
|
12
13
|
## Installation
|
13
14
|
|
14
|
-
Ideally you should install [jruby](http://jruby.org/download), at the very least you will have at least ruby-1.9.3 installed. You should [download][] and install vanilla [processing-2.0.3](https://processing.org/download/) (MacOSX) or [processing-2.1.0](https://processing.org/download/) (Windows, Linux) prior to installing this version of ruby-processing. You must also set the `PROCESSING_ROOT` in the .rp5rc yaml configuration file, the easiest way is by running the [SetProcessingRoot.pde](https://gist.github.com/monkstone/7438749) sketch in the processing ide.
|
15
|
+
Ideally you should install [jruby](http://jruby.org/download), at the very least you will have at least ruby-1.9.3 installed. You should [download][] and install vanilla [processing-2.0.3](https://processing.org/download/) (MacOSX) or [processing-2.1.0](https://processing.org/download/) (Windows, Linux) prior to installing this version of ruby-processing. You must also set the `PROCESSING_ROOT` in the .rp5rc yaml configuration file, the easiest way is by running the [SetProcessingRoot.pde](https://gist.github.com/monkstone/7438749) sketch in the processing ide.
|
15
16
|
|
16
17
|
Then install ruby-processing (from rubygems-org) in the usual way
|
17
18
|
|
18
|
-
`gem install ruby-processing` some systems eg Ubuntu
|
19
|
+
`gem install ruby-processing` some systems eg Ubuntu may require `sudo` access
|
19
20
|
|
20
|
-
To install jruby-complete use our built in tool (relies on `wget` to download [jruby-complete-1.7.
|
21
|
+
To install jruby-complete use our built in tool (relies on `wget` to download [jruby-complete-1.7.10](http://jruby.org/download))
|
21
22
|
|
22
23
|
`install_jruby_complete`
|
23
24
|
|
24
|
-
If you haven't got `wget` just download jruby-complete-1.7.
|
25
|
+
If you haven't got `wget` just download jruby-complete-1.7.10 to the vendors folder (then run above tool)
|
26
|
+
|
27
|
+
The vendored jruby-complete-1.7.10 is only required for application export, and running certain sketches (eg shader sketches see wiki).
|
25
28
|
|
26
29
|
|
27
30
|
## Documentation
|
@@ -17,7 +17,7 @@ module Processing
|
|
17
17
|
def export!(sketch)
|
18
18
|
# Check to make sure that the main file exists
|
19
19
|
@main_file_path, @main_file, @main_folder = *get_main_file(sketch)
|
20
|
-
usage( @main_file_path && File.
|
20
|
+
usage( @main_file_path && File.exist?(@main_file_path) )
|
21
21
|
|
22
22
|
extract_information
|
23
23
|
|
@@ -47,7 +47,7 @@ module Processing
|
|
47
47
|
@necessary_files += @real_requires
|
48
48
|
NECESSARY_FOLDERS.each do |folder|
|
49
49
|
resource_path = File.join(@main_folder, folder)
|
50
|
-
@necessary_files << resource_path if File.
|
50
|
+
@necessary_files << resource_path if File.exist?(resource_path)
|
51
51
|
end
|
52
52
|
@necessary_files.uniq!
|
53
53
|
cp_r(@necessary_files, File.join(@dest, @prefix))
|
@@ -10,7 +10,7 @@ module Processing
|
|
10
10
|
usage path
|
11
11
|
main_file = File.basename(path, ".rb")
|
12
12
|
# Check to make sure that the main file exists
|
13
|
-
already_exists = File.
|
13
|
+
already_exists = File.exist?(path) || File.exist?("#{File.dirname(path)}/#{main_file.underscore}.rb")
|
14
14
|
if already_exists
|
15
15
|
puts "That sketch already exists."
|
16
16
|
exit
|
@@ -113,7 +113,7 @@ module Processing
|
|
113
113
|
"#{@sketchbook_library_path}/#{library_name}/library",
|
114
114
|
"#{@sketchbook_library_path}/#{library_name}"
|
115
115
|
].each do |path|
|
116
|
-
if File.
|
116
|
+
if File.exist?(path) && !Dir.glob(path + "/*.#{ext}").empty?
|
117
117
|
return path
|
118
118
|
end
|
119
119
|
end
|
@@ -161,7 +161,7 @@ module Processing
|
|
161
161
|
arg_file = "#{File.dirname(sketch)}/data/java_args.txt"
|
162
162
|
args = []
|
163
163
|
args += dock_icon
|
164
|
-
if File.
|
164
|
+
if File.exist?(arg_file)
|
165
165
|
args += File.read(arg_file).split(/\s+/)
|
166
166
|
elsif Processing::CONFIG["java_args"]
|
167
167
|
args += Processing::CONFIG["java_args"].split(/\s+/)
|
@@ -171,12 +171,12 @@ module Processing
|
|
171
171
|
end
|
172
172
|
|
173
173
|
def ensure_exists(sketch)
|
174
|
-
puts "Couldn't find: #{sketch}" and exit unless File.
|
174
|
+
puts "Couldn't find: #{sketch}" and exit unless File.exist?(sketch)
|
175
175
|
end
|
176
176
|
|
177
177
|
def jruby_complete
|
178
178
|
rcomplete = File.join(RP5_ROOT, 'lib/ruby/jruby-complete.jar')
|
179
|
-
if File.
|
179
|
+
if File.exist?(rcomplete)
|
180
180
|
return rcomplete
|
181
181
|
else
|
182
182
|
warn "#{rcomplete} does not exist\nTry running `install_jruby_complete`"
|
@@ -2,7 +2,8 @@
|
|
2
2
|
# This flavor will either load up empty Ruby-Processing,
|
3
3
|
# or will start with your sketch.
|
4
4
|
|
5
|
-
|
5
|
+
root = File.dirname(__FILE__)
|
6
|
+
require "#{root}/base.rb"
|
6
7
|
Processing.load_and_run_sketch
|
7
8
|
|
8
9
|
ARGV.clear # So that IRB doesn't try to load them as files.
|
@@ -19,7 +19,7 @@ module Processing
|
|
19
19
|
def start_watching
|
20
20
|
start_runner
|
21
21
|
loop do
|
22
|
-
if @files.detect { |file| File.
|
22
|
+
if @files.detect { |file| File.exist?(file) && File.stat(file).mtime > @time }
|
23
23
|
puts "reloading sketch..."
|
24
24
|
$app && $app.close
|
25
25
|
@time = Time.now
|
data/ruby-processing.gemspec
CHANGED
@@ -44,8 +44,8 @@ Gem::Specification.new do |spec|
|
|
44
44
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
45
45
|
|
46
46
|
spec.add_development_dependency "bundler", "~> 1.3"
|
47
|
-
spec.add_development_dependency "rake"
|
48
|
-
spec.add_development_dependency
|
47
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
48
|
+
spec.add_development_dependency "minitest", "~> 5.1"
|
49
49
|
spec.requirements << 'A decent graphics card'
|
50
50
|
spec.requirements << 'java runtime >= 1.6+'
|
51
51
|
spec.requirements << 'processing = 2.0.3+'
|
data/test/rp5_test.rb
CHANGED
@@ -28,7 +28,16 @@ class Rp5Test < Minitest::Test
|
|
28
28
|
end
|
29
29
|
assert_match %r%ok%, out, "Failed P2D sketch"
|
30
30
|
end
|
31
|
-
|
31
|
+
|
32
|
+
def test_proc_root
|
33
|
+
require 'psych'
|
34
|
+
path = File.expand_path("~/.rp5rc")
|
35
|
+
config = File.exist?(path)? Psych.load_file(path) : {}
|
36
|
+
root = config.empty? ? '' : config['PROCESSING_ROOT']
|
37
|
+
assert root =~ /processing/, "You need to set your PROCESSING_ROOT in .rp5rc"
|
38
|
+
end
|
39
|
+
|
40
|
+
|
32
41
|
def test_p3d
|
33
42
|
out, err = capture_io do
|
34
43
|
open("|../bin/rp5 run p3d.rb", "r") do |io|
|
data/vendors/Rakefile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'rake/clean'
|
2
2
|
|
3
|
-
JRUBY_VERSION = "1.7.
|
3
|
+
JRUBY_VERSION = "1.7.10"
|
4
4
|
|
5
5
|
CLOBBER.include("jruby-complete-#{JRUBY_VERSION}.jar")
|
6
6
|
|
@@ -12,7 +12,7 @@ task :download => ["jruby-complete-#{JRUBY_VERSION}.jar"]
|
|
12
12
|
|
13
13
|
file "jruby-complete-#{JRUBY_VERSION}.jar" do
|
14
14
|
sh "wget http://jruby.org.s3.amazonaws.com/downloads/#{JRUBY_VERSION}/jruby-complete-#{JRUBY_VERSION}.jar"
|
15
|
-
check_sha1("jruby-complete-#{JRUBY_VERSION}.jar", "
|
15
|
+
check_sha1("jruby-complete-#{JRUBY_VERSION}.jar", "f74a8b29da11e2ea430a1d1d92b72d424f7ee311")
|
16
16
|
end
|
17
17
|
|
18
18
|
directory "../lib/ruby"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-processing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Ashkenas
|
@@ -18,7 +18,7 @@ authors:
|
|
18
18
|
autorequire:
|
19
19
|
bindir: bin
|
20
20
|
cert_chain: []
|
21
|
-
date:
|
21
|
+
date: 2014-01-10 00:00:00.000000000 Z
|
22
22
|
dependencies:
|
23
23
|
- !ruby/object:Gem::Dependency
|
24
24
|
name: bundler
|
@@ -38,30 +38,30 @@ dependencies:
|
|
38
38
|
name: rake
|
39
39
|
requirement: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
|
-
- - "
|
41
|
+
- - "~>"
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: '0'
|
43
|
+
version: '10.0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
46
|
version_requirements: !ruby/object:Gem::Requirement
|
47
47
|
requirements:
|
48
|
-
- - "
|
48
|
+
- - "~>"
|
49
49
|
- !ruby/object:Gem::Version
|
50
|
-
version: '0'
|
50
|
+
version: '10.0'
|
51
51
|
- !ruby/object:Gem::Dependency
|
52
52
|
name: minitest
|
53
53
|
requirement: !ruby/object:Gem::Requirement
|
54
54
|
requirements:
|
55
|
-
- - "
|
55
|
+
- - "~>"
|
56
56
|
- !ruby/object:Gem::Version
|
57
|
-
version: '
|
57
|
+
version: '5.1'
|
58
58
|
type: :development
|
59
59
|
prerelease: false
|
60
60
|
version_requirements: !ruby/object:Gem::Requirement
|
61
61
|
requirements:
|
62
|
-
- - "
|
62
|
+
- - "~>"
|
63
63
|
- !ruby/object:Gem::Version
|
64
|
-
version: '
|
64
|
+
version: '5.1'
|
65
65
|
description: "\n Ruby-Processing is a Ruby wrapper for the Processing code art framework.
|
66
66
|
It's\n this thin little shim that squeezes between Processing and JRuby, passing\n
|
67
67
|
\ along some neat goodies like:\n\n * Application exporting of your sketches. Hand
|
@@ -866,3 +866,4 @@ test_files:
|
|
866
866
|
- test/p3d.rb
|
867
867
|
- test/rp5_test.rb
|
868
868
|
- test/setup_ex.rb
|
869
|
+
has_rdoc:
|