ruby-processing 2.6.18 → 2.7.0

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: 4dd48824972676e215c9988d19964b304421ab81
4
- data.tar.gz: 5f1828ec177555fb60cf3d4c9692c7d33ea0e4dd
3
+ metadata.gz: 57834cd74a3c40290211326fdcc60b0a6a427ca0
4
+ data.tar.gz: 5ec86aa2ffbb63989cf432643c178e0430d2d42d
5
5
  SHA512:
6
- metadata.gz: 4d82a137e2125b0568862f01bdb88cdd8010293e935c36a1a21f0079a6675455e0406c012e7280be68a31dad5003d73049d27a8c9515e5ec34a3787b37976fcf
7
- data.tar.gz: a56c11b7a861e5e6cee25e78bb7e93fd7edebe0010c83ac51a0dca1ada3bbf10701efe372174357186d5aa1359b27b1d1366eb185baf7ce76115a0bdb2c0239b
6
+ metadata.gz: d392ece3930db6d8298b2d32abcae568fb5e2ae6a248ea7f88f6139b966d3597b561c8eb170097a0de70833de96cdc3c126600f34b9e55810d1b4bd69f785b31
7
+ data.tar.gz: 27d00ff60d54c300ed9a8aef3eca65fc3a777a3e4b9c6f9c62963880ed180551209729d6f86ee000340e710e7624750c0191b7b852ac4e51a6bc44c01d681765
Binary file
@@ -33,6 +33,7 @@ module Processing
33
33
  Examples:
34
34
  rp5 setup unpack_samples
35
35
  rp5 run rp_samples/samples/contributed/jwishy.rb
36
+ rp5 run-app rp_samples/samples/contributed/jwishy.rb
36
37
  rp5 create some_new_sketch 640 480 p3d (P3D mode example)
37
38
  rp5 create some_new_sketch 640 480 --wrap (a class wrapped default sketch)
38
39
  rp5 watch some_new_sketch.rb
@@ -63,14 +64,15 @@ module Processing
63
64
  # Dispatch central.
64
65
  def execute!
65
66
  case @options.action
66
- when 'run' then run(@options.path, @options.args)
67
- when 'watch' then watch(@options.path, @options.args)
68
- when 'live' then live(@options.path, @options.args)
69
- when 'create' then create(@options.path, @options.args)
70
- when 'app' then app(@options.path)
71
- when 'setup' then setup(@options.path)
72
- when /-v/ then show_version
73
- when /-h/ then show_help
67
+ when 'run' then run(@options.path, @options.args)
68
+ when 'run-app' then run_app(@options.path, @options.args)
69
+ when 'watch' then watch(@options.path, @options.args)
70
+ when 'live' then live(@options.path, @options.args)
71
+ when 'create' then create(@options.path, @options.args)
72
+ when 'app' then app(@options.path)
73
+ when 'setup' then setup(@options.path)
74
+ when /-v/ then show_version
75
+ when /-h/ then show_help
74
76
  else
75
77
  show_help
76
78
  end
@@ -103,6 +105,11 @@ module Processing
103
105
  spin_up('run.rb', sketch, args)
104
106
  end
105
107
 
108
+ def run_app(sketch, args)
109
+ ensure_exists(sketch)
110
+ spin_up('run_app.rb', sketch, args)
111
+ end
112
+
106
113
  # Run a sketch, keeping an eye on it's file, and reloading
107
114
  # whenever it changes.
108
115
  def watch(sketch, args)
@@ -26,13 +26,18 @@ module Processing
26
26
  EOS
27
27
 
28
28
  # This method is the common entry point to run a sketch, bare or complete.
29
+
30
+ def self.run_app
31
+ load SKETCH_PATH
32
+ Processing::App.sketch_class.new unless $app
33
+ end
34
+
29
35
  def self.load_and_run_sketch
30
36
  source = read_sketch_source
31
37
  wrapped = !source.match(/^[^#]*< Processing::App/).nil?
32
38
  no_methods = source.match(/^[^#]*(def\s+setup|def\s+draw)/).nil?
33
39
  if wrapped
34
- load SKETCH_PATH
35
- Processing::App.sketch_class.new unless $app
40
+ run_app
36
41
  return
37
42
  end
38
43
  code = no_methods ? format(NAKED_WRAP, source) : format(BARE_WRAP, source)
@@ -0,0 +1,3 @@
1
+ require_relative 'base'
2
+
3
+ Processing.run_app
@@ -1,3 +1,3 @@
1
1
  module RubyProcessing
2
- VERSION = '2.6.18'
2
+ VERSION = '2.7.0'
3
3
  end
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.18
4
+ version: 2.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Ashkenas
@@ -16,7 +16,7 @@ authors:
16
16
  autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
- date: 2016-04-15 00:00:00.000000000 Z
19
+ date: 2016-06-27 00:00:00.000000000 Z
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  name: bundler
@@ -90,6 +90,7 @@ files:
90
90
  - lib/ruby-processing/runners/base.rb
91
91
  - lib/ruby-processing/runners/live.rb
92
92
  - lib/ruby-processing/runners/run.rb
93
+ - lib/ruby-processing/runners/run_app.rb
93
94
  - lib/ruby-processing/runners/watch.rb
94
95
  - lib/ruby-processing/version.rb
95
96
  - lib/templates/application/Contents/Info.plist.erb