ruby-processing 2.6.13 → 2.6.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/rpextras.jar +0 -0
- data/lib/ruby-processing.rb +1 -11
- data/lib/ruby-processing/app.rb +9 -5
- data/lib/ruby-processing/config.rb +2 -1
- data/lib/ruby-processing/library_loader.rb +4 -2
- data/lib/ruby-processing/runner.rb +14 -29
- data/lib/ruby-processing/runners/base.rb +2 -2
- data/lib/ruby-processing/runners/live.rb +13 -9
- data/lib/ruby-processing/runners/run.rb +1 -4
- data/lib/ruby-processing/runners/watch.rb +1 -1
- data/lib/ruby-processing/version.rb +1 -1
- data/library/fastmath/fastmath.rb +3 -2
- data/library/library_proxy/library_proxy.rb +3 -2
- data/library/vecmath/vecmath.rb +7 -10
- data/library/video_event/video_event.rb +3 -2
- data/vendors/Rakefile +1 -1
- metadata +19 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 44805ffa73fa01bdd4064925c53ef8c6f1a70503
|
4
|
+
data.tar.gz: 3bb2dfbdaf8452b5134124a9076354bdc81f3fe2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e86989139b8a0ce2cac4f3aed69da1a63de183e78abb596fffb22ebfa79647a78205aa60cb3ecc8e4ebd1f3bd511a8f9430ec2ecf937d50b6e92b19a38f3cf8
|
7
|
+
data.tar.gz: 1bbc0c5067c4d3f645dea500d5b4c0ce35a78c0ced86e1f0029153e96ccfdd15bd9f2b5e0d997bac4f0c063b6b1bb3684c88b5d8aa0d226aafaf25376198f95f
|
data/lib/rpextras.jar
CHANGED
Binary file
|
data/lib/ruby-processing.rb
CHANGED
@@ -14,15 +14,5 @@ require 'ruby-processing/helpers/range'
|
|
14
14
|
|
15
15
|
# The top-level namespace, a home for all Ruby-Processing classes.
|
16
16
|
module Processing
|
17
|
-
|
18
|
-
@exported ||= ENV['EXPORTED'].eql?('true')
|
19
|
-
end
|
20
|
-
|
21
|
-
# Autoload a number of path/constants that we may end up using.
|
22
|
-
# mri ruby does not understand ** require 'java' ** and we may otherwise call
|
23
|
-
# it from mri ruby without lazy path loading of autoload
|
24
|
-
# NB: autoload is slated for possible removal by ruby-2.2
|
25
|
-
autoload :App, 'ruby-processing/app'
|
26
|
-
autoload :Runner, 'ruby-processing/runner'
|
27
|
-
autoload :Watcher, 'ruby-processing/runners/watch'
|
17
|
+
require 'ruby-processing/runner'
|
28
18
|
end
|
data/lib/ruby-processing/app.rb
CHANGED
@@ -3,10 +3,12 @@
|
|
3
3
|
# Most of the code here is for interfacing with Swing,
|
4
4
|
# web applets, going fullscreen and so on.
|
5
5
|
require 'java'
|
6
|
-
require_relative '
|
7
|
-
require_relative '
|
8
|
-
require_relative '
|
9
|
-
require_relative '
|
6
|
+
require_relative 'helper_methods'
|
7
|
+
require_relative 'helpers/string_extra'
|
8
|
+
require_relative 'library_loader'
|
9
|
+
require_relative 'config'
|
10
|
+
|
11
|
+
|
10
12
|
|
11
13
|
module Processing
|
12
14
|
# This is the main Ruby-Processing class, and is what you'll
|
@@ -16,7 +18,9 @@ module Processing
|
|
16
18
|
# should define in your sketch. 'setup' will be called one
|
17
19
|
# time when the sketch is first loaded, and 'draw' will be
|
18
20
|
# called constantly, for every frame.
|
19
|
-
|
21
|
+
Dir["#{RP_CONFIG["PROCESSING_ROOT"]}/core/library/\*.jar"].each do |jar|
|
22
|
+
require jar unless jar =~ /native/
|
23
|
+
end
|
20
24
|
# Include some core processing classes that we'd like to use:
|
21
25
|
include_package 'processing.core'
|
22
26
|
|
@@ -1,4 +1,6 @@
|
|
1
|
-
#
|
1
|
+
# The processing wrapper module
|
2
|
+
require_relative '../ruby-processing'
|
3
|
+
|
2
4
|
module Processing
|
3
5
|
|
4
6
|
# Encapsulate library loader functionality as a class
|
@@ -35,7 +37,7 @@ module Processing
|
|
35
37
|
def load_ruby_library(library_name)
|
36
38
|
library_name = library_name.to_sym
|
37
39
|
return true if @loaded_libraries.include?(library_name)
|
38
|
-
if
|
40
|
+
if ENV['EXPORTED'].eql?('true')
|
39
41
|
begin
|
40
42
|
return @loaded_libraries[library_name] = (require_relative "../library/#{library_name}")
|
41
43
|
rescue LoadError
|
@@ -4,7 +4,6 @@ require 'rbconfig'
|
|
4
4
|
require_relative '../ruby-processing/config'
|
5
5
|
require_relative '../ruby-processing/version'
|
6
6
|
|
7
|
-
|
8
7
|
module Processing
|
9
8
|
|
10
9
|
# Utility class to handle the different commands that the 'rp5' command
|
@@ -158,7 +157,6 @@ module Processing
|
|
158
157
|
puts " jruby-complete installed = #{installed}"
|
159
158
|
end
|
160
159
|
|
161
|
-
|
162
160
|
# Display the current version of Ruby-Processing.
|
163
161
|
def show_version
|
164
162
|
puts "Ruby-Processing version #{RubyProcessing::VERSION}"
|
@@ -169,13 +167,8 @@ module Processing
|
|
169
167
|
puts HELP_MESSAGE
|
170
168
|
end
|
171
169
|
|
172
|
-
|
173
170
|
private
|
174
171
|
|
175
|
-
def core_classpath
|
176
|
-
Dir["#{Processing::RP_CONFIG['PROCESSING_ROOT']}/core/library/\*.jar"]
|
177
|
-
end
|
178
|
-
|
179
172
|
# Trade in this Ruby instance for a JRuby instance, loading in a starter
|
180
173
|
# script and passing it some arguments.Unless '--nojruby' is passed, the
|
181
174
|
# installed version of jruby is used instead of our vendored jarred one
|
@@ -186,34 +179,26 @@ module Processing
|
|
186
179
|
runner = "#{RP5_ROOT}/lib/ruby-processing/runners/#{starter_script}"
|
187
180
|
warn('The --jruby flag is no longer required') if @options.jruby
|
188
181
|
@options.nojruby = true if Processing::RP_CONFIG['JRUBY'] == 'false'
|
189
|
-
java_args = discover_java_args(sketch)
|
190
|
-
if @options.nojruby
|
191
|
-
classpath = jruby_complete + core_classpath
|
182
|
+
java_args = discover_java_args(sketch)
|
183
|
+
if @options.nojruby
|
192
184
|
command = ['java',
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
185
|
+
java_args,
|
186
|
+
'-cp',
|
187
|
+
jruby_complete,
|
188
|
+
'org.jruby.Main',
|
189
|
+
runner,
|
190
|
+
sketch,
|
191
|
+
args].flatten
|
200
192
|
else
|
201
193
|
command = ['jruby',
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
sketch,
|
207
|
-
args].flatten
|
194
|
+
java_args,
|
195
|
+
runner,
|
196
|
+
sketch,
|
197
|
+
args].flatten
|
208
198
|
end
|
209
199
|
exec(*command)
|
210
200
|
# exec replaces the Ruby process with the JRuby one.
|
211
201
|
end
|
212
|
-
|
213
|
-
def path_separator
|
214
|
-
(host_os == :windows) ? ';' : ':'
|
215
|
-
end
|
216
|
-
|
217
202
|
|
218
203
|
# If you need to pass in arguments to Java, such as the ones on this page:
|
219
204
|
# http://docs.oracle.com/javase/1.5.0/docs/tooldocs/windows/java.html
|
@@ -239,7 +224,7 @@ module Processing
|
|
239
224
|
|
240
225
|
def jruby_complete
|
241
226
|
rcomplete = File.join(RP5_ROOT, 'lib/ruby/jruby-complete.jar')
|
242
|
-
return
|
227
|
+
return rcomplete if FileTest.exist?(rcomplete)
|
243
228
|
warn "#{rcomplete} does not exist\nTry running `rp5 setup install`"
|
244
229
|
exit
|
245
230
|
end
|
@@ -3,8 +3,8 @@
|
|
3
3
|
SKETCH_PATH ||= ARGV.shift
|
4
4
|
SKETCH_ROOT ||= File.dirname(SKETCH_PATH)
|
5
5
|
|
6
|
-
|
7
|
-
require_relative '
|
6
|
+
# we can safely require app.rb as we are using a jruby runtime
|
7
|
+
require_relative '../app'
|
8
8
|
|
9
9
|
# More processing module
|
10
10
|
module Processing
|
@@ -1,12 +1,16 @@
|
|
1
|
-
#
|
2
|
-
#
|
3
|
-
|
4
|
-
|
5
|
-
require_relative '../../ruby-processing/runners/base'
|
1
|
+
# A pry shell for live coding.
|
2
|
+
# Will start with your sketch.
|
3
|
+
require_relative 'base'
|
6
4
|
Processing.load_and_run_sketch
|
7
5
|
|
8
|
-
|
6
|
+
class PryException < StandardError
|
7
|
+
end
|
8
|
+
|
9
|
+
MESSAGE = "You need to 'jruby -S gem install pry' for 'live' mode"
|
9
10
|
|
10
|
-
|
11
|
-
|
12
|
-
|
11
|
+
if Gem::Specification.find_all_by_name('pry').any?
|
12
|
+
require 'pry'
|
13
|
+
$app.pry
|
14
|
+
else
|
15
|
+
fail(PryException.new, MESSAGE)
|
16
|
+
end
|
@@ -1,6 +1,7 @@
|
|
1
|
-
|
1
|
+
require_relative '../../lib/ruby-processing'
|
2
|
+
require "#{RP5_ROOT}/lib/rpextras"
|
2
3
|
|
3
|
-
LibraryProxy = Java::
|
4
|
+
LibraryProxy = Java::MonkstoneCore::AbstractLibrary
|
4
5
|
|
5
6
|
# classes that inherit from Library are expected to implement
|
6
7
|
# the abstract methods of processing.core.AbstractLibrary
|
data/library/vecmath/vecmath.rb
CHANGED
@@ -1,12 +1,9 @@
|
|
1
|
-
|
1
|
+
require_relative '../../lib/ruby-processing'
|
2
|
+
require "#{RP5_ROOT}/lib/rpextras"
|
2
3
|
|
3
|
-
|
4
|
-
|
5
|
-
|
4
|
+
Java::MonkstoneArcball::ArcballLibrary.new.load(JRuby.runtime, false)
|
5
|
+
Java::MonkstoneVecmathVec2::Vec2Library.new.load(JRuby.runtime, false)
|
6
|
+
Java::MonkstoneVecmathVec3::Vec3Library.new.load(JRuby.runtime, false)
|
6
7
|
|
7
|
-
Java::
|
8
|
-
Java::
|
9
|
-
Java::ProcessingVecmathVec3::Vec3Library.new.load(JRuby.runtime, false)
|
10
|
-
|
11
|
-
AppRender = Java::ProcessingVecmath::AppRender
|
12
|
-
ShapeRender = Java::ProcessingVecmath::ShapeRender
|
8
|
+
AppRender ||= Java::MonkstoneVecmath::AppRender
|
9
|
+
ShapeRender ||= Java::MonkstoneVecmath::ShapeRender
|
@@ -1,7 +1,8 @@
|
|
1
|
-
|
1
|
+
require_relative '../../lib/ruby-processing'
|
2
|
+
require "#{RP5_ROOT}/lib/rpextras"
|
2
3
|
|
3
4
|
class Processing::App
|
4
|
-
include Java::
|
5
|
+
include Java::MonkstoneVideoevent::VideoInterface
|
5
6
|
def captureEvent(c)
|
6
7
|
# satisfy implement abstract class
|
7
8
|
end
|
data/vendors/Rakefile
CHANGED
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.6.
|
4
|
+
version: 2.6.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Ashkenas
|
@@ -16,12 +16,12 @@ authors:
|
|
16
16
|
autorequire:
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
|
-
date: 2015-07-
|
19
|
+
date: 2015-07-29 00:00:00.000000000 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
requirement: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.3'
|
27
27
|
name: bundler
|
@@ -29,13 +29,13 @@ dependencies:
|
|
29
29
|
type: :development
|
30
30
|
version_requirements: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- - ~>
|
32
|
+
- - "~>"
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: '1.3'
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
requirement: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '10.3'
|
41
41
|
name: rake
|
@@ -43,13 +43,13 @@ dependencies:
|
|
43
43
|
type: :development
|
44
44
|
version_requirements: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- - ~>
|
46
|
+
- - "~>"
|
47
47
|
- !ruby/object:Gem::Version
|
48
48
|
version: '10.3'
|
49
49
|
- !ruby/object:Gem::Dependency
|
50
50
|
requirement: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0.9'
|
55
55
|
name: rake-compiler
|
@@ -57,13 +57,13 @@ dependencies:
|
|
57
57
|
type: :development
|
58
58
|
version_requirements: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
|
-
- - ~>
|
60
|
+
- - "~>"
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: '0.9'
|
63
63
|
- !ruby/object:Gem::Dependency
|
64
64
|
requirement: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - ~>
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '5.3'
|
69
69
|
name: minitest
|
@@ -71,18 +71,14 @@ dependencies:
|
|
71
71
|
type: :development
|
72
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
|
-
- - ~>
|
74
|
+
- - "~>"
|
75
75
|
- !ruby/object:Gem::Version
|
76
76
|
version: '5.3'
|
77
|
-
description:
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
provides a nice REPL-ish way to work on your processing sketches. Includes:-
|
83
|
-
A "Control Panel" library, so that you can easily create sliders, buttons,
|
84
|
-
checkboxes and drop-down menus, and hook them into your sketch's instance
|
85
|
-
variables and hundreds of worked examples to get you started...
|
77
|
+
description: " Ruby-Processing is a ruby wrapper for the processing art framework.\n\
|
78
|
+
\ This version supports processing-2.2.1, and uses jruby-complete-1.7.22 or an\
|
79
|
+
\ \n installed jruby as the glue between ruby and java. Use both processing \n\
|
80
|
+
\ libraries and ruby gems in your sketches. The \"watch\" mode, provides a \n \
|
81
|
+
\ nice REPL-ish way to work on your processing sketches. \n"
|
86
82
|
email: jeremy@ashkenas.com
|
87
83
|
executables:
|
88
84
|
- rp5
|
@@ -90,6 +86,7 @@ extensions: []
|
|
90
86
|
extra_rdoc_files: []
|
91
87
|
files:
|
92
88
|
- bin/rp5
|
89
|
+
- lib/rpextras.jar
|
93
90
|
- lib/ruby-processing.rb
|
94
91
|
- lib/ruby-processing/app.rb
|
95
92
|
- lib/ruby-processing/config.rb
|
@@ -128,7 +125,6 @@ files:
|
|
128
125
|
- library/vecmath/vecmath.rb
|
129
126
|
- library/video_event/video_event.rb
|
130
127
|
- vendors/Rakefile
|
131
|
-
- lib/rpextras.jar
|
132
128
|
homepage: http://wiki.github.com/jashkenas/ruby-processing
|
133
129
|
licenses:
|
134
130
|
- MIT
|
@@ -139,12 +135,12 @@ require_paths:
|
|
139
135
|
- lib
|
140
136
|
required_ruby_version: !ruby/object:Gem::Requirement
|
141
137
|
requirements:
|
142
|
-
- -
|
138
|
+
- - ">="
|
143
139
|
- !ruby/object:Gem::Version
|
144
140
|
version: 1.9.3
|
145
141
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
146
142
|
requirements:
|
147
|
-
- -
|
143
|
+
- - ">="
|
148
144
|
- !ruby/object:Gem::Version
|
149
145
|
version: '0'
|
150
146
|
requirements:
|
@@ -152,7 +148,7 @@ requirements:
|
|
152
148
|
- java runtime >= 1.7+
|
153
149
|
- processing = 2.2.1+
|
154
150
|
rubyforge_project:
|
155
|
-
rubygems_version: 2.
|
151
|
+
rubygems_version: 2.4.8
|
156
152
|
signing_key:
|
157
153
|
specification_version: 4
|
158
154
|
summary: Code as Art, Art as Code. Processing and Ruby are meant for each other.
|