motion-sparkle-sandbox 0.8.0 → 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/.gitignore +4 -0
- data/.rspec +2 -0
- data/.rubocop.yml +7 -0
- data/.rubocop_todo.yml +183 -0
- data/.ruby-version +1 -0
- data/.travis.yml +37 -0
- data/Gemfile +13 -3
- data/LICENSE +1 -0
- data/README.md +72 -72
- data/Rakefile +2 -7
- data/bin/bundle +105 -0
- data/bin/byebug +29 -0
- data/bin/coderay +29 -0
- data/bin/fuzzy_match +29 -0
- data/bin/htmldiff +29 -0
- data/bin/httpclient +29 -0
- data/bin/ldiff +29 -0
- data/bin/pod +29 -0
- data/bin/pry +29 -0
- data/bin/rake +29 -0
- data/bin/rspec +29 -0
- data/bin/rubocop +29 -0
- data/bin/ruby-parse +29 -0
- data/bin/ruby-rewrite +29 -0
- data/bin/sandbox-pod +29 -0
- data/bin/xcodeproj +29 -0
- data/lib/motion/project/appcast.rb +177 -104
- data/lib/motion/project/indent_string.rb +18 -0
- data/lib/motion/project/install.rb +22 -66
- data/lib/motion/project/package.rb +52 -36
- data/lib/motion/project/project.rb +41 -51
- data/lib/motion/project/rake_tasks.rb +28 -32
- data/lib/motion/project/setup.rb +67 -73
- data/lib/motion/project/sparkle.rb +244 -148
- data/lib/motion/project/templates.rb +24 -22
- data/lib/motion-sparkle-sandbox/version.rb +5 -0
- data/lib/motion-sparkle-sandbox.rb +20 -3
- data/motion-sparkle-sandbox.gemspec +26 -16
- data/sample-app/.gitignore +9 -0
- data/sample-app/Gemfile +8 -0
- data/sample-app/README.md +87 -0
- data/sample-app/Rakefile +44 -0
- data/sample-app/app/app_delegate.rb +15 -0
- data/sample-app/app/menu.rb +155 -0
- data/sample-app/resources/Assets.xcassets/AppIcon.appiconset/1024x1024.png +0 -0
- data/sample-app/resources/Assets.xcassets/AppIcon.appiconset/Contents.json +68 -0
- data/sample-app/resources/Assets.xcassets/AppIcon.appiconset/Icon_128x128.png +0 -0
- data/sample-app/resources/Assets.xcassets/AppIcon.appiconset/Icon_128x128@2x.png +0 -0
- data/sample-app/resources/Assets.xcassets/AppIcon.appiconset/Icon_16x16.png +0 -0
- data/sample-app/resources/Assets.xcassets/AppIcon.appiconset/Icon_16x16@2x.png +0 -0
- data/sample-app/resources/Assets.xcassets/AppIcon.appiconset/Icon_256x256.png +0 -0
- data/sample-app/resources/Assets.xcassets/AppIcon.appiconset/Icon_256x256@2x.png +0 -0
- data/sample-app/resources/Assets.xcassets/AppIcon.appiconset/Icon_32x32.png +0 -0
- data/sample-app/resources/Assets.xcassets/AppIcon.appiconset/Icon_32x32@2x.png +0 -0
- data/sample-app/resources/Assets.xcassets/AppIcon.appiconset/Icon_512x512.png +0 -0
- data/sample-app/resources/Assets.xcassets/AppIcon.appiconset/Icon_512x512@2x.png +0 -0
- data/sample-app/resources/Assets.xcassets/Contents.json +6 -0
- data/sample-app/resources/Credits.rtf +29 -0
- data/sample-app/spec/main_spec.rb +11 -0
- data/spec/setup_spec.rb +42 -0
- data/spec/sparkle_spec.rb +92 -73
- data/spec/spec_helper.rb +100 -27
- data/spec/spec_utils.rb +68 -0
- data/vendor/.git_keep +0 -0
- metadata +78 -15
- data/vendor/README.md +0 -24
- data/vendor/Sparkle.zip +0 -0
- data/vendor/codesign_xpc +0 -46
- data/vendor/generate_appcast +0 -0
data/spec/sparkle_spec.rb
CHANGED
@@ -1,90 +1,109 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
teardown_temporary_directory
|
15
|
-
setup_temporary_directory
|
16
|
-
|
17
|
-
FileUtils.mkdir_p(temporary_directory + 'resources')
|
18
|
-
FileUtils.mkdir_p(temporary_directory + 'vendor')
|
19
|
-
FileUtils.touch(temporary_directory + '.gitignore')
|
20
|
-
|
21
|
-
@config = App.config
|
22
|
-
@config.project_dir = temporary_directory.to_s
|
23
|
-
@config.instance_eval do
|
24
|
-
sparkle do
|
25
|
-
release :base_url, 'http://example.com'
|
26
|
-
release :public_key, 'public_key.pem'
|
27
|
-
release :version, '1.0'
|
28
|
-
# Optional config options
|
29
|
-
release :feed_base_url, 'http://rss.example.com'
|
30
|
-
release :feed_filename, 'example.xml'
|
31
|
-
release :notes_base_url, 'http://www.example.com'
|
32
|
-
release :notes_filename, 'example.html'
|
33
|
-
release :package_base_url, 'http://download.example.com'
|
34
|
-
release :package_filename, 'example.zip'
|
35
|
-
end
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require File.expand_path('spec_utils', __dir__)
|
4
|
+
|
5
|
+
# rubocop:disable Metrics/BlockLength
|
6
|
+
describe 'motion-sparkle-sandbox' do
|
7
|
+
before(:all) do
|
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/'
|
36
14
|
end
|
37
|
-
Rake::Task['sparkle:setup'].invoke
|
38
|
-
Rake::Task['sparkle:setup_certificates'].invoke
|
39
|
-
@completed_setup = true
|
40
15
|
end
|
41
16
|
end
|
42
17
|
|
43
|
-
|
44
|
-
|
45
|
-
|
18
|
+
context 'configuration' do
|
19
|
+
describe 'base url' do
|
20
|
+
it 'base url should be set correctly' do
|
21
|
+
expect(@config.sparkle.appcast.base_url).to eq 'http://example.com/'
|
22
|
+
end
|
23
|
+
end
|
46
24
|
|
47
|
-
|
48
|
-
|
49
|
-
|
25
|
+
describe 'feed url' do
|
26
|
+
it 'uses default value' do
|
27
|
+
expect(@config.info_plist['SUFeedURL']).to eq 'http://example.com/releases.xml'
|
28
|
+
end
|
50
29
|
|
51
|
-
|
52
|
-
|
53
|
-
end
|
30
|
+
it 'uses feed_base_url' do
|
31
|
+
@config.sparkle.publish(:feed_base_url, 'http://rss.example.com/')
|
54
32
|
|
55
|
-
|
56
|
-
|
57
|
-
end
|
33
|
+
expect(@config.info_plist['SUFeedURL']).to eq 'http://rss.example.com/releases.xml'
|
34
|
+
end
|
58
35
|
|
59
|
-
|
60
|
-
|
61
|
-
|
36
|
+
it 'uses feed_filename' do
|
37
|
+
@config.sparkle.publish(:feed_base_url, 'http://rss.example.com/')
|
38
|
+
@config.sparkle.publish(:feed_filename, 'example.xml')
|
62
39
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
end
|
40
|
+
expect(@config.info_plist['SUFeedURL']).to eq 'http://rss.example.com/example.xml'
|
41
|
+
end
|
42
|
+
end
|
67
43
|
|
68
|
-
|
69
|
-
|
70
|
-
|
44
|
+
describe 'appcast package base url' do
|
45
|
+
it 'uses default value' do
|
46
|
+
expect(@config.sparkle.appcast.package_base_url).to eq 'http://example.com/'
|
47
|
+
end
|
71
48
|
|
72
|
-
|
73
|
-
|
74
|
-
@config.embedded_frameworks.include?(sparkle_framework_path).should.equal true
|
75
|
-
end
|
49
|
+
it 'uses package_base_url' do
|
50
|
+
@config.sparkle.publish(:package_base_url, 'http://download.example.com/')
|
76
51
|
|
77
|
-
|
78
|
-
|
79
|
-
|
52
|
+
expect(@config.sparkle.appcast.package_base_url).to eq 'http://download.example.com/'
|
53
|
+
end
|
54
|
+
end
|
80
55
|
|
81
|
-
|
82
|
-
|
83
|
-
|
56
|
+
describe 'appcast package filename' do
|
57
|
+
it 'has no default value' do
|
58
|
+
expect(@config.sparkle.appcast.package_filename).to be_nil
|
59
|
+
end
|
84
60
|
|
85
|
-
|
86
|
-
|
87
|
-
|
61
|
+
it 'uses package_filename' do
|
62
|
+
@config.sparkle.publish(:package_filename, 'example.zip')
|
63
|
+
|
64
|
+
expect(@config.sparkle.appcast.package_filename).to eq 'example.zip'
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
describe 'appcast releases notes base url' do
|
69
|
+
it 'uses default value' do
|
70
|
+
expect(@config.sparkle.appcast.notes_base_url).to eq 'http://example.com/'
|
71
|
+
end
|
72
|
+
|
73
|
+
it 'uses notes_base_url' do
|
74
|
+
@config.sparkle.publish(:notes_base_url, 'http://download.example.com/')
|
75
|
+
|
76
|
+
expect(@config.sparkle.appcast.notes_base_url).to eq 'http://download.example.com/'
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
describe 'appcast release notes filename' do
|
81
|
+
it 'has no default value' do
|
82
|
+
expect(@config.sparkle.appcast.notes_filename).to be_nil
|
83
|
+
end
|
84
|
+
|
85
|
+
it 'uses package_filename' do
|
86
|
+
@config.sparkle.publish(:notes_filename, 'release_notes.html')
|
87
|
+
|
88
|
+
expect(@config.sparkle.appcast.notes_filename).to eq 'release_notes.html'
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
it 'version and short version should be set correctly' do
|
93
|
+
@config.sparkle.publish(:version, '1.0')
|
94
|
+
|
95
|
+
expect(@config.version).to eq '1.0'
|
96
|
+
expect(@config.short_version).to eq '1.0'
|
97
|
+
end
|
88
98
|
end
|
89
99
|
|
100
|
+
context 'cocoapod' do
|
101
|
+
it 'Sparkle framework pod should be embedded' do
|
102
|
+
sparkle_framework_path = 'vendor/Pods/Sparkle/Sparkle.framework'
|
103
|
+
|
104
|
+
@config.pods.pods_libraries
|
105
|
+
expect(@config.embedded_frameworks.first.end_with?(sparkle_framework_path)).to be_truthy
|
106
|
+
end
|
107
|
+
end
|
90
108
|
end
|
109
|
+
# rubocop:enable Metrics/BlockLength
|
data/spec/spec_helper.rb
CHANGED
@@ -1,35 +1,108 @@
|
|
1
|
-
|
2
|
-
require 'fileutils'
|
3
|
-
require 'rake'
|
4
|
-
require 'rubygems'
|
5
|
-
require 'bundler/setup'
|
6
|
-
require 'bacon'
|
1
|
+
# frozen_string_literal: true
|
7
2
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
require
|
12
|
-
|
13
|
-
|
14
|
-
|
3
|
+
# This file was generated by the `rspec --init` command. Conventionally, all
|
4
|
+
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
5
|
+
# The generated `.rspec` file contains `--require spec_helper` which will cause
|
6
|
+
# this file to always be loaded, without a need to explicitly require it in any
|
7
|
+
# files.
|
8
|
+
#
|
9
|
+
# Given that it is always loaded, you are encouraged to keep this file as
|
10
|
+
# light-weight as possible. Requiring heavyweight dependencies from this file
|
11
|
+
# will add to the boot time of your test suite on EVERY test run, even for an
|
12
|
+
# individual file that may not need all of that loaded. Instead, consider making
|
13
|
+
# a separate helper file that requires the additional dependencies and performs
|
14
|
+
# the additional setup, and require it from the spec files that actually need
|
15
|
+
# it.
|
16
|
+
#
|
17
|
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
18
|
+
RSpec.configure do |config|
|
19
|
+
# rspec-expectations config goes here. You can use an alternate
|
20
|
+
# assertion/expectation library such as wrong or the stdlib/minitest
|
21
|
+
# assertions if you prefer.
|
22
|
+
config.expect_with :rspec do |expectations|
|
23
|
+
# This option will default to `true` in RSpec 4. It makes the `description`
|
24
|
+
# and `failure_message` of custom matchers include text for helper methods
|
25
|
+
# defined using `chain`, e.g.:
|
26
|
+
# be_bigger_than(2).and_smaller_than(4).description
|
27
|
+
# # => "be bigger than 2 and smaller than 4"
|
28
|
+
# ...rather than:
|
29
|
+
# # => "be bigger than 2"
|
30
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
31
|
+
end
|
15
32
|
|
16
|
-
|
17
|
-
|
18
|
-
|
33
|
+
# rspec-mocks config goes here. You can use an alternate test double
|
34
|
+
# library (such as bogus or mocha) by changing the `mock_with` option here.
|
35
|
+
config.mock_with :rspec do |mocks|
|
36
|
+
# Prevents you from mocking or stubbing a method that does not exist on
|
37
|
+
# a real object. This is generally recommended, and will default to
|
38
|
+
# `true` in RSpec 4.
|
39
|
+
mocks.verify_partial_doubles = true
|
19
40
|
end
|
20
41
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
42
|
+
# This option will default to `:apply_to_host_groups` in RSpec 4 (and will
|
43
|
+
# have no way to turn it off -- the option exists only for backwards
|
44
|
+
# compatibility in RSpec 3). It causes shared context metadata to be
|
45
|
+
# inherited by the metadata hash of host groups and examples, rather than
|
46
|
+
# triggering implicit auto-inclusion in groups with matching metadata.
|
47
|
+
config.shared_context_metadata_behavior = :apply_to_host_groups
|
26
48
|
|
27
|
-
|
28
|
-
|
29
|
-
|
49
|
+
# The settings below are suggested to provide a good initial experience
|
50
|
+
# with RSpec, but feel free to customize to your heart's content.
|
51
|
+
# # This allows you to limit a spec run to individual examples or groups
|
52
|
+
# # you care about by tagging them with `:focus` metadata. When nothing
|
53
|
+
# # is tagged with `:focus`, all examples get run. RSpec also provides
|
54
|
+
# # aliases for `it`, `describe`, and `context` that include `:focus`
|
55
|
+
# # metadata: `fit`, `fdescribe` and `fcontext`, respectively.
|
56
|
+
# config.filter_run_when_matching :focus
|
57
|
+
#
|
58
|
+
# # Allows RSpec to persist some state between runs in order to support
|
59
|
+
# # the `--only-failures` and `--next-failure` CLI options. We recommend
|
60
|
+
# # you configure your source control system to ignore this file.
|
61
|
+
# config.example_status_persistence_file_path = "spec/examples.txt"
|
62
|
+
#
|
63
|
+
# # Limits the available syntax to the non-monkey patched syntax that is
|
64
|
+
# # recommended. For more details, see:
|
65
|
+
# # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
|
66
|
+
# # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
67
|
+
# # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
|
68
|
+
# config.disable_monkey_patching!
|
69
|
+
#
|
70
|
+
# # This setting enables warnings. It's recommended, but in some cases may
|
71
|
+
# # be too noisy due to issues in dependencies.
|
72
|
+
# config.warnings = true
|
73
|
+
#
|
74
|
+
# # Many RSpec users commonly either run the entire suite or an individual
|
75
|
+
# # file, and it's useful to allow more verbose output when running an
|
76
|
+
# # individual spec file.
|
77
|
+
# if config.files_to_run.one?
|
78
|
+
# # Use the documentation formatter for detailed output,
|
79
|
+
# # unless a formatter has already been configured
|
80
|
+
# # (e.g. via a command-line flag).
|
81
|
+
# config.default_formatter = "doc"
|
82
|
+
# end
|
83
|
+
#
|
84
|
+
# # Print the 10 slowest examples and example groups at the
|
85
|
+
# # end of the spec run, to help surface which specs are running
|
86
|
+
# # particularly slow.
|
87
|
+
# config.profile_examples = 10
|
88
|
+
#
|
89
|
+
# # Run specs in random order to surface order dependencies. If you find an
|
90
|
+
# # order dependency and want to debug it, you can fix the order by providing
|
91
|
+
# # the seed, which is printed after each run.
|
92
|
+
# # --seed 1234
|
93
|
+
# config.order = :random
|
94
|
+
#
|
95
|
+
# # Seed global randomization in this process using the `--seed` CLI option.
|
96
|
+
# # Setting this allows you to use `--seed` to deterministically reproduce
|
97
|
+
# # test failures related to randomization by passing the same `--seed` value
|
98
|
+
# # as the one that triggered the failure.
|
99
|
+
# Kernel.srand config.seed
|
100
|
+
|
101
|
+
config.before(:suite) do
|
102
|
+
SpecUtils::SparkleSetup.initial_install
|
103
|
+
end
|
30
104
|
|
31
|
-
|
32
|
-
|
33
|
-
end
|
105
|
+
config.after(:suite) do
|
106
|
+
SpecUtils::SparkleSetup.final_deinstall
|
34
107
|
end
|
35
108
|
end
|
data/spec/spec_utils.rb
ADDED
@@ -0,0 +1,68 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'rake'
|
4
|
+
require 'pry'
|
5
|
+
|
6
|
+
ROOT = Pathname.new(File.expand_path('..', __dir__))
|
7
|
+
$:.unshift(ENV['RUBYMOTION_CHECKOUT'] || '/Library/RubyMotion/lib')
|
8
|
+
$:.unshift("#{ROOT}lib".to_s)
|
9
|
+
|
10
|
+
# need to ensure that we bypass the `app.pods` in `lib/motion-sparkle-sandbox.rb`
|
11
|
+
@running_specs = 1
|
12
|
+
|
13
|
+
require 'motion/project/template/osx'
|
14
|
+
require 'motion-sparkle-sandbox'
|
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
|
+
|
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
|
+
|
53
|
+
module TemporaryDirectory
|
54
|
+
TEMPORARY_DIRECTORY = ROOT + 'tmp' # rubocop:disable Style/StringConcatenation
|
55
|
+
|
56
|
+
def self.directory
|
57
|
+
TEMPORARY_DIRECTORY
|
58
|
+
end
|
59
|
+
|
60
|
+
def self.setup
|
61
|
+
directory.mkpath
|
62
|
+
end
|
63
|
+
|
64
|
+
def self.teardown
|
65
|
+
directory.rmtree if directory.exist?
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
data/vendor/.git_keep
ADDED
File without changes
|
metadata
CHANGED
@@ -1,31 +1,71 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: motion-sparkle-sandbox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brett Walker
|
8
|
-
|
8
|
+
- Alexandre L. Solleiro
|
9
|
+
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date:
|
12
|
-
dependencies:
|
12
|
+
date: 2022-05-28 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: motion-cocoapods
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - ">="
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '0'
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '0'
|
13
28
|
description: motion-sparkle-sandbox makes it easy to use the sandboxed version of
|
14
|
-
Sparkle in your RubyMotion
|
15
|
-
email:
|
29
|
+
Sparkle in your RubyMotion macOS apps
|
30
|
+
email:
|
31
|
+
- github@digitalmoksha.com
|
32
|
+
- alex@webcracy.org
|
16
33
|
executables: []
|
17
34
|
extensions: []
|
18
35
|
extra_rdoc_files: []
|
19
36
|
files:
|
20
37
|
- ".gitignore"
|
38
|
+
- ".rspec"
|
39
|
+
- ".rubocop.yml"
|
40
|
+
- ".rubocop_todo.yml"
|
41
|
+
- ".ruby-version"
|
42
|
+
- ".travis.yml"
|
21
43
|
- Gemfile
|
22
44
|
- LICENSE
|
23
45
|
- README.md
|
24
46
|
- Rakefile
|
47
|
+
- bin/bundle
|
48
|
+
- bin/byebug
|
49
|
+
- bin/coderay
|
50
|
+
- bin/fuzzy_match
|
51
|
+
- bin/htmldiff
|
52
|
+
- bin/httpclient
|
53
|
+
- bin/ldiff
|
54
|
+
- bin/pod
|
55
|
+
- bin/pry
|
56
|
+
- bin/rake
|
57
|
+
- bin/rspec
|
58
|
+
- bin/rubocop
|
59
|
+
- bin/ruby-parse
|
60
|
+
- bin/ruby-rewrite
|
61
|
+
- bin/sandbox-pod
|
62
|
+
- bin/xcodeproj
|
25
63
|
- lib/motion-sparkle-sandbox.rb
|
64
|
+
- lib/motion-sparkle-sandbox/version.rb
|
26
65
|
- lib/motion/project/appcast.rb
|
27
66
|
- lib/motion/project/appcast/release_notes.content.html
|
28
67
|
- lib/motion/project/appcast/release_notes.template.erb
|
68
|
+
- lib/motion/project/indent_string.rb
|
29
69
|
- lib/motion/project/install.rb
|
30
70
|
- lib/motion/project/package.rb
|
31
71
|
- lib/motion/project/project.rb
|
@@ -34,17 +74,37 @@ files:
|
|
34
74
|
- lib/motion/project/sparkle.rb
|
35
75
|
- lib/motion/project/templates.rb
|
36
76
|
- motion-sparkle-sandbox.gemspec
|
77
|
+
- sample-app/.gitignore
|
78
|
+
- sample-app/Gemfile
|
79
|
+
- sample-app/README.md
|
80
|
+
- sample-app/Rakefile
|
81
|
+
- sample-app/app/app_delegate.rb
|
82
|
+
- sample-app/app/menu.rb
|
83
|
+
- sample-app/resources/Assets.xcassets/AppIcon.appiconset/1024x1024.png
|
84
|
+
- sample-app/resources/Assets.xcassets/AppIcon.appiconset/Contents.json
|
85
|
+
- sample-app/resources/Assets.xcassets/AppIcon.appiconset/Icon_128x128.png
|
86
|
+
- sample-app/resources/Assets.xcassets/AppIcon.appiconset/Icon_128x128@2x.png
|
87
|
+
- sample-app/resources/Assets.xcassets/AppIcon.appiconset/Icon_16x16.png
|
88
|
+
- sample-app/resources/Assets.xcassets/AppIcon.appiconset/Icon_16x16@2x.png
|
89
|
+
- sample-app/resources/Assets.xcassets/AppIcon.appiconset/Icon_256x256.png
|
90
|
+
- sample-app/resources/Assets.xcassets/AppIcon.appiconset/Icon_256x256@2x.png
|
91
|
+
- sample-app/resources/Assets.xcassets/AppIcon.appiconset/Icon_32x32.png
|
92
|
+
- sample-app/resources/Assets.xcassets/AppIcon.appiconset/Icon_32x32@2x.png
|
93
|
+
- sample-app/resources/Assets.xcassets/AppIcon.appiconset/Icon_512x512.png
|
94
|
+
- sample-app/resources/Assets.xcassets/AppIcon.appiconset/Icon_512x512@2x.png
|
95
|
+
- sample-app/resources/Assets.xcassets/Contents.json
|
96
|
+
- sample-app/resources/Credits.rtf
|
97
|
+
- sample-app/spec/main_spec.rb
|
98
|
+
- spec/setup_spec.rb
|
37
99
|
- spec/sparkle_spec.rb
|
38
100
|
- spec/spec_helper.rb
|
39
|
-
-
|
40
|
-
- vendor
|
41
|
-
- vendor/codesign_xpc
|
42
|
-
- vendor/generate_appcast
|
101
|
+
- spec/spec_utils.rb
|
102
|
+
- vendor/.git_keep
|
43
103
|
homepage: https://github.com/digitalmoksha/motion-sparkle-sandbox
|
44
104
|
licenses:
|
45
105
|
- MIT
|
46
106
|
metadata: {}
|
47
|
-
post_install_message:
|
107
|
+
post_install_message:
|
48
108
|
rdoc_options: []
|
49
109
|
require_paths:
|
50
110
|
- lib
|
@@ -59,9 +119,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
59
119
|
- !ruby/object:Gem::Version
|
60
120
|
version: '0'
|
61
121
|
requirements: []
|
62
|
-
|
63
|
-
|
64
|
-
signing_key:
|
122
|
+
rubygems_version: 3.1.4
|
123
|
+
signing_key:
|
65
124
|
specification_version: 4
|
66
125
|
summary: Sparkle (sandboxed) integration for Rubymotion projects
|
67
|
-
test_files:
|
126
|
+
test_files:
|
127
|
+
- spec/spec_helper.rb
|
128
|
+
- spec/sparkle_spec.rb
|
129
|
+
- spec/setup_spec.rb
|
130
|
+
- spec/spec_utils.rb
|
data/vendor/README.md
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
## Building the Sparkle.zip
|
2
|
-
|
3
|
-
The structure of `Sparkle.zip` is:
|
4
|
-
|
5
|
-
```
|
6
|
-
Sparkle
|
7
|
-
codesign_xpc
|
8
|
-
Sparkle.framework
|
9
|
-
XPCServices
|
10
|
-
org.sparkle-project.InstallerConnection.xpc
|
11
|
-
org.sparkle-project.InstallerLauncher.xpc
|
12
|
-
org.sparkle-project.InstallerStatus.xpc
|
13
|
-
```
|
14
|
-
|
15
|
-
In order to get xpc services to be signed and work properly, they need to be copied into an `XPCServices` folder in `MyApp.app/Contents`
|
16
|
-
|
17
|
-
The `codesign_xpc` can properly sign these files once they have been copied into place.
|
18
|
-
|
19
|
-
1. Fetch the `ui-separation-and-xpc` branch
|
20
|
-
2. Copy the `bin/codesign_xpc` into the `Sparkle` folder
|
21
|
-
3. Run `make release` and change to the output folder
|
22
|
-
4. Copy the `Sparkle.framework` into the `Sparkle` folder
|
23
|
-
5. Copy each of the above xpc files into the `XPCServices` folder
|
24
|
-
6. compress the `Sparkle` folder
|
data/vendor/Sparkle.zip
DELETED
Binary file
|
data/vendor/codesign_xpc
DELETED
@@ -1,46 +0,0 @@
|
|
1
|
-
#!/usr/bin/env python
|
2
|
-
|
3
|
-
import os, sys, subprocess
|
4
|
-
|
5
|
-
def log_message(message):
|
6
|
-
sys.stderr.write(message + "\n")
|
7
|
-
|
8
|
-
#Surround a token with double quotes if it has a space in it
|
9
|
-
def sanitize(argument):
|
10
|
-
return ('"' + argument + '"' if ' ' in argument else argument)
|
11
|
-
|
12
|
-
def _codesign_service(identity, path, entitlements_path=None):
|
13
|
-
command = ["codesign", "-fs", identity, path] + ([] if entitlements_path is None else ["--entitlements", entitlements_path])
|
14
|
-
log_message(" ".join(map(sanitize, command)))
|
15
|
-
|
16
|
-
process = subprocess.Popen(command, stdout=subprocess.PIPE)
|
17
|
-
process.communicate()
|
18
|
-
if process.returncode != 0:
|
19
|
-
log_message("Error: Failed to codesign %s" % (path))
|
20
|
-
sys.exit(1)
|
21
|
-
|
22
|
-
def codesign_service(service_name, identity, path, entitlements_path=None):
|
23
|
-
#Sign the auxiliary executables (if any)
|
24
|
-
executables_path = os.path.join(path, "Contents/MacOS/")
|
25
|
-
if os.path.exists(executables_path):
|
26
|
-
for executable in os.listdir(executables_path):
|
27
|
-
if executable != service_name:
|
28
|
-
_codesign_service(identity, os.path.join(executables_path, executable), entitlements_path)
|
29
|
-
|
30
|
-
#Sign the service bundle
|
31
|
-
_codesign_service(identity, path, entitlements_path)
|
32
|
-
|
33
|
-
if __name__ == "__main__":
|
34
|
-
if len(sys.argv) < 3:
|
35
|
-
log_message("Usage:\n\t%s code-signing-identity xpc-service xpc-service2 ..." % (sys.argv[0]))
|
36
|
-
log_message("Example:\n\t%s \"Developer ID Application\" ./XPCServices/*.xpc" % (sys.argv[0]))
|
37
|
-
sys.exit(1)
|
38
|
-
|
39
|
-
signing_identity = sys.argv[1]
|
40
|
-
xpc_services = sys.argv[2:]
|
41
|
-
|
42
|
-
for xpc_service in xpc_services:
|
43
|
-
parent, child = os.path.split(xpc_service)
|
44
|
-
service_name = os.path.splitext(child)[0]
|
45
|
-
entitlements_path = os.path.join(parent, service_name + ".entitlements")
|
46
|
-
codesign_service(service_name, signing_identity, xpc_service, None if not os.path.exists(entitlements_path) else entitlements_path)
|
data/vendor/generate_appcast
DELETED
Binary file
|