Skip to content

Commit 3e50389

Browse files
Merge pull request #8 from digitalmoksha/7-update-to-sparkle-21
Update to Sparkle 2.1
2 parents d6723a8 + e5f2116 commit 3e50389

23 files changed

+216
-226
lines changed

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ After building your app for release and running `rake sparkle:package`, all you
3434

3535
- Use the latest version of **motion-sparkle-sandbox**
3636
- 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
3838

3939
## Installation
4040

41-
In your project's Gemfile, add:
41+
In your project's `Gemfile`, add:
4242

4343
```ruby
4444
# Gemfile
@@ -104,8 +104,6 @@ If everything is OK, you should be informed that it's time to generate or config
104104

105105
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.
106106

107-
_Currently, `motion-sparkle-sandbox` does not support configuring `EdDSA` signatures, only `DSA`._
108-
109107
`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`.
110108

111109
You have two options: have Sparkle 2 generate the certificates for you, or follow the instructions to use your existing ones.

bin/bundle

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,84 +8,84 @@
88
# this file is here to facilitate running it.
99
#
1010

11-
require 'rubygems'
11+
require "rubygems"
1212

1313
m = Module.new do
14-
module_function
14+
module_function
1515

1616
def invoked_as_script?
1717
File.expand_path($0) == File.expand_path(__FILE__)
1818
end
1919

2020
def env_var_version
21-
ENV['BUNDLER_VERSION']
21+
ENV["BUNDLER_VERSION"]
2222
end
2323

2424
def cli_arg_version
2525
return unless invoked_as_script? # don't want to hijack other binstubs
26-
return unless 'update'.start_with?(ARGV.first || ' ') # must be running `bundle update`
27-
26+
return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update`
2827
bundler_version = nil
2928
update_index = nil
3029
ARGV.each_with_index do |a, i|
31-
bundler_version = a if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN
30+
if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN
31+
bundler_version = a
32+
end
3233
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"
3535
update_index = i
3636
end
3737
bundler_version
3838
end
3939

4040
def gemfile
41-
gemfile = ENV['BUNDLE_GEMFILE']
41+
gemfile = ENV["BUNDLE_GEMFILE"]
4242
return gemfile if gemfile && !gemfile.empty?
4343

44-
File.expand_path('../Gemfile', __dir__)
44+
File.expand_path("../../Gemfile", __FILE__)
4545
end
4646

4747
def lockfile
4848
lockfile =
4949
case File.basename(gemfile)
50-
when 'gems.rb' then gemfile.sub(/\.rb$/, gemfile)
50+
when "gems.rb" then gemfile.sub(/\.rb$/, gemfile)
5151
else "#{gemfile}.lock"
5252
end
5353
File.expand_path(lockfile)
5454
end
5555

5656
def lockfile_version
5757
return unless File.file?(lockfile)
58-
5958
lockfile_contents = File.read(lockfile)
6059
return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/
61-
6260
Regexp.last_match(1)
6361
end
6462

6563
def bundler_version
66-
@bundler_version ||= env_var_version || cli_arg_version ||
67-
lockfile_version || "#{Gem::Requirement.default}.a"
64+
@bundler_version ||= begin
65+
env_var_version || cli_arg_version ||
66+
lockfile_version || "#{Gem::Requirement.default}.a"
67+
end
6868
end
6969

7070
def load_bundler!
71-
ENV['BUNDLE_GEMFILE'] ||= gemfile
71+
ENV["BUNDLE_GEMFILE"] ||= gemfile
7272

7373
# must dup string for RG < 1.8 compatibility
7474
activate_bundler(bundler_version.dup)
7575
end
7676

7777
def activate_bundler(bundler_version)
78-
bundler_version = '< 2' if Gem::Version.correct?(bundler_version) && Gem::Version.new(bundler_version).release < Gem::Version.new('2.0')
78+
if Gem::Version.correct?(bundler_version) && Gem::Version.new(bundler_version).release < Gem::Version.new("2.0")
79+
bundler_version = "< 2"
80+
end
7981
gem_error = activation_error_handling do
80-
gem 'bundler', bundler_version
82+
gem "bundler", bundler_version
8183
end
8284
return if gem_error.nil?
83-
8485
require_error = activation_error_handling do
85-
require 'bundler/version'
86+
require "bundler/version"
8687
end
8788
return if require_error.nil? && Gem::Requirement.new(bundler_version).satisfied_by?(Gem::Version.new(Bundler::VERSION))
88-
8989
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}'`"
9090
exit 42
9191
end
@@ -100,4 +100,6 @@ end
100100

101101
m.load_bundler!
102102

103-
load Gem.bin_path('bundler', 'bundle') if m.invoked_as_script?
103+
if m.invoked_as_script?
104+
load Gem.bin_path("bundler", "bundle")
105+
end

bin/byebug

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
# this file is here to facilitate running it.
99
#
1010

11-
require 'pathname'
12-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
13-
Pathname.new(__FILE__).realpath)
11+
require "pathname"
12+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13+
Pathname.new(__FILE__).realpath)
1414

15-
bundle_binstub = File.expand_path('bundle', __dir__)
15+
bundle_binstub = File.expand_path("../bundle", __FILE__)
1616

1717
if File.file?(bundle_binstub)
1818
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
2323
end
2424
end
2525

26-
require 'rubygems'
27-
require 'bundler/setup'
26+
require "rubygems"
27+
require "bundler/setup"
2828

29-
load Gem.bin_path('byebug', 'byebug')
29+
load Gem.bin_path("byebug", "byebug")

bin/coderay

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
# this file is here to facilitate running it.
99
#
1010

11-
require 'pathname'
12-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
13-
Pathname.new(__FILE__).realpath)
11+
require "pathname"
12+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13+
Pathname.new(__FILE__).realpath)
1414

15-
bundle_binstub = File.expand_path('bundle', __dir__)
15+
bundle_binstub = File.expand_path("../bundle", __FILE__)
1616

1717
if File.file?(bundle_binstub)
1818
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
2323
end
2424
end
2525

26-
require 'rubygems'
27-
require 'bundler/setup'
26+
require "rubygems"
27+
require "bundler/setup"
2828

29-
load Gem.bin_path('coderay', 'coderay')
29+
load Gem.bin_path("coderay", "coderay")

bin/fuzzy_match

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
# this file is here to facilitate running it.
99
#
1010

11-
require 'pathname'
12-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
13-
Pathname.new(__FILE__).realpath)
11+
require "pathname"
12+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13+
Pathname.new(__FILE__).realpath)
1414

15-
bundle_binstub = File.expand_path('bundle', __dir__)
15+
bundle_binstub = File.expand_path("../bundle", __FILE__)
1616

1717
if File.file?(bundle_binstub)
1818
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
2323
end
2424
end
2525

26-
require 'rubygems'
27-
require 'bundler/setup'
26+
require "rubygems"
27+
require "bundler/setup"
2828

29-
load Gem.bin_path('fuzzy_match', 'fuzzy_match')
29+
load Gem.bin_path("fuzzy_match", "fuzzy_match")

bin/htmldiff

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
# this file is here to facilitate running it.
99
#
1010

11-
require 'pathname'
12-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
13-
Pathname.new(__FILE__).realpath)
11+
require "pathname"
12+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13+
Pathname.new(__FILE__).realpath)
1414

15-
bundle_binstub = File.expand_path('bundle', __dir__)
15+
bundle_binstub = File.expand_path("../bundle", __FILE__)
1616

1717
if File.file?(bundle_binstub)
1818
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
2323
end
2424
end
2525

26-
require 'rubygems'
27-
require 'bundler/setup'
26+
require "rubygems"
27+
require "bundler/setup"
2828

29-
load Gem.bin_path('diff-lcs', 'htmldiff')
29+
load Gem.bin_path("diff-lcs", "htmldiff")

bin/httpclient

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
# this file is here to facilitate running it.
99
#
1010

11-
require 'pathname'
12-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
13-
Pathname.new(__FILE__).realpath)
11+
require "pathname"
12+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13+
Pathname.new(__FILE__).realpath)
1414

15-
bundle_binstub = File.expand_path('bundle', __dir__)
15+
bundle_binstub = File.expand_path("../bundle", __FILE__)
1616

1717
if File.file?(bundle_binstub)
1818
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
2323
end
2424
end
2525

26-
require 'rubygems'
27-
require 'bundler/setup'
26+
require "rubygems"
27+
require "bundler/setup"
2828

29-
load Gem.bin_path('httpclient', 'httpclient')
29+
load Gem.bin_path("httpclient", "httpclient")

bin/ldiff

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
# this file is here to facilitate running it.
99
#
1010

11-
require 'pathname'
12-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
13-
Pathname.new(__FILE__).realpath)
11+
require "pathname"
12+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13+
Pathname.new(__FILE__).realpath)
1414

15-
bundle_binstub = File.expand_path('bundle', __dir__)
15+
bundle_binstub = File.expand_path("../bundle", __FILE__)
1616

1717
if File.file?(bundle_binstub)
1818
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
2323
end
2424
end
2525

26-
require 'rubygems'
27-
require 'bundler/setup'
26+
require "rubygems"
27+
require "bundler/setup"
2828

29-
load Gem.bin_path('diff-lcs', 'ldiff')
29+
load Gem.bin_path("diff-lcs", "ldiff")

bin/pod

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
# this file is here to facilitate running it.
99
#
1010

11-
require 'pathname'
12-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
13-
Pathname.new(__FILE__).realpath)
11+
require "pathname"
12+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13+
Pathname.new(__FILE__).realpath)
1414

15-
bundle_binstub = File.expand_path('bundle', __dir__)
15+
bundle_binstub = File.expand_path("../bundle", __FILE__)
1616

1717
if File.file?(bundle_binstub)
1818
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
2323
end
2424
end
2525

26-
require 'rubygems'
27-
require 'bundler/setup'
26+
require "rubygems"
27+
require "bundler/setup"
2828

29-
load Gem.bin_path('cocoapods', 'pod')
29+
load Gem.bin_path("cocoapods", "pod")

bin/pry

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
# this file is here to facilitate running it.
99
#
1010

11-
require 'pathname'
12-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
13-
Pathname.new(__FILE__).realpath)
11+
require "pathname"
12+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13+
Pathname.new(__FILE__).realpath)
1414

15-
bundle_binstub = File.expand_path('bundle', __dir__)
15+
bundle_binstub = File.expand_path("../bundle", __FILE__)
1616

1717
if File.file?(bundle_binstub)
1818
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
2323
end
2424
end
2525

26-
require 'rubygems'
27-
require 'bundler/setup'
26+
require "rubygems"
27+
require "bundler/setup"
2828

29-
load Gem.bin_path('pry', 'pry')
29+
load Gem.bin_path("pry", "pry")

bin/rake

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
# this file is here to facilitate running it.
99
#
1010

11-
require 'pathname'
12-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
13-
Pathname.new(__FILE__).realpath)
11+
require "pathname"
12+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13+
Pathname.new(__FILE__).realpath)
1414

15-
bundle_binstub = File.expand_path('bundle', __dir__)
15+
bundle_binstub = File.expand_path("../bundle", __FILE__)
1616

1717
if File.file?(bundle_binstub)
1818
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
2323
end
2424
end
2525

26-
require 'rubygems'
27-
require 'bundler/setup'
26+
require "rubygems"
27+
require "bundler/setup"
2828

29-
load Gem.bin_path('rake', 'rake')
29+
load Gem.bin_path("rake", "rake")

0 commit comments

Comments
 (0)