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 +4 -4
- data/lib/jruby_art/installer.rb +16 -12
- data/lib/jruby_art/native_folder.rb +4 -4
- data/lib/jruby_art/version.rb +1 -1
- data/lib/rpextras.jar +0 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9400df7764b3a1c10982e7080abd20efaca7a14d
|
4
|
+
data.tar.gz: 73c2580b54abc99a05fd7eb8e2ed8b37bba06e1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46276f2ee3ad45d580f2ae3448ddb562780d4564b18f53eb75b22a9ccbc4504f039bf5562c7b2a51d7dd8530a0e25740ec12f40e0cc91fb47ebd16ac8a1351a1
|
7
|
+
data.tar.gz: 7736cb0f6bd17a9b6c836854b8d84f244ccdb02729c5fd106b8727257735e39e5d87d73ab60179b118ee0a88c79f3fabf9088c8e70e698405df656476f47e601
|
data/lib/jruby_art/installer.rb
CHANGED
@@ -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 = "#{
|
13
|
-
@sketch = "#{
|
14
|
-
@sketch = "#{
|
15
|
-
@confd = "#{
|
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 = "#{
|
20
|
+
folder = "#{HOME}/.jruby_art"
|
21
21
|
Dir.mkdir(folder) unless File.exist? folder
|
22
22
|
path = File.join(folder, 'config.yml')
|
23
|
-
proot = "#{
|
23
|
+
proot = "#{HOME}/processing-#{VERSION}"
|
24
24
|
proot = "/Java/Processing-#{VERSION}" if os == :windows
|
25
|
-
proot =
|
26
|
-
settings = %w
|
27
|
-
|
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.
|
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.
|
31
|
+
return '*.dll' if WIN_PATTERNS.any? { |pat| pat =~ os }
|
32
32
|
'*.dylib' # MacOS
|
33
33
|
end
|
34
34
|
end
|
data/lib/jruby_art/version.rb
CHANGED
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.
|
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-
|
13
|
+
date: 2017-09-13 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rake
|