jruby_art 1.0.1 → 1.0.2
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/jruby_art/app.rb +5 -4
- data/lib/jruby_art/library_loader.rb +14 -10
- data/lib/jruby_art/version.rb +1 -1
- data/lib/rpextras.jar +0 -0
- data/library/library_proxy/library_proxy.rb +4 -2
- data/vendors/Rakefile +8 -8
- metadata +22 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 48d37b040cb7e365cbf1d094c67d9d919842963e
|
4
|
+
data.tar.gz: 166054a0b6e271e12fc13472f514dc3df6ddc875
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f5e7ab20d51a274f5b6cb2b9261ab3ff6c1ab53efc7265d1ee915edfb5f3e1a64a846d3216232b762af2d7d6b7877218111c1ee02f766d4d4455ffa0540a428
|
7
|
+
data.tar.gz: 9e789af265ac0219e29abd05a03f8d0e61e3867d78e993a5f10fe3b2ff34c26daa21333f04a6fe599d785c4608edd10e9cb55e57e0df11e04053f609c0dcb9e0
|
data/lib/jruby_art/app.rb
CHANGED
@@ -19,9 +19,10 @@ module Processing
|
|
19
19
|
Java::MonkstoneVecmathVec3::Vec3Library.load(JRuby.runtime)
|
20
20
|
Java::MonkstoneFastmath::DeglutLibrary.load(JRuby.runtime)
|
21
21
|
Java::Monkstone::MathToolLibrary.load(JRuby.runtime)
|
22
|
-
|
23
|
-
|
24
|
-
|
22
|
+
module Render
|
23
|
+
java_import 'monkstone.vecmath.AppRender'
|
24
|
+
java_import 'monkstone.vecmath.ShapeRender'
|
25
|
+
end
|
25
26
|
# Watch the definition of these methods, to make sure
|
26
27
|
# that Processing is able to call them during events.
|
27
28
|
METHODS_TO_ALIAS ||= {
|
@@ -36,7 +37,7 @@ module Processing
|
|
36
37
|
}
|
37
38
|
# All sketches extend this class
|
38
39
|
class App < PApplet
|
39
|
-
include HelperMethods, Math, MathTool
|
40
|
+
include HelperMethods, Math, MathTool, Render
|
40
41
|
# Alias some methods for familiarity for Shoes coders.
|
41
42
|
# surface replaces :frame, but needs field_reader for access
|
42
43
|
alias_method :oval, :ellipse
|
@@ -80,7 +80,8 @@ module Processing
|
|
80
80
|
end
|
81
81
|
|
82
82
|
def get_platform_specific_library_paths(basename)
|
83
|
-
|
83
|
+
# for MacOSX, but does this even work, or does Mac return '64'?
|
84
|
+
bits = 'universal'
|
84
85
|
if java.lang.System.getProperty('sun.arch.data.model') == '32' ||
|
85
86
|
java.lang.System.getProperty('java.vm.name').index('32')
|
86
87
|
bits = '32'
|
@@ -101,11 +102,12 @@ module Processing
|
|
101
102
|
def get_library_directory_path(library_name, extension = nil)
|
102
103
|
extensions = extension ? [extension] : %w(jar rb)
|
103
104
|
extensions.each do |ext|
|
104
|
-
[
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
105
|
+
[
|
106
|
+
"#{SKETCH_ROOT}/library/#{library_name}",
|
107
|
+
"#{Processing::RP_CONFIG['PROCESSING_ROOT']}/modes/java/libraries/#{library_name}/library",
|
108
|
+
"#{K9_ROOT}/library/#{library_name}/library",
|
109
|
+
"#{K9_ROOT}/library/#{library_name}",
|
110
|
+
"#{@sketchbook_library_path}/#{library_name}/library"
|
109
111
|
].each do |jpath|
|
110
112
|
if File.exist?(jpath) && !Dir.glob(format('%s/*.%s', jpath, ext)).empty?
|
111
113
|
return jpath
|
@@ -120,9 +122,11 @@ module Processing
|
|
120
122
|
sketchbook_paths = []
|
121
123
|
sketchbook_path = Processing::RP_CONFIG.fetch('sketchbook_path', false)
|
122
124
|
return sketchbook_path if sketchbook_path
|
123
|
-
[
|
124
|
-
|
125
|
-
|
125
|
+
[
|
126
|
+
"'Application Data/Processing'", 'AppData/Roaming/Processing',
|
127
|
+
'Library/Processing', 'Documents/Processing',
|
128
|
+
'.processing', 'sketchbook'
|
129
|
+
].each do |prefix|
|
126
130
|
spath = format('%s/%s', ENV['HOME'], prefix)
|
127
131
|
pref_path = format('%s/preferences.txt', spath)
|
128
132
|
preferences_paths << pref_path if FileTest.file?(pref_path)
|
@@ -131,7 +135,7 @@ module Processing
|
|
131
135
|
return sketchbook_paths.first if preferences_paths.empty?
|
132
136
|
lines = IO.readlines(preferences_paths.first)
|
133
137
|
matchedline = lines.grep(/^sketchbook/).first
|
134
|
-
matchedline[/=(.+)/].
|
138
|
+
matchedline[/=(.+)/].delete('=')
|
135
139
|
end
|
136
140
|
end
|
137
141
|
end
|
data/lib/jruby_art/version.rb
CHANGED
data/lib/rpextras.jar
CHANGED
Binary file
|
@@ -1,10 +1,12 @@
|
|
1
1
|
# require 'rpextras'
|
2
|
+
#@todo fix how we call LIbrary Proxy
|
3
|
+
java_import Java::MonkstoneCore::LibraryProxy
|
2
4
|
|
3
|
-
LibraryProxy = Java::MonkstoneCore::AbstractLibrary
|
4
5
|
|
5
6
|
# classes that inherit from Library are expected to implement
|
6
|
-
# the abstract methods of processing.core.
|
7
|
+
# the abstract methods of processing.core.LibraryProxy
|
7
8
|
# def pre...
|
8
9
|
# def draw...
|
9
10
|
# def post...
|
10
11
|
# NOOP is fine...
|
12
|
+
# `app` can be called to get PApplet instance
|
data/vendors/Rakefile
CHANGED
@@ -9,7 +9,7 @@ WARNING = <<-EOS
|
|
9
9
|
EOS
|
10
10
|
|
11
11
|
JRUBYC_VERSION = '9.0.4.0'
|
12
|
-
EXAMPLES = '1.
|
12
|
+
EXAMPLES = '1.2'
|
13
13
|
HOME_DIR = ENV['HOME']
|
14
14
|
MAC_OR_LINUX = /linux|mac|darwin/ =~ RbConfig::CONFIG['host_os']
|
15
15
|
|
@@ -27,7 +27,7 @@ file "jruby-complete-#{JRUBYC_VERSION}.jar" do
|
|
27
27
|
rescue
|
28
28
|
warn(WARNING)
|
29
29
|
end
|
30
|
-
|
30
|
+
check_sha256("jruby-complete-#{JRUBYC_VERSION}.jar", "3b87fc20a8e51e56632d6b0f7a00b5906f5ecd6c6642f9c189105307103220e8")
|
31
31
|
end
|
32
32
|
|
33
33
|
directory "../lib/ruby"
|
@@ -37,16 +37,16 @@ task :copy_ruby => ["../lib/ruby"] do
|
|
37
37
|
sh "cp -v jruby-complete-#{JRUBYC_VERSION}.jar ../lib/ruby/jruby-complete.jar"
|
38
38
|
end
|
39
39
|
|
40
|
-
def
|
41
|
-
require "digest/
|
42
|
-
|
40
|
+
def check_sha256(filename, expected_hash)
|
41
|
+
require "digest/sha256"
|
42
|
+
sha256 = Digest::SHA256.new
|
43
43
|
File.open(filename, "r") do |f|
|
44
44
|
while buf = f.read(4096)
|
45
|
-
|
45
|
+
sha256.update(buf)
|
46
46
|
end
|
47
47
|
end
|
48
|
-
if
|
49
|
-
raise "bad
|
48
|
+
if sha256.hexdigest != expected_hash
|
49
|
+
raise "bad sha256 checksum for #{filename} (expected #{expected_hash} got #{sha256.hexdigest})"
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jruby_art
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Ashkenas
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2015-
|
13
|
+
date: 2015-12-15 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rake
|
@@ -40,6 +40,26 @@ dependencies:
|
|
40
40
|
- - "~>"
|
41
41
|
- !ruby/object:Gem::Version
|
42
42
|
version: '5.8'
|
43
|
+
- !ruby/object:Gem::Dependency
|
44
|
+
name: maven
|
45
|
+
requirement: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - "~>"
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '3.3'
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: 3.3.3
|
53
|
+
type: :development
|
54
|
+
prerelease: false
|
55
|
+
version_requirements: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
57
|
+
- - "~>"
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '3.3'
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: 3.3.3
|
43
63
|
description: |2
|
44
64
|
JRubyArt is a ruby wrapper for the processing art framework.
|
45
65
|
The current version supports processing-3.0, and uses jruby-9.0.3.0
|
@@ -102,7 +122,6 @@ requirements:
|
|
102
122
|
- A decent graphics card
|
103
123
|
- java runtime >= 1.8+
|
104
124
|
- processing = 3.0.1+
|
105
|
-
- maven = 3.3.3
|
106
125
|
rubyforge_project:
|
107
126
|
rubygems_version: 2.5.0
|
108
127
|
signing_key:
|