motion-sparkle-sandbox 2.2 → 2.9.6
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/.github/workflows/ci.yml +56 -0
- data/.rubocop.yml +4 -0
- data/.ruby-version +1 -1
- data/Gemfile +5 -2
- data/README.md +2 -2
- data/lib/motion/project/appcast.rb +2 -17
- data/lib/motion/project/indent_string.rb +1 -1
- data/lib/motion/project/package.rb +8 -3
- data/lib/motion/project/project.rb +3 -1
- data/lib/motion/project/sparkle.rb +7 -9
- data/lib/motion-sparkle-sandbox/version.rb +1 -1
- data/lib/motion-sparkle-sandbox.rb +1 -1
- data/motion-sparkle-sandbox.gemspec +1 -1
- data/sample-app/Gemfile +2 -1
- data/sample-app/Rakefile +1 -1
- data/spec/appcast_spec.rb +17 -19
- data/spec/package_spec.rb +67 -0
- data/spec/setup_spec.rb +1 -1
- data/spec/sparkle_spec.rb +2 -3
- data/spec/spec_utils.rb +7 -3
- metadata +8 -14
- data/.travis.yml +0 -37
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3abc9bddd0ba919b4842386ec957db60123597426bae4e5712d0c79775293a4a
|
|
4
|
+
data.tar.gz: 15278612827eb5fda621cbd9cdf11484ef34e4ca72ec941e19ea4bcf0922daa0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 59eade40012c48ba4b3fd45cd3a77dfca4995fe587e8f4e9a2c03730a5130c56d85bb6f4b30fa52c96f04319d50366e64709f585ccbc00923a803fa657107afd
|
|
7
|
+
data.tar.gz: 1da39a96d8e55f1cbf48cf72cf7af4ab06405639362c4eec374a606543acfea3b3a2598261d9e8959549113c4e11a7a11665601a91ef578d4e2ea6d5d0f5a595
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [master]
|
|
6
|
+
pull_request:
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
concurrency:
|
|
10
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
11
|
+
cancel-in-progress: true
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
rubocop:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
- uses: ruby/setup-ruby@v1
|
|
19
|
+
with:
|
|
20
|
+
bundler-cache: true
|
|
21
|
+
- run: bundle exec rubocop
|
|
22
|
+
|
|
23
|
+
macos:
|
|
24
|
+
runs-on: macos-latest
|
|
25
|
+
env:
|
|
26
|
+
RUBYMOTION_LICENSE: 1dcac45cc434293009f74b33037bdf7361a3a1ff # Official license key for open-source projects
|
|
27
|
+
TMP_DIR: ./tmp # For motion repo, so it doesn't attempt to use /tmp, to which it has no access
|
|
28
|
+
OBJC_DISABLE_INITIALIZE_FORK_SAFETY: 'YES'
|
|
29
|
+
steps:
|
|
30
|
+
- uses: actions/checkout@v4
|
|
31
|
+
- uses: ruby/setup-ruby@v1
|
|
32
|
+
with:
|
|
33
|
+
bundler-cache: true
|
|
34
|
+
|
|
35
|
+
- name: Install RubyMotion
|
|
36
|
+
run: |
|
|
37
|
+
curl -fsSL http://travisci.rubymotion.com/ -o RubyMotion-TravisCI.pkg
|
|
38
|
+
sudo installer -pkg RubyMotion-TravisCI.pkg -target /
|
|
39
|
+
mkdir -p ~/Library/RubyMotion/build
|
|
40
|
+
sudo motion activate "$RUBYMOTION_LICENSE"
|
|
41
|
+
sudo motion update
|
|
42
|
+
motion repo
|
|
43
|
+
if [ ! -d ~/.rubymotion/rubymotion-templates ]; then
|
|
44
|
+
git clone --depth 1 https://github.com/amirrajan/rubymotion-templates ~/.rubymotion/rubymotion-templates
|
|
45
|
+
fi
|
|
46
|
+
motion --version
|
|
47
|
+
ruby --version
|
|
48
|
+
|
|
49
|
+
- name: Cache CocoaPods specs
|
|
50
|
+
uses: actions/cache@v4
|
|
51
|
+
with:
|
|
52
|
+
path: ~/.cocoapods/repos
|
|
53
|
+
key: cocoapods-${{ runner.os }}-${{ hashFiles('lib/motion-sparkle-sandbox.rb') }}
|
|
54
|
+
restore-keys: cocoapods-${{ runner.os }}-
|
|
55
|
+
|
|
56
|
+
- run: bundle exec rspec
|
data/.rubocop.yml
CHANGED
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
3.4.3
|
data/Gemfile
CHANGED
|
@@ -2,10 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
source 'https://rubygems.org'
|
|
4
4
|
|
|
5
|
-
gem '
|
|
6
|
-
gem 'pry-byebug', '~> 3.9.0', platform: :mri
|
|
5
|
+
gem 'bigdecimal'
|
|
7
6
|
gem 'rake'
|
|
8
7
|
|
|
8
|
+
#--- Development
|
|
9
|
+
gem 'binding_of_caller'
|
|
10
|
+
gem 'pry-byebug'
|
|
11
|
+
|
|
9
12
|
gem 'rspec', '~> 3.0'
|
|
10
13
|
|
|
11
14
|
gem 'rubocop'
|
data/README.md
CHANGED
|
@@ -30,11 +30,11 @@ After building your app for release and running `rake sparkle:package`, all you
|
|
|
30
30
|
|
|
31
31
|
## Compatibility
|
|
32
32
|
|
|
33
|
-
###
|
|
33
|
+
### macOS 10.13 and above
|
|
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
|
|
37
|
+
- Sparkle 2.9 requires macOS 10.13 (High Sierra) or later
|
|
38
38
|
|
|
39
39
|
## Installation
|
|
40
40
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# rubocop:disable Metrics/ClassLength
|
|
3
|
+
# rubocop:disable-next Metrics/ClassLength
|
|
4
4
|
module Motion
|
|
5
5
|
module Project
|
|
6
6
|
class Sparkle
|
|
@@ -27,7 +27,6 @@ module Motion
|
|
|
27
27
|
versions: '--versions',
|
|
28
28
|
maximum_deltas: '--maximum-deltas',
|
|
29
29
|
delta_compression: '--delta-compression',
|
|
30
|
-
delta_compression_level: '--delta-compression-level',
|
|
31
30
|
channel: '--channel',
|
|
32
31
|
major_version: '--major-version',
|
|
33
32
|
ignore_skipped_upgrades_below_version: '--ignore-skipped-upgrades-below-version',
|
|
@@ -65,7 +64,7 @@ module Motion
|
|
|
65
64
|
@use_exported_private_key = false
|
|
66
65
|
end
|
|
67
66
|
|
|
68
|
-
def process_option(key, value)
|
|
67
|
+
def process_option?(key, value)
|
|
69
68
|
if CLI_OPTIONS.keys.include?(key)
|
|
70
69
|
cli_options[key] = value
|
|
71
70
|
elsif PARAMS.include?(key)
|
|
@@ -101,7 +100,6 @@ module Motion
|
|
|
101
100
|
versions(args)
|
|
102
101
|
maximum_deltas(args)
|
|
103
102
|
delta_compression(args)
|
|
104
|
-
delta_compression_level(args)
|
|
105
103
|
channel(args)
|
|
106
104
|
major_version(args)
|
|
107
105
|
ignore_skipped_upgrades_below_version(args)
|
|
@@ -211,18 +209,6 @@ module Motion
|
|
|
211
209
|
args << "--delta-compression=#{cli_options[:delta_compression]}"
|
|
212
210
|
end
|
|
213
211
|
|
|
214
|
-
# --delta-compression-level <delta-compression-level>
|
|
215
|
-
# The compression level to use for generating delta
|
|
216
|
-
# updates. This only applies if the compression method
|
|
217
|
-
# used is bzip2 which accepts values from 1 - 9. A
|
|
218
|
-
# special value of 0 will use the default compression
|
|
219
|
-
# level. (default: 0)
|
|
220
|
-
def delta_compression_level(args)
|
|
221
|
-
return unless cli_options[:delta_compression_level].present?
|
|
222
|
-
|
|
223
|
-
args << "--delta-compression-level=#{cli_options[:delta_compression_level]}"
|
|
224
|
-
end
|
|
225
|
-
|
|
226
212
|
# --channel <channel-name>
|
|
227
213
|
# The Sparkle channel name that will be used for
|
|
228
214
|
# generating new updates. By default, no channel is
|
|
@@ -306,4 +292,3 @@ module Motion
|
|
|
306
292
|
end
|
|
307
293
|
end
|
|
308
294
|
end
|
|
309
|
-
# rubocop:enable Metrics/ClassLength
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
String.class_eval do
|
|
5
5
|
def indent(count, char = ' ', skip_first_line: false)
|
|
6
6
|
gsub(/([^\n]*)(\n|$)/) do |_match|
|
|
7
|
-
last_iteration =
|
|
7
|
+
last_iteration = Regexp.last_match(1) == '' && Regexp.last_match(2) == ''
|
|
8
8
|
line = String.new
|
|
9
9
|
line << (char * count) unless last_iteration || skip_first_line
|
|
10
10
|
line << Regexp.last_match(1)
|
|
@@ -46,9 +46,14 @@ module Motion
|
|
|
46
46
|
args = []
|
|
47
47
|
|
|
48
48
|
if appcast.use_exported_private_key && File.exist?(private_key_path)
|
|
49
|
-
# -
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
# --ed-key-file <private-key-file>
|
|
50
|
+
# Path to the file containing the private EdDSA (ed25519) key.
|
|
51
|
+
# (`-s <private-key>` is deprecated and unsupported for newly generated keys)
|
|
52
|
+
args << "--ed-key-file=#{private_key_path}"
|
|
53
|
+
elsif appcast.cli_options[:account].present?
|
|
54
|
+
# --account <account>
|
|
55
|
+
# The account name in your keychain associated with your private keys
|
|
56
|
+
args << "--account=#{appcast.cli_options[:account]}"
|
|
52
57
|
end
|
|
53
58
|
|
|
54
59
|
results, _status = Open3.capture2e(sign_update_app, *args, package)
|
|
@@ -51,7 +51,9 @@ module Motion
|
|
|
51
51
|
`/usr/bin/codesign -f -s "#{config.codesign_certificate}" -o runtime "#{sparkle_path}/Versions/B/Autoupdate"`
|
|
52
52
|
`/usr/bin/codesign -f -s "#{config.codesign_certificate}" -o runtime "#{sparkle_path}/Versions/B/Updater.app"`
|
|
53
53
|
`/usr/bin/codesign -f -s "#{config.codesign_certificate}" -o runtime "#{sparkle_path}/Versions/B/XPCServices/Installer.xpc"`
|
|
54
|
-
|
|
54
|
+
# Sparkle >= 2.6 no longer ships the `Entitlements` directory - the Downloader's entitlements
|
|
55
|
+
# are embedded in its signature. See https://sparkle-project.org/documentation/sandboxing/
|
|
56
|
+
`/usr/bin/codesign -f -s "#{config.codesign_certificate}" -o runtime --preserve-metadata=entitlements "#{sparkle_path}/Versions/B/XPCServices/Downloader.xpc"`
|
|
55
57
|
|
|
56
58
|
`/usr/bin/codesign -f -s "#{config.codesign_certificate}" -o runtime "#{sparkle_path}"`
|
|
57
59
|
end
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
module Motion
|
|
4
4
|
module Project
|
|
5
|
-
# rubocop:disable Metrics/ClassLength
|
|
5
|
+
# rubocop:disable-next Metrics/ClassLength
|
|
6
6
|
class Sparkle
|
|
7
7
|
SPARKLE_ROOT = 'sparkle'
|
|
8
8
|
CONFIG_PATH = "#{SPARKLE_ROOT}/config"
|
|
@@ -24,7 +24,7 @@ module Motion
|
|
|
24
24
|
end
|
|
25
25
|
|
|
26
26
|
def publish(key, value)
|
|
27
|
-
return if appcast.process_option(key, value)
|
|
27
|
+
return if appcast.process_option?(key, value)
|
|
28
28
|
|
|
29
29
|
case key
|
|
30
30
|
when :public_key
|
|
@@ -92,11 +92,11 @@ module Motion
|
|
|
92
92
|
"#{vendored_sparkle_path}/bin/generate_keys"
|
|
93
93
|
end
|
|
94
94
|
|
|
95
|
-
# rubocop:disable Metrics/PerceivedComplexity, Metrics/CyclomaticComplexity, Metrics/MethodLength
|
|
95
|
+
# rubocop:disable-next Metrics/PerceivedComplexity, Metrics/CyclomaticComplexity, Metrics/MethodLength
|
|
96
96
|
def generate_keys
|
|
97
97
|
return false unless config_ok?
|
|
98
98
|
|
|
99
|
-
FileUtils.mkdir_p sparkle_config_path
|
|
99
|
+
FileUtils.mkdir_p sparkle_config_path
|
|
100
100
|
|
|
101
101
|
if appcast.use_exported_private_key && File.exist?(private_key_path)
|
|
102
102
|
App.info 'Sparkle', "Private key already exported at `#{private_key_path}` and will be used."
|
|
@@ -158,7 +158,6 @@ module Motion
|
|
|
158
158
|
create_private_key
|
|
159
159
|
export_private_key if appcast.use_exported_private_key
|
|
160
160
|
end
|
|
161
|
-
# rubocop:enable Metrics/PerceivedComplexity, Metrics/CyclomaticComplexity, Metrics/MethodLength
|
|
162
161
|
|
|
163
162
|
# Create the private key in the keychain
|
|
164
163
|
def create_private_key
|
|
@@ -228,7 +227,7 @@ module Motion
|
|
|
228
227
|
appcast_filename = (path + appcast.feed_filename)
|
|
229
228
|
appcast.cli_options[:output_path] = appcast_filename
|
|
230
229
|
|
|
231
|
-
FileUtils.mkdir_p(path)
|
|
230
|
+
FileUtils.mkdir_p(path)
|
|
232
231
|
|
|
233
232
|
App.info('Sparkle', "Generating appcast using `#{generate_appcast_app}`")
|
|
234
233
|
puts "from files in `#{path}`...".indent(11)
|
|
@@ -346,13 +345,12 @@ module Motion
|
|
|
346
345
|
private
|
|
347
346
|
|
|
348
347
|
def create_config_folder
|
|
349
|
-
FileUtils.mkdir_p(sparkle_config_path)
|
|
348
|
+
FileUtils.mkdir_p(sparkle_config_path)
|
|
350
349
|
end
|
|
351
350
|
|
|
352
351
|
def create_release_folder
|
|
353
|
-
FileUtils.mkdir_p(sparkle_release_path)
|
|
352
|
+
FileUtils.mkdir_p(sparkle_release_path)
|
|
354
353
|
end
|
|
355
354
|
end
|
|
356
|
-
# rubocop:enable Metrics/ClassLength
|
|
357
355
|
end
|
|
358
356
|
end
|
|
@@ -24,8 +24,8 @@ Gem::Specification.new do |spec|
|
|
|
24
24
|
spec.license = 'MIT'
|
|
25
25
|
|
|
26
26
|
spec.files = `git ls-files`.split("\n")
|
|
27
|
-
spec.test_files = Dir.glob('spec/**/*.rb')
|
|
28
27
|
spec.require_paths = ['lib']
|
|
29
28
|
|
|
30
29
|
spec.add_dependency 'motion-cocoapods'
|
|
30
|
+
spec.metadata['rubygems_mfa_required'] = 'true'
|
|
31
31
|
end
|
data/sample-app/Gemfile
CHANGED
data/sample-app/Rakefile
CHANGED
|
@@ -16,7 +16,7 @@ end
|
|
|
16
16
|
Motion::Project::App.setup do |app|
|
|
17
17
|
# Use `rake config' to see complete project settings.
|
|
18
18
|
app.name = 'sample-app'
|
|
19
|
-
app.deployment_target = '
|
|
19
|
+
app.deployment_target = '13.3'
|
|
20
20
|
app.info_plist['CFBundleIconName'] = 'AppIcon'
|
|
21
21
|
app.codesign_certificate = '-' # use an ad-hoc signing certificate
|
|
22
22
|
|
data/spec/appcast_spec.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
require_relative 'spec_utils'
|
|
4
4
|
|
|
5
5
|
describe 'Appcast' do
|
|
6
6
|
describe 'arguments' do
|
|
@@ -25,7 +25,6 @@ describe 'Appcast' do
|
|
|
25
25
|
'--versions=test7',
|
|
26
26
|
'--maximum-deltas=test8',
|
|
27
27
|
'--delta-compression=test9',
|
|
28
|
-
'--delta-compression-level=test10',
|
|
29
28
|
'--channel=test11',
|
|
30
29
|
'--major-version=test12',
|
|
31
30
|
'--ignore-skipped-upgrades-below-version=test13',
|
|
@@ -35,23 +34,22 @@ describe 'Appcast' do
|
|
|
35
34
|
'-o=test17'
|
|
36
35
|
]
|
|
37
36
|
|
|
38
|
-
@appcast.process_option(:account, 'test1')
|
|
39
|
-
@appcast.process_option(:private_ed_key_file, 'test2')
|
|
40
|
-
@appcast.process_option(:download_url_prefix, 'test3')
|
|
41
|
-
@appcast.process_option(:release_notes_url_prefix, 'test4')
|
|
42
|
-
@appcast.process_option(:full_release_notes_url, 'test5')
|
|
43
|
-
@appcast.process_option(:link, 'test6')
|
|
44
|
-
@appcast.process_option(:versions, 'test7')
|
|
45
|
-
@appcast.process_option(:maximum_deltas, 'test8')
|
|
46
|
-
@appcast.process_option(:delta_compression, 'test9')
|
|
47
|
-
@appcast.process_option(:
|
|
48
|
-
@appcast.process_option(:
|
|
49
|
-
@appcast.process_option(:
|
|
50
|
-
@appcast.process_option(:
|
|
51
|
-
@appcast.process_option(:
|
|
52
|
-
@appcast.process_option(:
|
|
53
|
-
@appcast.process_option(:
|
|
54
|
-
@appcast.process_option(:output_path, 'test17')
|
|
37
|
+
@appcast.process_option?(:account, 'test1')
|
|
38
|
+
@appcast.process_option?(:private_ed_key_file, 'test2')
|
|
39
|
+
@appcast.process_option?(:download_url_prefix, 'test3')
|
|
40
|
+
@appcast.process_option?(:release_notes_url_prefix, 'test4')
|
|
41
|
+
@appcast.process_option?(:full_release_notes_url, 'test5')
|
|
42
|
+
@appcast.process_option?(:link, 'test6')
|
|
43
|
+
@appcast.process_option?(:versions, 'test7')
|
|
44
|
+
@appcast.process_option?(:maximum_deltas, 'test8')
|
|
45
|
+
@appcast.process_option?(:delta_compression, 'test9')
|
|
46
|
+
@appcast.process_option?(:channel, 'test11')
|
|
47
|
+
@appcast.process_option?(:major_version, 'test12')
|
|
48
|
+
@appcast.process_option?(:ignore_skipped_upgrades_below_version, 'test13')
|
|
49
|
+
@appcast.process_option?(:phased_rollout_interval, 'test14')
|
|
50
|
+
@appcast.process_option?(:critical_update_version, 'test15')
|
|
51
|
+
@appcast.process_option?(:informational_update_versions, 'test16')
|
|
52
|
+
@appcast.process_option?(:output_path, 'test17')
|
|
55
53
|
args = @appcast.prepare_args
|
|
56
54
|
|
|
57
55
|
expect(args).to match_array expected_results
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative 'spec_utils'
|
|
4
|
+
|
|
5
|
+
describe 'motion-sparkle-sandbox package' do
|
|
6
|
+
before do
|
|
7
|
+
@config = App.config
|
|
8
|
+
@config.sparkle = nil
|
|
9
|
+
@config.project_dir = SpecUtils::TemporaryDirectory.directory.to_s
|
|
10
|
+
@config.instance_eval do
|
|
11
|
+
sparkle do
|
|
12
|
+
release :base_url, 'http://example.com/'
|
|
13
|
+
publish :package_filename, 'test.zip'
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
@sparkle = @config.sparkle
|
|
18
|
+
@sign_update = "#{@sparkle.vendored_sparkle_path}/bin/sign_update"
|
|
19
|
+
|
|
20
|
+
allow(App).to receive(:info)
|
|
21
|
+
allow(Open3).to receive(:capture2e).and_return(['', nil])
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
describe 'sign_package' do
|
|
25
|
+
it 'signs with the default keychain account' do
|
|
26
|
+
@sparkle.sign_package
|
|
27
|
+
|
|
28
|
+
expect(Open3).to have_received(:capture2e)
|
|
29
|
+
.with(@sign_update, '--account=ed25519', a_string_ending_with('/test.zip'))
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
it 'signs with a custom keychain account' do
|
|
33
|
+
@sparkle.publish(:account, 'my.custom.account')
|
|
34
|
+
@sparkle.sign_package
|
|
35
|
+
|
|
36
|
+
expect(Open3).to have_received(:capture2e)
|
|
37
|
+
.with(@sign_update, '--account=my.custom.account', a_string_ending_with('/test.zip'))
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
context 'with an exported private key' do
|
|
41
|
+
before do
|
|
42
|
+
FileUtils.mkdir_p(@sparkle.private_key_path.dirname)
|
|
43
|
+
FileUtils.touch(@sparkle.private_key_path)
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
after do
|
|
47
|
+
FileUtils.rm_f(@sparkle.private_key_path)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
it 'signs with the private key file instead of the keychain account' do
|
|
51
|
+
@sparkle.publish(:account, 'my.custom.account')
|
|
52
|
+
@sparkle.publish(:use_exported_private_key, true)
|
|
53
|
+
@sparkle.sign_package
|
|
54
|
+
|
|
55
|
+
expect(Open3).to have_received(:capture2e)
|
|
56
|
+
.with(@sign_update, "--ed-key-file=#{@sparkle.private_key_path}", a_string_ending_with('/test.zip'))
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
it 'uses the keychain account when use_exported_private_key is not set' do
|
|
60
|
+
@sparkle.sign_package
|
|
61
|
+
|
|
62
|
+
expect(Open3).to have_received(:capture2e)
|
|
63
|
+
.with(@sign_update, '--account=ed25519', a_string_ending_with('/test.zip'))
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
data/spec/setup_spec.rb
CHANGED
data/spec/sparkle_spec.rb
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
require_relative 'spec_utils'
|
|
4
4
|
|
|
5
|
-
# rubocop:disable Metrics/BlockLength
|
|
5
|
+
# rubocop:disable-next Metrics/BlockLength
|
|
6
6
|
describe 'motion-sparkle-sandbox' do
|
|
7
7
|
before(:all) do
|
|
8
8
|
@config = App.config
|
|
@@ -108,4 +108,3 @@ describe 'motion-sparkle-sandbox' do
|
|
|
108
108
|
end
|
|
109
109
|
end
|
|
110
110
|
end
|
|
111
|
-
# rubocop:enable Metrics/BlockLength
|
data/spec/spec_utils.rb
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
$:.unshift('/Library/RubyMotion/lib')
|
|
4
|
+
$:.unshift(File.expand_path('~/.rubymotion/rubymotion-templates'))
|
|
5
|
+
require 'pry-byebug'
|
|
3
6
|
require 'rake'
|
|
4
|
-
require 'pry'
|
|
5
7
|
|
|
6
8
|
ROOT = Pathname.new(File.expand_path('..', __dir__))
|
|
7
|
-
$:.unshift(ENV['RUBYMOTION_CHECKOUT'] || '/Library/RubyMotion/lib')
|
|
8
|
-
$:.unshift("#{ROOT}lib".to_s)
|
|
9
9
|
|
|
10
10
|
# need to ensure that we bypass the `app.pods` in `lib/motion-sparkle-sandbox.rb`
|
|
11
11
|
@running_specs = 1
|
|
@@ -13,6 +13,10 @@ $:.unshift("#{ROOT}lib".to_s)
|
|
|
13
13
|
require 'motion/project/template/osx'
|
|
14
14
|
require 'motion-sparkle-sandbox'
|
|
15
15
|
|
|
16
|
+
# activesupport 4.x uses BigDecimal.new which was removed in bigdecimal 3.0
|
|
17
|
+
require 'bigdecimal'
|
|
18
|
+
BigDecimal.singleton_class.define_method(:new) { |*a| BigDecimal(*a) } unless BigDecimal.respond_to?(:new)
|
|
19
|
+
|
|
16
20
|
# necessary for us to be able to overwrite the `project_dir`
|
|
17
21
|
module Motion
|
|
18
22
|
module Project
|
metadata
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: motion-sparkle-sandbox
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 2.9.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Brett Walker
|
|
8
8
|
- Alexandre L. Solleiro
|
|
9
|
-
autorequire:
|
|
10
9
|
bindir: bin
|
|
11
10
|
cert_chain: []
|
|
12
|
-
date:
|
|
11
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
13
12
|
dependencies:
|
|
14
13
|
- !ruby/object:Gem::Dependency
|
|
15
14
|
name: motion-cocoapods
|
|
@@ -34,12 +33,12 @@ executables: []
|
|
|
34
33
|
extensions: []
|
|
35
34
|
extra_rdoc_files: []
|
|
36
35
|
files:
|
|
36
|
+
- ".github/workflows/ci.yml"
|
|
37
37
|
- ".gitignore"
|
|
38
38
|
- ".rspec"
|
|
39
39
|
- ".rubocop.yml"
|
|
40
40
|
- ".rubocop_todo.yml"
|
|
41
41
|
- ".ruby-version"
|
|
42
|
-
- ".travis.yml"
|
|
43
42
|
- Gemfile
|
|
44
43
|
- LICENSE
|
|
45
44
|
- README.md
|
|
@@ -96,6 +95,7 @@ files:
|
|
|
96
95
|
- sample-app/resources/Credits.rtf
|
|
97
96
|
- sample-app/spec/main_spec.rb
|
|
98
97
|
- spec/appcast_spec.rb
|
|
98
|
+
- spec/package_spec.rb
|
|
99
99
|
- spec/setup_spec.rb
|
|
100
100
|
- spec/sparkle_spec.rb
|
|
101
101
|
- spec/spec_helper.rb
|
|
@@ -104,8 +104,8 @@ files:
|
|
|
104
104
|
homepage: https://github.com/digitalmoksha/motion-sparkle-sandbox
|
|
105
105
|
licenses:
|
|
106
106
|
- MIT
|
|
107
|
-
metadata:
|
|
108
|
-
|
|
107
|
+
metadata:
|
|
108
|
+
rubygems_mfa_required: 'true'
|
|
109
109
|
rdoc_options: []
|
|
110
110
|
require_paths:
|
|
111
111
|
- lib
|
|
@@ -120,13 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
120
120
|
- !ruby/object:Gem::Version
|
|
121
121
|
version: '0'
|
|
122
122
|
requirements: []
|
|
123
|
-
rubygems_version:
|
|
124
|
-
signing_key:
|
|
123
|
+
rubygems_version: 4.0.11
|
|
125
124
|
specification_version: 4
|
|
126
125
|
summary: Sparkle (sandboxed) integration for Rubymotion projects
|
|
127
|
-
test_files:
|
|
128
|
-
- spec/appcast_spec.rb
|
|
129
|
-
- spec/spec_helper.rb
|
|
130
|
-
- spec/sparkle_spec.rb
|
|
131
|
-
- spec/setup_spec.rb
|
|
132
|
-
- spec/spec_utils.rb
|
|
126
|
+
test_files: []
|
data/.travis.yml
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
language: objective-c
|
|
2
|
-
osx_image: xcode12.2
|
|
3
|
-
env:
|
|
4
|
-
global:
|
|
5
|
-
- RUBYMOTION_LICENSE=1dcac45cc434293009f74b33037bdf7361a3a1ff # Official license key for open-source projects
|
|
6
|
-
- TMP_DIR=./tmp # For motion repo, so it doesn't attempt to use /tmp, to which it has no access
|
|
7
|
-
- OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
|
|
8
|
-
|
|
9
|
-
before_install:
|
|
10
|
-
- brew update
|
|
11
|
-
- brew outdated xctool || brew upgrade xctool
|
|
12
|
-
- (xcrun simctl list)
|
|
13
|
-
- wget http://travisci.rubymotion.com/ -O RubyMotion-TravisCI.pkg
|
|
14
|
-
- sudo installer -pkg RubyMotion-TravisCI.pkg -target /
|
|
15
|
-
- cp -r /usr/lib/swift/*.dylib /Applications/Xcode.app/Contents/Frameworks/
|
|
16
|
-
- touch /Applications/Xcode.app/Contents/Frameworks/.swift-5-staged
|
|
17
|
-
- sudo mkdir -p ~/Library/RubyMotion/build
|
|
18
|
-
- sudo chown -R travis ~/Library/RubyMotion
|
|
19
|
-
- eval "sudo motion activate $RUBYMOTION_LICENSE"
|
|
20
|
-
- sudo motion update
|
|
21
|
-
- (motion --version)
|
|
22
|
-
- (ruby --version)
|
|
23
|
-
- motion repo
|
|
24
|
-
- bundle install --jobs=3 --retry=3
|
|
25
|
-
- bundle exec rake pod:install
|
|
26
|
-
|
|
27
|
-
gemfile:
|
|
28
|
-
- Gemfile
|
|
29
|
-
|
|
30
|
-
jobs:
|
|
31
|
-
include:
|
|
32
|
-
- stage: rubocop
|
|
33
|
-
script: bundle exec rubocop
|
|
34
|
-
- stage: macos
|
|
35
|
-
script: bundle exec rake spec
|
|
36
|
-
# - stage: ios
|
|
37
|
-
# script: bundle exec rake spec platform=ios
|