ruby-processing 2.6.12 → 2.6.13
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/ruby-processing/helpers/camel_string.rb +2 -1
- data/lib/ruby-processing/helpers/string_extra.rb +1 -1
- data/lib/ruby-processing/library_loader.rb +17 -17
- data/lib/ruby-processing/runner.rb +7 -2
- data/lib/ruby-processing/version.rb +1 -1
- data/library/video_event/video_event.rb +7 -0
- data/vendors/Rakefile +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0dd16b8c23b72512132d1d5d4ec026e4a8ea3c73
|
4
|
+
data.tar.gz: cb859d80e805cb554abab5dadc86cd35d3977871
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c77a518ef8bf243e6cd30d4d8d0371072ef1b0cb68e24d20e880a8844f992ea188325da8480c35b150ba6b48d6560604013a2006840c4b28504ed5789c3780b
|
7
|
+
data.tar.gz: c6ed3b51da1ed81e459194535668977e69a58816092d3f19b7b742d57e7502c29e5c7dffa7e5d22b2b1061ac5a877050723df154cd10490612103a78122dc951
|
@@ -10,7 +10,8 @@ class CamelString
|
|
10
10
|
|
11
11
|
def camelize(first_letter_in_uppercase = true)
|
12
12
|
if first_letter_in_uppercase
|
13
|
-
@string.gsub(
|
13
|
+
@string.gsub(%r{\/(.?)}) { '::' + Regexp.last_match[1].upcase }
|
14
|
+
.gsub(/(^|_)(.)/) { Regexp.last_match[2].upcase }
|
14
15
|
else
|
15
16
|
@string[0] + camelize[1..-1]
|
16
17
|
end
|
@@ -1,4 +1,6 @@
|
|
1
|
+
# Then processing wrapper module
|
1
2
|
module Processing
|
3
|
+
|
2
4
|
# Encapsulate library loader functionality as a class
|
3
5
|
class LibraryLoader
|
4
6
|
attr_reader :sketchbook_library_path
|
@@ -36,7 +38,7 @@ module Processing
|
|
36
38
|
if Processing.exported?
|
37
39
|
begin
|
38
40
|
return @loaded_libraries[library_name] = (require_relative "../library/#{library_name}")
|
39
|
-
rescue LoadError
|
41
|
+
rescue LoadError
|
40
42
|
return false
|
41
43
|
end
|
42
44
|
end
|
@@ -58,7 +60,7 @@ module Processing
|
|
58
60
|
jars.each { |jar| require jar }
|
59
61
|
platform_specific_library_paths = get_platform_specific_library_paths(jpath)
|
60
62
|
platform_specific_library_paths = platform_specific_library_paths.select do |ppath|
|
61
|
-
|
63
|
+
FileTest.directory?(ppath) && !Dir.glob(File.join(ppath, '*.{so,dll,jnilib}')).empty?
|
62
64
|
end
|
63
65
|
unless platform_specific_library_paths.empty?
|
64
66
|
platform_specific_library_paths << java.lang.System.getProperty('java.library.path')
|
@@ -121,22 +123,20 @@ module Processing
|
|
121
123
|
def find_sketchbook_path
|
122
124
|
preferences_paths = []
|
123
125
|
sketchbook_paths = []
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
'
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
sketchbook_paths << spath if test(?d, spath)
|
134
|
-
end
|
135
|
-
return sketchbook_paths.first if preferences_paths.empty?
|
136
|
-
lines = IO.readlines(preferences_paths.first)
|
137
|
-
matchedline = lines.grep(/^sketchbook/).first
|
138
|
-
matchedline[/=(.+)/].gsub('=', '')
|
126
|
+
sketchbook_path = Processing::RP_CONFIG.fetch('sketchbook_path', false)
|
127
|
+
return sketchbook_path if sketchbook_path
|
128
|
+
["'Application Data/Processing'", 'AppData/Roaming/Processing',
|
129
|
+
'Library/Processing', 'Documents/Processing',
|
130
|
+
'.processing', 'sketchbook'].each do |prefix|
|
131
|
+
spath = format('%s/%s', ENV['HOME'], prefix)
|
132
|
+
pref_path = format('%s/preferences.txt', spath)
|
133
|
+
preferences_paths << pref_path if FileTest.file?(pref_path)
|
134
|
+
sketchbook_paths << spath if FileTest.directory?(spath)
|
139
135
|
end
|
136
|
+
return sketchbook_paths.first if preferences_paths.empty?
|
137
|
+
lines = IO.readlines(preferences_paths.first)
|
138
|
+
matchedline = lines.grep(/^sketchbook/).first
|
139
|
+
matchedline[/=(.+)/].gsub('=', '')
|
140
140
|
end
|
141
141
|
end
|
142
142
|
end
|
@@ -192,7 +192,7 @@ module Processing
|
|
192
192
|
command = ['java',
|
193
193
|
java_args,
|
194
194
|
'-cp',
|
195
|
-
classpath.join(
|
195
|
+
classpath.join(path_separator),
|
196
196
|
'org.jruby.Main',
|
197
197
|
runner,
|
198
198
|
sketch,
|
@@ -201,7 +201,7 @@ module Processing
|
|
201
201
|
command = ['jruby',
|
202
202
|
java_args,
|
203
203
|
'-J-cp',
|
204
|
-
core_classpath.join(
|
204
|
+
core_classpath.join(path_separator),
|
205
205
|
runner,
|
206
206
|
sketch,
|
207
207
|
args].flatten
|
@@ -209,6 +209,11 @@ module Processing
|
|
209
209
|
exec(*command)
|
210
210
|
# exec replaces the Ruby process with the JRuby one.
|
211
211
|
end
|
212
|
+
|
213
|
+
def path_separator
|
214
|
+
(host_os == :windows) ? ';' : ':'
|
215
|
+
end
|
216
|
+
|
212
217
|
|
213
218
|
# If you need to pass in arguments to Java, such as the ones on this page:
|
214
219
|
# http://docs.oracle.com/javase/1.5.0/docs/tooldocs/windows/java.html
|
data/vendors/Rakefile
CHANGED
@@ -8,7 +8,7 @@ WARNING = <<-EOS
|
|
8
8
|
|
9
9
|
EOS
|
10
10
|
|
11
|
-
JRUBYC_VERSION = '1.7.
|
11
|
+
JRUBYC_VERSION = '1.7.21'
|
12
12
|
EXAMPLES = '1.6'
|
13
13
|
HOME_DIR = ENV['HOME']
|
14
14
|
MAC_OR_LINUX = /linux|mac|darwin/ =~ RbConfig::CONFIG['host_os']
|
@@ -27,7 +27,7 @@ file "jruby-complete-#{JRUBYC_VERSION}.jar" do
|
|
27
27
|
rescue
|
28
28
|
warn(WARNING)
|
29
29
|
end
|
30
|
-
check_sha1("jruby-complete-#{JRUBYC_VERSION}.jar", "
|
30
|
+
check_sha1("jruby-complete-#{JRUBYC_VERSION}.jar", "e061b9f399a5e8d5cfcca84d4a6baf879111e83c")
|
31
31
|
end
|
32
32
|
|
33
33
|
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.6.
|
4
|
+
version: 2.6.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Ashkenas
|
@@ -11,12 +11,12 @@ authors:
|
|
11
11
|
- Florian Jenett
|
12
12
|
- Andreas Haller
|
13
13
|
- Juris
|
14
|
-
- Galang Guillaume
|
14
|
+
- Galang Guillaume Pierronnet
|
15
15
|
- Martin Prout
|
16
16
|
autorequire:
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
|
-
date: 2015-
|
19
|
+
date: 2015-07-07 00:00:00.000000000 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
requirement: !ruby/object:Gem::Requirement
|