applebot 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +38 -0
- data/LICENSE +19 -0
- data/README.md +153 -0
- data/Rakefile +13 -0
- data/applebot.gemspec +27 -0
- data/bin/applebot +73 -0
- data/create_app_id_manifest.js +6 -0
- data/create_manifest.js +24 -0
- data/lib/applebot/command_proxy.rb +44 -0
- data/lib/applebot/commands.rb +74 -0
- data/lib/applebot/error.rb +97 -0
- data/lib/applebot/mkmf.rb +25 -0
- data/lib/applebot/shell.rb +79 -0
- data/lib/applebot/version.rb +5 -0
- data/lib/applebot.rb +109 -0
- data/phantom/_commands.json +318 -0
- data/phantom/applebot.js +656 -0
- data/phantom/create_app.js +355 -0
- data/phantom/create_app_id.js +80 -0
- data/phantom/create_profile.js +134 -0
- data/phantom/delete_app_id.js +57 -0
- data/phantom/download_profile.js +36 -0
- data/phantom/list_app_id.js +66 -0
- data/phantom/list_profile.js +23 -0
- data/phantom/reject_binary_app.js +73 -0
- data/phantom/remove_from_sale_app.js +50 -0
- data/phantom/update_app.js +309 -0
- data/update_app_manifest.js +9 -0
- metadata +143 -0
@@ -0,0 +1,66 @@
|
|
1
|
+
var require = patchRequire(require);
|
2
|
+
|
3
|
+
var fs = require('fs');
|
4
|
+
var AppleBot = require('applebot').AppleBot;
|
5
|
+
var CommandHandler = require('applebot').CommandHandler;
|
6
|
+
|
7
|
+
var commandHandler = new CommandHandler("list_app_id.js");
|
8
|
+
|
9
|
+
var userOptions = commandHandler.parseArgs();
|
10
|
+
var applebot = new AppleBot(commandHandler.getAuthFromArgs());
|
11
|
+
|
12
|
+
var searchInADC = function() {
|
13
|
+
var LOAD_URL = "https://developer.apple.com/account/ios/identifiers/bundle/bundleList.action";
|
14
|
+
applebot.openPage(LOAD_URL, function(page){
|
15
|
+
var appIds = {};
|
16
|
+
applebot.action("Grab app id info", function() {
|
17
|
+
appIds = page.evaluate(function() {
|
18
|
+
var appIds = {};
|
19
|
+
var ids = $(".ui-widget-content.jqgrow.ui-row-ltr");
|
20
|
+
ids.each(function() {
|
21
|
+
var $el = this;
|
22
|
+
var name = $(".ui-ellipsis.bold", $el).first().attr('title');
|
23
|
+
var appId = $(".ui-ellipsis", $el).last().attr("title");
|
24
|
+
appIds[appId] = name;
|
25
|
+
});
|
26
|
+
return appIds
|
27
|
+
});
|
28
|
+
});
|
29
|
+
|
30
|
+
applebot.action("Grab app id info");
|
31
|
+
applebot.result(appIds);
|
32
|
+
});
|
33
|
+
};
|
34
|
+
|
35
|
+
var searchInITC = function() {
|
36
|
+
var LOAD_URL = "https://itunesconnect.apple.com";
|
37
|
+
applebot.openPage(LOAD_URL, function(page){
|
38
|
+
var appIds = {};
|
39
|
+
|
40
|
+
applebot.action("Click the Add New App button", function() {
|
41
|
+
page.click('.upload-app-button a');
|
42
|
+
});
|
43
|
+
|
44
|
+
applebot.action("Grab app id info", function() {
|
45
|
+
appIds = applebot.shortcuts.filterBundleIdsFromItunesConnect(page, true);
|
46
|
+
});
|
47
|
+
|
48
|
+
applebot.step("Wait for Manage Your Apps", 'waitForText', 'Recent Activity', function() {
|
49
|
+
applebot.action("Click the Add New App button");
|
50
|
+
});
|
51
|
+
|
52
|
+
applebot.step("Wait for the New App Information page", 'waitForSelector', '#mainForm', function() {
|
53
|
+
applebot.action("Grab app id info");
|
54
|
+
applebot.result(appIds);
|
55
|
+
});
|
56
|
+
|
57
|
+
applebot.shortcuts.openManageApps(page);
|
58
|
+
});
|
59
|
+
};
|
60
|
+
|
61
|
+
if (userOptions.source === 'itc') {
|
62
|
+
searchInITC();
|
63
|
+
}
|
64
|
+
else {
|
65
|
+
searchInADC();
|
66
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
var require = patchRequire(require);
|
2
|
+
|
3
|
+
var fs = require('fs');
|
4
|
+
var AppleBot = require('applebot').AppleBot;
|
5
|
+
var CommandHandler = require('applebot').CommandHandler;
|
6
|
+
|
7
|
+
var commandHandler = new CommandHandler("list_profile.js");
|
8
|
+
|
9
|
+
var userOptions = commandHandler.parseArgs();
|
10
|
+
var applebot = new AppleBot(commandHandler.getAuthFromArgs());
|
11
|
+
|
12
|
+
var profileType = {
|
13
|
+
development: 'limited',
|
14
|
+
distribution: 'production'
|
15
|
+
}[userOptions.profile_type || "development"];
|
16
|
+
|
17
|
+
var LOAD_URL = "https://developer.apple.com/account/ios/profile/profileList.action?type=" + profileType;
|
18
|
+
|
19
|
+
applebot.openPage(LOAD_URL, function(page){
|
20
|
+
applebot.shortcuts.waitToParseProfiles(applebot, page, profileType, function(parsedProfiles) {
|
21
|
+
applebot.result(parsedProfiles);
|
22
|
+
});
|
23
|
+
});
|
@@ -0,0 +1,73 @@
|
|
1
|
+
var require = patchRequire(require);
|
2
|
+
|
3
|
+
var fs = require('fs');
|
4
|
+
var AppleBot = require('applebot').AppleBot;
|
5
|
+
var CommandHandler = require('applebot').CommandHandler;
|
6
|
+
|
7
|
+
var commandHandler = new CommandHandler("remove_from_sale_app.js");
|
8
|
+
|
9
|
+
|
10
|
+
var userOptions = commandHandler.parseArgs();
|
11
|
+
var applebot = new AppleBot(commandHandler.getAuthFromArgs());
|
12
|
+
|
13
|
+
var LOAD_URL = "https://itunesconnect.apple.com";
|
14
|
+
applebot.openPage(LOAD_URL, function(page){
|
15
|
+
applebot.action("Click current version", function() {
|
16
|
+
page.click(".version .column-container a.blue-btn");
|
17
|
+
});
|
18
|
+
|
19
|
+
applebot.action("Click next version", function() {
|
20
|
+
page.click(".version .column-container.right a.blue-btn");
|
21
|
+
});
|
22
|
+
|
23
|
+
applebot.action("Click Binary Details", function() {
|
24
|
+
var hrefSelector = applebot.shortcuts.findHrefSelector("Binary Details", page, '#versionInfoLightboxUpdate');
|
25
|
+
page.click(hrefSelector);
|
26
|
+
});
|
27
|
+
|
28
|
+
applebot.action("Click Reject Binary" ,function() {
|
29
|
+
page.click(".lightbox-button");
|
30
|
+
});
|
31
|
+
|
32
|
+
|
33
|
+
applebot.shortcuts.addStepsToSearchAndClickAppTitle(applebot, page, userOptions.title, function() {
|
34
|
+
if (userOptions.app_version) {
|
35
|
+
var actionName = page.evaluate(function(app_version) {
|
36
|
+
var nodes = document.querySelectorAll(".version-container p span");
|
37
|
+
var actionName = null;
|
38
|
+
for (var i = nodes.length - 1; i >= 0; i--) {
|
39
|
+
var node = nodes[i];
|
40
|
+
if (node.innerHTML == app_version) {
|
41
|
+
var relevantAncestor = node.parentElement.parentElement.parentElement.parentElement;
|
42
|
+
var classes = relevantAncestor.classList;
|
43
|
+
if (classes[1] === 'right') {
|
44
|
+
actionName = "Click next version";
|
45
|
+
}
|
46
|
+
else {
|
47
|
+
actionName = "Click current version";
|
48
|
+
}
|
49
|
+
}
|
50
|
+
};
|
51
|
+
return actionName;
|
52
|
+
}, userOptions.app_version);
|
53
|
+
applebot.action(actionName);
|
54
|
+
}
|
55
|
+
else {
|
56
|
+
applebot.action("Click current version");
|
57
|
+
}
|
58
|
+
});
|
59
|
+
|
60
|
+
applebot.step("Wait for version information page", 'waitForText', 'Version Information', function() {
|
61
|
+
applebot.action("Click Binary Details");
|
62
|
+
});
|
63
|
+
|
64
|
+
applebot.step("Wait for Binary Details page", 'waitForText', 'Supported Architectures', function() {
|
65
|
+
applebot.action("Click Reject Binary");
|
66
|
+
});
|
67
|
+
|
68
|
+
applebot.step("Wait for changes to save", 'waitForText', 'Supported Architectures', function() {
|
69
|
+
// done
|
70
|
+
});
|
71
|
+
|
72
|
+
applebot.shortcuts.openManageApps(page);
|
73
|
+
});
|
@@ -0,0 +1,50 @@
|
|
1
|
+
var require = patchRequire(require);
|
2
|
+
|
3
|
+
var fs = require('fs');
|
4
|
+
var AppleBot = require('applebot').AppleBot;
|
5
|
+
var CommandHandler = require('applebot').CommandHandler;
|
6
|
+
|
7
|
+
var commandHandler = new CommandHandler("remove_from_sale_app.js");
|
8
|
+
|
9
|
+
|
10
|
+
var userOptions = commandHandler.parseArgs();
|
11
|
+
var applebot = new AppleBot(commandHandler.getAuthFromArgs());
|
12
|
+
|
13
|
+
var LOAD_URL = "https://itunesconnect.apple.com";
|
14
|
+
applebot.openPage(LOAD_URL, function(page){
|
15
|
+
applebot.action("Click Rights and Pricing", function() {
|
16
|
+
var hrefSelector = applebot.shortcuts.findHrefSelector("Rights and Pricing", page, "#availableButtons");
|
17
|
+
page.click(hrefSelector);
|
18
|
+
});
|
19
|
+
|
20
|
+
applebot.action("Open Specific Territories", function() {
|
21
|
+
var hrefSelector = applebot.shortcuts.findHrefSelector("specific territories", page, '#hideCountriesOption');
|
22
|
+
page.click(hrefSelector);
|
23
|
+
});
|
24
|
+
|
25
|
+
applebot.action("Click Deselect All", function() {
|
26
|
+
var hrefSelector = applebot.shortcuts.findHrefSelector("Deselect All", page, '.country-check-all');
|
27
|
+
page.click(hrefSelector + ".right");
|
28
|
+
});
|
29
|
+
|
30
|
+
applebot.action("Click Save button", function() {
|
31
|
+
page.click('.saveChangesActionButton');
|
32
|
+
});
|
33
|
+
|
34
|
+
|
35
|
+
applebot.shortcuts.addStepsToSearchAndClickAppTitle(applebot, page, userOptions.title, function() {
|
36
|
+
applebot.action("Click Rights and Pricing");
|
37
|
+
});
|
38
|
+
|
39
|
+
applebot.step("Wait for Rights and Pricing page", 'waitForText', "Select the availability date", function() {
|
40
|
+
applebot.action("Open Specific Territories");
|
41
|
+
applebot.action("Click Deselect All");
|
42
|
+
applebot.action("Click Save button");
|
43
|
+
});
|
44
|
+
|
45
|
+
applebot.step("Wait for changes to save", 'waitForText', 'Your changes have been saved.', function() {
|
46
|
+
// done
|
47
|
+
});
|
48
|
+
|
49
|
+
applebot.shortcuts.openManageApps(page);
|
50
|
+
});
|
@@ -0,0 +1,309 @@
|
|
1
|
+
var require = patchRequire(require);
|
2
|
+
|
3
|
+
var fs = require('fs');
|
4
|
+
var AppleBot = require('applebot').AppleBot;
|
5
|
+
var CommandHandler = require('applebot').CommandHandler;
|
6
|
+
|
7
|
+
var commandHandler = new CommandHandler("update_app.js");
|
8
|
+
|
9
|
+
|
10
|
+
var userOptions = commandHandler.parseArgs();
|
11
|
+
var applebot = new AppleBot(commandHandler.getAuthFromArgs());
|
12
|
+
|
13
|
+
var LOAD_URL = "https://itunesconnect.apple.com";
|
14
|
+
|
15
|
+
applebot.openPage(LOAD_URL, function(page){
|
16
|
+
var findFieldName = applebot.shortcuts.findFieldName;
|
17
|
+
var updateAlreadyExists = false;
|
18
|
+
|
19
|
+
var addWaitForVersionInfoStep = function(callback) {
|
20
|
+
var callbackImpl = callback;
|
21
|
+
if (typeof callback === "string") {
|
22
|
+
callbackImpl = function() {
|
23
|
+
applebot.action(callback);
|
24
|
+
}
|
25
|
+
}
|
26
|
+
applebot.step("Wait for update version info screen", 'waitForText','App Store Contact Information', callbackImpl);
|
27
|
+
}
|
28
|
+
this.addWaitForVersionInfoStep = addWaitForVersionInfoStep;
|
29
|
+
|
30
|
+
var waitForMetadataToClose = function() {
|
31
|
+
applebot.step("Wait for metadata screen to close", 'waitWhileVisible', '#fileInput_35InchRetinaDisplayScreenshots');
|
32
|
+
}
|
33
|
+
|
34
|
+
this.handleLargeIcon = function() {
|
35
|
+
addWaitForVersionInfoStep("Click the Version Information edit button");
|
36
|
+
applebot.step("Wait for the app icon upload screen", 'waitForSelector', 'form[name="FileUploadForm_largeAppIcon"]', function() {
|
37
|
+
applebot.action("Update app icon");
|
38
|
+
});
|
39
|
+
applebot.step("Wait for the app icon to change", 'waitWhileVisible', '.lcUploaderImage .lcUploaderImageWellSpinner', function() {
|
40
|
+
applebot.action("Close app icon update screen");
|
41
|
+
})
|
42
|
+
applebot.step("Wait for Version Information screen to close", 'waitWhileVisible', 'form[name="FileUploadForm_largeAppIcon"]');
|
43
|
+
};
|
44
|
+
|
45
|
+
this.handleNewTitle = function() {
|
46
|
+
addWaitForVersionInfoStep("Click the Metadata edit button");
|
47
|
+
applebot.step("Wait for the app title upload screen", 'waitForSelector', '#fileInput_35InchRetinaDisplayScreenshots', function() {
|
48
|
+
applebot.action("Update app title");
|
49
|
+
});
|
50
|
+
applebot.step("Wait for the app title to confirm", 'waitWhileVisible', '#appNameUpdateSpinnerId', function() {
|
51
|
+
applebot.action("Save Metadata changes");
|
52
|
+
});
|
53
|
+
waitForMetadataToClose();
|
54
|
+
};
|
55
|
+
|
56
|
+
|
57
|
+
var waitForScreenshotsToBeEmpty = function(type, selectorId, callback) {
|
58
|
+
applebot.step("Wait for all " + type + " screenshots to be cleared", 'waitFor', function() {
|
59
|
+
var buttonCount = page.evaluate(function(selectorId) {
|
60
|
+
var screenshotContainer = Array.prototype.slice.call(document.querySelectorAll(".lcUploaderPictureSet")).filter(function(el) {
|
61
|
+
return el.id === selectorId;
|
62
|
+
})[0];
|
63
|
+
var deleteButtons = screenshotContainer.querySelectorAll(".lcUploaderImageDelete");
|
64
|
+
return deleteButtons.length;
|
65
|
+
}, selectorId);
|
66
|
+
return buttonCount === 0;
|
67
|
+
},callback);
|
68
|
+
}
|
69
|
+
this.handleScreenshots35 = function() {
|
70
|
+
addWaitForVersionInfoStep("Click the Metadata edit button");
|
71
|
+
applebot.step("Wait for the app title upload screen", 'waitForSelector', '#fileInput_35InchRetinaDisplayScreenshots', function() {
|
72
|
+
applebot.action("Clear 3.5in screenshots");
|
73
|
+
});
|
74
|
+
waitForScreenshotsToBeEmpty("3.5in", "35InchRetinaDisplayScreenshots", function() {
|
75
|
+
applebot.action("Upload next 3.5in screenshot");
|
76
|
+
});
|
77
|
+
var screenshotStepOption = {
|
78
|
+
key_path: 'screenshots_35',
|
79
|
+
selector: 'div.iPhoneScreenshot',
|
80
|
+
description: "3.5in",
|
81
|
+
next_step: "Save Metadata changes",
|
82
|
+
while_step: "Upload next 3.5in screenshot"
|
83
|
+
};
|
84
|
+
applebot.shortcuts.addStepsForScreenshotGroup(applebot, page, userOptions, screenshotStepOption);
|
85
|
+
waitForMetadataToClose();
|
86
|
+
};
|
87
|
+
|
88
|
+
this.handleScreenshots4 = function() {
|
89
|
+
addWaitForVersionInfoStep("Click the Metadata edit button");
|
90
|
+
applebot.step("Wait for the app title upload screen", 'waitForSelector', '#fileInput_35InchRetinaDisplayScreenshots', function() {
|
91
|
+
applebot.action("Clear 4in screenshots");
|
92
|
+
});
|
93
|
+
|
94
|
+
waitForScreenshotsToBeEmpty("4in", "iPhone5", function() {
|
95
|
+
applebot.action("Upload next 4in screenshot");
|
96
|
+
});
|
97
|
+
var screenshotStepOption = {
|
98
|
+
key_path: 'screenshots_4',
|
99
|
+
selector: 'div.SortedN41ScreenShot',
|
100
|
+
description: "4in",
|
101
|
+
next_step: "Save Metadata changes",
|
102
|
+
while_step: "Upload next 4in screenshot"
|
103
|
+
};
|
104
|
+
applebot.shortcuts.addStepsForScreenshotGroup(applebot, page, userOptions, screenshotStepOption);
|
105
|
+
waitForMetadataToClose();
|
106
|
+
};
|
107
|
+
|
108
|
+
applebot.action("Click the 'See All' link", function() {
|
109
|
+
page.click('.seeAll a');
|
110
|
+
});
|
111
|
+
|
112
|
+
applebot.action("Fill the apps search box", function() {
|
113
|
+
applebot.shortcuts.searchITCApps(page, {title: userOptions.title});
|
114
|
+
});
|
115
|
+
|
116
|
+
applebot.action("Upload next 3.5in screenshot", function() {
|
117
|
+
var screenshotPath = applebot.shortcuts.popScreenshotPaths(userOptions, 'screenshots_35');
|
118
|
+
page.fillSelectors('form[name="FileUploadForm_35InchRetinaDisplayScreenshots"]', {
|
119
|
+
'#fileInput_35InchRetinaDisplayScreenshots': screenshotPath
|
120
|
+
}, false);
|
121
|
+
});
|
122
|
+
|
123
|
+
applebot.action("Upload next 4in screenshot", function() {
|
124
|
+
var screenshotPath = applebot.shortcuts.popScreenshotPaths(userOptions, 'screenshots_4');
|
125
|
+
page.fillSelectors('form[name="FileUploadForm_iPhone5"]', {
|
126
|
+
'#fileInput_iPhone5': screenshotPath
|
127
|
+
}, false);
|
128
|
+
});
|
129
|
+
|
130
|
+
applebot.action('Find the add version button and click it', function() {
|
131
|
+
var hrefSelector = applebot.shortcuts.findHrefSelector('Add Version', page);
|
132
|
+
page.click(hrefSelector);
|
133
|
+
})
|
134
|
+
|
135
|
+
applebot.action('View details of pending update', function() {
|
136
|
+
var hrefSelector = applebot.shortcuts.findHrefSelector('View Details', page, '.column-container.right');
|
137
|
+
page.click(hrefSelector);
|
138
|
+
});
|
139
|
+
|
140
|
+
applebot.action('Fill initial update info form', function() {
|
141
|
+
var fillOptions = {};
|
142
|
+
|
143
|
+
var versionFieldName = findFieldName(page, "Version Number", '.middle > div');
|
144
|
+
fillOptions['input[name="' + versionFieldName + '"]'] = userOptions.app_version;
|
145
|
+
|
146
|
+
fillOptions['textarea'] = userOptions.update_description;
|
147
|
+
|
148
|
+
page.fillSelectors('#mainForm', fillOptions, false);
|
149
|
+
|
150
|
+
page.click('.saveChangesActionButton');
|
151
|
+
});
|
152
|
+
|
153
|
+
applebot.action('Click the Ready to Upload Binary button', function() {
|
154
|
+
try {
|
155
|
+
page.click(".customActionButton");
|
156
|
+
}
|
157
|
+
catch(err) {
|
158
|
+
// Button didn't exist, which means an update already
|
159
|
+
if (updateAlreadyExists) {
|
160
|
+
console.log("Finishing - binary was already ready to upload");
|
161
|
+
page.exit(0);
|
162
|
+
}
|
163
|
+
else {
|
164
|
+
page.die("Could not find the Ready To Upload button but an update was not already pending");
|
165
|
+
}
|
166
|
+
}
|
167
|
+
})
|
168
|
+
|
169
|
+
applebot.action("Click the Version Information edit button", function() {
|
170
|
+
page.click("h2 a");
|
171
|
+
});
|
172
|
+
|
173
|
+
applebot.action("Click the Metadata edit button", function() {
|
174
|
+
page.click("#localizationLightboxUpdate a");
|
175
|
+
});
|
176
|
+
|
177
|
+
applebot.action("Update app icon", function() {
|
178
|
+
page.fillSelectors('form[name="FileUploadForm_largeAppIcon"]', {
|
179
|
+
'#fileInput_largeAppIcon': userOptions.large_icon
|
180
|
+
}, false);
|
181
|
+
});
|
182
|
+
|
183
|
+
applebot.action("Save Metadata changes", function() {
|
184
|
+
page.click("#lightboxSaveButtonEnabled");
|
185
|
+
})
|
186
|
+
|
187
|
+
applebot.action('Close app icon update screen', function() {
|
188
|
+
page.click("#lightboxSaveButtonEnabled");
|
189
|
+
})
|
190
|
+
|
191
|
+
applebot.action("Update app title", function() {
|
192
|
+
var fillOptions = {};
|
193
|
+
|
194
|
+
page.evaluate(function(newTitle) {
|
195
|
+
document.querySelector('#appNameUpdateContainerId input').value = newTitle;
|
196
|
+
document.querySelector('#appNameUpdateContainerId input').onblur();
|
197
|
+
}, userOptions.new_title);
|
198
|
+
});
|
199
|
+
|
200
|
+
var clearScreenshots = function(selectorId) {
|
201
|
+
page.evaluate(function(selectorId) {
|
202
|
+
var screenshotContainer = Array.prototype.slice.call(document.querySelectorAll(".lcUploaderPictureSet")).filter(function(el) {
|
203
|
+
return el.id === selectorId;
|
204
|
+
})[0];
|
205
|
+
var deleteButtons = screenshotContainer.querySelectorAll(".lcUploaderImageDelete");
|
206
|
+
var buffer = "";
|
207
|
+
Array.prototype.forEach.call(
|
208
|
+
deleteButtons,
|
209
|
+
function(button) {
|
210
|
+
buffer += ("" + button);
|
211
|
+
var click_ev = document.createEvent("MouseEvent");
|
212
|
+
click_ev.initEvent("click", true /* bubble */, true /* cancelable */);
|
213
|
+
|
214
|
+
try {
|
215
|
+
button.dispatchEvent(click_ev);
|
216
|
+
}
|
217
|
+
catch (e) {
|
218
|
+
buffer += ("" + e);
|
219
|
+
}
|
220
|
+
}
|
221
|
+
);
|
222
|
+
}, selectorId);
|
223
|
+
}
|
224
|
+
applebot.action("Clear 3.5in screenshots", function() {
|
225
|
+
clearScreenshots("35InchRetinaDisplayScreenshots");
|
226
|
+
});
|
227
|
+
|
228
|
+
applebot.action("Clear 4in screenshots", function() {
|
229
|
+
clearScreenshots("iPhone5");
|
230
|
+
});
|
231
|
+
|
232
|
+
applebot.action('Fill export compliance page', function() {
|
233
|
+
applebot.shortcuts.safeFill(page, '#mainForm', {
|
234
|
+
'encryptionHasChanged': "false",
|
235
|
+
'ipContentsQuestionRadio': 'false',
|
236
|
+
'booleanRadioButton': 'false',
|
237
|
+
'hasLegalIssues': 'false'
|
238
|
+
}, false);
|
239
|
+
page.click('.continueActionButton');
|
240
|
+
});
|
241
|
+
|
242
|
+
applebot.action('Fill version release date page', function() {
|
243
|
+
page.fill("#mainForm", {
|
244
|
+
'goLive': 'false'
|
245
|
+
}, false);
|
246
|
+
page.click('.saveChangesActionButton');
|
247
|
+
})
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
//////////////////////////
|
252
|
+
// Steps
|
253
|
+
|
254
|
+
//applebot.start("Click the 'Manage Your Apps' screen", applebot.shortcuts.openManageApps);
|
255
|
+
|
256
|
+
applebot.shortcuts.addStepsToSearchAndClickAppTitle(applebot, page, userOptions.title, function() {
|
257
|
+
try {
|
258
|
+
applebot.action('Find the add version button and click it');
|
259
|
+
}
|
260
|
+
catch(err) {
|
261
|
+
// Means there's already a submission pending
|
262
|
+
updateAlreadyExists = true;
|
263
|
+
applebot.action('View details of pending update');
|
264
|
+
};
|
265
|
+
})
|
266
|
+
|
267
|
+
applebot.step("Wait for the new version page", 'waitForText', 'New Version', function() {
|
268
|
+
applebot.action('Fill initial update info form');
|
269
|
+
}, {
|
270
|
+
onFail: function() {
|
271
|
+
if (updateAlreadyExists) {
|
272
|
+
return false;
|
273
|
+
}
|
274
|
+
}
|
275
|
+
})
|
276
|
+
|
277
|
+
var operations = [];
|
278
|
+
if (userOptions.new_title && (userOptions.new_title != userOptions.title)) {
|
279
|
+
operations.push('handleNewTitle');
|
280
|
+
}
|
281
|
+
if (userOptions.large_icon) {
|
282
|
+
operations.push('handleLargeIcon');
|
283
|
+
}
|
284
|
+
if (userOptions.screenshots_4) {
|
285
|
+
operations.push('handleScreenshots4');
|
286
|
+
}
|
287
|
+
if (userOptions.screenshots_35) {
|
288
|
+
operations.push('handleScreenshots35');
|
289
|
+
}
|
290
|
+
|
291
|
+
var length = operations.length;
|
292
|
+
for (var i = 0; i < length; i++) {
|
293
|
+
this[operations.pop()]();
|
294
|
+
}
|
295
|
+
addWaitForVersionInfoStep('Click the Ready to Upload Binary button');
|
296
|
+
|
297
|
+
applebot.step("Wait for the Export Compliance page", 'waitForText', 'Export Compliance', function() {
|
298
|
+
applebot.action('Fill export compliance page');
|
299
|
+
}, {
|
300
|
+
timeout: 10 * 1000
|
301
|
+
});
|
302
|
+
|
303
|
+
applebot.step("Wait release date page", 'waitForText', "You can control when this version of your app is released to the App Store", function() {
|
304
|
+
applebot.action('Fill version release date page');
|
305
|
+
});
|
306
|
+
|
307
|
+
|
308
|
+
applebot.shortcuts.openManageApps(page);
|
309
|
+
});
|
@@ -0,0 +1,9 @@
|
|
1
|
+
{
|
2
|
+
"username": "clay+applestore@usepropeller.com",
|
3
|
+
"password": "B0nnyB3ar",
|
4
|
+
"title": "Rebel Redefined",
|
5
|
+
"app_version": "1.5.1",
|
6
|
+
"update_description": "Interface adjustments, better performance, and bug fixes",
|
7
|
+
"screenshots_35": "[\"/Users/clayallsopp/Projects/Apptory/iOS/profiles/apps/37/screenshots/product_short.png\",\"/Users/clayallsopp/Projects/Apptory/iOS/profiles/apps/37/screenshots/menu_short.png\"]",
|
8
|
+
"screenshots_4": "[\"/Users/clayallsopp/Projects/Apptory/iOS/profiles/apps/37/screenshots/product.png\", \"/Users/clayallsopp/Projects/Apptory/iOS/profiles/apps/37/screenshots/menu.png\"]"
|
9
|
+
}
|
metadata
ADDED
@@ -0,0 +1,143 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: applebot
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Clay Allsopp
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-05-28 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: commander
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 4.1.2
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 4.1.2
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: activesupport
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '3.2'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '3.2'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: terminal-table
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 1.4.0
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 1.4.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: dotenv
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
description: A robot for Apple Developer Center and iTunes Connect tasks
|
84
|
+
email: clay@usepropeller.com
|
85
|
+
executables:
|
86
|
+
- applebot
|
87
|
+
extensions: []
|
88
|
+
extra_rdoc_files: []
|
89
|
+
files:
|
90
|
+
- ./applebot.gemspec
|
91
|
+
- ./create_app_id_manifest.js
|
92
|
+
- ./create_manifest.js
|
93
|
+
- ./Gemfile
|
94
|
+
- ./Gemfile.lock
|
95
|
+
- ./lib/applebot/command_proxy.rb
|
96
|
+
- ./lib/applebot/commands.rb
|
97
|
+
- ./lib/applebot/error.rb
|
98
|
+
- ./lib/applebot/mkmf.rb
|
99
|
+
- ./lib/applebot/shell.rb
|
100
|
+
- ./lib/applebot/version.rb
|
101
|
+
- ./lib/applebot.rb
|
102
|
+
- ./LICENSE
|
103
|
+
- ./phantom/_commands.json
|
104
|
+
- ./phantom/applebot.js
|
105
|
+
- ./phantom/create_app.js
|
106
|
+
- ./phantom/create_app_id.js
|
107
|
+
- ./phantom/create_profile.js
|
108
|
+
- ./phantom/delete_app_id.js
|
109
|
+
- ./phantom/download_profile.js
|
110
|
+
- ./phantom/list_app_id.js
|
111
|
+
- ./phantom/list_profile.js
|
112
|
+
- ./phantom/reject_binary_app.js
|
113
|
+
- ./phantom/remove_from_sale_app.js
|
114
|
+
- ./phantom/update_app.js
|
115
|
+
- ./Rakefile
|
116
|
+
- ./README.md
|
117
|
+
- ./update_app_manifest.js
|
118
|
+
- bin/applebot
|
119
|
+
homepage: https://github.com/usepropeller/applebot
|
120
|
+
licenses:
|
121
|
+
- MIT
|
122
|
+
metadata: {}
|
123
|
+
post_install_message:
|
124
|
+
rdoc_options: []
|
125
|
+
require_paths:
|
126
|
+
- lib
|
127
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - '>='
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
133
|
+
requirements:
|
134
|
+
- - '>='
|
135
|
+
- !ruby/object:Gem::Version
|
136
|
+
version: '0'
|
137
|
+
requirements: []
|
138
|
+
rubyforge_project:
|
139
|
+
rubygems_version: 2.0.3
|
140
|
+
signing_key:
|
141
|
+
specification_version: 4
|
142
|
+
summary: AppleBot
|
143
|
+
test_files: []
|