ruby-processing 2.6.12 → 2.6.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d97dffce26050b2b5f80189ef063b6f9093a8f39
4
- data.tar.gz: 045df452ea1968641ddfccac5e0e2222efdfc06d
3
+ metadata.gz: 0dd16b8c23b72512132d1d5d4ec026e4a8ea3c73
4
+ data.tar.gz: cb859d80e805cb554abab5dadc86cd35d3977871
5
5
  SHA512:
6
- metadata.gz: 8d3e525fc43e1d74ea96e7df4b3cd52eb81601f2e8f57a603163cc80988d8ab227ce84a7875123eac9bb18fb80bf5cc7a65b58a695b163ec6db95bb39a48f7bd
7
- data.tar.gz: 63a38138b14d31f5bdb1b49fc8ab46ff87bddd41393e279ebcb1365809b4c9ad326caf441a3941beff68306919326e7b131727c86362c1ed4d4785b3e349ac7d
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(/\/(.?)/) { '::' + $1.upcase }.gsub(/(^|_)(.)/) { $2.upcase }
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
@@ -16,7 +16,7 @@ class StringExtra
16
16
  .downcase
17
17
  .gsub(/_id$/, '')
18
18
  .gsub(/_/, ' ').capitalize
19
- .gsub(/\b([a-z])/) { $1.capitalize }
19
+ .gsub(/\b([a-z])/) { Regexp.last_match[1].capitalize }
20
20
  end
21
21
 
22
22
  def humanize
@@ -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 => e
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
- test(?d, ppath) && !Dir.glob(File.join(ppath, '*.{so,dll,jnilib}')).empty?
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
- if sketchbook_path = Processing::RP_CONFIG.fetch('sketchbook_path', false)
125
- return sketchbook_path
126
- else
127
- ["'Application Data/Processing'", 'AppData/Roaming/Processing',
128
- 'Library/Processing', 'Documents/Processing',
129
- '.processing', 'sketchbook'].each do |prefix|
130
- spath = format('%s/%s', ENV['HOME'], prefix)
131
- pref_path = format('%s/preferences.txt', spath)
132
- preferences_paths << pref_path if test(?f, pref_path)
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
@@ -1,3 +1,3 @@
1
1
  module RubyProcessing
2
- VERSION = '2.6.12'
2
+ VERSION = '2.6.13'
3
3
  end
@@ -2,4 +2,11 @@ require 'rpextras'
2
2
 
3
3
  class Processing::App
4
4
  include Java::ProcessingCore::VideoInterface
5
+ def captureEvent(c)
6
+ # satisfy implement abstract class
7
+ end
8
+
9
+ def movieEvent(m)
10
+ # satisfy implement abstract class
11
+ end
5
12
  end
data/vendors/Rakefile CHANGED
@@ -8,7 +8,7 @@ WARNING = <<-EOS
8
8
 
9
9
  EOS
10
10
 
11
- JRUBYC_VERSION = '1.7.20'
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", "0f784b3d9d760b80b2f9d78ede80ee1d8d85e786")
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.12
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 Pierronne
14
+ - Galang Guillaume Pierronnet
15
15
  - Martin Prout
16
16
  autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
- date: 2015-06-12 00:00:00.000000000 Z
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