jruby_art 0.2.4.pre → 0.2.6.pre

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 05c56a4fef1b06b3b0eef19527dd33a9b0d89333
4
- data.tar.gz: 300a3b7e12a1883085fac9d467bcacbe46d268bc
3
+ metadata.gz: 186cf1166260ed477d29a53e4d6af5982ec61320
4
+ data.tar.gz: 778ff0c076f4fc7a5cae5e297713ee2154eadafd
5
5
  SHA512:
6
- metadata.gz: 46e27c5d4f77c70155763fc0c0012d53ed6e42eb83dcf89b1657e1be452617181b3e7d618fd4991b8b280946cf711c2f7971b80fbe7e370375d6629e57f309e8
7
- data.tar.gz: 040c4eee673e1b5816e0bdb6029e6218413df601a66eda8ef6e1b3a23224517b3e4c29d1aac36d0cb6bbd07b4144857f6908625b2b0823773df9c871a377ad67
6
+ metadata.gz: 5501b44349aefdbedd0531db69d1e539e85f2da546a0777da584b159540b03909e960ae6b433bbf5639dc3ba2795b9ac173837657a8f25b685af4735dfd0dcf0
7
+ data.tar.gz: 6a331e4710e2f8185e2cc535959e033b14906e35561d4625040fd43ab01523bdd5f84a0db04cd4f9bc39b1e4980ce65b2e69ac21ac78da1d721e313c9d43acd0
data/CHANGELOG.md CHANGED
@@ -1,10 +1,19 @@
1
1
  ## JRubyArt CHANGELOG
2
2
 
3
3
  It might seem a little of that this log starts at version 0.1.2, the reason for this is that previous version relate to earlier versions which were essentially a clone of ruby-processing.
4
+ ### Version 0.2.6
5
+
6
+ Enable use of 'videoEvent' and 'captureEvent' java reflection methods by creating a 'VideoInterface' in a java class.
7
+
8
+
9
+ ### Version 0.2.5
10
+
11
+ jruby-1.7.20 version
12
+ Revert to Processing::Proxy as a module, but implement :method_missing (after tyfkda processing ruby-mode), and java_import PConstants in that module. Require 'yaml' rather than 'psych' as workaround for builtin 'psych' in jruby.
4
13
 
5
14
  ### Version 0.2.4
6
15
 
7
- Can't wait forever for jruby-9000, this release is require to promote the new toxiclibs gem.
16
+ Can't wait forever for jruby-9000, this release is required to promote the new [toxiclibs gem][].
8
17
 
9
18
  ### Version 0.2.3
10
19
 
@@ -47,3 +56,5 @@ Move config file from ~/.k9rc to ~/.jruby_art/config.yml, created installer for
47
56
  ### Version 0.1.2
48
57
 
49
58
  First point release, requires user build, supports 2D and opengl sketches, but no library support. Sketches will only run with jruby (jruby-complete is not included). To run sketches with load_image jruby-complete is required, so either provide that or use netbeans as your ide (with jruby plugin).
59
+
60
+ [toxiclibs gem]:https://github.com/ruby-processing/toxicgem
data/README.md CHANGED
@@ -2,10 +2,11 @@
2
2
  [![Gem Version](https://badge.fury.io/rb/jruby_art.svg)](http://badge.fury.io/rb/jruby_art)
3
3
 
4
4
  Is an alternative implementation of [ruby-processing][] that provides a ruby-wrapper for the java version of [processing][]. It is currently at the pre-release stage, but is ready for testing, and available from rubygems.org.
5
+ Core processing jars are included, so it does not require a vanilla processing install..., you should perhaps consider making a contribution to the [processing foundation][].
5
6
 
6
7
  ### Requirements
7
8
 
8
- Java runtime 7+, and ruby (can be MRI ruby), curl (to download jruby-complete and examples, although there is a workaround). NB: it is not necessary to install vanilla [processing][] with this implementation, core jars are included in the gem.
9
+ Java runtime 7+, and ruby (can be MRI ruby), curl (to download jruby-complete and examples, although there is a workaround).
9
10
 
10
11
  ### Getting Started
11
12
 
@@ -51,13 +52,13 @@ However such sketches must be run with `k9 run sketch.rb`, however you can do 'k
51
52
 
52
53
  ###Ruby Versions
53
54
 
54
- jruby-1.7.19 (when sketches run with jruby command)
55
+ jruby-1.7.20 (when sketches run with jruby command)
55
56
 
56
- jruby-9.0.0.0.pre1 also seems to work (the next pre-release will target jruby-9.0.0.0-pre2)
57
+ jruby-9.0.0.0.pre2 also seems to work (the next pre-release will probably target jruby-9.0.0.0-pre2)
57
58
 
58
59
  or
59
60
 
60
- ruby-2.1.2+ (when sketches are run using k9 command, ie using jruby-complete)
61
+ ruby-2.1.2+ (when sketches are run using k9 command, ie using jruby-complete with jruby-9.0.0.0)
61
62
 
62
63
  ### Using netbeans as an ide for JRubyArt
63
64
 
@@ -87,3 +88,4 @@ ___
87
88
  [netbeans]:http://learning-ruby-processing.blogspot.co.uk/2014/10/alternative-ruby-processing-implentation.html
88
89
  [processing-2.2.1]:https://processing.org/download/
89
90
  [processing-core]:https://github.com/ruby-processing/processing-core/blob/master/README.md
91
+ [processing foundation]:https://processing.org/download/
data/Rakefile CHANGED
@@ -18,7 +18,7 @@ spec = Gem::Specification.new do |s|
18
18
  s.description = "A ruby wrapper for processing, that doesn't require a separate install of processing"
19
19
  s.license = 'MIT'
20
20
  s.author = 'Martin Prout'
21
- s.email = 'martin_p@lineone.net'
21
+ s.email = 'mamba2928@yahoo.co.uk'
22
22
  s.homepage = 'https://github.com/ruby-processing/JRubyArt'
23
23
  s.executables << 'k9'
24
24
  s.files = %w(LICENSE.md README.md Rakefile CHANGELOG.md) + Dir.glob('{bin,lib,library,spec,vendors}/**/*')
data/lib/jruby_art.rb CHANGED
@@ -15,14 +15,9 @@ if RUBY_PLATFORM == 'java'
15
15
  # require_relative jar unless jar =~ /native/ (breaks netbeans)
16
16
  require jar unless jar =~ /native/
17
17
  end
18
- #Dir[File.join(working_directory, platform)].each do |jar|
19
- # require_relative jar (break netbeans)
20
- # require jar
21
- # end
22
18
  Java::ProcessingFastmath::DeglutLibrary.new.load(JRuby.runtime, false)
23
19
  Java::ProcessingVecmathVec2::Vec2Library.new.load(JRuby.runtime, false)
24
20
  Java::ProcessingVecmathVec3::Vec3Library.new.load(JRuby.runtime, false)
25
-
26
21
  AppRender = Java::ProcessingVecmath::AppRender
27
22
  ShapeRender = Java::ProcessingVecmath::ShapeRender
28
23
  require 'jruby_art/app'
data/lib/jruby_art/app.rb CHANGED
@@ -26,14 +26,14 @@ module Processing
26
26
  def post_initialize(_opts = {})
27
27
  nil
28
28
  end
29
-
29
+
30
30
  # This method configures the sketch title and and presentation mode.
31
31
  #
32
32
  def configure_sketch
33
33
  presentation_mode
34
34
  sketch_title
35
35
  end
36
-
36
+
37
37
  # This method sets the sketch presentation mode.
38
38
  #
39
39
  def presentation_mode
@@ -41,20 +41,20 @@ module Processing
41
41
  args << '--full-screen'
42
42
  args << "--bgcolor=#{opts[:bgcolor]}" if opts[:bgcolor]
43
43
  end
44
-
44
+
45
45
  # This method is the main draw loop of the sketch. This is usually
46
46
  # overridden by the user.
47
47
  #
48
48
  def draw
49
49
  nil
50
50
  end
51
-
51
+
52
52
  # This method runs the processing sketch.
53
53
  #
54
54
  def run_sketch
55
55
  PApplet.run_sketch(args.to_java(:string), self)
56
56
  end
57
-
57
+
58
58
  # This method sets the sketch title.
59
59
  #
60
60
  def sketch_title
@@ -73,22 +73,22 @@ module Processing
73
73
  key_released: :keyReleased,
74
74
  key_typed: :keyTyped
75
75
  }
76
-
76
+
77
77
  # This class is for default (Java2D) sketches only
78
78
  class App < PApplet
79
79
  include Math, Common, HelperMethods
80
80
  attr_reader :title, :args, :opts
81
-
81
+
82
82
  class << self
83
83
  # Handy getters and setters on the class go here:
84
84
  attr_accessor :sketch_class, :library_loader
85
-
85
+
86
86
  def load_libraries(*args)
87
87
  library_loader ||= LibraryLoader.new
88
88
  library_loader.load_libraries(*args)
89
89
  end
90
90
  alias_method :load_library, :load_libraries
91
-
91
+
92
92
  # When certain special methods get added to the sketch, we need to let
93
93
  # Processing call them by their expected Java names.
94
94
  def method_added(method_name) #:nodoc:
@@ -96,11 +96,11 @@ module Processing
96
96
  alias_method METHODS_TO_ALIAS[method_name], method_name
97
97
  end
98
98
  end
99
-
99
+
100
100
  def sketch_class
101
101
  self.class.sketch_class
102
102
  end
103
-
103
+
104
104
  # App should be instantiated with an optional list of opts
105
105
  # and array of args.
106
106
  #
@@ -116,7 +116,7 @@ module Processing
116
116
  configure_sketch
117
117
  run_sketch
118
118
  end
119
-
119
+
120
120
  # This method provides the default setup for the sketch. It can
121
121
  # be overridden by the user for finer grained control.
122
122
  #
@@ -124,7 +124,7 @@ module Processing
124
124
  size(width, height)
125
125
  end
126
126
  end
127
-
127
+
128
128
  # This class is for opengl sketches (P2D and P3D)
129
129
  class AppGL < PApplet
130
130
  include Math, Processing, Common
@@ -132,7 +132,7 @@ module Processing
132
132
  include HelperMethods
133
133
  Java::ProcessingVecmathArcball::ArcballLibrary.new.load(JRuby.runtime, false)
134
134
  attr_reader :title, :args, :opts
135
-
135
+
136
136
  # App should be instantiated with an optional list of opts
137
137
  # and array of args.
138
138
  #
@@ -148,7 +148,7 @@ module Processing
148
148
  configure_sketch
149
149
  run_sketch
150
150
  end
151
-
151
+
152
152
  # This method provides the default setup for the sketch. It can
153
153
  # be overridden by the user for finer grained control.
154
154
  #
@@ -156,17 +156,17 @@ module Processing
156
156
  size(width, height, mode = P3D)
157
157
  fail unless /opengl/ =~ mode
158
158
  end
159
-
159
+
160
160
  class << self
161
161
  # Handy getters and setters on the class go here:
162
162
  attr_accessor :sketch_class, :library_loader
163
-
163
+
164
164
  def load_libraries(*args)
165
165
  library_loader ||= LibraryLoader.new
166
166
  library_loader.load_libraries(*args)
167
167
  end
168
168
  alias_method :load_library, :load_libraries
169
-
169
+
170
170
  # When certain special methods get added to the sketch, we need to let
171
171
  # Processing call them by their expected Java names.
172
172
  def method_added(method_name) #:nodoc:
@@ -175,5 +175,19 @@ module Processing
175
175
  end
176
176
  end
177
177
  end
178
- end
179
178
 
179
+ # Importing PConstants to access to processing constants,
180
+ # to keep namespace clean use PConstants::TRIANGLE (for example)
181
+ # or to use bare TRIANGLE also 'include PConstants'
182
+ # Using :method_missing to mimic inner class methods
183
+ # @HACK you should consider using 'forwardable' to avoid this
184
+ # egregious hack...
185
+ module Proxy
186
+ java_import 'processing.core.PConstants'
187
+
188
+ def method_missing(name, *args)
189
+ return $app.send(name, *args) if $app && $app.respond_to?(name)
190
+ super
191
+ end
192
+ end
193
+ end
@@ -1,13 +1,11 @@
1
- require 'psych'
1
+ require 'yaml'
2
2
  # The Processing module is a wrapper for JRubyArt
3
3
  # Author:: Martin Prout (extends / re-implements ruby-processing)
4
4
  module Processing
5
5
  unless defined? RP_CONFIG
6
6
  begin
7
7
  CONFIG_FILE_PATH = File.expand_path('~/.jruby_art/config.yml')
8
- File.open(CONFIG_FILE_PATH, 'r') do |yaml|
9
- RP_CONFIG = Psych.load(yaml)
10
- end
8
+ RP_CONFIG = YAML.load_file(CONFIG_FILE_PATH)
11
9
  rescue
12
10
  warn('WARNING: you need to set PROCESSING_ROOT in ~/.jruby_art/config.yml')
13
11
  end
@@ -1,4 +1,4 @@
1
1
  # The sole purpose of this module is to provide a name-space for version
2
2
  module JRubyArt
3
- VERSION = '0.2.4.pre'
3
+ VERSION = '0.2.6.pre'
4
4
  end
data/lib/rpextras.jar CHANGED
Binary file
@@ -0,0 +1,3 @@
1
+ require 'rpextras'
2
+
3
+ LibraryProxy = Java::ProcessingCore::AbstractLibrary
@@ -0,0 +1 @@
1
+ name = Video
@@ -0,0 +1 @@
1
+ Macosx requires binary blobs to use this library, copy the macosx64 folder from the
@@ -0,0 +1,3 @@
1
+ windows requires binary blobs to use this library, copy either the windows32 or windows64
2
+ folder from https://github.com/processing/processing-video/releases/download/latest/video.zip
3
+ available since processing-3.0a5 video library here (as appropriate for your system).
@@ -0,0 +1,12 @@
1
+ require 'rpextras'
2
+ require_relative 'lib/video.jar'
3
+ require_relative 'lib/gstreamer-java.jar'
4
+ require_relative 'lib/jna.jar'
5
+
6
+ class Processing::App
7
+ include Java::ProcessingCore::VideoInterface
8
+ end
9
+
10
+ class Processing::AppGL
11
+ include Java::ProcessingCore::VideoInterface
12
+ end
data/spec/vecmath_spec.rb CHANGED
@@ -34,7 +34,38 @@ describe 'Vec2D#==' do
34
34
  it 'should return a == b' do
35
35
  a = Vec2D.new(3, 5)
36
36
  b = Vec2D.new(6, 7)
37
- expect(a == b).to eq(false)
37
+ expect(a == b).to be false
38
+ end
39
+ end
40
+
41
+ describe 'Vec2D#eql?' do
42
+ it 'should return a.eql? b' do
43
+ a = Vec2D.new(3.0, 5.0)
44
+ b = Vec2D.new(3.0, 5.0)
45
+ expect(a.eql?(b)).to be true
46
+ end
47
+ end
48
+
49
+ describe 'Vec2D#eql?' do
50
+ it 'should return a.eql? b' do
51
+ a = Vec2D.new(3.0, 5.0)
52
+ b = Vec2D.new(3.0, 5.000001)
53
+ expect(a.eql?(b)).to be false
54
+ end
55
+ end
56
+
57
+ describe 'Vec2D#equal?' do
58
+ it 'should return a.eql? b' do
59
+ a = Vec2D.new(3.0, 5.0)
60
+ expect(a.equal?(a)).to be true
61
+ end
62
+ end
63
+
64
+ describe 'Vec2D#equal?' do
65
+ it 'should return a.eql? b' do
66
+ a = Vec2D.new(3.0, 5.0)
67
+ b = Vec2D.new(3.0, 5.0)
68
+ expect(a.equal?(b)).to be false
38
69
  end
39
70
  end
40
71
 
@@ -42,7 +73,7 @@ describe 'Vec2D#==' do
42
73
  it 'should return a == b' do
43
74
  a = Vec2D.new(3.0000000, 5.00000)
44
75
  b = Vec2D.new(3.0000000, 5.000001)
45
- expect(a == b).to eq(true)
76
+ expect(a == b).to be true
46
77
  end
47
78
  end
48
79
 
@@ -275,3 +306,178 @@ describe 'Vec2D#rotate rot' do
275
306
  expect(a).to eq(Vec2D.new(-10.0, 20.0))
276
307
  end
277
308
  end
309
+
310
+ describe 'Vec3D#to_a' do
311
+ it 'should return x, y, z as an array' do
312
+ x, y, z = 1.0000001, 1.01, 0.999999
313
+ a = Vec3D.new(x, y, z)
314
+ expect(a.to_a).to eq([x, y, z])
315
+ end
316
+ end
317
+
318
+ describe 'Vec3D#copy' do
319
+ it 'should return a deep copy' do
320
+ x, y, z = 1.0000001, 1.01, 0.999999
321
+ a = Vec3D.new(x, y, z)
322
+ expect(a.copy.to_a).to eq([x, y, z])
323
+ end
324
+ end
325
+
326
+ describe 'Vec3D#copy' do
327
+ it 'should produce a new object' do
328
+ x, y, z = 1.0000001, 1.01, 0.999999
329
+ a = Vec3D.new(x, y, z)
330
+ b = a.copy
331
+ b.normalize!
332
+ expect(a).not_to eq(b)
333
+ end
334
+ end
335
+
336
+ describe 'Vec3D#normalize! zero vector' do
337
+ it 'should do nothing' do
338
+ a = Vec3D.new
339
+ b = a.normalize!
340
+ expect(a).to eq(b)
341
+ end
342
+ end
343
+
344
+ describe 'Vec3D#normalize zero vector' do
345
+ it 'should do nothing' do
346
+ a = Vec3D.new
347
+ b = a.normalize
348
+ expect(a).to eq(b)
349
+ expect(a).to_not equal(b)
350
+ end
351
+ end
352
+
353
+ describe 'Vec3D#dist_squared' do
354
+ it 'should return Vec3D.dist_squared(a, b)' do
355
+ a = Vec3D.new(3, 5, 2)
356
+ b = Vec3D.new(6, 7, 1)
357
+ expect(a.dist_squared(b)).to eq 3.0**2 + 2**2 + 1
358
+ end
359
+ end
360
+
361
+ describe 'Vec3D#dist' do
362
+ it 'should return Vec3D.dist(a, b)' do
363
+ a = Vec3D.new(3, 5, 2)
364
+ b = Vec3D.new(6, 7, 1)
365
+ expect(a.dist(b)).to eq Math.sqrt(3.0**2 + 2**2 + 1)
366
+ end
367
+ end
368
+
369
+ describe 'Vec3D#normalize' do
370
+ it 'should return Vec3D#normalize a new Vec3D with mag == 1.0' do
371
+ a = Vec3D.new(3, 5, 2)
372
+ b = a.normalize
373
+ expect(b.mag).to be_within(EPSILON).of(1.0)
374
+ end
375
+ end
376
+
377
+ describe 'Vec3D#normalize!' do
378
+ it 'should return Vec3D#normalize! Vec3D#mag == 1.0' do
379
+ a = Vec3D.new(3, 5, 2)
380
+ a.normalize!
381
+ expect(a.mag).to be_within(EPSILON).of(1.0)
382
+ end
383
+ end
384
+
385
+ describe 'Vec3D#set_mag zero vector' do
386
+ it 'should return zero vector' do
387
+ a = Vec3D.new(0, 0, 0)
388
+ expect(a.set_mag(Math.sqrt(48))).to eq Vec3D.new(0, 0, 0)
389
+ end
390
+ end
391
+
392
+ describe 'Vec3D#set_mag' do
393
+ it 'should return Vec3D#set_mag' do
394
+ a = Vec3D.new(1, 1, 1)
395
+ expect(a.set_mag(Math.sqrt(48))).to eq Vec3D.new(4, 4, 4)
396
+ end
397
+ end
398
+
399
+ describe 'Vec3D#cross product' do
400
+ it 'should return Vec3D.cross(vec)' do
401
+ a = Vec3D.new(3, 5, 2)
402
+ b = Vec3D.new(6, 7, 1)
403
+ expect(a.cross(b)).to eq Vec3D.new(-9.0, 9.0, -9.0)
404
+ end
405
+ end
406
+
407
+ describe 'Vec3D#set_mag negative block' do
408
+ it 'should return Vec3D#set_mag' do
409
+ a = Vec3D.new(1, 1, 1)
410
+ expect(a.set_mag(Math.sqrt(48)) { false }).to eq a
411
+ end
412
+ end
413
+
414
+ describe 'Vec3D#inspect' do
415
+ it 'should return a String' do
416
+ a = Vec3D.new(3, 5, 2.000000000000001)
417
+ expect(a.inspect).to eq 'Vec3D(x = 3.0000, y = 5.0000, z = 2.0000)'
418
+ end
419
+ end
420
+
421
+ describe 'Vec3D#set_mag positive block' do
422
+ it 'should return Vec3D#set_mag' do
423
+ a = Vec3D.new(1, 1, 1)
424
+ expect(a.set_mag(Math.sqrt(48)) { true }).to eq Vec3D.new(4, 4, 4)
425
+ end
426
+ end
427
+
428
+ describe 'Vec3D#to_a' do
429
+ it 'should return x, y as an array' do
430
+ x, y, z = 1.0000001, 1.01, 1.001
431
+ a = Vec3D.new(x, y, z)
432
+ expect(a.to_a).to eq([x, y, z])
433
+ end
434
+ end
435
+
436
+ describe 'Vec3D#z=' do
437
+ it 'should set z value' do
438
+ x, y, z = 1.0000001, 1.01, 1.001
439
+ a = Vec3D.new(x, y, z)
440
+ w = 56.0
441
+ a.z = w
442
+ expect(a.z).to eq(w)
443
+ end
444
+ end
445
+
446
+ describe 'Vec3D#==' do
447
+ it 'should return a == b' do
448
+ a = Vec3D.new(3.0, 5.0, 0)
449
+ b = Vec3D.new(3.0, 5.000001, 0)
450
+ expect(a == b).to be true
451
+ end
452
+ end
453
+
454
+ describe 'Vec3D#eql?' do
455
+ it 'should return a.eql? b' do
456
+ a = Vec3D.new(3.0, 5.0, 0)
457
+ b = Vec3D.new(3.0, 5.0, 0)
458
+ expect(a.eql?(b)).to be true
459
+ end
460
+ end
461
+
462
+ describe 'Vec3D#eql?' do
463
+ it 'should return a.eql? b' do
464
+ a = Vec3D.new(3.0, 5.0, 0)
465
+ b = Vec3D.new(3.0, 5.000001, 0)
466
+ expect(a.eql?(b)).to be false
467
+ end
468
+ end
469
+
470
+ describe 'Vec3D#equal?' do
471
+ it 'should return a.eql? b' do
472
+ a = Vec3D.new(3.0, 5.0)
473
+ expect(a.equal?(a)).to be true
474
+ end
475
+ end
476
+
477
+ describe 'Vec3D#equal?' do
478
+ it 'should return a.eql? b' do
479
+ a = Vec3D.new(3.0, 5.0, 0)
480
+ b = Vec3D.new(3.0, 5.0, 0)
481
+ expect(a.equal?(b)).to be false
482
+ end
483
+ end
data/vendors/Rakefile CHANGED
@@ -10,14 +10,25 @@ WARNING = <<-EOS
10
10
 
11
11
  EOS
12
12
 
13
- JRUBYC_VERSION = '1.7.19'
14
- EXAMPLES = '0.0.5'
13
+ JRUBYC_VERSION = '1.7.20'
14
+ EXAMPLES = '0.0.6-pre'
15
15
  HOME_DIR = ENV['HOME']
16
16
  MAC_OR_LINUX = /linux|mac|darwin/ =~ RbConfig::CONFIG['host_os']
17
- CLOBBER.include("jruby-complete-#{JRUBYC_VERSION}.jar", "#{EXAMPLES}.tar.gz")
17
+ CLOBBER.include("jruby-complete-#{JRUBYC_VERSION}.jar", "#{EXAMPLES}.tar.gz", "video.zip")
18
18
 
19
19
  desc "download, and copy to ruby-processing"
20
- task :default => [:download, :copy_ruby, :download_examples, :copy_examples, :config]
20
+ task :default => [:install_ruby, :install_video, :config, :install_examples]
21
+
22
+ desc "install jruby"
23
+ task :install_ruby => [:download, :copy_ruby]
24
+
25
+ desc "install video library"
26
+ task :install_video => [:download_video, :copy_video]
27
+
28
+
29
+ desc "install examples"
30
+ task :install_examples => [:download_examples, :copy_examples]
31
+
21
32
 
22
33
  desc "download JRuby upstream sources"
23
34
  task :download => ["jruby-complete-#{JRUBYC_VERSION}.jar"]
@@ -28,7 +39,18 @@ file "jruby-complete-#{JRUBYC_VERSION}.jar" do
28
39
  rescue
29
40
  warn(WARNING)
30
41
  end
31
- check_sha1("jruby-complete-#{JRUBYC_VERSION}.jar", "9973923de511c06d979e950801b51a95d19e8be3")
42
+ check_sha1("jruby-complete-#{JRUBYC_VERSION}.jar", "0f784b3d9d760b80b2f9d78ede80ee1d8d85e786")
43
+ end
44
+
45
+ desc "download processing video-library"
46
+ task :download_video => ["video.zip"]
47
+
48
+ file "video.zip" do
49
+ begin
50
+ sh "curl -O https://github.com/processing/processing-video/releases/download/latest/video.zip"
51
+ rescue
52
+ warn(WARNING)
53
+ end
32
54
  end
33
55
 
34
56
  directory "../lib/ruby"
@@ -40,6 +62,9 @@ end
40
62
 
41
63
  desc "download, and copy to JRubyArt"
42
64
  task :unpack_samples => [:download_examples, :copy_examples]
65
+
66
+
67
+
43
68
  desc 'download and copy examples to user home'
44
69
  task :download_examples
45
70
  file_name = (MAC_OR_LINUX.nil?) ? "#{EXAMPLES}.zip" : "#{EXAMPLES}.tar.gz"
@@ -55,6 +80,20 @@ file file_name do
55
80
  end
56
81
  end
57
82
 
83
+
84
+
85
+ desc "copy video library"
86
+
87
+ task :copy_video => ["../library/video/lib"] do
88
+ sh "unzip video.zip"
89
+ Dir["video/library/*.jar"].each do |f|
90
+ sh "cp #{f} ../library/video/lib"
91
+ end
92
+ sh "cp -r video/library/windows32 ../library/video/lib"
93
+ sh "cp -r video/library/windows64 ../library/video/lib"
94
+ sh "cp -r video/library/macosx64 ../library/video/lib"
95
+ end
96
+
58
97
  desc "copy examples"
59
98
  task :copy_examples => file_name do
60
99
  if MAC_OR_LINUX.nil?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jruby_art
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4.pre
4
+ version: 0.2.6.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Prout
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-25 00:00:00.000000000 Z
11
+ date: 2015-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -53,7 +53,7 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0.9'
55
55
  description: A ruby wrapper for processing, that doesn't require a separate install of processing
56
- email: martin_p@lineone.net
56
+ email: mamba2928@yahoo.co.uk
57
57
  executables:
58
58
  - k9
59
59
  extensions: []
@@ -97,8 +97,13 @@ files:
97
97
  - lib/jruby_art/helpers/camel_string.rb
98
98
  - lib/jruby_art/helpers/numeric.rb
99
99
  - lib/jruby_art/helpers/range.rb
100
+ - library/video/video.rb
101
+ - library/video/lib/export.txt
102
+ - library/video/lib/macosx64.txt
103
+ - library/video/lib/windows.txt
100
104
  - library/grammar/grammar.rb
101
105
  - library/control_panel/control_panel.rb
106
+ - library/library_proxy/library_proxy.rb
102
107
  - library/boids/boids.rb
103
108
  - library/file_chooser/file_chooser.rb
104
109
  - spec/library_loader_spec.rb