shoes-package 4.0.0.pre6 → 4.0.0.pre7
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 +4 -4
- data/Guardfile +1 -1
- data/lib/shoes/package/configuration.rb +29 -19
- data/lib/shoes/package/version.rb +3 -1
- data/lib/warbler/traits/shoes.rb +3 -1
- data/spec/configuration_spec.rb +2 -2
- data/spec/spec_helper.rb +7 -7
- data/spec/swt_app_spec.rb +3 -3
- data/spec/swt_jar_spec.rb +2 -2
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae062974967b441f26f83ce016b4c1ef030371aa
|
4
|
+
data.tar.gz: a574f7c9022023305a83d4e64ec7640fab433ae3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77e56c8ad760ed134b318c39168dcb0394a928f2fd2b34f962ce8ad2f9dec078ec43aeeb71f4878872561a427dddfeb520cf5310e06b024dfcd997ae375c7dad
|
7
|
+
data.tar.gz: 322afeacda5569a04d24dc65dca71156846ed26108dd9f1a8e244bb7c27be3bbd223b896e89d791ba85aedfa3c4de0228d646b8e86ee303e9fb476fae4e682dc
|
data/Guardfile
CHANGED
@@ -16,17 +16,18 @@ class Shoes
|
|
16
16
|
module Configuration
|
17
17
|
extend ::Furoshiki::Util
|
18
18
|
|
19
|
-
JAR_APP_TEMPLATE_URL = 'https://s3.amazonaws.com/net.wasnotrice.shoes/wrappers/shoes-app-template-0.0.2.zip'
|
19
|
+
JAR_APP_TEMPLATE_URL = 'https://s3.amazonaws.com/net.wasnotrice.shoes/wrappers/shoes-app-template-0.0.2.zip'.freeze
|
20
20
|
|
21
21
|
# Convenience method for loading config from a file. Note that you
|
22
22
|
# can pass four kinds of paths to the loader. Given the following
|
23
23
|
# file structure:
|
24
24
|
#
|
25
|
-
#
|
26
|
-
#
|
27
|
-
#
|
28
|
-
#
|
29
|
-
#
|
25
|
+
# |-- a
|
26
|
+
# | |-- app.yaml
|
27
|
+
# | |-- shoes-app-a.rb
|
28
|
+
# |
|
29
|
+
# |-- b
|
30
|
+
# |-- shoes-app-b.rb
|
30
31
|
#
|
31
32
|
# To package an app that has an `app.yaml`, like `shoes-app-a.rb`,
|
32
33
|
# you can call the loader with any of:
|
@@ -57,11 +58,14 @@ class Shoes
|
|
57
58
|
app_yaml = Pathname.new('app.yaml')
|
58
59
|
|
59
60
|
if pathname.basename == app_yaml
|
60
|
-
file
|
61
|
+
file = pathname
|
62
|
+
dir = pathname.dirname
|
61
63
|
elsif pathname.directory?
|
62
|
-
file
|
63
|
-
|
64
|
-
|
64
|
+
file = pathname.join(app_yaml)
|
65
|
+
dir = pathname
|
66
|
+
elsif pathname.file? && pathname.parent.children.include?(pathname.parent.join(app_yaml))
|
67
|
+
file = pathname.parent.join(app_yaml)
|
68
|
+
dir = pathname.parent
|
65
69
|
else
|
66
70
|
file, dir = config_for_single_file_app(pathname)
|
67
71
|
end
|
@@ -82,14 +86,14 @@ class Shoes
|
|
82
86
|
ignore: 'pkg',
|
83
87
|
# TODO: Add actual paths. Keep these keys for compatibility with Shoes 3
|
84
88
|
icons: {
|
85
|
-
#osx: 'path/to/default/App.icns',
|
86
|
-
#gtk: 'path/to/default/app.png',
|
87
|
-
#win32: 'path/to/default/App.ico',
|
89
|
+
# osx: 'path/to/default/App.icns',
|
90
|
+
# gtk: 'path/to/default/app.png',
|
91
|
+
# win32: 'path/to/default/App.ico',
|
88
92
|
},
|
89
93
|
# TODO: Add actual paths. Keep these keys for compatibility with Shoes 3
|
90
94
|
dmg: {
|
91
|
-
#ds_store: 'path/to/default/.DS_Store',
|
92
|
-
#background: 'path/to/default/background.png'
|
95
|
+
# ds_store: 'path/to/default/.DS_Store',
|
96
|
+
# background: 'path/to/default/background.png'
|
93
97
|
},
|
94
98
|
working_dir: Dir.pwd,
|
95
99
|
gems: ['shoes-core'],
|
@@ -102,8 +106,6 @@ class Shoes
|
|
102
106
|
Furoshiki::Configuration.new defaults.merge(symbolized_config)
|
103
107
|
end
|
104
108
|
|
105
|
-
private
|
106
|
-
|
107
109
|
# If it exists, load default options. If not, let the filesystem raise an
|
108
110
|
# error.
|
109
111
|
def self.config_for_single_file_app(pathname)
|
@@ -120,8 +122,16 @@ class Shoes
|
|
120
122
|
# replace the whole array, so we handle the gems separately. Note that
|
121
123
|
# keys may not have been symbolized yet
|
122
124
|
def self.merge_gems(base, additional)
|
123
|
-
base_gems =
|
124
|
-
|
125
|
+
base_gems = begin
|
126
|
+
base.fetch(:gems)
|
127
|
+
rescue
|
128
|
+
base['gems']
|
129
|
+
end
|
130
|
+
additional_gems = begin
|
131
|
+
additional.fetch(:gems)
|
132
|
+
rescue
|
133
|
+
additional['gems']
|
134
|
+
end
|
125
135
|
Array(base_gems).concat(Array(additional_gems)).uniq
|
126
136
|
end
|
127
137
|
end
|
data/lib/warbler/traits/shoes.rb
CHANGED
data/spec/configuration_spec.rb
CHANGED
@@ -131,7 +131,7 @@ describe Shoes::Package::Configuration do
|
|
131
131
|
end
|
132
132
|
|
133
133
|
context "when osx icon is specified, but doesn't exist" do
|
134
|
-
let(:options) {
|
134
|
+
let(:options) { {icons: {osx: "path/to/non-existent/file"}} }
|
135
135
|
subject { Shoes::Package::Configuration.create options }
|
136
136
|
|
137
137
|
it "sets osx icon path" do
|
@@ -180,7 +180,7 @@ describe Shoes::Package::Configuration do
|
|
180
180
|
it "blows up" do
|
181
181
|
expect do
|
182
182
|
Shoes::Package::Configuration.load('some/bogus/path')
|
183
|
-
end.to raise_error
|
183
|
+
end.to raise_error(/No such file or directory/)
|
184
184
|
end
|
185
185
|
end
|
186
186
|
|
data/spec/spec_helper.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
FUROSHIKI_SPEC_DIR = Pathname.new(__FILE__).dirname.expand_path.to_s
|
4
4
|
ENV['FUROSHIKI_HOME'] = FUROSHIKI_SPEC_DIR
|
5
5
|
|
6
|
-
SHOES_PACKAGE_SPEC_ROOT= File.expand_path('..', __FILE__)
|
6
|
+
SHOES_PACKAGE_SPEC_ROOT = File.expand_path('..', __FILE__)
|
7
7
|
|
8
8
|
$LOAD_PATH << File.expand_path(SHOES_PACKAGE_SPEC_ROOT)
|
9
9
|
$LOAD_PATH << File.expand_path('../../lib', __FILE__)
|
@@ -12,7 +12,7 @@ $LOAD_PATH << File.expand_path('../../../shoes-core/lib', __FILE__)
|
|
12
12
|
require 'pathname'
|
13
13
|
require 'rspec/its'
|
14
14
|
|
15
|
-
Dir["#{SHOES_PACKAGE_SPEC_ROOT}/support/**/*.rb"].each {|f| require f}
|
15
|
+
Dir["#{SHOES_PACKAGE_SPEC_ROOT}/support/**/*.rb"].each { |f| require f }
|
16
16
|
|
17
17
|
module PackageHelpers
|
18
18
|
# need these values from a context block, so let doesn't work
|
@@ -38,7 +38,7 @@ module Guard
|
|
38
38
|
# end
|
39
39
|
# end
|
40
40
|
def platform_is(platform)
|
41
|
-
yield if
|
41
|
+
yield if send "platform_is_#{platform}"
|
42
42
|
end
|
43
43
|
|
44
44
|
# Runs specs only if platform does not match
|
@@ -50,19 +50,19 @@ module Guard
|
|
50
50
|
# end
|
51
51
|
# end
|
52
52
|
def platform_is_not(platform)
|
53
|
-
yield unless
|
53
|
+
yield unless send "platform_is_#{platform}"
|
54
54
|
end
|
55
55
|
|
56
56
|
def platform_is_windows
|
57
|
-
|
57
|
+
RbConfig::CONFIG['host_os'] =~ /windows|mswin/i
|
58
58
|
end
|
59
59
|
|
60
60
|
def platform_is_linux
|
61
|
-
|
61
|
+
RbConfig::CONFIG['host_os'] =~ /linux/i
|
62
62
|
end
|
63
63
|
|
64
64
|
def platform_is_osx
|
65
|
-
|
65
|
+
RbConfig::CONFIG['host_os'] =~ /darwin/i
|
66
66
|
end
|
67
67
|
end
|
68
68
|
|
data/spec/swt_app_spec.rb
CHANGED
@@ -36,7 +36,7 @@ describe Shoes::Package::JarApp do
|
|
36
36
|
|
37
37
|
it "sets package dir to {pwd}/pkg" do
|
38
38
|
Dir.chdir @app_dir do
|
39
|
-
expect(subject.default_package_dir).to eq(@app_dir.join
|
39
|
+
expect(subject.default_package_dir).to eq(@app_dir.join('pkg'))
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
@@ -88,13 +88,13 @@ describe Shoes::Package::JarApp do
|
|
88
88
|
|
89
89
|
it "removes any extraneous jars" do
|
90
90
|
jar_dir_contents = @output_file.join("Contents/Java").children
|
91
|
-
expect(jar_dir_contents.reject {|f| f == jar }).to be_empty
|
91
|
+
expect(jar_dir_contents.reject { |f| f == jar }).to be_empty
|
92
92
|
end
|
93
93
|
|
94
94
|
describe "Info.plist" do
|
95
95
|
require 'plist'
|
96
96
|
before :all do
|
97
|
-
@plist = Plist.parse_xml(@output_file.join
|
97
|
+
@plist = Plist.parse_xml(@output_file.join('Contents/Info.plist'))
|
98
98
|
end
|
99
99
|
|
100
100
|
it "sets identifier" do
|
data/spec/swt_jar_spec.rb
CHANGED
@@ -18,7 +18,7 @@ describe Furoshiki::Jar do
|
|
18
18
|
end
|
19
19
|
|
20
20
|
let(:jar_name) { 'sweet-nebulae.jar' }
|
21
|
-
let(:output_file) { Pathname.new(@output_dir.join
|
21
|
+
let(:output_file) { Pathname.new(@output_dir.join(jar_name)) }
|
22
22
|
subject { @subject }
|
23
23
|
|
24
24
|
it "creates a .jar" do
|
@@ -56,7 +56,7 @@ describe Furoshiki::Jar do
|
|
56
56
|
end
|
57
57
|
|
58
58
|
describe "with an invalid configuration" do
|
59
|
-
let(:config) { Shoes::Package::Configuration.create}
|
59
|
+
let(:config) { Shoes::Package::Configuration.create }
|
60
60
|
subject { Shoes::Package::Jar.new(config) }
|
61
61
|
|
62
62
|
it "fails to initialize" do
|
metadata
CHANGED
@@ -1,21 +1,21 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shoes-package
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.0.
|
4
|
+
version: 4.0.0.pre7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Team Shoes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11
|
11
|
+
date: 2016-12-11 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.pre7
|
19
19
|
name: shoes-core
|
20
20
|
prerelease: false
|
21
21
|
type: :runtime
|
@@ -23,7 +23,7 @@ dependencies:
|
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 4.0.0.
|
26
|
+
version: 4.0.0.pre7
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
29
29
|
requirements:
|
@@ -85,7 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
85
85
|
version: 1.3.1
|
86
86
|
requirements: []
|
87
87
|
rubyforge_project:
|
88
|
-
rubygems_version: 2.6.
|
88
|
+
rubygems_version: 2.6.8
|
89
89
|
signing_key:
|
90
90
|
specification_version: 4
|
91
91
|
summary: Application packaging for Shoes, the best little GUI toolkit for Ruby.
|