motion-sparkle-sandbox 0.7.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
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/LICENSE +1 -0
  10. data/README.md +73 -71
  11. data/Rakefile +2 -7
  12. data/bin/bundle +103 -0
  13. data/bin/byebug +29 -0
  14. data/bin/coderay +29 -0
  15. data/bin/fuzzy_match +29 -0
  16. data/bin/htmldiff +29 -0
  17. data/bin/httpclient +29 -0
  18. data/bin/ldiff +29 -0
  19. data/bin/pod +29 -0
  20. data/bin/pry +29 -0
  21. data/bin/rake +29 -0
  22. data/bin/rspec +29 -0
  23. data/bin/rubocop +29 -0
  24. data/bin/ruby-parse +29 -0
  25. data/bin/ruby-rewrite +29 -0
  26. data/bin/sandbox-pod +29 -0
  27. data/bin/xcodeproj +29 -0
  28. data/lib/motion/project/appcast.rb +177 -104
  29. data/lib/motion/project/indent_string.rb +18 -0
  30. data/lib/motion/project/install.rb +22 -66
  31. data/lib/motion/project/package.rb +52 -36
  32. data/lib/motion/project/project.rb +44 -46
  33. data/lib/motion/project/rake_tasks.rb +28 -32
  34. data/lib/motion/project/setup.rb +67 -73
  35. data/lib/motion/project/sparkle.rb +244 -148
  36. data/lib/motion/project/templates.rb +24 -22
  37. data/lib/motion-sparkle-sandbox/version.rb +5 -0
  38. data/lib/motion-sparkle-sandbox.rb +20 -3
  39. data/motion-sparkle-sandbox.gemspec +26 -16
  40. data/sample-app/.gitignore +9 -0
  41. data/sample-app/Gemfile +8 -0
  42. data/sample-app/README.md +87 -0
  43. data/sample-app/Rakefile +44 -0
  44. data/sample-app/app/app_delegate.rb +15 -0
  45. data/sample-app/app/menu.rb +155 -0
  46. data/sample-app/resources/Assets.xcassets/AppIcon.appiconset/1024x1024.png +0 -0
  47. data/sample-app/resources/Assets.xcassets/AppIcon.appiconset/Contents.json +68 -0
  48. data/sample-app/resources/Assets.xcassets/AppIcon.appiconset/Icon_128x128.png +0 -0
  49. data/sample-app/resources/Assets.xcassets/AppIcon.appiconset/Icon_128x128@2x.png +0 -0
  50. data/sample-app/resources/Assets.xcassets/AppIcon.appiconset/Icon_16x16.png +0 -0
  51. data/sample-app/resources/Assets.xcassets/AppIcon.appiconset/Icon_16x16@2x.png +0 -0
  52. data/sample-app/resources/Assets.xcassets/AppIcon.appiconset/Icon_256x256.png +0 -0
  53. data/sample-app/resources/Assets.xcassets/AppIcon.appiconset/Icon_256x256@2x.png +0 -0
  54. data/sample-app/resources/Assets.xcassets/AppIcon.appiconset/Icon_32x32.png +0 -0
  55. data/sample-app/resources/Assets.xcassets/AppIcon.appiconset/Icon_32x32@2x.png +0 -0
  56. data/sample-app/resources/Assets.xcassets/AppIcon.appiconset/Icon_512x512.png +0 -0
  57. data/sample-app/resources/Assets.xcassets/AppIcon.appiconset/Icon_512x512@2x.png +0 -0
  58. data/sample-app/resources/Assets.xcassets/Contents.json +6 -0
  59. data/sample-app/resources/Credits.rtf +29 -0
  60. data/sample-app/spec/main_spec.rb +11 -0
  61. data/spec/setup_spec.rb +67 -0
  62. data/spec/sparkle_spec.rb +113 -65
  63. data/spec/spec_helper.rb +94 -29
  64. data/spec/spec_utils.rb +32 -0
  65. data/vendor/.git_keep +0 -0
  66. metadata +78 -15
  67. data/vendor/README.md +0 -24
  68. data/vendor/Sparkle.zip +0 -0
  69. data/vendor/codesign_xpc +0 -46
  70. data/vendor/generate_appcast +0 -0
data/spec/sparkle_spec.rb CHANGED
@@ -1,90 +1,138 @@
1
- require File.expand_path('../spec_helper', __FILE__)
1
+ # frozen_string_literal: true
2
2
 
3
- module Motion; module Project;
4
- class Config
5
- attr_writer :project_dir
6
- end
7
- end; end
3
+ require File.expand_path('spec_utils', __dir__)
8
4
 
9
- describe "motion-sparkle-sandbox" do
10
- extend SpecHelper::TemporaryDirectory
5
+ module Motion
6
+ module Project
7
+ class Config
8
+ attr_writer :project_dir
9
+ end
10
+ end
11
+ end
11
12
 
12
- before do
13
- unless @completed_setup
14
- teardown_temporary_directory
15
- setup_temporary_directory
13
+ # rubocop:disable Metrics/BlockLength
14
+ describe 'motion-sparkle-sandbox' do
15
+ before(:all) do
16
+ SpecUtils::TemporaryDirectory.teardown
17
+ SpecUtils::TemporaryDirectory.setup
16
18
 
17
- FileUtils.mkdir_p(temporary_directory + 'resources')
18
- FileUtils.mkdir_p(temporary_directory + 'vendor')
19
- FileUtils.touch(temporary_directory + '.gitignore')
19
+ FileUtils.mkdir_p("#{SpecUtils::TemporaryDirectory.directory}resources")
20
+ FileUtils.mkdir_p("#{SpecUtils::TemporaryDirectory.directory}vendor")
21
+ FileUtils.touch("#{SpecUtils::TemporaryDirectory.directory}.gitignore")
22
+ end
20
23
 
24
+ context 'configuration' do
25
+ before do
21
26
  @config = App.config
22
- @config.project_dir = temporary_directory.to_s
27
+ @config.sparkle = nil
28
+ @config.project_dir = SpecUtils::TemporaryDirectory.directory.to_s
23
29
  @config.instance_eval do
24
30
  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'
31
+ release :base_url, 'http://example.com/'
35
32
  end
36
33
  end
37
- Rake::Task['sparkle:setup'].invoke
38
- Rake::Task['sparkle:setup_certificates'].invoke
39
- @completed_setup = true
40
34
  end
41
- end
42
35
 
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
36
+ describe 'base url' do
37
+ it 'base url should be set correctly' do
38
+ expect(@config.sparkle.appcast.base_url).to eq 'http://example.com/'
39
+ end
40
+ end
46
41
 
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
42
+ describe 'feed url' do
43
+ it 'uses default value' do
44
+ expect(@config.info_plist['SUFeedURL']).to eq 'http://example.com/releases.xml'
45
+ end
50
46
 
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
47
+ it 'uses feed_base_url' do
48
+ @config.sparkle.publish(:feed_base_url, 'http://rss.example.com/')
54
49
 
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
50
+ expect(@config.info_plist['SUFeedURL']).to eq 'http://rss.example.com/releases.xml'
51
+ end
58
52
 
59
- it "Sparkle's public key should have custom name" do
60
- @config.info_plist['SUPublicDSAKeyFile'].should.equal 'public_key.pem'
61
- end
53
+ it 'uses feed_filename' do
54
+ @config.sparkle.publish(:feed_base_url, 'http://rss.example.com/')
55
+ @config.sparkle.publish(:feed_filename, 'example.xml')
62
56
 
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
57
+ expect(@config.info_plist['SUFeedURL']).to eq 'http://rss.example.com/example.xml'
58
+ end
59
+ end
67
60
 
68
- it "Version should be same for short_version and version" do
69
- @config.version.should.equal @config.short_version
70
- end
61
+ describe 'appcast package base url' do
62
+ it 'uses default value' do
63
+ expect(@config.sparkle.appcast.package_base_url).to eq 'http://example.com/'
64
+ end
71
65
 
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
66
+ it 'uses package_base_url' do
67
+ @config.sparkle.publish(:package_base_url, 'http://download.example.com/')
76
68
 
77
- it "should create private certificate" do
78
- File.exist?(@config.sparkle.private_key_path.to_s).should.equal true
79
- end
69
+ expect(@config.sparkle.appcast.package_base_url).to eq 'http://download.example.com/'
70
+ end
71
+ end
80
72
 
81
- it "should create public certificate" do
82
- File.exist?(@config.sparkle.public_key_path.to_s).should.equal true
83
- end
73
+ describe 'appcast package filename' do
74
+ it 'has no default value' do
75
+ expect(@config.sparkle.appcast.package_filename).to be_nil
76
+ end
77
+
78
+ it 'uses package_filename' do
79
+ @config.sparkle.publish(:package_filename, 'example.zip')
84
80
 
85
- it "should add files to gitignore" do
86
- a = `cat .gitignore`
87
- a.strip.should.not.equal ''
81
+ expect(@config.sparkle.appcast.package_filename).to eq 'example.zip'
82
+ end
83
+ end
84
+
85
+ describe 'appcast releases notes base url' do
86
+ it 'uses default value' do
87
+ expect(@config.sparkle.appcast.notes_base_url).to eq 'http://example.com/'
88
+ end
89
+
90
+ it 'uses notes_base_url' do
91
+ @config.sparkle.publish(:notes_base_url, 'http://download.example.com/')
92
+
93
+ expect(@config.sparkle.appcast.notes_base_url).to eq 'http://download.example.com/'
94
+ end
95
+ end
96
+
97
+ describe 'appcast release notes filename' do
98
+ it 'has no default value' do
99
+ expect(@config.sparkle.appcast.notes_filename).to be_nil
100
+ end
101
+
102
+ it 'uses package_filename' do
103
+ @config.sparkle.publish(:notes_filename, 'release_notes.html')
104
+
105
+ expect(@config.sparkle.appcast.notes_filename).to eq 'release_notes.html'
106
+ end
107
+ end
108
+
109
+ it 'version and short version should be set correctly' do
110
+ @config.sparkle.publish(:version, '1.0')
111
+
112
+ expect(@config.version).to eq '1.0'
113
+ expect(@config.short_version).to eq '1.0'
114
+ end
88
115
  end
89
116
 
117
+ context 'cocoapod' do
118
+ before do
119
+ @config = App.config
120
+ @config.project_dir = SpecUtils::TemporaryDirectory.directory.to_s
121
+ @config.instance_eval do
122
+ pods do
123
+ pod 'Sparkle', POD_VERSION
124
+ end
125
+ end
126
+
127
+ Rake::Task['pod:install'].invoke
128
+ end
129
+
130
+ it 'Sparkle framework pod should be embedded' do
131
+ sparkle_framework_path = 'vendor/Pods/Sparkle/Sparkle.framework'
132
+ @config.pods.pods_libraries
133
+
134
+ expect(@config.embedded_frameworks.first.end_with?(sparkle_framework_path)).to be_truthy
135
+ end
136
+ end
90
137
  end
138
+ # rubocop:enable Metrics/BlockLength
data/spec/spec_helper.rb CHANGED
@@ -1,35 +1,100 @@
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
15
-
16
- module SpecHelper
17
- def self.temporary_directory
18
- TemporaryDirectory.temporary_directory
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
19
31
  end
20
32
 
21
- module TemporaryDirectory
22
- def temporary_directory
23
- ROOT + 'tmp'
24
- end
25
- module_function :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
40
+ end
26
41
 
27
- def setup_temporary_directory
28
- temporary_directory.mkpath
29
- end
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
30
48
 
31
- def teardown_temporary_directory
32
- temporary_directory.rmtree if temporary_directory.exist?
33
- end
34
- 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
35
100
  end
@@ -0,0 +1,32 @@
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
+ module SpecUtils
17
+ module TemporaryDirectory
18
+ TEMPORARY_DIRECTORY = ROOT + 'tmp' # rubocop:disable Style/StringConcatenation
19
+
20
+ def self.directory
21
+ TEMPORARY_DIRECTORY
22
+ end
23
+
24
+ def self.setup
25
+ directory.mkpath
26
+ end
27
+
28
+ def self.teardown
29
+ directory.rmtree if directory.exist?
30
+ end
31
+ end
32
+ 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: 0.7.0
4
+ version: 2.0.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: 2019-03-17 00:00:00.000000000 Z
12
- dependencies: []
12
+ date: 2022-05-27 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,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
- - vendor/README.md
40
- - vendor/Sparkle.zip
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
- rubyforge_project:
63
- rubygems_version: 2.7.6
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)
Binary file