Skip to content

Commit 69c2997

Browse files
committed
tidy up refactoring, bump version
1 parent 8a5ad01 commit 69c2997

7 files changed

Lines changed: 11 additions & 10 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
**v1.3.0** Not strictly semantic versioning in the sense that the significant internal refactoring of launcher.rb should not be evident to user. Bump to jruby-9.1.8.0 which should be last before jruby-9.2.x.x series (ruby-2.4 here we come).
2+
13
**v1.2.9** Grid method now in java (and corrected for step greater than 1). Update to processing-3.3. Update examples to 2.0, which features WOVNS examples that make use of `grid` method and in part caused me to look again a its implementation.
24

35
**v1.2.8** Properly implement post-initialize (it might be useful). Refactor Sketchbook and OS. Update to processing-3.2.4, if you have not updated samples for a while you should now.

lib/jruby_art/helper_methods.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,15 @@ def thread(&block)
7777
# explicitly provide 'processing.org' min instance method
7878
# to return a float:- a, b and c need to be floats
7979

80-
def min(*args, &block)
80+
def min(args, &block)
8181
args.min unless block_given?
8282
args.min(&block) # { |a, b| a.value <=> b.value }
8383
end
8484

8585
# explicitly provide 'processing.org' max instance method
8686
# to return a float:- a, b and c need to be floats
8787

88-
def max(*args, &block)
88+
def max(args, &block)
8989
args.max unless block_given?
9090
args.max(&block) # { |a, b| a.value <=> b.value }
9191
end

lib/jruby_art/java_opts.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ class JavaOpts
55

66
def initialize
77
arg_file = File.join(SKETCH_ROOT, 'data/java_args.txt')
8-
puts arg_file
98
@opts = []
109
@opts += File.read(arg_file).split(/\s+/) if FileTest.exist?(arg_file)
1110
return unless opts.empty? && Processing::RP_CONFIG.fetch('java_args', false)

lib/jruby_art/launcher.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,6 @@ def initialize(runner, args, filename)
5454
end
5555

5656
def cmd
57-
['jruby', opts, runner, filename, args].flatten if installed
57+
['jruby', opts, runner, filename, args].flatten
5858
end
5959
end

lib/jruby_art/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22
# A wrapper for version
33
module JRubyArt
4-
VERSION = '1.2.9'.freeze
4+
VERSION = '1.3.0'.freeze
55
end

pom.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
project 'rp5extras', 'https://github.com/ruby-processing/JRubyArt' do
33

44
model_version '4.0.0'
5-
id 'ruby-processing:rp5extras', '1.2.9'
5+
id 'ruby-processing:rp5extras', '1.3.0'
66
packaging 'jar'
77

88
description 'rp5extras for JRubyArt'

test/helper_methods_test.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ def test_dist
5151
end
5252

5353
def test_min
54-
assert_equal(min(*ARRAY), 'albatross')
55-
assert_equal(min(*ARRAY) { |a, b| a.length <=> b.length }, 'dog')
54+
assert_equal(min(ARRAY), 'albatross')
55+
assert_equal(min(ARRAY) { |a, b| a.length <=> b.length }, 'dog')
5656
end
5757

5858
def test_max
59-
assert_equal(max(*ARRAY), 'horse')
60-
assert_equal(max(*ARRAY) { |a, b| a.length <=> b.length }, 'albatross')
59+
assert_equal(max(ARRAY), 'horse')
60+
assert_equal(max(ARRAY) { |a, b| a.length <=> b.length }, 'albatross')
6161
end
6262
end

0 commit comments

Comments
 (0)