motion-sparkle-sandbox 2.0.0 → 2.1.1

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.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +4 -0
  3. data/.rspec +2 -0
  4. data/.rubocop.yml +7 -0
  5. data/.rubocop_todo.yml +183 -0
  6. data/.ruby-version +1 -0
  7. data/.travis.yml +37 -0
  8. data/Gemfile +13 -3
  9. data/README.md +72 -72
  10. data/Rakefile +2 -7
  11. data/bin/bundle +114 -0
  12. data/bin/byebug +29 -0
  13. data/bin/coderay +29 -0
  14. data/bin/fuzzy_match +29 -0
  15. data/bin/htmldiff +29 -0
  16. data/bin/httpclient +29 -0
  17. data/bin/ldiff +29 -0
  18. data/bin/pod +29 -0
  19. data/bin/pry +29 -0
  20. data/bin/rake +29 -0
  21. data/bin/rspec +29 -0
  22. data/bin/rubocop +29 -0
  23. data/bin/ruby-parse +29 -0
  24. data/bin/ruby-rewrite +29 -0
  25. data/bin/sandbox-pod +29 -0
  26. data/bin/xcodeproj +29 -0
  27. data/lib/motion/project/appcast.rb +294 -111
  28. data/lib/motion/project/indent_string.rb +18 -0
  29. data/lib/motion/project/install.rb +22 -66
  30. data/lib/motion/project/package.rb +52 -36
  31. data/lib/motion/project/project.rb +42 -51
  32. data/lib/motion/project/rake_tasks.rb +38 -28
  33. data/lib/motion/project/setup.rb +67 -73
  34. data/lib/motion/project/sparkle.rb +317 -148
  35. data/lib/motion/project/templates.rb +24 -22
  36. data/lib/motion-sparkle-sandbox/version.rb +5 -0
  37. data/lib/motion-sparkle-sandbox.rb +19 -3
  38. data/motion-sparkle-sandbox.gemspec +26 -16
  39. data/sample-app/.gitignore +10 -0
  40. data/sample-app/Gemfile +8 -0
  41. data/sample-app/README.md +87 -0
  42. data/sample-app/Rakefile +47 -0
  43. data/sample-app/app/app_delegate.rb +15 -0
  44. data/sample-app/app/menu.rb +155 -0
  45. data/sample-app/resources/Assets.xcassets/AppIcon.appiconset/1024x1024.png +0 -0
  46. data/sample-app/resources/Assets.xcassets/AppIcon.appiconset/Contents.json +68 -0
  47. data/sample-app/resources/Assets.xcassets/AppIcon.appiconset/Icon_128x128.png +0 -0
  48. data/sample-app/resources/Assets.xcassets/AppIcon.appiconset/Icon_128x128@2x.png +0 -0
  49. data/sample-app/resources/Assets.xcassets/AppIcon.appiconset/Icon_16x16.png +0 -0
  50. data/sample-app/resources/Assets.xcassets/AppIcon.appiconset/Icon_16x16@2x.png +0 -0
  51. data/sample-app/resources/Assets.xcassets/AppIcon.appiconset/Icon_256x256.png +0 -0
  52. data/sample-app/resources/Assets.xcassets/AppIcon.appiconset/Icon_256x256@2x.png +0 -0
  53. data/sample-app/resources/Assets.xcassets/AppIcon.appiconset/Icon_32x32.png +0 -0
  54. data/sample-app/resources/Assets.xcassets/AppIcon.appiconset/Icon_32x32@2x.png +0 -0
  55. data/sample-app/resources/Assets.xcassets/AppIcon.appiconset/Icon_512x512.png +0 -0
  56. data/sample-app/resources/Assets.xcassets/AppIcon.appiconset/Icon_512x512@2x.png +0 -0
  57. data/sample-app/resources/Assets.xcassets/Contents.json +6 -0
  58. data/sample-app/resources/Credits.rtf +29 -0
  59. data/sample-app/spec/main_spec.rb +11 -0
  60. data/spec/appcast_spec.rb +60 -0
  61. data/spec/setup_spec.rb +42 -0
  62. data/spec/sparkle_spec.rb +94 -73
  63. data/spec/spec_helper.rb +100 -27
  64. data/spec/spec_utils.rb +68 -0
  65. data/vendor/.git_keep +0 -0
  66. metadata +80 -14
  67. data/vendor/README.md +0 -34
  68. data/vendor/Sparkle.zip +0 -0
  69. data/vendor/codesign_embedded_executable +0 -46
  70. data/vendor/generate_appcast +0 -0
data/spec/sparkle_spec.rb CHANGED
@@ -1,90 +1,111 @@
1
- require File.expand_path('../spec_helper', __FILE__)
2
-
3
- module Motion; module Project;
4
- class Config
5
- attr_writer :project_dir
6
- end
7
- end; end
8
-
9
- describe "motion-sparkle-sandbox" do
10
- extend SpecHelper::TemporaryDirectory
11
-
12
- before do
13
- unless @completed_setup
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
- it "Sparkle's release base url should be set correctly" do
44
- @config.sparkle.appcast.base_url.should.equal 'http://example.com'
45
- end
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
- it "Sparkle's feed url should be set correctly" do
48
- @config.info_plist['SUFeedURL'].should.equal 'http://rss.example.com/example.xml'
49
- end
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
- it "Sparkle's release notes url should be set correctly" do
52
- @config.sparkle.appcast.notes_url.should.equal 'http://www.example.com/example.html'
53
- end
30
+ it 'uses feed_base_url' do
31
+ @config.sparkle.publish(:feed_base_url, 'http://rss.example.com/')
32
+ @config.sparkle.after_initialize
54
33
 
55
- it "Sparkle's appcast package url should be set correctly" do
56
- @config.sparkle.appcast.package_url.should.equal 'http://download.example.com/example.zip'
57
- end
34
+ expect(@config.info_plist['SUFeedURL']).to eq 'http://rss.example.com/releases.xml'
35
+ end
58
36
 
59
- it "Sparkle's public key should have custom name" do
60
- @config.info_plist['SUPublicDSAKeyFile'].should.equal 'public_key.pem'
61
- end
37
+ it 'uses feed_filename' do
38
+ @config.sparkle.publish(:feed_base_url, 'http://rss.example.com/')
39
+ @config.sparkle.publish(:feed_filename, 'example.xml')
40
+ @config.sparkle.after_initialize
62
41
 
63
- it "Version and short version should be set correctly" do
64
- @config.version.should.equal '1.0'
65
- @config.short_version.should.equal '1.0'
66
- end
42
+ expect(@config.info_plist['SUFeedURL']).to eq 'http://rss.example.com/example.xml'
43
+ end
44
+ end
67
45
 
68
- it "Version should be same for short_version and version" do
69
- @config.version.should.equal @config.short_version
70
- end
46
+ describe 'appcast package base url' do
47
+ it 'uses default value' do
48
+ expect(@config.sparkle.appcast.package_base_url).to eq 'http://example.com/'
49
+ end
71
50
 
72
- it "Sparkle framework should be embedded" do
73
- sparkle_framework_path = ROOT + "tmp/vendor/Sparkle/Sparkle.framework"
74
- @config.embedded_frameworks.include?(sparkle_framework_path).should.equal true
75
- end
51
+ it 'uses package_base_url' do
52
+ @config.sparkle.publish(:package_base_url, 'http://download.example.com/')
76
53
 
77
- it "should create private certificate" do
78
- File.exist?(@config.sparkle.private_key_path.to_s).should.equal true
79
- end
54
+ expect(@config.sparkle.appcast.package_base_url).to eq 'http://download.example.com/'
55
+ end
56
+ end
80
57
 
81
- it "should create public certificate" do
82
- File.exist?(@config.sparkle.public_key_path.to_s).should.equal true
83
- end
58
+ describe 'appcast package filename' do
59
+ it 'has no default value' do
60
+ expect(@config.sparkle.appcast.package_filename).to be_nil
61
+ end
84
62
 
85
- it "should add files to gitignore" do
86
- a = `cat .gitignore`
87
- a.strip.should.not.equal ''
63
+ it 'uses package_filename' do
64
+ @config.sparkle.publish(:package_filename, 'example.zip')
65
+
66
+ expect(@config.sparkle.appcast.package_filename).to eq 'example.zip'
67
+ end
68
+ end
69
+
70
+ describe 'appcast releases notes base url' do
71
+ it 'uses default value' do
72
+ expect(@config.sparkle.appcast.notes_base_url).to eq 'http://example.com/'
73
+ end
74
+
75
+ it 'uses notes_base_url' do
76
+ @config.sparkle.publish(:notes_base_url, 'http://download.example.com/')
77
+
78
+ expect(@config.sparkle.appcast.notes_base_url).to eq 'http://download.example.com/'
79
+ end
80
+ end
81
+
82
+ describe 'appcast release notes filename' do
83
+ it 'has no default value' do
84
+ expect(@config.sparkle.appcast.notes_filename).to be_nil
85
+ end
86
+
87
+ it 'uses package_filename' do
88
+ @config.sparkle.publish(:notes_filename, 'release_notes.html')
89
+
90
+ expect(@config.sparkle.appcast.notes_filename).to eq 'release_notes.html'
91
+ end
92
+ end
93
+
94
+ it 'version and short version should be set correctly' do
95
+ @config.sparkle.publish(:version, '1.0')
96
+
97
+ expect(@config.version).to eq '1.0'
98
+ expect(@config.short_version).to eq '1.0'
99
+ end
88
100
  end
89
101
 
102
+ context 'cocoapod' do
103
+ it 'Sparkle framework pod should be embedded' do
104
+ sparkle_framework_path = 'vendor/Pods/Sparkle/Sparkle.framework'
105
+
106
+ @config.pods.pods_libraries
107
+ expect(@config.embedded_frameworks.first.end_with?(sparkle_framework_path)).to be_truthy
108
+ end
109
+ end
90
110
  end
111
+ # rubocop:enable Metrics/BlockLength
data/spec/spec_helper.rb CHANGED
@@ -1,35 +1,108 @@
1
- require 'pathname'
2
- require 'fileutils'
3
- require 'rake'
4
- require 'rubygems'
5
- require 'bundler/setup'
6
- require 'bacon'
1
+ # frozen_string_literal: true
7
2
 
8
- ROOT = Pathname.new(File.expand_path('../../', __FILE__))
9
- $:.unshift(ENV['RUBYMOTION_CHECKOUT'] || "/Library/RubyMotion/lib")
10
- $:.unshift((ROOT + 'lib').to_s)
11
- require 'motion/project/template/osx'
12
- require 'motion-sparkle-sandbox'
13
-
14
- Bacon.summary_at_exit
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
- module SpecHelper
17
- def self.temporary_directory
18
- TemporaryDirectory.temporary_directory
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
- module TemporaryDirectory
22
- def temporary_directory
23
- ROOT + 'tmp'
24
- end
25
- module_function :temporary_directory
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
- def setup_temporary_directory
28
- temporary_directory.mkpath
29
- end
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
- def teardown_temporary_directory
32
- temporary_directory.rmtree if temporary_directory.exist?
33
- end
105
+ config.after(:suite) do
106
+ SpecUtils::SparkleSetup.final_deinstall
34
107
  end
35
108
  end
@@ -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: 2.0.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Walker
8
- autorequire:
8
+ - Alexandre L. Solleiro
9
+ autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2020-08-30 00:00:00.000000000 Z
12
- dependencies: []
12
+ date: 2022-06-12 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 OS X apps
15
- email: github@digitalmoksha.com
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,38 @@ 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/appcast_spec.rb
99
+ - spec/setup_spec.rb
37
100
  - spec/sparkle_spec.rb
38
101
  - spec/spec_helper.rb
39
- - vendor/README.md
40
- - vendor/Sparkle.zip
41
- - vendor/codesign_embedded_executable
42
- - vendor/generate_appcast
102
+ - spec/spec_utils.rb
103
+ - vendor/.git_keep
43
104
  homepage: https://github.com/digitalmoksha/motion-sparkle-sandbox
44
105
  licenses:
45
106
  - MIT
46
107
  metadata: {}
47
- post_install_message:
108
+ post_install_message:
48
109
  rdoc_options: []
49
110
  require_paths:
50
111
  - lib
@@ -59,8 +120,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
59
120
  - !ruby/object:Gem::Version
60
121
  version: '0'
61
122
  requirements: []
62
- rubygems_version: 3.0.6
63
- signing_key:
123
+ rubygems_version: 3.1.4
124
+ signing_key:
64
125
  specification_version: 4
65
126
  summary: Sparkle (sandboxed) integration for Rubymotion projects
66
- test_files: []
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
data/vendor/README.md DELETED
@@ -1,34 +0,0 @@
1
- ## Building the Sparkle.zip
2
-
3
- The `vendor` directory should contain
4
-
5
- ```
6
- vendor
7
- codesign_embedded_executable
8
- generate_appcast
9
- README.md
10
- Sparkle.zip
11
- ```
12
-
13
- The structure of `Sparkle.zip` is:
14
-
15
- ```
16
- Sparkle
17
- Sparkle.framework
18
- XPCServices
19
- org.sparkle-project.Downloader.xpc (not usually needed)
20
- org.sparkle-project.InstallerConnection.xpc
21
- org.sparkle-project.InstallerLauncher.xpc
22
- org.sparkle-project.InstallerStatus.xpc
23
- ```
24
-
25
- 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`
26
-
27
- The `codesign_embedded_executable` can properly sign these files once they have been copied into place.
28
-
29
- 1. Fetch the `2.x` branch
30
- 2. Copy the `bin/codesign_embedded_executable` into the `vendor` folder
31
- 3. Run `make release` and change to the output folder
32
- 4. Copy the `Sparkle.framework` into the `Sparkle` folder
33
- 5. Copy each of the above xpc files into the `XPCServices` folder
34
- 6. compress the `Sparkle` folder
data/vendor/Sparkle.zip DELETED
Binary file
@@ -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", "-o", "runtime", "-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 executable1 executable1 ..." % (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
- executables = sys.argv[2:]
41
-
42
- for executable in executables:
43
- parent, child = os.path.split(executable)
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, executable, None if not os.path.exists(entitlements_path) else entitlements_path)
Binary file