jruby_art 1.4.1 → 1.4.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3f5a2a6e4f71fa4b9b431e90623c6813bd8f3c43
4
- data.tar.gz: 138573a28fe79c3982c22452369a6379cd77943c
3
+ metadata.gz: 9400df7764b3a1c10982e7080abd20efaca7a14d
4
+ data.tar.gz: 73c2580b54abc99a05fd7eb8e2ed8b37bba06e1a
5
5
  SHA512:
6
- metadata.gz: e167c2fbcb36d8bceba43f6c04ae2f6c0ed5acb4f212435800ca8b3f2e2383a75f051ba07e2deca202b845824f15c7a20169f783f3bdbaa886e35416be1f16b6
7
- data.tar.gz: 880b701d19c4235ae7b862069912c2187df92c1f7230c3168b02219467dbec018793a777a9d894c1dec5d713f7317c65733e51d49257635183c8c8e17ce92493
6
+ metadata.gz: 46276f2ee3ad45d580f2ae3448ddb562780d4564b18f53eb75b22a9ccbc4504f039bf5562c7b2a51d7dd8530a0e25740ec12f40e0cc91fb47ebd16ac8a1351a1
7
+ data.tar.gz: 7736cb0f6bd17a9b6c836854b8d84f244ccdb02729c5fd106b8727257735e39e5d87d73ab60179b118ee0a88c79f3fabf9088c8e70e698405df656476f47e601
@@ -1,33 +1,37 @@
1
1
  # frozen_string_literal: false
2
- require 'yaml'
3
2
 
3
+ require 'yaml'
4
4
  VERSION = '3.3.6'.freeze # processing version
5
-
5
+ HOME = ENV['HOME']
6
6
  # Abstract Installer class
7
7
  class Installer
8
8
  attr_reader :os, :sketch, :gem_root, :confd
9
9
  def initialize(root, os)
10
10
  @os = os
11
11
  @gem_root = root
12
- @sketch = "#{ENV['HOME']}/sketchbook" if os == :linux
13
- @sketch = "#{ENV['HOME']}/My Documents/Processing" if os == :windows
14
- @sketch = "#{ENV['HOME']}/Documents/Processing" if os == :mac
15
- @confd = "#{ENV['HOME']}/.jruby_art"
12
+ @sketch = "#{HOME}/sketchbook" if os == :linux
13
+ @sketch = "#{HOME}/My Documents/Processing" if os == :windows
14
+ @sketch = "#{HOME}/Documents/Processing" if os == :mac
15
+ @confd = "#{HOME}/.jruby_art"
16
16
  end
17
17
 
18
18
  # Optimistically set processing root
19
19
  def set_processing_root
20
- folder = "#{ENV['HOME']}/.jruby_art"
20
+ folder = "#{HOME}/.jruby_art"
21
21
  Dir.mkdir(folder) unless File.exist? folder
22
22
  path = File.join(folder, 'config.yml')
23
- proot = "#{ENV['HOME']}/processing-#{VERSION}"
23
+ proot = "#{HOME}/processing-#{VERSION}"
24
24
  proot = "/Java/Processing-#{VERSION}" if os == :windows
25
- proot = "/Applications/Processing.app/Contents/Java" if os == :mac
26
- settings = %w(PROCESSING_ROOT JRUBY sketchbook_path template MAX_WATCH sketch_title width height)
27
- values = [proot, true, sketch, 'bare', 32, 'JRubyArt Static Sketch', 600, 600]
25
+ proot = '/Applications/Processing.app/Contents/Java' if os == :mac
26
+ settings = %w[
27
+ PROCESSING_ROOT JRUBY sketchbook_path template MAX_WATCH sketch_title width height
28
+ ]
29
+ values = [
30
+ proot, true, sketch, 'bare', 32, 'JRubyArt Static Sketch', 600, 600
31
+ ]
28
32
  data = settings.zip(values).to_h
29
33
  open(path, 'w:UTF-8') { |file| file.write(data.to_yaml) }
30
- warn 'PROCESSING_ROOT set optimistically, run check to confirm'
34
+ warn 'PROCESSING_ROOT set optimistically, run check to confirm'
31
35
  end
32
36
 
33
37
  def root_exist?
@@ -4,8 +4,8 @@ require 'rbconfig'
4
4
  class NativeFolder
5
5
  attr_reader :os, :bit
6
6
 
7
- WIN_FORMAT = 'windows%d'
8
- LINUX_FORMAT = 'linux%d'
7
+ WIN_FORMAT = 'windows%d'.freeze
8
+ LINUX_FORMAT = 'linux%d'.freeze
9
9
  WIN_PATTERNS = [
10
10
  /bccwin/i,
11
11
  /cygwin/i,
@@ -22,13 +22,13 @@ class NativeFolder
22
22
 
23
23
  def name
24
24
  return 'macosx' if os =~ /darwin/ || os =~ /mac/
25
- return format(WIN_FORMAT, bit) if WIN_PATTERNS.include? os
25
+ return format(WIN_FORMAT, bit) if WIN_PATTERNS.any? { |pat| pat =~ os }
26
26
  return format(LINUX_FORMAT, bit) if os =~ /linux/
27
27
  end
28
28
 
29
29
  def extension
30
30
  return '*.so' if os =~ /linux/
31
- return '*.dll' if WIN_PATTERNS.include? os
31
+ return '*.dll' if WIN_PATTERNS.any? { |pat| pat =~ os }
32
32
  '*.dylib' # MacOS
33
33
  end
34
34
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  # A wrapper for version
3
3
  module JRubyArt
4
- VERSION = '1.4.1'.freeze
4
+ VERSION = '1.4.2'.freeze
5
5
  end
data/lib/rpextras.jar CHANGED
Binary file
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.4.1
4
+ version: 1.4.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: 2017-09-07 00:00:00.000000000 Z
13
+ date: 2017-09-13 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rake