motion-sparkle-sandbox 2.0.1 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -4
- data/bin/bundle +24 -22
- data/bin/byebug +7 -7
- data/bin/coderay +7 -7
- data/bin/fuzzy_match +7 -7
- data/bin/htmldiff +7 -7
- data/bin/httpclient +7 -7
- data/bin/ldiff +7 -7
- data/bin/pod +7 -7
- data/bin/pry +7 -7
- data/bin/rake +7 -7
- data/bin/rspec +7 -7
- data/bin/rubocop +7 -7
- data/bin/ruby-parse +7 -7
- data/bin/ruby-rewrite +7 -7
- data/bin/sandbox-pod +7 -7
- data/bin/xcodeproj +7 -7
- data/lib/motion-sparkle-sandbox/version.rb +1 -1
- data/lib/motion-sparkle-sandbox.rb +1 -1
- data/spec/setup_spec.rb +30 -55
- data/spec/sparkle_spec.rb +9 -38
- data/spec/spec_helper.rb +8 -0
- data/spec/spec_utils.rb +36 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df7c1845f67138c6774aab881d396058ee2041c1ed541ba0cc824bb48fac8839
|
4
|
+
data.tar.gz: eaaa9add1f9755ebf2858da7ee56781836c5aeb63cddb4483f2326ad7c5751bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47b4434bdfdaa48004bdd4e70f4c1608548c204b001246609a8a25356aa9f5cbad502e6b0c14198e1161a0d319599b53361fb25f6de1284e0553914c13f9db96
|
7
|
+
data.tar.gz: 62a6a7bbee1cd82ebc2a414300db3d0307b75a052c9d480167cefc5401182cff2adcb7394eb119d2d7eafac52b7c2fb3bca6e9f31cc3d15fea2b9656691d58e1
|
data/README.md
CHANGED
@@ -34,11 +34,11 @@ After building your app for release and running `rake sparkle:package`, all you
|
|
34
34
|
|
35
35
|
- Use the latest version of **motion-sparkle-sandbox**
|
36
36
|
- You will need RubyMotion version 5.0 or above
|
37
|
-
- Sparkle 2 now requires Mac OS X 10.11 El Capitan) or later
|
37
|
+
- Sparkle 2 now requires Mac OS X 10.11 (El Capitan) or later
|
38
38
|
|
39
39
|
## Installation
|
40
40
|
|
41
|
-
In your project's Gemfile
|
41
|
+
In your project's `Gemfile`, add:
|
42
42
|
|
43
43
|
```ruby
|
44
44
|
# Gemfile
|
@@ -104,8 +104,6 @@ If everything is OK, you should be informed that it's time to generate or config
|
|
104
104
|
|
105
105
|
For security, Sparkle 2 allows you to sign your releases with a private certificate before distribution: when the user tries to install an update, Sparkle 2 will check the package using the signature provided in the XML file and the public certificate contained in the running application.
|
106
106
|
|
107
|
-
_Currently, `motion-sparkle-sandbox` does not support configuring `EdDSA` signatures, only `DSA`._
|
108
|
-
|
109
107
|
`motion-sparkle-sandbox` makes it very easy to handle this. In fact, after the first setup, it becomes completely transparent to you as all is handled when you run `rake sparkle:package`.
|
110
108
|
|
111
109
|
You have two options: have Sparkle 2 generate the certificates for you, or follow the instructions to use your existing ones.
|
data/bin/bundle
CHANGED
@@ -8,46 +8,46 @@
|
|
8
8
|
# this file is here to facilitate running it.
|
9
9
|
#
|
10
10
|
|
11
|
-
require
|
11
|
+
require "rubygems"
|
12
12
|
|
13
13
|
m = Module.new do
|
14
|
-
|
14
|
+
module_function
|
15
15
|
|
16
16
|
def invoked_as_script?
|
17
17
|
File.expand_path($0) == File.expand_path(__FILE__)
|
18
18
|
end
|
19
19
|
|
20
20
|
def env_var_version
|
21
|
-
ENV[
|
21
|
+
ENV["BUNDLER_VERSION"]
|
22
22
|
end
|
23
23
|
|
24
24
|
def cli_arg_version
|
25
25
|
return unless invoked_as_script? # don't want to hijack other binstubs
|
26
|
-
return unless
|
27
|
-
|
26
|
+
return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update`
|
28
27
|
bundler_version = nil
|
29
28
|
update_index = nil
|
30
29
|
ARGV.each_with_index do |a, i|
|
31
|
-
|
30
|
+
if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN
|
31
|
+
bundler_version = a
|
32
|
+
end
|
32
33
|
next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/
|
33
|
-
|
34
|
-
bundler_version = Regexp.last_match(1) || '>= 0.a'
|
34
|
+
bundler_version = $1 || ">= 0.a"
|
35
35
|
update_index = i
|
36
36
|
end
|
37
37
|
bundler_version
|
38
38
|
end
|
39
39
|
|
40
40
|
def gemfile
|
41
|
-
gemfile = ENV[
|
41
|
+
gemfile = ENV["BUNDLE_GEMFILE"]
|
42
42
|
return gemfile if gemfile && !gemfile.empty?
|
43
43
|
|
44
|
-
File.expand_path(
|
44
|
+
File.expand_path("../../Gemfile", __FILE__)
|
45
45
|
end
|
46
46
|
|
47
47
|
def lockfile
|
48
48
|
lockfile =
|
49
49
|
case File.basename(gemfile)
|
50
|
-
when
|
50
|
+
when "gems.rb" then gemfile.sub(/\.rb$/, gemfile)
|
51
51
|
else "#{gemfile}.lock"
|
52
52
|
end
|
53
53
|
File.expand_path(lockfile)
|
@@ -55,37 +55,37 @@ m = Module.new do
|
|
55
55
|
|
56
56
|
def lockfile_version
|
57
57
|
return unless File.file?(lockfile)
|
58
|
-
|
59
58
|
lockfile_contents = File.read(lockfile)
|
60
59
|
return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/
|
61
|
-
|
62
60
|
Regexp.last_match(1)
|
63
61
|
end
|
64
62
|
|
65
63
|
def bundler_version
|
66
|
-
@bundler_version ||=
|
67
|
-
|
64
|
+
@bundler_version ||= begin
|
65
|
+
env_var_version || cli_arg_version ||
|
66
|
+
lockfile_version || "#{Gem::Requirement.default}.a"
|
67
|
+
end
|
68
68
|
end
|
69
69
|
|
70
70
|
def load_bundler!
|
71
|
-
ENV[
|
71
|
+
ENV["BUNDLE_GEMFILE"] ||= gemfile
|
72
72
|
|
73
73
|
# must dup string for RG < 1.8 compatibility
|
74
74
|
activate_bundler(bundler_version.dup)
|
75
75
|
end
|
76
76
|
|
77
77
|
def activate_bundler(bundler_version)
|
78
|
-
|
78
|
+
if Gem::Version.correct?(bundler_version) && Gem::Version.new(bundler_version).release < Gem::Version.new("2.0")
|
79
|
+
bundler_version = "< 2"
|
80
|
+
end
|
79
81
|
gem_error = activation_error_handling do
|
80
|
-
gem
|
82
|
+
gem "bundler", bundler_version
|
81
83
|
end
|
82
84
|
return if gem_error.nil?
|
83
|
-
|
84
85
|
require_error = activation_error_handling do
|
85
|
-
require
|
86
|
+
require "bundler/version"
|
86
87
|
end
|
87
88
|
return if require_error.nil? && Gem::Requirement.new(bundler_version).satisfied_by?(Gem::Version.new(Bundler::VERSION))
|
88
|
-
|
89
89
|
warn "Activating bundler (#{bundler_version}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_version}'`"
|
90
90
|
exit 42
|
91
91
|
end
|
@@ -100,4 +100,6 @@ end
|
|
100
100
|
|
101
101
|
m.load_bundler!
|
102
102
|
|
103
|
-
|
103
|
+
if m.invoked_as_script?
|
104
|
+
load Gem.bin_path("bundler", "bundle")
|
105
|
+
end
|
data/bin/byebug
CHANGED
@@ -8,11 +8,11 @@
|
|
8
8
|
# this file is here to facilitate running it.
|
9
9
|
#
|
10
10
|
|
11
|
-
require
|
12
|
-
ENV[
|
13
|
-
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
14
|
|
15
|
-
bundle_binstub = File.expand_path(
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
16
|
|
17
17
|
if File.file?(bundle_binstub)
|
18
18
|
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
@@ -23,7 +23,7 @@ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this
|
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
-
require
|
27
|
-
require
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
28
|
|
29
|
-
load Gem.bin_path(
|
29
|
+
load Gem.bin_path("byebug", "byebug")
|
data/bin/coderay
CHANGED
@@ -8,11 +8,11 @@
|
|
8
8
|
# this file is here to facilitate running it.
|
9
9
|
#
|
10
10
|
|
11
|
-
require
|
12
|
-
ENV[
|
13
|
-
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
14
|
|
15
|
-
bundle_binstub = File.expand_path(
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
16
|
|
17
17
|
if File.file?(bundle_binstub)
|
18
18
|
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
@@ -23,7 +23,7 @@ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this
|
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
-
require
|
27
|
-
require
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
28
|
|
29
|
-
load Gem.bin_path(
|
29
|
+
load Gem.bin_path("coderay", "coderay")
|
data/bin/fuzzy_match
CHANGED
@@ -8,11 +8,11 @@
|
|
8
8
|
# this file is here to facilitate running it.
|
9
9
|
#
|
10
10
|
|
11
|
-
require
|
12
|
-
ENV[
|
13
|
-
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
14
|
|
15
|
-
bundle_binstub = File.expand_path(
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
16
|
|
17
17
|
if File.file?(bundle_binstub)
|
18
18
|
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
@@ -23,7 +23,7 @@ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this
|
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
-
require
|
27
|
-
require
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
28
|
|
29
|
-
load Gem.bin_path(
|
29
|
+
load Gem.bin_path("fuzzy_match", "fuzzy_match")
|
data/bin/htmldiff
CHANGED
@@ -8,11 +8,11 @@
|
|
8
8
|
# this file is here to facilitate running it.
|
9
9
|
#
|
10
10
|
|
11
|
-
require
|
12
|
-
ENV[
|
13
|
-
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
14
|
|
15
|
-
bundle_binstub = File.expand_path(
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
16
|
|
17
17
|
if File.file?(bundle_binstub)
|
18
18
|
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
@@ -23,7 +23,7 @@ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this
|
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
-
require
|
27
|
-
require
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
28
|
|
29
|
-
load Gem.bin_path(
|
29
|
+
load Gem.bin_path("diff-lcs", "htmldiff")
|
data/bin/httpclient
CHANGED
@@ -8,11 +8,11 @@
|
|
8
8
|
# this file is here to facilitate running it.
|
9
9
|
#
|
10
10
|
|
11
|
-
require
|
12
|
-
ENV[
|
13
|
-
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
14
|
|
15
|
-
bundle_binstub = File.expand_path(
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
16
|
|
17
17
|
if File.file?(bundle_binstub)
|
18
18
|
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
@@ -23,7 +23,7 @@ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this
|
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
-
require
|
27
|
-
require
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
28
|
|
29
|
-
load Gem.bin_path(
|
29
|
+
load Gem.bin_path("httpclient", "httpclient")
|
data/bin/ldiff
CHANGED
@@ -8,11 +8,11 @@
|
|
8
8
|
# this file is here to facilitate running it.
|
9
9
|
#
|
10
10
|
|
11
|
-
require
|
12
|
-
ENV[
|
13
|
-
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
14
|
|
15
|
-
bundle_binstub = File.expand_path(
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
16
|
|
17
17
|
if File.file?(bundle_binstub)
|
18
18
|
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
@@ -23,7 +23,7 @@ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this
|
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
-
require
|
27
|
-
require
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
28
|
|
29
|
-
load Gem.bin_path(
|
29
|
+
load Gem.bin_path("diff-lcs", "ldiff")
|
data/bin/pod
CHANGED
@@ -8,11 +8,11 @@
|
|
8
8
|
# this file is here to facilitate running it.
|
9
9
|
#
|
10
10
|
|
11
|
-
require
|
12
|
-
ENV[
|
13
|
-
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
14
|
|
15
|
-
bundle_binstub = File.expand_path(
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
16
|
|
17
17
|
if File.file?(bundle_binstub)
|
18
18
|
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
@@ -23,7 +23,7 @@ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this
|
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
-
require
|
27
|
-
require
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
28
|
|
29
|
-
load Gem.bin_path(
|
29
|
+
load Gem.bin_path("cocoapods", "pod")
|
data/bin/pry
CHANGED
@@ -8,11 +8,11 @@
|
|
8
8
|
# this file is here to facilitate running it.
|
9
9
|
#
|
10
10
|
|
11
|
-
require
|
12
|
-
ENV[
|
13
|
-
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
14
|
|
15
|
-
bundle_binstub = File.expand_path(
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
16
|
|
17
17
|
if File.file?(bundle_binstub)
|
18
18
|
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
@@ -23,7 +23,7 @@ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this
|
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
-
require
|
27
|
-
require
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
28
|
|
29
|
-
load Gem.bin_path(
|
29
|
+
load Gem.bin_path("pry", "pry")
|
data/bin/rake
CHANGED
@@ -8,11 +8,11 @@
|
|
8
8
|
# this file is here to facilitate running it.
|
9
9
|
#
|
10
10
|
|
11
|
-
require
|
12
|
-
ENV[
|
13
|
-
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
14
|
|
15
|
-
bundle_binstub = File.expand_path(
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
16
|
|
17
17
|
if File.file?(bundle_binstub)
|
18
18
|
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
@@ -23,7 +23,7 @@ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this
|
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
-
require
|
27
|
-
require
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
28
|
|
29
|
-
load Gem.bin_path(
|
29
|
+
load Gem.bin_path("rake", "rake")
|
data/bin/rspec
CHANGED
@@ -8,11 +8,11 @@
|
|
8
8
|
# this file is here to facilitate running it.
|
9
9
|
#
|
10
10
|
|
11
|
-
require
|
12
|
-
ENV[
|
13
|
-
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
14
|
|
15
|
-
bundle_binstub = File.expand_path(
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
16
|
|
17
17
|
if File.file?(bundle_binstub)
|
18
18
|
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
@@ -23,7 +23,7 @@ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this
|
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
-
require
|
27
|
-
require
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
28
|
|
29
|
-
load Gem.bin_path(
|
29
|
+
load Gem.bin_path("rspec-core", "rspec")
|
data/bin/rubocop
CHANGED
@@ -8,11 +8,11 @@
|
|
8
8
|
# this file is here to facilitate running it.
|
9
9
|
#
|
10
10
|
|
11
|
-
require
|
12
|
-
ENV[
|
13
|
-
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
14
|
|
15
|
-
bundle_binstub = File.expand_path(
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
16
|
|
17
17
|
if File.file?(bundle_binstub)
|
18
18
|
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
@@ -23,7 +23,7 @@ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this
|
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
-
require
|
27
|
-
require
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
28
|
|
29
|
-
load Gem.bin_path(
|
29
|
+
load Gem.bin_path("rubocop", "rubocop")
|
data/bin/ruby-parse
CHANGED
@@ -8,11 +8,11 @@
|
|
8
8
|
# this file is here to facilitate running it.
|
9
9
|
#
|
10
10
|
|
11
|
-
require
|
12
|
-
ENV[
|
13
|
-
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
14
|
|
15
|
-
bundle_binstub = File.expand_path(
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
16
|
|
17
17
|
if File.file?(bundle_binstub)
|
18
18
|
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
@@ -23,7 +23,7 @@ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this
|
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
-
require
|
27
|
-
require
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
28
|
|
29
|
-
load Gem.bin_path(
|
29
|
+
load Gem.bin_path("parser", "ruby-parse")
|
data/bin/ruby-rewrite
CHANGED
@@ -8,11 +8,11 @@
|
|
8
8
|
# this file is here to facilitate running it.
|
9
9
|
#
|
10
10
|
|
11
|
-
require
|
12
|
-
ENV[
|
13
|
-
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
14
|
|
15
|
-
bundle_binstub = File.expand_path(
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
16
|
|
17
17
|
if File.file?(bundle_binstub)
|
18
18
|
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
@@ -23,7 +23,7 @@ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this
|
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
-
require
|
27
|
-
require
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
28
|
|
29
|
-
load Gem.bin_path(
|
29
|
+
load Gem.bin_path("parser", "ruby-rewrite")
|
data/bin/sandbox-pod
CHANGED
@@ -8,11 +8,11 @@
|
|
8
8
|
# this file is here to facilitate running it.
|
9
9
|
#
|
10
10
|
|
11
|
-
require
|
12
|
-
ENV[
|
13
|
-
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
14
|
|
15
|
-
bundle_binstub = File.expand_path(
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
16
|
|
17
17
|
if File.file?(bundle_binstub)
|
18
18
|
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
@@ -23,7 +23,7 @@ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this
|
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
-
require
|
27
|
-
require
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
28
|
|
29
|
-
load Gem.bin_path(
|
29
|
+
load Gem.bin_path("cocoapods", "sandbox-pod")
|
data/bin/xcodeproj
CHANGED
@@ -8,11 +8,11 @@
|
|
8
8
|
# this file is here to facilitate running it.
|
9
9
|
#
|
10
10
|
|
11
|
-
require
|
12
|
-
ENV[
|
13
|
-
|
11
|
+
require "pathname"
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
14
|
|
15
|
-
bundle_binstub = File.expand_path(
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
16
16
|
|
17
17
|
if File.file?(bundle_binstub)
|
18
18
|
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
|
@@ -23,7 +23,7 @@ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this
|
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
|
-
require
|
27
|
-
require
|
26
|
+
require "rubygems"
|
27
|
+
require "bundler/setup"
|
28
28
|
|
29
|
-
load Gem.bin_path(
|
29
|
+
load Gem.bin_path("xcodeproj", "xcodeproj")
|
data/spec/setup_spec.rb
CHANGED
@@ -2,66 +2,41 @@
|
|
2
2
|
|
3
3
|
require File.expand_path('spec_utils', __dir__)
|
4
4
|
|
5
|
-
module Motion
|
6
|
-
module Project
|
7
|
-
class Config
|
8
|
-
attr_writer :project_dir
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
5
|
describe 'Sparkle setup' do
|
14
6
|
before(:all) do
|
15
|
-
|
16
|
-
SpecUtils::TemporaryDirectory.
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
sparkle do
|
33
|
-
release :base_url, 'http://example.com/'
|
34
|
-
# release :public_key, 'public_key.pem'
|
35
|
-
publish :public_key, '<YOUR-EDDSA-PUBLIC-KEY>'
|
36
|
-
release :version, '1.0'
|
37
|
-
|
38
|
-
# Optional config options
|
39
|
-
release :feed_base_url, 'http://rss.example.com/'
|
40
|
-
release :feed_filename, 'example.xml'
|
41
|
-
release :notes_base_url, 'http://www.example.com/'
|
42
|
-
release :notes_filename, 'example.html'
|
43
|
-
release :package_base_url, 'http://download.example.com/'
|
44
|
-
release :package_filename, 'example.zip'
|
45
|
-
# publish :use_exported_private_key, true
|
46
|
-
end
|
7
|
+
@config = App.config
|
8
|
+
@config.project_dir = SpecUtils::TemporaryDirectory.directory.to_s
|
9
|
+
@config.instance_eval do
|
10
|
+
sparkle do
|
11
|
+
release :base_url, 'http://example.com/'
|
12
|
+
# release :public_key, 'public_key.pem'
|
13
|
+
publish :public_key, '<YOUR-EDDSA-PUBLIC-KEY>'
|
14
|
+
release :version, '1.0'
|
15
|
+
|
16
|
+
# Optional config options
|
17
|
+
release :feed_base_url, 'http://rss.example.com/'
|
18
|
+
release :feed_filename, 'example.xml'
|
19
|
+
release :notes_base_url, 'http://www.example.com/'
|
20
|
+
release :notes_filename, 'example.html'
|
21
|
+
release :package_base_url, 'http://download.example.com/'
|
22
|
+
release :package_filename, 'example.zip'
|
23
|
+
# publish :use_exported_private_key, true
|
47
24
|
end
|
48
|
-
|
49
|
-
Rake::Task['pod:install'].invoke
|
50
|
-
Rake::Task['sparkle:setup'].invoke
|
51
|
-
# Rake::Task['sparkle:setup_certificates'].invoke
|
52
|
-
end
|
53
|
-
|
54
|
-
it 'should create private certificate' do
|
55
|
-
expect(File.exist?(@config.sparkle.private_key_path.to_s)).to be_truthy
|
56
25
|
end
|
57
26
|
|
58
|
-
|
59
|
-
|
60
|
-
end
|
27
|
+
Rake::Task['sparkle:setup'].invoke
|
28
|
+
end
|
61
29
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
30
|
+
# it 'should create private certificate' do
|
31
|
+
# expect(File.exist?(@config.sparkle.private_key_path.to_s)).to be_truthy
|
32
|
+
# end
|
33
|
+
#
|
34
|
+
# it 'should create public certificate' do
|
35
|
+
# expect(File.exist?(@config.sparkle.public_key_path.to_s)).to be_truthy
|
36
|
+
# end
|
37
|
+
|
38
|
+
it 'should add files to gitignore' do
|
39
|
+
a = `cat .gitignore`
|
40
|
+
expect(a.strip).not_to eq ''
|
66
41
|
end
|
67
42
|
end
|
data/spec/sparkle_spec.rb
CHANGED
@@ -2,37 +2,20 @@
|
|
2
2
|
|
3
3
|
require File.expand_path('spec_utils', __dir__)
|
4
4
|
|
5
|
-
module Motion
|
6
|
-
module Project
|
7
|
-
class Config
|
8
|
-
attr_writer :project_dir
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
5
|
# rubocop:disable Metrics/BlockLength
|
14
6
|
describe 'motion-sparkle-sandbox' do
|
15
7
|
before(:all) do
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
end
|
23
|
-
|
24
|
-
context 'configuration' do
|
25
|
-
before do
|
26
|
-
@config = App.config
|
27
|
-
@config.sparkle = nil
|
28
|
-
@config.project_dir = SpecUtils::TemporaryDirectory.directory.to_s
|
29
|
-
@config.instance_eval do
|
30
|
-
sparkle do
|
31
|
-
release :base_url, 'http://example.com/'
|
32
|
-
end
|
8
|
+
@config = App.config
|
9
|
+
@config.sparkle = nil
|
10
|
+
@config.project_dir = SpecUtils::TemporaryDirectory.directory.to_s
|
11
|
+
@config.instance_eval do
|
12
|
+
sparkle do
|
13
|
+
release :base_url, 'http://example.com/'
|
33
14
|
end
|
34
15
|
end
|
16
|
+
end
|
35
17
|
|
18
|
+
context 'configuration' do
|
36
19
|
describe 'base url' do
|
37
20
|
it 'base url should be set correctly' do
|
38
21
|
expect(@config.sparkle.appcast.base_url).to eq 'http://example.com/'
|
@@ -115,22 +98,10 @@ describe 'motion-sparkle-sandbox' do
|
|
115
98
|
end
|
116
99
|
|
117
100
|
context 'cocoapod' do
|
118
|
-
before do
|
119
|
-
@config = App.config
|
120
|
-
@config.project_dir = SpecUtils::TemporaryDirectory.directory.to_s
|
121
|
-
@config.instance_eval do
|
122
|
-
pods do
|
123
|
-
pod 'Sparkle', POD_VERSION
|
124
|
-
end
|
125
|
-
end
|
126
|
-
|
127
|
-
Rake::Task['pod:install'].invoke
|
128
|
-
end
|
129
|
-
|
130
101
|
it 'Sparkle framework pod should be embedded' do
|
131
102
|
sparkle_framework_path = 'vendor/Pods/Sparkle/Sparkle.framework'
|
132
|
-
@config.pods.pods_libraries
|
133
103
|
|
104
|
+
@config.pods.pods_libraries
|
134
105
|
expect(@config.embedded_frameworks.first.end_with?(sparkle_framework_path)).to be_truthy
|
135
106
|
end
|
136
107
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -97,4 +97,12 @@ RSpec.configure do |config|
|
|
97
97
|
# # test failures related to randomization by passing the same `--seed` value
|
98
98
|
# # as the one that triggered the failure.
|
99
99
|
# Kernel.srand config.seed
|
100
|
+
|
101
|
+
config.before(:suite) do
|
102
|
+
SpecUtils::SparkleSetup.initial_install
|
103
|
+
end
|
104
|
+
|
105
|
+
config.after(:suite) do
|
106
|
+
SpecUtils::SparkleSetup.final_deinstall
|
107
|
+
end
|
100
108
|
end
|
data/spec/spec_utils.rb
CHANGED
@@ -13,7 +13,43 @@ $:.unshift("#{ROOT}lib".to_s)
|
|
13
13
|
require 'motion/project/template/osx'
|
14
14
|
require 'motion-sparkle-sandbox'
|
15
15
|
|
16
|
+
# necessary for us to be able to overwrite the `project_dir`
|
17
|
+
module Motion
|
18
|
+
module Project
|
19
|
+
class Config
|
20
|
+
attr_writer :project_dir
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
16
25
|
module SpecUtils
|
26
|
+
module SparkleSetup
|
27
|
+
# run from a before(:suite)
|
28
|
+
def self.initial_install
|
29
|
+
SpecUtils::TemporaryDirectory.setup
|
30
|
+
|
31
|
+
FileUtils.mkdir_p("#{SpecUtils::TemporaryDirectory.directory}/resources")
|
32
|
+
FileUtils.mkdir_p("#{SpecUtils::TemporaryDirectory.directory}/vendor")
|
33
|
+
FileUtils.touch("#{SpecUtils::TemporaryDirectory.directory}/.gitignore")
|
34
|
+
|
35
|
+
@config = App.config
|
36
|
+
@config.sparkle = nil
|
37
|
+
@config.project_dir = SpecUtils::TemporaryDirectory.directory.to_s
|
38
|
+
@config.instance_eval do
|
39
|
+
pods do
|
40
|
+
pod 'Sparkle', POD_VERSION
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
Rake::Task['pod:install'].invoke
|
45
|
+
end
|
46
|
+
|
47
|
+
# run from an after(:suite)
|
48
|
+
def self.final_deinstall
|
49
|
+
SpecUtils::TemporaryDirectory.teardown
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
17
53
|
module TemporaryDirectory
|
18
54
|
TEMPORARY_DIRECTORY = ROOT + 'tmp' # rubocop:disable Style/StringConcatenation
|
19
55
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: motion-sparkle-sandbox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brett Walker
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-05-
|
12
|
+
date: 2022-05-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: motion-cocoapods
|