jruby_art 1.2.2 → 1.2.3

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: f668fbc71962abf201d373a8b3cac768c81ea269
4
- data.tar.gz: 2abb81363bb489fb397c51443c7c33d477bfcbc2
3
+ metadata.gz: b2dfba054f56e77ac74d0d06c693b6d777b74993
4
+ data.tar.gz: 827f373276fbba69e470f82624dcc2644811dbd5
5
5
  SHA512:
6
- metadata.gz: 03cb1b70cf248937f86cee8d6c135e861232e07279352fdbd194d294eebd04b68eab1b75a780e8ff80b64eedaacf76015bbf0e321daff36c4de7e26125aa20c5
7
- data.tar.gz: 9821714651eaec453b93ff15ebd9268092a27fb01aaa2989f4933f472bb7d19955fadea645a324bb0fabc31cab5ebe58286f8aae70a8cf0b18ff87db620b61b0
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(creator)
36
- sketch = creator.code(param)
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)
@@ -106,11 +106,7 @@ module Processing
106
106
 
107
107
  def create
108
108
  require_relative '../jruby_art/creators/sketch_writer'
109
- config = Processing::RP_CONFIG.fetch('template', 'bare')
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 = <<~EOS
13
+ BARE_WRAP = <<-EOS
14
14
  class Sketch < Processing::App
15
15
  %s
16
16
  end
17
17
  EOS
18
18
 
19
- NAKED_WRAP = <<~EOS
19
+ NAKED_WRAP = <<-EOS
20
20
  class Sketch < Processing::App
21
21
  def setup
22
22
  sketch_title 'Nude Sketch'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  # A wrapper for version
3
3
  module JRubyArt
4
- VERSION = '1.2.2'.freeze
4
+ VERSION = '1.2.3'.freeze
5
5
  end
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.3.0'
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", "99cae715f87b9829b44a5a7295f200fc7295114f0887b160a3cf613bf93544a0")
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.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-08-30 00:00:00.000000000 Z
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 This
44
- version uses 'optparse', run becomes --run (or -r) and 'setup install' \n becomes
45
- '--install' or (-i) etc. Use both processing libraries and ruby gems \n in your
46
- sketches. Features create/run/watch/live modes. The \"--watch\" mode,\n provides
47
- a nice REPL-ish way to work on your processing sketches. Includes:-\n A \"Control
48
- Panel\" library, so that you can easily create sliders, buttons,\n checkboxes and
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