jruby_art 1.2.2 → 1.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jruby_art/creators/sketch_writer.rb +17 -2
- data/lib/jruby_art/runner.rb +1 -5
- data/lib/jruby_art/runners/base.rb +2 -2
- data/lib/jruby_art/version.rb +1 -1
- data/lib/rpextras.jar +0 -0
- data/vendors/Rakefile +2 -2
- metadata +8 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b2dfba054f56e77ac74d0d06c693b6d777b74993
|
4
|
+
data.tar.gz: 827f373276fbba69e470f82624dcc2644811dbd5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 508f568672d34d078fabbd912641c1753b427b9b0dedee450e117d147be21d6e077b3efa4b43adf04a8909d840a3709fac295a8b0e34ab6768ab9c5e6859e427
|
7
|
+
data.tar.gz: d35b6d2c0604b0d76dd92ee04b6ceb5a73b0edf9537a59834e2728bb4895625a822f47a5d36fe0aa45f8dd33646b0f97106caeaaa9194d3d88d7eda499289833
|
@@ -32,8 +32,9 @@ class SketchWriter
|
|
32
32
|
@file = format('%s/%s.rb', File.dirname(path), path)
|
33
33
|
end
|
34
34
|
|
35
|
-
def write
|
36
|
-
|
35
|
+
def write
|
36
|
+
template = SketchTemplate.template
|
37
|
+
sketch = template.code(param)
|
37
38
|
File.open(file, 'w+') { |f| f.write sketch.join("\n") }
|
38
39
|
end
|
39
40
|
end
|
@@ -68,6 +69,20 @@ class Sketch
|
|
68
69
|
end
|
69
70
|
end
|
70
71
|
|
72
|
+
# Switch templates on config
|
73
|
+
class SketchTemplate
|
74
|
+
def self.template
|
75
|
+
case Processing::RP_CONFIG.fetch('template', 'bare')
|
76
|
+
when /bare/
|
77
|
+
return BareSketch.new
|
78
|
+
when /class/
|
79
|
+
return ClassSketch.new
|
80
|
+
when /emacs/
|
81
|
+
return EmacsSketch.new
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
71
86
|
# The sketch class creates an array of formatted sketch lines
|
72
87
|
class BareSketch < Sketch
|
73
88
|
def code(param)
|
data/lib/jruby_art/runner.rb
CHANGED
@@ -106,11 +106,7 @@ module Processing
|
|
106
106
|
|
107
107
|
def create
|
108
108
|
require_relative '../jruby_art/creators/sketch_writer'
|
109
|
-
|
110
|
-
sketch = BareSketch.new if /bare/ =~ config
|
111
|
-
sketch = ClassSketch.new if /class/ =~ config
|
112
|
-
sketch = EmacsSketch.new if /emacs/ =~ config
|
113
|
-
SketchWriter.new(File.basename(filename, '.rb'), argc).write(sketch)
|
109
|
+
SketchWriter.new(File.basename(filename, '.rb'), argc).write
|
114
110
|
end
|
115
111
|
|
116
112
|
# Export as app not implemented
|
@@ -10,13 +10,13 @@ require_relative '../app'
|
|
10
10
|
# More processing module
|
11
11
|
module Processing
|
12
12
|
# For use with "bare" sketches that don't want to define a class or methods
|
13
|
-
BARE_WRAP =
|
13
|
+
BARE_WRAP = <<-EOS
|
14
14
|
class Sketch < Processing::App
|
15
15
|
%s
|
16
16
|
end
|
17
17
|
EOS
|
18
18
|
|
19
|
-
NAKED_WRAP =
|
19
|
+
NAKED_WRAP = <<-EOS
|
20
20
|
class Sketch < Processing::App
|
21
21
|
def setup
|
22
22
|
sketch_title 'Nude Sketch'
|
data/lib/jruby_art/version.rb
CHANGED
data/lib/rpextras.jar
CHANGED
Binary file
|
data/vendors/Rakefile
CHANGED
@@ -8,7 +8,7 @@ WARNING = <<-EOS
|
|
8
8
|
|
9
9
|
EOS
|
10
10
|
|
11
|
-
JRUBYC_VERSION = '9.1.
|
11
|
+
JRUBYC_VERSION = '9.1.4.0'
|
12
12
|
EXAMPLES = '1.4'
|
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_sha256("jruby-complete-#{JRUBYC_VERSION}.jar", "
|
30
|
+
check_sha256("jruby-complete-#{JRUBYC_VERSION}.jar", "a042931f5088dca7007985d6a2178af31cbc26aadb64ee10c3fa25f432c68505")
|
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: jruby_art
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.3
|
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: 2016-
|
13
|
+
date: 2016-09-02 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rake
|
@@ -40,14 +40,12 @@ dependencies:
|
|
40
40
|
- - "~>"
|
41
41
|
- !ruby/object:Gem::Version
|
42
42
|
version: '5.8'
|
43
|
-
description: " JRubyArt is a ruby wrapper for the processing art framework.\n
|
44
|
-
|
45
|
-
|
46
|
-
sketches.
|
47
|
-
|
48
|
-
|
49
|
-
drop-down menus, and hook them into your sketch's instance\n variables and hundreds
|
50
|
-
of worked examples to get you started...\n"
|
43
|
+
description: " JRubyArt is a ruby wrapper for the processing art framework.\n Use
|
44
|
+
both processing libraries and ruby gems in your sketches. Features \n create/run/watch/live
|
45
|
+
modes. The \"--watch\" mode, provides a nice REPL-ish \n way to work on your processing
|
46
|
+
sketches. Includes:-\n A \"Control Panel\" library, so that you can easily create
|
47
|
+
sliders, buttons,\n checkboxes and drop-down menus, and hook them into your sketch's
|
48
|
+
instance\n variables and hundreds of worked examples to get you started...\n"
|
51
49
|
email: mamba2928@yahoo.co.uk
|
52
50
|
executables:
|
53
51
|
- k9
|