motion-sparkle-sandbox 2.1.1 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ca50d516f00ac1b85b4212983fbe11e53f1d859ebbb18b2d3e4fad974a055523
4
- data.tar.gz: 263ad26c09854be232dd7a19485270b02d33b148838925f09f06c874eef2f993
3
+ metadata.gz: 3abc9bddd0ba919b4842386ec957db60123597426bae4e5712d0c79775293a4a
4
+ data.tar.gz: 15278612827eb5fda621cbd9cdf11484ef34e4ca72ec941e19ea4bcf0922daa0
5
5
  SHA512:
6
- metadata.gz: 85a7857cc96ef6e0a54bca54bdb416316781101cd7a85510c4905d8ecca79c3558795c89f83225df83db2f914052be24a570ddf03d093f80ea0121b75324141a
7
- data.tar.gz: fecced623e72e228bc0f64025c40aae21bd89819de2a7c8d655e8f04043be0af6d68820372a5018dbad69302d67678b1feccacd6efe683b84d583ff23f899309
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
@@ -1,5 +1,9 @@
1
1
  inherit_from: .rubocop_todo.yml
2
2
 
3
+ inherit_mode:
4
+ merge:
5
+ - Exclude
6
+
3
7
  AllCops:
4
8
  NewCops: enable
5
9
  Exclude:
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.7.2
1
+ 3.4.3
data/Gemfile CHANGED
@@ -2,10 +2,13 @@
2
2
 
3
3
  source 'https://rubygems.org'
4
4
 
5
- gem 'binding_of_caller'
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
- ### Mac OS X 10.11 and above
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 now requires Mac OS X 10.11 (El Capitan) or later
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
@@ -19,7 +19,7 @@ module Motion
19
19
 
20
20
  CLI_OPTIONS = {
21
21
  account: '--account',
22
- private_eddsa_key: '-s',
22
+ private_ed_key_file: '--ed-key-file',
23
23
  download_url_prefix: '--download-url-prefix',
24
24
  release_notes_url_prefix: '--release-notes-url-prefix',
25
25
  full_release_notes_url: '--full-release-notes-url',
@@ -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)
@@ -93,7 +92,7 @@ module Motion
93
92
  args = []
94
93
 
95
94
  account(args)
96
- private_eddsa_key(args)
95
+ private_ed_key_file(args)
97
96
  download_url_prefix(args)
98
97
  release_notes_url_prefix(args)
99
98
  full_release_notes_url(args)
@@ -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)
@@ -127,12 +125,11 @@ module Motion
127
125
  # -s <private-EdDSA-key> The private EdDSA string (128 characters). If not
128
126
  # specified, the private EdDSA key will be read from
129
127
  # the Keychain instead.
130
- def private_eddsa_key(args)
131
- if cli_options[:private_eddsa_key].present?
132
- args << "-s=#{cli_options[:private_eddsa_key]}"
133
- elsif use_exported_private_key && File.exist?(private_key_path)
134
- private_key = File.read(private_key_path)
135
- args << "-s=#{private_key}"
128
+ def private_ed_key_file(args)
129
+ if cli_options[:private_ed_key_file].present?
130
+ args << "--ed-key-file=#{cli_options[:private_ed_key_file]}"
131
+ elsif use_exported_private_key && File.exist?(@sparkle.private_key_path)
132
+ args << "--ed-key-file=#{@sparkle.private_key_path}"
136
133
  end
137
134
  end
138
135
 
@@ -212,18 +209,6 @@ module Motion
212
209
  args << "--delta-compression=#{cli_options[:delta_compression]}"
213
210
  end
214
211
 
215
- # --delta-compression-level <delta-compression-level>
216
- # The compression level to use for generating delta
217
- # updates. This only applies if the compression method
218
- # used is bzip2 which accepts values from 1 - 9. A
219
- # special value of 0 will use the default compression
220
- # level. (default: 0)
221
- def delta_compression_level(args)
222
- return unless cli_options[:delta_compression_level].present?
223
-
224
- args << "--delta-compression-level=#{cli_options[:delta_compression_level]}"
225
- end
226
-
227
212
  # --channel <channel-name>
228
213
  # The Sparkle channel name that will be used for
229
214
  # generating new updates. By default, no channel is
@@ -307,4 +292,3 @@ module Motion
307
292
  end
308
293
  end
309
294
  end
310
- # 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 = (Regexp.last_match(1) == '' && Regexp.last_match(2) == '')
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
- # -s <private-key> The private EdDSA (ed25519) key
50
- private_key = File.read(private_key_path)
51
- args << "-s=#{private_key}"
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)
@@ -40,10 +40,20 @@ module Motion
40
40
  bundle_path = App.config.app_bundle('MacOSX')
41
41
  sparkle_path = File.join(bundle_path, 'Frameworks', 'Sparkle.framework')
42
42
 
43
+ # strip out any header files, as they are not needed for a built product, and Xcode
44
+ # typically does this. Their permissions are set such that it conflicts
45
+ # with building the deltas. See https://github.com/sparkle-project/Sparkle/issues/1972
46
+ `rm -fr "#{sparkle_path}/Versions/B/PrivateHeaders"`
47
+ `rm "#{sparkle_path}/PrivateHeaders"`
48
+ `rm -fr "#{sparkle_path}/Versions/B/Headers"`
49
+ `rm "#{sparkle_path}/Headers"`
50
+
43
51
  `/usr/bin/codesign -f -s "#{config.codesign_certificate}" -o runtime "#{sparkle_path}/Versions/B/Autoupdate"`
44
52
  `/usr/bin/codesign -f -s "#{config.codesign_certificate}" -o runtime "#{sparkle_path}/Versions/B/Updater.app"`
45
- `/usr/bin/codesign -f -s "#{config.codesign_certificate}" -o runtime "#{sparkle_path}/Versions/B/XPCServices/org.sparkle-project.InstallerLauncher.xpc"`
46
- `/usr/bin/codesign -f -s "#{config.codesign_certificate}" -o runtime --entitlements "./vendor/Pods/Sparkle/Entitlements/org.sparkle-project.Downloader.entitlements" "#{sparkle_path}/Versions/B/XPCServices/org.sparkle-project.Downloader.xpc"` # rubocop:disable Layout/LineLength
53
+ `/usr/bin/codesign -f -s "#{config.codesign_certificate}" -o runtime "#{sparkle_path}/Versions/B/XPCServices/Installer.xpc"`
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"`
47
57
 
48
58
  `/usr/bin/codesign -f -s "#{config.codesign_certificate}" -o runtime "#{sparkle_path}"`
49
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 unless File.exist?(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
@@ -210,12 +209,12 @@ module Motion
210
209
  # copy the release notes and zip archive into the releases_folder,
211
210
  # where the appcast will get built
212
211
  def copy_to_release
213
- path = (project_path + releases_folder).realpath
214
- zip_file_path = (sparkle_release_path + zip_file).realpath
212
+ destination_path = (project_path + releases_folder).realpath
213
+ zip_file_path = (sparkle_release_path + zip_file)
215
214
 
216
215
  [release_notes_path, zip_file_path].each do |file|
217
- FileUtils.cp(file, "#{path}/")
218
- App.info 'Copied', "./#{path}/#{file}"
216
+ FileUtils.cp(file, "#{destination_path}/")
217
+ App.info 'Copied', "#{destination_path}/#{file}"
219
218
  end
220
219
  end
221
220
 
@@ -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) unless File.exist?(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) unless File.exist?(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) unless File.exist?(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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MotionSparkleSandbox
4
- VERSION = '2.1.1'
4
+ VERSION = '2.9.6'
5
5
  end
@@ -16,7 +16,7 @@ require 'motion/project/indent_string'
16
16
 
17
17
  lib_dir_path = File.dirname(File.expand_path(__FILE__))
18
18
 
19
- POD_VERSION = '~> 2.1.0'
19
+ POD_VERSION = '~> 2.9.6'
20
20
 
21
21
  unless @running_specs
22
22
  Motion::Project::App.setup do |app|
@@ -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
@@ -1,8 +1,9 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem 'rake'
4
+ gem 'bigdecimal'
4
5
 
5
6
  gem 'motion-sparkle-sandbox', path: '..'
6
7
 
7
- gem 'pry-byebug', '~> 3.9.0', platform: :mri
8
+ gem 'pry-byebug'
8
9
  gem 'binding_of_caller'
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 = '10.14'
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
- require File.expand_path('spec_utils', __dir__)
3
+ require_relative 'spec_utils'
4
4
 
5
5
  describe 'Appcast' do
6
6
  describe 'arguments' do
@@ -11,13 +11,13 @@ describe 'Appcast' do
11
11
  it 'defaults to empty' do
12
12
  args = @appcast.prepare_args
13
13
 
14
- expect(args).to eq []
14
+ expect(args).to eq ['--account=ed25519']
15
15
  end
16
16
 
17
17
  it 'sets all command line options' do
18
18
  expected_results = [
19
19
  '--account=test1',
20
- '-s=test2',
20
+ '--ed-key-file=test2',
21
21
  '--download-url-prefix=test3',
22
22
  '--release-notes-url-prefix=test4',
23
23
  '--full-release-notes-url=test5',
@@ -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_eddsa_key, '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(:delta_compression_level, 'test10')
48
- @appcast.process_option(:channel, 'test11')
49
- @appcast.process_option(:major_version, 'test12')
50
- @appcast.process_option(:ignore_skipped_upgrades_below_version, 'test13')
51
- @appcast.process_option(:phased_rollout_interval, 'test14')
52
- @appcast.process_option(:critical_update_version, 'test15')
53
- @appcast.process_option(:informational_update_versions, 'test16')
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
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require File.expand_path('spec_utils', __dir__)
3
+ require_relative 'spec_utils'
4
4
 
5
5
  describe 'Sparkle setup' do
6
6
  before(:all) do
data/spec/sparkle_spec.rb CHANGED
@@ -1,8 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require File.expand_path('spec_utils', __dir__)
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: 2.1.1
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: 2022-06-12 00:00:00.000000000 Z
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
- post_install_message:
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: 3.1.4
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