motion-sparkle-sandbox 2.0.0 → 2.0.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.
- 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/README.md +73 -71
- data/Rakefile +2 -7
- data/bin/bundle +103 -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 +19 -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 +67 -0
- data/spec/sparkle_spec.rb +113 -65
- data/spec/spec_helper.rb +94 -29
- data/spec/spec_utils.rb +32 -0
- data/vendor/.git_keep +0 -0
- metadata +78 -14
- data/vendor/README.md +0 -34
- data/vendor/Sparkle.zip +0 -0
- data/vendor/codesign_embedded_executable +0 -46
- data/vendor/generate_appcast +0 -0
@@ -0,0 +1,87 @@
|
|
1
|
+
# sample-app #
|
2
|
+
|
3
|
+
## Build and Run ###
|
4
|
+
|
5
|
+
- `rake build`
|
6
|
+
- `rake run`
|
7
|
+
|
8
|
+
Run `rake -T` to display a list of supported tasks.
|
9
|
+
|
10
|
+
## Deploying to the App Store ##
|
11
|
+
|
12
|
+
To deploy to the App Store, you'll want to use `rake clean
|
13
|
+
archive:distribution`. With a valid distribution certificate.
|
14
|
+
|
15
|
+
In your `Rakefile`, set the following values:
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
#This is only an example, your certificate name may be different.
|
19
|
+
app.development do
|
20
|
+
app.codesign_certificate = "Mac Developer: xxxxx"
|
21
|
+
end
|
22
|
+
|
23
|
+
app.release do
|
24
|
+
app.codesign_certificate = "3rd Party Mac Developer Application: xxxxx"
|
25
|
+
end
|
26
|
+
|
27
|
+
app.codesign_for_development = true
|
28
|
+
app.codesign_for_release = true
|
29
|
+
```
|
30
|
+
|
31
|
+
It's also recommand to use [motion-provisoning](https://github.com/HipByte/motion-provisioning)
|
32
|
+
|
33
|
+
## Icons ##
|
34
|
+
|
35
|
+
Apple supports both the use of `.icns` and Asset Catalogs for defining icons.
|
36
|
+
|
37
|
+
### ICNS ###
|
38
|
+
|
39
|
+
Place your icon under `./resources/`, add the following line to `Rakefile`:
|
40
|
+
|
41
|
+
```
|
42
|
+
app.icon = "Icon.icns"
|
43
|
+
```
|
44
|
+
|
45
|
+
### Asset Catalogs ###
|
46
|
+
|
47
|
+
You'll find icon under `./resources/Assets.xcassets`. You can run the following
|
48
|
+
script to generate all the icon sizes (once you've specified `1024x1024.png`).
|
49
|
+
Keep in mind that your `.png` files _cannot_ contain alpha channels.
|
50
|
+
|
51
|
+
Save this following script to `./gen-icons.sh` and run it:
|
52
|
+
|
53
|
+
```sh
|
54
|
+
set -x
|
55
|
+
|
56
|
+
brew install imagemagick
|
57
|
+
|
58
|
+
pushd resources/Assets.xcassets/AppIcon.appiconset/
|
59
|
+
|
60
|
+
for size in 512 256 128 32 16
|
61
|
+
do
|
62
|
+
cp "1024x1024.png" "Icon_${size}x${size}.png"
|
63
|
+
mogrify -resize "$((size))x$((size))" "Icon_${size}x${size}.png"
|
64
|
+
|
65
|
+
cp "1024x1024.png" "Icon_${size}x${size}@2x.png"
|
66
|
+
mogrify -resize "$((size*2))x$((size*2))" "Icon_${size}x${size}@2x.png"
|
67
|
+
done
|
68
|
+
|
69
|
+
popd
|
70
|
+
```
|
71
|
+
|
72
|
+
Add following line to `Rakefile`:
|
73
|
+
|
74
|
+
```
|
75
|
+
app.info_plist['CFBundleIconName'] = 'AppIcon'
|
76
|
+
```
|
77
|
+
|
78
|
+
For more information about Asset Catalogs, refer to this link: https://developer.apple.com/library/content/documentation/Xcode/Reference/xcode_ref-Asset_Catalog_Format/
|
79
|
+
|
80
|
+
|
81
|
+
## Contributing ##
|
82
|
+
|
83
|
+
1. Fork it
|
84
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
85
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
86
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
87
|
+
5. Create new Pull Request
|
data/sample-app/Rakefile
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
$:.unshift('/Library/RubyMotion/lib')
|
4
|
+
$:.unshift('~/.rubymotion/rubymotion-templates')
|
5
|
+
|
6
|
+
require 'motion/project/template/osx'
|
7
|
+
|
8
|
+
SHORT_VERSION = '0.5'
|
9
|
+
|
10
|
+
begin
|
11
|
+
require 'bundler'
|
12
|
+
Bundler.require
|
13
|
+
rescue LoadError
|
14
|
+
end
|
15
|
+
|
16
|
+
Motion::Project::App.setup do |app|
|
17
|
+
# Use `rake config' to see complete project settings.
|
18
|
+
app.name = 'sample-app'
|
19
|
+
app.deployment_target = '10.14'
|
20
|
+
app.info_plist['CFBundleIconName'] = 'AppIcon'
|
21
|
+
app.codesign_certificate = '-' # use an ad-hoc signing certificate
|
22
|
+
|
23
|
+
app.short_version = SHORT_VERSION # CFBundleShortVersionString
|
24
|
+
app.version = `git rev-list --all | wc -l`.strip.to_i.to_s # the build number
|
25
|
+
|
26
|
+
app.sparkle do
|
27
|
+
publish :base_url, 'http://example.com/your_app_folder/releases/'
|
28
|
+
publish :public_key, '06Iq4HGJFToJrA8lqWWG0SCqqtGXLuEN1Wgy/CVJBnI='
|
29
|
+
publish :archive_folder, '../published/releases/v2.2/'
|
30
|
+
|
31
|
+
# Appcast Feed
|
32
|
+
# publish :feed_base_url, 'http://downloads.example.com/releases' # defaults to base_url
|
33
|
+
publish :feed_filename, 'releases.xml' # default
|
34
|
+
|
35
|
+
# Release Notes
|
36
|
+
publish :notes_base_url, 'http://downloads.example.com/releases_notes/' # defaults to base_url
|
37
|
+
# publish :notes_filename, 'test'
|
38
|
+
|
39
|
+
# App Package
|
40
|
+
# publish :package_base_url, 'http://downloads.example.com/releases/' # defaults to base_url
|
41
|
+
|
42
|
+
# publish :use_exported_private_key, true
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class AppDelegate
|
2
|
+
def applicationDidFinishLaunching(notification)
|
3
|
+
buildMenu
|
4
|
+
buildWindow
|
5
|
+
end
|
6
|
+
|
7
|
+
def buildWindow
|
8
|
+
@mainWindow = NSWindow.alloc.initWithContentRect([[240, 180], [480, 360]],
|
9
|
+
styleMask: NSTitledWindowMask|NSClosableWindowMask|NSMiniaturizableWindowMask|NSResizableWindowMask,
|
10
|
+
backing: NSBackingStoreBuffered,
|
11
|
+
defer: false)
|
12
|
+
@mainWindow.title = NSBundle.mainBundle.infoDictionary['CFBundleName']
|
13
|
+
@mainWindow.orderFrontRegardless
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,155 @@
|
|
1
|
+
class AppDelegate
|
2
|
+
def buildMenu
|
3
|
+
@mainMenu = NSMenu.new
|
4
|
+
|
5
|
+
appName = NSBundle.mainBundle.infoDictionary['CFBundleName']
|
6
|
+
|
7
|
+
find_menu = createMenu('Find') do
|
8
|
+
addItemWithTitle('Find...', action: 'performFindPanelAction:', keyEquivalent: 'f')
|
9
|
+
addItemWithTitle('Find Next', action: 'performFindPanelAction:', keyEquivalent: 'g')
|
10
|
+
addItemWithTitle('Find Previous', action: 'performFindPanelAction:', keyEquivalent: 'G')
|
11
|
+
addItemWithTitle('Use Selection for Find', action: 'performFindPanelAction:', keyEquivalent: 'e')
|
12
|
+
addItemWithTitle('Jump to Selection', action: 'centerSelectionInVisibleArea:', keyEquivalent: 'j')
|
13
|
+
end
|
14
|
+
|
15
|
+
spelling_and_grammar_menu = createMenu('Spelling and Grammar') do
|
16
|
+
addItemWithTitle('Show Spelling and Grammar', action: 'showGuessPanel:', keyEquivalent: ':')
|
17
|
+
addItemWithTitle('Check Document Now', action: 'checkSpelling:', keyEquivalent: ';')
|
18
|
+
addItem(NSMenuItem.separatorItem)
|
19
|
+
addItemWithTitle('Check Spelling While Typing', action: 'toggleContinuousSpellChecking:', keyEquivalent: '')
|
20
|
+
addItemWithTitle('Check Grammar With Spelling', action: 'toggleGrammarChecking:', keyEquivalent: '')
|
21
|
+
addItemWithTitle('Correct Spelling Automatically', action: 'toggleAutomaticSpellingCorrection:', keyEquivalent: '')
|
22
|
+
end
|
23
|
+
|
24
|
+
substitutions_menu = createMenu('Substitutions') do
|
25
|
+
addItemWithTitle('Show Substitutions', action: 'orderFrontSubstitutionsPanel:', keyEquivalent: 'f')
|
26
|
+
addItem(NSMenuItem.separatorItem)
|
27
|
+
addItemWithTitle('Smart Copy/Paste', action: 'toggleSmartInsertDelete:', keyEquivalent: 'f')
|
28
|
+
addItemWithTitle('Smart Quotes', action: 'toggleAutomaticQuoteSubstitution:', keyEquivalent: 'g')
|
29
|
+
addItemWithTitle('Smart Dashes', action: 'toggleAutomaticDashSubstitution:', keyEquivalent: '')
|
30
|
+
addItemWithTitle('Smart Links', action: 'toggleAutomaticLinkDetection:', keyEquivalent: 'G')
|
31
|
+
addItemWithTitle('Text Replacement', action: 'toggleAutomaticTextReplacement:', keyEquivalent: '')
|
32
|
+
end
|
33
|
+
|
34
|
+
transformations_menu = createMenu('Transformations') do
|
35
|
+
addItemWithTitle('Make Upper Case', action: 'uppercaseWord:', keyEquivalent: '')
|
36
|
+
addItemWithTitle('Make Lower Case', action: 'lowercaseWord:', keyEquivalent: '')
|
37
|
+
addItemWithTitle('Capitalize', action: 'capitalizeWord:', keyEquivalent: '')
|
38
|
+
end
|
39
|
+
|
40
|
+
speech_menu = createMenu('Speech') do
|
41
|
+
addItemWithTitle('Start Speaking', action: 'startSpeaking:', keyEquivalent: '')
|
42
|
+
addItemWithTitle('Stop Speaking', action: 'stopSpeaking:', keyEquivalent: '')
|
43
|
+
end
|
44
|
+
|
45
|
+
addMenu(appName) do
|
46
|
+
addItemWithTitle("About #{appName}", action: 'orderFrontStandardAboutPanel:', keyEquivalent: '')
|
47
|
+
addItem(NSMenuItem.separatorItem)
|
48
|
+
addItemWithTitle('Preferences', action: 'openPreferences:', keyEquivalent: ',')
|
49
|
+
addItem(NSMenuItem.separatorItem)
|
50
|
+
servicesItem = addItemWithTitle('Services', action: nil, keyEquivalent: '')
|
51
|
+
NSApp.servicesMenu = servicesItem.submenu = NSMenu.new
|
52
|
+
addItem(NSMenuItem.separatorItem)
|
53
|
+
addItemWithTitle("Hide #{appName}", action: 'hide:', keyEquivalent: 'h')
|
54
|
+
item = addItemWithTitle('Hide Others', action: 'hideOtherApplications:', keyEquivalent: 'H')
|
55
|
+
item.keyEquivalentModifierMask = NSCommandKeyMask|NSAlternateKeyMask
|
56
|
+
addItemWithTitle('Show All', action: 'unhideAllApplications:', keyEquivalent: '')
|
57
|
+
addItem(NSMenuItem.separatorItem)
|
58
|
+
addItemWithTitle("Quit #{appName}", action: 'terminate:', keyEquivalent: 'q')
|
59
|
+
end
|
60
|
+
|
61
|
+
addMenu('File') do
|
62
|
+
addItemWithTitle('New', action: 'newDocument:', keyEquivalent: 'n')
|
63
|
+
addItemWithTitle('Open…', action: 'openDocument:', keyEquivalent: 'o')
|
64
|
+
addItem(NSMenuItem.separatorItem)
|
65
|
+
addItemWithTitle('Close', action: 'performClose:', keyEquivalent: 'w')
|
66
|
+
addItemWithTitle('Save…', action: 'saveDocument:', keyEquivalent: 's')
|
67
|
+
addItemWithTitle('Revert to Saved', action: 'revertDocumentToSaved:', keyEquivalent: '')
|
68
|
+
addItem(NSMenuItem.separatorItem)
|
69
|
+
addItemWithTitle('Page Setup…', action: 'runPageLayout:', keyEquivalent: 'P')
|
70
|
+
addItemWithTitle('Print…', action: 'printDocument:', keyEquivalent: 'p')
|
71
|
+
end
|
72
|
+
|
73
|
+
addMenu('Edit') do
|
74
|
+
addItemWithTitle('Undo', action: 'undo:', keyEquivalent: 'z')
|
75
|
+
addItemWithTitle('Redo', action: 'redo:', keyEquivalent: 'Z')
|
76
|
+
addItem(NSMenuItem.separatorItem)
|
77
|
+
addItemWithTitle('Cut', action: 'cut:', keyEquivalent: 'x')
|
78
|
+
addItemWithTitle('Copy', action: 'copy:', keyEquivalent: 'c')
|
79
|
+
addItemWithTitle('Paste', action: 'paste:', keyEquivalent: 'v')
|
80
|
+
item = addItemWithTitle('Paste and Match Style', action: 'pasteAsPlainText:', keyEquivalent: 'V')
|
81
|
+
item.keyEquivalentModifierMask = NSCommandKeyMask|NSAlternateKeyMask
|
82
|
+
addItemWithTitle('Delete', action: 'delete:', keyEquivalent: '')
|
83
|
+
addItemWithTitle('Select All', action: 'selectAll:', keyEquivalent: 'a')
|
84
|
+
addItem(NSMenuItem.separatorItem)
|
85
|
+
addItem(find_menu)
|
86
|
+
addItem(spelling_and_grammar_menu)
|
87
|
+
addItem(substitutions_menu)
|
88
|
+
addItem(transformations_menu)
|
89
|
+
addItem(speech_menu)
|
90
|
+
end
|
91
|
+
|
92
|
+
fontMenu = createMenu('Font') do
|
93
|
+
addItemWithTitle('Show Fonts', action: 'orderFrontFontPanel:', keyEquivalent: 't')
|
94
|
+
addItemWithTitle('Bold', action: 'addFontTrait:', keyEquivalent: 'b')
|
95
|
+
addItemWithTitle('Italic', action: 'addFontTrait:', keyEquivalent: 'i')
|
96
|
+
addItemWithTitle('Underline', action: 'underline:', keyEquivalent: 'u')
|
97
|
+
addItem(NSMenuItem.separatorItem)
|
98
|
+
addItemWithTitle('Bigger', action: 'modifyFont:', keyEquivalent: '+')
|
99
|
+
addItemWithTitle('Smaller', action: 'modifyFont:', keyEquivalent: '-')
|
100
|
+
end
|
101
|
+
|
102
|
+
textMenu = createMenu('Text') do
|
103
|
+
addItemWithTitle('Align Left', action: 'alignLeft:', keyEquivalent: '{')
|
104
|
+
addItemWithTitle('Center', action: 'alignCenter:', keyEquivalent: '|')
|
105
|
+
addItemWithTitle('Justify', action: 'alignJustified:', keyEquivalent: '')
|
106
|
+
addItemWithTitle('Align Right', action: 'alignRight:', keyEquivalent: '}')
|
107
|
+
addItem(NSMenuItem.separatorItem)
|
108
|
+
addItemWithTitle('Show Ruler', action: 'toggleRuler:', keyEquivalent: '')
|
109
|
+
item = addItemWithTitle('Copy Ruler', action: 'copyRuler:', keyEquivalent: 'c')
|
110
|
+
item.keyEquivalentModifierMask = NSCommandKeyMask|NSControlKeyMask
|
111
|
+
item = addItemWithTitle('Paste Ruler', action: 'pasteRuler:', keyEquivalent: 'v')
|
112
|
+
item.keyEquivalentModifierMask = NSCommandKeyMask|NSControlKeyMask
|
113
|
+
end
|
114
|
+
|
115
|
+
addMenu('Format') do
|
116
|
+
addItem fontMenu
|
117
|
+
addItem textMenu
|
118
|
+
end
|
119
|
+
|
120
|
+
addMenu('View') do
|
121
|
+
item = addItemWithTitle('Show Toolbar', action: 'toggleToolbarShown:', keyEquivalent: 't')
|
122
|
+
item.keyEquivalentModifierMask = NSCommandKeyMask|NSAlternateKeyMask
|
123
|
+
addItemWithTitle('Customize Toolbar…', action: 'runToolbarCustomizationPalette:', keyEquivalent: '')
|
124
|
+
end
|
125
|
+
|
126
|
+
NSApp.windowsMenu = addMenu('Window') do
|
127
|
+
addItemWithTitle('Minimize', action: 'performMiniaturize:', keyEquivalent: 'm')
|
128
|
+
addItemWithTitle('Zoom', action: 'performZoom:', keyEquivalent: '')
|
129
|
+
addItem(NSMenuItem.separatorItem)
|
130
|
+
addItemWithTitle('Bring All To Front', action: 'arrangeInFront:', keyEquivalent: '')
|
131
|
+
end.submenu
|
132
|
+
|
133
|
+
NSApp.helpMenu = addMenu('Help') do
|
134
|
+
addItemWithTitle("#{appName} Help", action: 'showHelp:', keyEquivalent: '?')
|
135
|
+
end.submenu
|
136
|
+
|
137
|
+
NSApp.mainMenu = @mainMenu
|
138
|
+
end
|
139
|
+
|
140
|
+
private
|
141
|
+
|
142
|
+
def addMenu(title, &b)
|
143
|
+
item = createMenu(title, &b)
|
144
|
+
@mainMenu.addItem item
|
145
|
+
item
|
146
|
+
end
|
147
|
+
|
148
|
+
def createMenu(title, &b)
|
149
|
+
menu = NSMenu.alloc.initWithTitle(title)
|
150
|
+
menu.instance_eval(&b) if b
|
151
|
+
item = NSMenuItem.alloc.initWithTitle(title, action: nil, keyEquivalent: '')
|
152
|
+
item.submenu = menu
|
153
|
+
item
|
154
|
+
end
|
155
|
+
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
{
|
2
|
+
"images" : [
|
3
|
+
{
|
4
|
+
"size" : "16x16",
|
5
|
+
"idiom" : "mac",
|
6
|
+
"filename" : "Icon_16x16.png",
|
7
|
+
"scale" : "1x"
|
8
|
+
},
|
9
|
+
{
|
10
|
+
"size" : "16x16",
|
11
|
+
"idiom" : "mac",
|
12
|
+
"filename" : "Icon_16x16@2x.png",
|
13
|
+
"scale" : "2x"
|
14
|
+
},
|
15
|
+
{
|
16
|
+
"size" : "32x32",
|
17
|
+
"idiom" : "mac",
|
18
|
+
"filename" : "Icon_32x32.png",
|
19
|
+
"scale" : "1x"
|
20
|
+
},
|
21
|
+
{
|
22
|
+
"size" : "32x32",
|
23
|
+
"idiom" : "mac",
|
24
|
+
"filename" : "Icon_32x32@2x.png",
|
25
|
+
"scale" : "2x"
|
26
|
+
},
|
27
|
+
{
|
28
|
+
"size" : "128x128",
|
29
|
+
"idiom" : "mac",
|
30
|
+
"filename" : "Icon_128x128.png",
|
31
|
+
"scale" : "1x"
|
32
|
+
},
|
33
|
+
{
|
34
|
+
"size" : "128x128",
|
35
|
+
"idiom" : "mac",
|
36
|
+
"filename" : "Icon_128x128@2x.png",
|
37
|
+
"scale" : "2x"
|
38
|
+
},
|
39
|
+
{
|
40
|
+
"size" : "256x256",
|
41
|
+
"idiom" : "mac",
|
42
|
+
"filename" : "Icon_256x256.png",
|
43
|
+
"scale" : "1x"
|
44
|
+
},
|
45
|
+
{
|
46
|
+
"size" : "256x256",
|
47
|
+
"idiom" : "mac",
|
48
|
+
"filename" : "Icon_256x256@2x.png",
|
49
|
+
"scale" : "2x"
|
50
|
+
},
|
51
|
+
{
|
52
|
+
"size" : "512x512",
|
53
|
+
"idiom" : "mac",
|
54
|
+
"filename" : "Icon_512x512.png",
|
55
|
+
"scale" : "1x"
|
56
|
+
},
|
57
|
+
{
|
58
|
+
"size" : "512x512",
|
59
|
+
"idiom" : "mac",
|
60
|
+
"filename" : "Icon_512x512@2x.png",
|
61
|
+
"scale" : "2x"
|
62
|
+
}
|
63
|
+
],
|
64
|
+
"info" : {
|
65
|
+
"version" : 1,
|
66
|
+
"author" : "xcode"
|
67
|
+
}
|
68
|
+
}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;}
|
2
|
+
{\colortbl;\red255\green255\blue255;}
|
3
|
+
\paperw9840\paperh8400
|
4
|
+
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
|
5
|
+
|
6
|
+
\f0\b\fs24 \cf0 Engineering:
|
7
|
+
\b0 \
|
8
|
+
Some people\
|
9
|
+
\
|
10
|
+
|
11
|
+
\b Human Interface Design:
|
12
|
+
\b0 \
|
13
|
+
Some other people\
|
14
|
+
\
|
15
|
+
|
16
|
+
\b Testing:
|
17
|
+
\b0 \
|
18
|
+
Hopefully not nobody\
|
19
|
+
\
|
20
|
+
|
21
|
+
\b Documentation:
|
22
|
+
\b0 \
|
23
|
+
Whoever\
|
24
|
+
\
|
25
|
+
|
26
|
+
\b With special thanks to:
|
27
|
+
\b0 \
|
28
|
+
Mom\
|
29
|
+
}
|
data/spec/setup_spec.rb
ADDED
@@ -0,0 +1,67 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require File.expand_path('spec_utils', __dir__)
|
4
|
+
|
5
|
+
module Motion
|
6
|
+
module Project
|
7
|
+
class Config
|
8
|
+
attr_writer :project_dir
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
describe 'Sparkle setup' do
|
14
|
+
before(:all) do
|
15
|
+
SpecUtils::TemporaryDirectory.teardown
|
16
|
+
SpecUtils::TemporaryDirectory.setup
|
17
|
+
|
18
|
+
FileUtils.mkdir_p("#{SpecUtils::TemporaryDirectory.directory}resources")
|
19
|
+
FileUtils.mkdir_p("#{SpecUtils::TemporaryDirectory.directory}vendor")
|
20
|
+
FileUtils.touch("#{SpecUtils::TemporaryDirectory.directory}.gitignore")
|
21
|
+
end
|
22
|
+
|
23
|
+
context 'something' do
|
24
|
+
before do
|
25
|
+
@config = App.config
|
26
|
+
@config.project_dir = SpecUtils::TemporaryDirectory.directory.to_s
|
27
|
+
@config.instance_eval do
|
28
|
+
pods do
|
29
|
+
pod 'Sparkle', POD_VERSION
|
30
|
+
end
|
31
|
+
|
32
|
+
sparkle do
|
33
|
+
release :base_url, 'http://example.com/'
|
34
|
+
# release :public_key, 'public_key.pem'
|
35
|
+
publish :public_key, '<YOUR-EDDSA-PUBLIC-KEY>'
|
36
|
+
release :version, '1.0'
|
37
|
+
|
38
|
+
# Optional config options
|
39
|
+
release :feed_base_url, 'http://rss.example.com/'
|
40
|
+
release :feed_filename, 'example.xml'
|
41
|
+
release :notes_base_url, 'http://www.example.com/'
|
42
|
+
release :notes_filename, 'example.html'
|
43
|
+
release :package_base_url, 'http://download.example.com/'
|
44
|
+
release :package_filename, 'example.zip'
|
45
|
+
# publish :use_exported_private_key, true
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
Rake::Task['pod:install'].invoke
|
50
|
+
Rake::Task['sparkle:setup'].invoke
|
51
|
+
# Rake::Task['sparkle:setup_certificates'].invoke
|
52
|
+
end
|
53
|
+
|
54
|
+
it 'should create private certificate' do
|
55
|
+
expect(File.exist?(@config.sparkle.private_key_path.to_s)).to be_truthy
|
56
|
+
end
|
57
|
+
|
58
|
+
it 'should create public certificate' do
|
59
|
+
expect(File.exist?(@config.sparkle.public_key_path.to_s)).to be_truthy
|
60
|
+
end
|
61
|
+
|
62
|
+
it 'should add files to gitignore' do
|
63
|
+
a = `cat .gitignore`
|
64
|
+
expect(a.strip).not_to eq ''
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|