shoes 4.0.0.pre7 → 4.0.0.pre8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/shoes-stub +66 -0
- data/ext/install/Rakefile +39 -0
- data/ext/install/shoes.bat +20 -0
- data/lib/rubygems_plugin.rb +24 -0
- metadata +16 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74d8089cb7dbd7c83e14512a3ffb93f64cb24637
|
4
|
+
data.tar.gz: 50450a4c2369bd7b93cfe120aff64205d888eef1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65eb1e57e8d8f7eac92447e284098912299c0d2310c42822b4348bf60ccd1cedf0b5d9039becc2f2a169713c6ed2af215d65c984320d1e5a8777547d5826dbd0
|
7
|
+
data.tar.gz: 7686563a63fe2048d9687135ada81ef2ff92e9c82589f28c0af8b7e0a54851cb0160e4802b6382101c1bd875bf592d38f138b2f422e97ed5b0eadaf372368916
|
data/bin/shoes-stub
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
#!/usr/bin/env sh
|
2
|
+
|
3
|
+
# This script is symlinked to be present as both bin/shoes and bin/shoes-stub
|
4
|
+
# See ext/install/Rakefile for the full explanation of why we do that.
|
5
|
+
|
6
|
+
# Don't try to cd on an empty $NEXT_DIR (link in same directory)
|
7
|
+
mac_move_to_link_dir () {
|
8
|
+
# Skip if already in link directory
|
9
|
+
NEXT_DIR=$(dirname $1)
|
10
|
+
if [[ -n "$NEXT_DIR" ]]; then
|
11
|
+
cd $NEXT_DIR
|
12
|
+
fi
|
13
|
+
}
|
14
|
+
|
15
|
+
mac_readlink_f () {
|
16
|
+
# based on http://stackoverflow.com/questions/1055671/how-can-i-get-the-behavior-of-gnus-readlink-f-on-a-mac
|
17
|
+
|
18
|
+
# A relative or absolute path to a file, potentially a symlink
|
19
|
+
LINK=$1
|
20
|
+
|
21
|
+
if [ ! -L "$LINK" ] ; then
|
22
|
+
# Not a link, all good
|
23
|
+
echo $LINK
|
24
|
+
return
|
25
|
+
fi
|
26
|
+
|
27
|
+
# http://bosker.wordpress.com/2012/02/12/bash-scripters-beware-of-the-cdpath/
|
28
|
+
unset CDPATH
|
29
|
+
|
30
|
+
# Look up links until we find something that is not a symlink
|
31
|
+
while [ -L "$LINK" ] ; do
|
32
|
+
mac_move_to_link_dir $LINK
|
33
|
+
RELATIVE_LINK=$(basename $LINK)
|
34
|
+
LINK=$(readlink $RELATIVE_LINK)
|
35
|
+
done
|
36
|
+
|
37
|
+
# Now PATH is an unqualified file name, but we're in its directory, so turn
|
38
|
+
# it into an absolute path by prefixing with the current working directory.
|
39
|
+
|
40
|
+
PHYS_DIR=`pwd -P`
|
41
|
+
RESULT=$PHYS_DIR/$LINK
|
42
|
+
echo $RESULT
|
43
|
+
}
|
44
|
+
|
45
|
+
case "${MACHTYPE:-}${OSTYPE:-}" in
|
46
|
+
(*darwin*)
|
47
|
+
SCRIPT=$(mac_readlink_f $0);;
|
48
|
+
(*)
|
49
|
+
# see http://stackoverflow.com/a/1638397/1810896
|
50
|
+
SCRIPT=$(readlink -f "$0");;
|
51
|
+
esac
|
52
|
+
|
53
|
+
SCRIPTPATH=$(dirname "$SCRIPT")
|
54
|
+
|
55
|
+
BACKEND_FILE="$SCRIPTPATH/shoes-backend"
|
56
|
+
if [ ! -e "$BACKEND_FILE" ]; then
|
57
|
+
$SCRIPTPATH/shoes-picker $SCRIPTPATH
|
58
|
+
|
59
|
+
STATUS=$?
|
60
|
+
if [ $STATUS != 0 ]; then
|
61
|
+
exit $STATUS
|
62
|
+
fi
|
63
|
+
fi
|
64
|
+
|
65
|
+
BACKEND_COMMAND=$(cat $BACKEND_FILE)
|
66
|
+
SHOES_BIN_DIR=$SCRIPTPATH $BACKEND_COMMAND $@
|
@@ -0,0 +1,39 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'fileutils'
|
3
|
+
|
4
|
+
# Running JRuby on OS X requires options passed at the start. To pass those
|
5
|
+
# options and avoid double JVM startup, we want 'shoes' to be a bash script on
|
6
|
+
# Unix systems, but Rubygems only supports installing Ruby to the bin.
|
7
|
+
|
8
|
+
# We work around this by installing our script as shoes-stub, then acting like
|
9
|
+
# a "native extension" via this Rakefile, we manually generate the right script
|
10
|
+
# (a copy of shoes-stub) in the Gem.bindir.
|
11
|
+
|
12
|
+
# Because we don't actually declare shoes as an executable, we also have to
|
13
|
+
# copy our shoes.bat into place as well on Windows systems.
|
14
|
+
|
15
|
+
# We also provide a Rubygems plugin to clean up our manual file on uninstall.
|
16
|
+
# Post-install hooks didn't seem to work, though, hence the extension trick.
|
17
|
+
|
18
|
+
task default: ['install_script']
|
19
|
+
|
20
|
+
task :install_script do
|
21
|
+
# If we're run via jruby-complete.jar, bindir is within the jar itself so
|
22
|
+
# look for bin based on user directory. Otherwise, prefer Gem.bindir.
|
23
|
+
dest_dir = if Gem.bindir.start_with?("uri:classloader")
|
24
|
+
Gem.bindir(Gem.user_dir)
|
25
|
+
else
|
26
|
+
Gem.bindir
|
27
|
+
end
|
28
|
+
|
29
|
+
if Gem.win_platform?
|
30
|
+
source_path = File.join(Dir.pwd, "shoes.bat")
|
31
|
+
dest_path = File.join(dest_dir, "shoes.bat")
|
32
|
+
else
|
33
|
+
source_path = File.join(Dir.pwd, "..", "..", "bin", "shoes-stub")
|
34
|
+
dest_path = File.join(dest_dir, "shoes")
|
35
|
+
end
|
36
|
+
|
37
|
+
FileUtils.mkdir_p(dest_dir)
|
38
|
+
FileUtils.cp(source_path, dest_path)
|
39
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
@setlocal enableextensions enabledelayedexpansion
|
2
|
+
@echo off
|
3
|
+
|
4
|
+
REM If we're running from source, bin/shoes.bat will have set bin_dir already.
|
5
|
+
if not defined bin_dir set bin_dir=%~dp0
|
6
|
+
|
7
|
+
if not exist !bin_dir!\shoes-backend (
|
8
|
+
REM shoes-picker is directly runnable either from Rubygems stubs or our shims
|
9
|
+
call !bin_dir!\shoes-picker !bin_dir!
|
10
|
+
)
|
11
|
+
|
12
|
+
REM If we didn't get a backend generated, we presume that shoes-picker already
|
13
|
+
REM told us why things failed, so just skip the rest.
|
14
|
+
if exist !bin_dir!\shoes-backend (
|
15
|
+
set shoes_bin_dir=!bin_dir!
|
16
|
+
set /p command=<!bin_dir!/shoes-backend
|
17
|
+
|
18
|
+
call !command! %*
|
19
|
+
)
|
20
|
+
endlocal
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'fileutils'
|
3
|
+
|
4
|
+
# See ext/install/Rakefile for why this cleanup is our responsibility.
|
5
|
+
# Decide if user uninstalled executables based on our actual Ruby script.
|
6
|
+
Gem.post_uninstall do |gem|
|
7
|
+
uninstalling_shoes = gem.spec.name == "shoes"
|
8
|
+
missing_executable = !File.exist?(File.join(Gem.bindir, "shoes-stub")) &&
|
9
|
+
!File.exist?(File.join(Gem.bindir, "shoes-stub.bat"))
|
10
|
+
|
11
|
+
if uninstalling_shoes && missing_executable
|
12
|
+
puts "Removing shoes"
|
13
|
+
if Gem.win_platform?
|
14
|
+
FileUtils.rm(File.join(Gem.bindir, "shoes.bat"))
|
15
|
+
else
|
16
|
+
FileUtils.rm(File.join(Gem.bindir, "shoes"))
|
17
|
+
end
|
18
|
+
|
19
|
+
# Everybody potentially has a generated backend file in their bin
|
20
|
+
puts "Removing shoes-backend"
|
21
|
+
backend = File.join(Gem.bindir, "shoes-backend")
|
22
|
+
FileUtils.rm(backend) if File.exist?(backend)
|
23
|
+
end
|
24
|
+
end
|
metadata
CHANGED
@@ -1,21 +1,21 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shoes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.0.
|
4
|
+
version: 4.0.0.pre8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Team Shoes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
15
15
|
requirements:
|
16
16
|
- - '='
|
17
17
|
- !ruby/object:Gem::Version
|
18
|
-
version: 4.0.0.
|
18
|
+
version: 4.0.0.pre8
|
19
19
|
name: shoes-core
|
20
20
|
prerelease: false
|
21
21
|
type: :runtime
|
@@ -23,13 +23,13 @@ dependencies:
|
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 4.0.0.
|
26
|
+
version: 4.0.0.pre8
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
29
29
|
requirements:
|
30
30
|
- - '='
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: 4.0.0.
|
32
|
+
version: 4.0.0.pre8
|
33
33
|
name: shoes-swt
|
34
34
|
prerelease: false
|
35
35
|
type: :runtime
|
@@ -37,7 +37,7 @@ dependencies:
|
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 4.0.0.
|
40
|
+
version: 4.0.0.pre8
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
requirement: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|
@@ -60,13 +60,19 @@ dependencies:
|
|
60
60
|
version: 4.0.0
|
61
61
|
description: Shoes is the best little GUI toolkit for Ruby. Shoes makes building for Mac, Windows, and Linux super simple. Shoes runs on JRuby only for now.
|
62
62
|
email:
|
63
|
-
- shoes@
|
64
|
-
executables:
|
65
|
-
|
63
|
+
- shoes@lists.mvmanila.com
|
64
|
+
executables:
|
65
|
+
- shoes-stub
|
66
|
+
extensions:
|
67
|
+
- ext/install/Rakefile
|
66
68
|
extra_rdoc_files: []
|
67
69
|
files:
|
68
70
|
- LICENSE
|
69
71
|
- README.md
|
72
|
+
- bin/shoes-stub
|
73
|
+
- ext/install/Rakefile
|
74
|
+
- ext/install/shoes.bat
|
75
|
+
- lib/rubygems_plugin.rb
|
70
76
|
homepage: https://github.com/shoes/shoes4
|
71
77
|
licenses:
|
72
78
|
- MIT
|
@@ -87,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
87
93
|
version: 1.3.1
|
88
94
|
requirements: []
|
89
95
|
rubyforge_project:
|
90
|
-
rubygems_version: 2.6.
|
96
|
+
rubygems_version: 2.6.10
|
91
97
|
signing_key:
|
92
98
|
specification_version: 4
|
93
99
|
summary: Shoes is the best little GUI toolkit for Ruby. Shoes runs on JRuby only for now.
|