shipit-engine 0.4.10 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -1
- data/app/helpers/stacks_helper.rb +1 -10
- data/app/models/commit.rb +11 -1
- data/app/models/deploy_spec.rb +4 -0
- data/app/models/deploy_spec/file_system.rb +5 -1
- data/app/models/missing_status.rb +18 -0
- data/app/models/stack.rb +1 -1
- data/app/models/status_group.rb +3 -3
- data/app/views/commits/_commit.html.erb +1 -1
- data/config/locales/en.yml +5 -0
- data/lib/shipit/version.rb +1 -1
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +3771 -0
- data/test/dummy/log/test.log +88208 -0
- data/test/dummy/tmp/cache/98C/C60/stacks%3A616453971%3Aci_enabled +1 -1
- data/test/dummy/tmp/cache/991/020/stacks%3A805262699%3Aci_enabled +1 -1
- data/test/dummy/tmp/cache/AFB/D10/1c8a597711f928cc91e5ac353bbad46e8088cd24 +2 -2
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/0bjH0uaRbK2LwiGbzir2Vr1CEd_BCRM3zafyFrTxtWo.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/0cXLyRm6lZhyo1qqlgCrXD1t_3-V3U3rhBB237IJdx8.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/22cH27p3z0iftqXk5kjY17qrgCdytxMXdCXwyRw4VmU.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/64dEPaBLo5z6LMNpnAJJZAld1bJsjlN9Jv0YhHDi1As.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/6dmTJIeVb_clll5M5sXaue6G5SbKbQkanhoJ3XPx5Io.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/6yRaQTp2ELmVWDqduqRG7hvzYEIJYFfIbM2plGCaOt4.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/7BxgYqphWFZ2WeN1vgxe_BsHnaRCNTBNKiK9zNbFqsA.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/DHSc9ZhNSI7m2-7C4JG0PzFceq7lMKWb_bx82gA2wuM.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/DkKagJ29zezvTdGcEpVSdxyBL458oc_uMz5x8xmoLMM.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/Ed5D-0u0BKMms6OQSiLZLSYbzsvm-_TEiZ97ueqpY44.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/FuTtkfcaXW8YGNfgT-ZZV9Mrk9i1ynnZqHLIfV63j8k.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/GYxe6lp8qnxrqlFmhLnfOMLiMWXg36PV-hKBoG5e-dw.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/G_o4CuSkPm8IQgGAhR-p9dohkunUxNu15V3Hr5XX21E.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/GjzHbFeaFoOvC8CJaPq8D7peK9Y6BleJruxF8TH2Cl0.cache +64 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/Hcs7avkdizKbFbJWWzjMGRTVn0mWGc5zbGy3rcHDF78.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/IRSIXqzwg_kQIEO5syk6Ej1l4XLi3IcYB70A5IHctAA.cache +105 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/JQ8n4TH3kuPzDkGXdft77ktId3xDdNuPysNdAIrlVsw.cache +63 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/KrEtDtAlu1lGD00nLxPXedo7GNcRW-qYJWoQGdDEyMo.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/UKPDHEwywsrYVV5U6Wzqzdz9r3GEY1iZgpUsxsD0_w4.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/W3JpGFR_4F0RfRrDTsXyU0Nio5OKFvmvZUeb81tt4RM.cache +9 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/Zm7XUcI996G2YV1E60HsUmJEaqrG5rRGarZQjkMkEqw.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/cUw4vgZA-C61NvpUB18kKh6MnsQfQzDT0cxhjyXOkio.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/eT9NqLzv8XD4gQFtuP8Xw7nDh_l4voicWU578uIUdO4.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/fssUS76e4YbH0OMN72pPl8DuSGZPx6w-d3KKeL8Rzck.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/gMmdmmexTGqU7e5fNGQ1TC4ujI-DqBCgVtM4ASKKytw.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/gMmpywAwZ6bKN7vqWoP-IDxBfLoOGUhRaW3oY_sELsE.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/guH7S-7x--fDI1cGrt7yObX-wucIVZDVWj8NIMo6Amw.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/jONckGUhizDx1JzIg3Fjo44UlxRgZbiQ2nTcOTIvdGI.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/nrV5QMx0DB1aSJ1uDwdmc-MAmL4N3bMTzmPMbMbWtnc.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/p8PoBJeYtCNp2Cq6WuU_qEJU7rncSDU5TzkUFKkVQHA.cache +17 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/re_FmHoiyphtcwEySx2HO5U5i_DQ5z1jVk3r_geheQE.cache +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/sVM0uM6tQ2clAYU00sHU1MZRhAj12OLLyreoA_sBEug.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/uWzQhnhV_TICz6WXxGHYMOXPDCrNSIhjhF3kliicW50.cache +1 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/vaYm-hYQGfqQV7izliGnlCuQ4Ot8x_0PYDRFpHE4O1A.cache +20 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/v3.0/wGZD-3AHpHPFqBl2CiUi9dqm9xSNSJpkpqRJB4PdJbU.cache +0 -0
- data/test/fixtures/stacks.yml +1 -1
- data/test/models/commits_test.rb +14 -2
- data/test/models/missing_status_test.rb +21 -0
- data/test/models/status_group_test.rb +1 -1
- data/test/unit/deploy_spec_test.rb +1 -1
- metadata +55 -2
@@ -1 +1 @@
|
|
1
|
-
o: ActiveSupport::Cache::Entry:@valueT:@created_atf
|
1
|
+
o: ActiveSupport::Cache::Entry:@valueT:@created_atf1450452214.593803:@expires_in0
|
@@ -1 +1 @@
|
|
1
|
-
o: ActiveSupport::Cache::Entry:@valueT:@created_atf
|
1
|
+
o: ActiveSupport::Cache::Entry:@valueT:@created_atf1450452208.2112489:@expires_in0
|
@@ -3,5 +3,5 @@ https:ET:
|
|
3
3
|
@user0:@password0:
|
4
4
|
@hostI"api.github.com;T:
|
5
5
|
@porti�:
|
6
|
-
@pathI"/users/byroot;T:@query0:@opaque0:@registry0:@fragment0:@parser0:headersIC:Faraday::Utils::Headers{ I"Accept;FI"#application/vnd.github.v3+json;TI"User-Agent;FI"Octokit Ruby Gem 4.1.1;TI"Content-Type;FI"application/json;TI"Authorization;TI"3token d5a01c65f69d86ecc55dccdf347b19d6f9a16b3b;T:@names{ I"accept;FI"Accept;FI"user-agent;FI"User-Agent;FI"content-type;FI"Content-Type;FI"authorization;T@{:statusi�: body"e{"login":"byroot","id":44640,"avatar_url":"https://avatars.githubusercontent.com/u/44640?v=3","gravatar_id":"","url":"https://api.github.com/users/byroot","html_url":"https://github.com/byroot","followers_url":"https://api.github.com/users/byroot/followers","following_url":"https://api.github.com/users/byroot/following{/other_user}","gists_url":"https://api.github.com/users/byroot/gists{/gist_id}","starred_url":"https://api.github.com/users/byroot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/byroot/subscriptions","organizations_url":"https://api.github.com/users/byroot/orgs","repos_url":"https://api.github.com/users/byroot/repos","events_url":"https://api.github.com/users/byroot/events{/privacy}","received_events_url":"https://api.github.com/users/byroot/received_events","type":"User","site_admin":false,"name":"Jean Boussier","company":"Shopify","blog":null,"location":"Montréal, QC","email":"jean.boussier@gmail.com","hireable":true,"bio":null,"public_repos":99,"public_gists":35,"followers":
|
7
|
-
closeI"status;T"200 OK"x-ratelimit-limit" 5000"x-ratelimit-remaining"
|
6
|
+
@pathI"/users/byroot;T:@query0:@opaque0:@registry0:@fragment0:@parser0:headersIC:Faraday::Utils::Headers{ I"Accept;FI"#application/vnd.github.v3+json;TI"User-Agent;FI"Octokit Ruby Gem 4.1.1;TI"Content-Type;FI"application/json;TI"Authorization;TI"3token d5a01c65f69d86ecc55dccdf347b19d6f9a16b3b;T:@names{ I"accept;FI"Accept;FI"user-agent;FI"User-Agent;FI"content-type;FI"Content-Type;FI"authorization;T@{:statusi�: body"e{"login":"byroot","id":44640,"avatar_url":"https://avatars.githubusercontent.com/u/44640?v=3","gravatar_id":"","url":"https://api.github.com/users/byroot","html_url":"https://github.com/byroot","followers_url":"https://api.github.com/users/byroot/followers","following_url":"https://api.github.com/users/byroot/following{/other_user}","gists_url":"https://api.github.com/users/byroot/gists{/gist_id}","starred_url":"https://api.github.com/users/byroot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/byroot/subscriptions","organizations_url":"https://api.github.com/users/byroot/orgs","repos_url":"https://api.github.com/users/byroot/repos","events_url":"https://api.github.com/users/byroot/events{/privacy}","received_events_url":"https://api.github.com/users/byroot/received_events","type":"User","site_admin":false,"name":"Jean Boussier","company":"Shopify","blog":null,"location":"Montréal, QC","email":"jean.boussier@gmail.com","hireable":true,"bio":null,"public_repos":99,"public_gists":35,"followers":69,"following":21,"created_at":"2009-01-06T19:11:43Z","updated_at":"2015-12-11T07:54:23Z"}:response_headersIC;{I"server;T"GitHub.comI" date;T""Fri, 18 Dec 2015 13:44:28 GMTI"content-type;T"$application/json; charset=utf-8I"transfer-encoding;T"chunkedI"connection;T"
|
7
|
+
closeI"status;T"200 OK"x-ratelimit-limit" 5000"x-ratelimit-remaining" 4997"x-ratelimit-reset"1450449102I"cache-control;T"%private, max-age=60, s-maxage=60"last-modified""Fri, 11 Dec 2015 07:54:23 GMT" etag")W/"3346867990c0f80987426dafae0ae376""x-oauth-scopes"*admin:org_hook, admin:repo_hook, repo"x-accepted-oauth-scopes" userI" vary;T"AAccept, Authorization, Cookie, X-GitHub-OTP, Accept-Encoding"x-github-media-type"github.v3; format=json"%access-control-allow-credentials" true""access-control-expose-headers"�ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval" access-control-allow-origin"*I"content-security-policy;T"default-src 'none'I"strict-transport-security;T"1max-age=31536000; includeSubdomains; preloadI"x-content-type-options;T"nosniffI"x-frame-options;T" denyI"x-xss-protection;T"1; mode=blockI"x-served-by;T"%bae57931a6fe678a3dffe9be8e7819c8I"x-github-request-id;T"$51DC5D4C:1D25E:8A66308:56740DBC;{I"server;T@!I" date;T@#I"content-type;T@%I"transfer-encoding;T@'I"connection;T@)I"status;T@+"x-ratelimit-limit@-"x-ratelimit-remaining@/"x-ratelimit-reset@1I"cache-control;T@3"last-modified@5" etag@7"x-oauth-scopes@9"x-accepted-oauth-scopes@;I" vary;T@="x-github-media-type@?"%access-control-allow-credentials@A""access-control-expose-headers@C" access-control-allow-origin@EI"content-security-policy;T@GI"strict-transport-security;T@II"x-content-type-options;T@KI"x-frame-options;T@MI"x-xss-protection;T@OI"x-served-by;T@QI"x-github-request-id;T@S:@created_atf1450446268.464461:@expires_in0
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
I"�/Users/byroot/workspace/shopify/shipit-engine/app/assets/javascripts/shipit/deploy.js.coffee?type=application/javascript&pipeline=self&id=e801e7b72e2f3a95a14d29d73a57dbe2ef4c96e46c175b99568f1e431785fbd7:ET
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
I"�/Users/byroot/workspace/shopify/shipit-engine/app/assets/javascripts/shipit.js.coffee?type=application/javascript&id=cb9c9e0f0c0a6874005febc8acbfb2e3d2d934bbc9653cfb03156a32c8a068ed:ET
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
I"�/Users/byroot/workspace/shopify/shipit-engine/app/assets/javascripts/shipit/stacks.js.coffee?type=application/javascript&pipeline=self&id=7932444309945588ef0cc9ba293b8f91f22401a626604d2c92a4daf781fc7c00:ET
|
Binary file
|
Binary file
|
@@ -0,0 +1,64 @@
|
|
1
|
+
I"�(function() {
|
2
|
+
jQuery(function($) {
|
3
|
+
var dismissIgnoreCiMessage, displayIgnoreCiMessage, getLocalStorageKey, listenToEventSource, retries, updatePage;
|
4
|
+
displayIgnoreCiMessage = function() {
|
5
|
+
var ignoreCiMessage;
|
6
|
+
ignoreCiMessage = $(".ignoring-ci");
|
7
|
+
if (!ignoreCiMessage) {
|
8
|
+
return;
|
9
|
+
}
|
10
|
+
$('.dismiss-ignore-ci-warning').click(function(event) {
|
11
|
+
event.preventDefault();
|
12
|
+
return dismissIgnoreCiMessage();
|
13
|
+
});
|
14
|
+
if (localStorage.getItem(getLocalStorageKey())) {
|
15
|
+
return ignoreCiMessage.hide();
|
16
|
+
}
|
17
|
+
};
|
18
|
+
dismissIgnoreCiMessage = function() {
|
19
|
+
var ignoreCiMessage;
|
20
|
+
localStorage.setItem(getLocalStorageKey(), true);
|
21
|
+
ignoreCiMessage = $(".ignoring-ci");
|
22
|
+
if (ignoreCiMessage) {
|
23
|
+
return ignoreCiMessage.hide();
|
24
|
+
}
|
25
|
+
};
|
26
|
+
getLocalStorageKey = function() {
|
27
|
+
var stackName;
|
28
|
+
stackName = $('.repo-name').data('repo-full-name');
|
29
|
+
return "ignoreCIDismissed" + stackName;
|
30
|
+
};
|
31
|
+
displayIgnoreCiMessage();
|
32
|
+
updatePage = function(message) {
|
33
|
+
var payload;
|
34
|
+
payload = JSON.parse(message.data);
|
35
|
+
return $('[data-layout-content]').load(payload.url + " [data-layout-content] > *", function() {
|
36
|
+
return $('time[data-time-ago]').timeago();
|
37
|
+
});
|
38
|
+
};
|
39
|
+
retries = 0;
|
40
|
+
listenToEventSource = function(url) {
|
41
|
+
var interval, source;
|
42
|
+
source = new EventSource(url);
|
43
|
+
source.addEventListener('stack.update', updatePage);
|
44
|
+
return interval = setInterval(function() {
|
45
|
+
switch (source.readyState) {
|
46
|
+
case source.CLOSED:
|
47
|
+
clearInterval(interval);
|
48
|
+
if (retries > 0) {
|
49
|
+
retries -= 1;
|
50
|
+
return listenToEventSource(url);
|
51
|
+
}
|
52
|
+
break;
|
53
|
+
default:
|
54
|
+
return retries = 2;
|
55
|
+
}
|
56
|
+
}, 30000);
|
57
|
+
};
|
58
|
+
return $('[data-event-stream]').each(function() {
|
59
|
+
return listenToEventSource($(this).data('event-stream'));
|
60
|
+
});
|
61
|
+
});
|
62
|
+
|
63
|
+
}).call(this);
|
64
|
+
:ET
|
Binary file
|
@@ -0,0 +1,105 @@
|
|
1
|
+
I"](function() {
|
2
|
+
var KEY, StackSearch, search,
|
3
|
+
slice = [].slice,
|
4
|
+
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
|
5
|
+
|
6
|
+
if (!String.prototype.contains) {
|
7
|
+
String.prototype.contains = function() {
|
8
|
+
var args;
|
9
|
+
args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
10
|
+
return this.indexOf.apply(this, args) !== -1;
|
11
|
+
};
|
12
|
+
}
|
13
|
+
|
14
|
+
KEY = {
|
15
|
+
UP: 38,
|
16
|
+
DOWN: 40,
|
17
|
+
ENTER: 13
|
18
|
+
};
|
19
|
+
|
20
|
+
StackSearch = (function() {
|
21
|
+
function StackSearch(root) {
|
22
|
+
this.onKeyUp = bind(this.onKeyUp, this);
|
23
|
+
this.$root = $(root);
|
24
|
+
this.$root.on('keyup', '.stack-search', this.onKeyUp);
|
25
|
+
this.$root.on('click', '.show-all-stacks', (function(_this) {
|
26
|
+
return function(event) {
|
27
|
+
_this.$root.find('.not-matching').removeClass('not-matching');
|
28
|
+
return event.preventDefault();
|
29
|
+
};
|
30
|
+
})(this));
|
31
|
+
}
|
32
|
+
|
33
|
+
StackSearch.prototype.onKeyUp = function(event) {
|
34
|
+
this.$items = this.$root.find('[data-search]');
|
35
|
+
switch (event.keyCode) {
|
36
|
+
case KEY.ENTER:
|
37
|
+
event.preventDefault();
|
38
|
+
return this.goToSelectedStack();
|
39
|
+
case KEY.UP:
|
40
|
+
event.preventDefault();
|
41
|
+
return this.selectPrevious();
|
42
|
+
case KEY.DOWN:
|
43
|
+
event.preventDefault();
|
44
|
+
return this.selectNext();
|
45
|
+
default:
|
46
|
+
return this.filterResults($.trim($(event.target).val()).toLowerCase());
|
47
|
+
}
|
48
|
+
};
|
49
|
+
|
50
|
+
StackSearch.prototype.filterResults = function(query) {
|
51
|
+
var $item, i, item, len, ref;
|
52
|
+
if (query) {
|
53
|
+
ref = this.$items;
|
54
|
+
for (i = 0, len = ref.length; i < len; i++) {
|
55
|
+
item = ref[i];
|
56
|
+
$item = $(item);
|
57
|
+
$item.toggleClass('not-matching', !$item.attr('data-search').toLowerCase().contains(query));
|
58
|
+
}
|
59
|
+
return this.selectFirst();
|
60
|
+
} else {
|
61
|
+
return this.$items.removeClass('not-matching');
|
62
|
+
}
|
63
|
+
};
|
64
|
+
|
65
|
+
StackSearch.prototype.selectFirst = function() {
|
66
|
+
return this.$items.removeClass('selected').first(':not(.not-matching)').addClass('selected');
|
67
|
+
};
|
68
|
+
|
69
|
+
StackSearch.prototype.selectNext = function() {
|
70
|
+
var $next;
|
71
|
+
$next = this.$items.filter('.selected').removeClass('selected').nextAll(':not(.not-matching)').first();
|
72
|
+
if (!$next.length) {
|
73
|
+
$next = this.$items.filter(':not(.not-matching)').first();
|
74
|
+
}
|
75
|
+
return $next.addClass('selected');
|
76
|
+
};
|
77
|
+
|
78
|
+
StackSearch.prototype.selectPrevious = function() {
|
79
|
+
var $previous;
|
80
|
+
$previous = this.$items.filter('.selected').removeClass('selected').prevAll(':not(.not-matching)').first();
|
81
|
+
if (!$previous.length) {
|
82
|
+
$previous = this.$items.filter(':not(.not-matching)').last();
|
83
|
+
}
|
84
|
+
return $previous.addClass('selected');
|
85
|
+
};
|
86
|
+
|
87
|
+
StackSearch.prototype.goToSelectedStack = function() {
|
88
|
+
var stack;
|
89
|
+
if (stack = this.$items.filter('.selected').filter(':not(.not-matching)').find('.commits-path').attr('href')) {
|
90
|
+
return window.location = stack;
|
91
|
+
}
|
92
|
+
};
|
93
|
+
|
94
|
+
return StackSearch;
|
95
|
+
|
96
|
+
})();
|
97
|
+
|
98
|
+
search = new StackSearch(document);
|
99
|
+
|
100
|
+
jQuery(function() {
|
101
|
+
return $('.stack-search').focus();
|
102
|
+
});
|
103
|
+
|
104
|
+
}).call(this);
|
105
|
+
:ET
|
@@ -0,0 +1,63 @@
|
|
1
|
+
I"�(function() {
|
2
|
+
var AbortButton,
|
3
|
+
bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
|
4
|
+
|
5
|
+
AbortButton = (function() {
|
6
|
+
var SELECTOR;
|
7
|
+
|
8
|
+
SELECTOR = '[data-action="abort"]';
|
9
|
+
|
10
|
+
AbortButton.listen = function() {
|
11
|
+
return $(document).on('click', SELECTOR, this.handle);
|
12
|
+
};
|
13
|
+
|
14
|
+
AbortButton.handle = function(event) {
|
15
|
+
var button;
|
16
|
+
event.preventDefault();
|
17
|
+
button = new AbortButton($(event.currentTarget));
|
18
|
+
return button.trigger();
|
19
|
+
};
|
20
|
+
|
21
|
+
function AbortButton($button) {
|
22
|
+
this.$button = $button;
|
23
|
+
this.reenable = bind(this.reenable, this);
|
24
|
+
this.waitForCompletion = bind(this.waitForCompletion, this);
|
25
|
+
this.url = this.$button.attr('href');
|
26
|
+
this.shouldRollback = this.$button.data('rollback');
|
27
|
+
}
|
28
|
+
|
29
|
+
AbortButton.prototype.trigger = function() {
|
30
|
+
if (this.isDisabled()) {
|
31
|
+
return false;
|
32
|
+
}
|
33
|
+
this.disable();
|
34
|
+
this.waitForCompletion();
|
35
|
+
return $.post(this.url).success(this.waitForCompletion).error(this.reenable);
|
36
|
+
};
|
37
|
+
|
38
|
+
AbortButton.prototype.waitForCompletion = function() {
|
39
|
+
return setTimeout(this.reenable, 3000);
|
40
|
+
};
|
41
|
+
|
42
|
+
AbortButton.prototype.reenable = function() {
|
43
|
+
this.$button.removeClass('pending btn-disabled');
|
44
|
+
return this.$button.siblings(SELECTOR).removeClass('btn-disabled');
|
45
|
+
};
|
46
|
+
|
47
|
+
AbortButton.prototype.disable = function() {
|
48
|
+
this.$button.addClass('pending btn-disabled');
|
49
|
+
return this.$button.siblings(SELECTOR).addClass('btn-disabled');
|
50
|
+
};
|
51
|
+
|
52
|
+
AbortButton.prototype.isDisabled = function() {
|
53
|
+
return this.$button.hasClass('btn-disabled');
|
54
|
+
};
|
55
|
+
|
56
|
+
return AbortButton;
|
57
|
+
|
58
|
+
})();
|
59
|
+
|
60
|
+
AbortButton.listen();
|
61
|
+
|
62
|
+
}).call(this);
|
63
|
+
:ET
|
@@ -0,0 +1 @@
|
|
1
|
+
I"�/Users/byroot/workspace/shopify/shipit-engine/app/assets/stylesheets/shipit.scss?type=text/css&pipeline=self&id=5ab1a7563ea0aadf184a79322a79375cfc7597015ffaeff5f6c4ca2f21a470d8:ET
|
@@ -0,0 +1 @@
|
|
1
|
+
I"�/Users/byroot/workspace/shopify/shipit-engine/app/assets/javascripts/shipit/checklist.js.coffee?type=application/javascript&pipeline=self&id=850bd6400f604ee915b919e7e6c70154e9d25c36c451bfeca5dd5f625206cd08:ET
|
Binary file
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
I"�/Users/byroot/workspace/shopify/shipit-engine/app/assets/javascripts/shipit.js.coffee?type=application/javascript&pipeline=self&id=24511bcd41f118ecf97e8676619831575008468c1ce5e4c5da5bbf3039289430:ET
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
I"�/Users/byroot/workspace/shopify/shipit-engine/app/assets/stylesheets/shipit.scss?type=text/css&id=0e0cdb622804f936d15f86b2ecf05103fcc8631a0be4ab997467d24cc9f69087:ET
|
@@ -0,0 +1 @@
|
|
1
|
+
I"�/Users/byroot/workspace/shopify/shipit-engine/app/assets/javascripts/shipit/search.js.coffee?type=application/javascript&pipeline=self&id=7d129c16f454fe7308f99e2a9a1723106effe8492047a2569cde6b296e13ff5c:ET
|
Binary file
|
@@ -0,0 +1,17 @@
|
|
1
|
+
I"�(function() {
|
2
|
+
var $document, toggleDeployButton;
|
3
|
+
|
4
|
+
$document = $(document);
|
5
|
+
|
6
|
+
toggleDeployButton = function() {
|
7
|
+
return $('.trigger-deploy').toggleClass('disabled btn--disabled', !!$(':checkbox[name=checklist]:not(:checked)').length);
|
8
|
+
};
|
9
|
+
|
10
|
+
$document.on('change', ':checkbox[name=checklist]', toggleDeployButton);
|
11
|
+
|
12
|
+
jQuery(function($) {
|
13
|
+
return toggleDeployButton();
|
14
|
+
});
|
15
|
+
|
16
|
+
}).call(this);
|
17
|
+
:ET
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
I"�/Users/byroot/workspace/shopify/shipit-engine/app/assets/javascripts/shipit/flash.js.coffee?type=application/javascript&pipeline=self&id=4ce1955dc15d697eae2e858848bbb71a23ca35eb50c83ded219ccac4216c5f55:ET
|
@@ -0,0 +1 @@
|
|
1
|
+
"%7\3��o�l<c�6rM+��>�>�<�Z9
|
@@ -0,0 +1,20 @@
|
|
1
|
+
I"+(function() {
|
2
|
+
$(document).on('click', '.disabled, .btn--disabled', function(event) {
|
3
|
+
return event.preventDefault();
|
4
|
+
});
|
5
|
+
|
6
|
+
jQuery(function() {
|
7
|
+
var $button, $notificationNotice;
|
8
|
+
$notificationNotice = $('.notifications');
|
9
|
+
if ($.notifyCheck() === $.NOTIFY_NOT_ALLOWED) {
|
10
|
+
$button = $notificationNotice.find('button');
|
11
|
+
$button.on('click', function() {
|
12
|
+
$.notifyRequest();
|
13
|
+
return $notificationNotice.addClass('hidden');
|
14
|
+
});
|
15
|
+
return $notificationNotice.removeClass('hidden');
|
16
|
+
}
|
17
|
+
});
|
18
|
+
|
19
|
+
}).call(this);
|
20
|
+
:ET
|
Binary file
|
data/test/fixtures/stacks.yml
CHANGED
data/test/models/commits_test.rb
CHANGED
@@ -262,11 +262,23 @@ class CommitsTest < ActiveSupport::TestCase
|
|
262
262
|
end
|
263
263
|
|
264
264
|
test "#deployable? is true if commit status is 'success'" do
|
265
|
-
|
265
|
+
assert_predicate commits(:cyclimse_first), :deployable?
|
266
266
|
end
|
267
267
|
|
268
268
|
test "#deployable? is true if stack is set to 'ignore_ci'" do
|
269
|
-
|
269
|
+
commit = commits(:first)
|
270
|
+
commit.stack.update!(ignore_ci: true)
|
271
|
+
assert_predicate commit, :deployable?
|
272
|
+
end
|
273
|
+
|
274
|
+
test "#deployable? is false if commit has no statuses" do
|
275
|
+
refute_predicate commits(:fifth), :deployable?
|
276
|
+
end
|
277
|
+
|
278
|
+
test "#deployable? is false if a required status is missing" do
|
279
|
+
commit = commits(:cyclimse_first)
|
280
|
+
commit.stack.stubs(:required_statuses).returns(%w(ci/very-important))
|
281
|
+
refute_predicate commit, :deployable?
|
270
282
|
end
|
271
283
|
|
272
284
|
expected_webhook_transitions = { # we expect deployable_status to fire on these transitions, and not on any others
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class MissingStatusTest < ActiveSupport::TestCase
|
4
|
+
setup do
|
5
|
+
@real_status = statuses(:first_pending)
|
6
|
+
@status = MissingStatus.new(@real_status, %w(ci/very-important style/very-important-too))
|
7
|
+
end
|
8
|
+
|
9
|
+
test "#state is 'missing'" do
|
10
|
+
assert_equal 'missing', @status.state
|
11
|
+
end
|
12
|
+
|
13
|
+
test "#description explains the situation" do
|
14
|
+
message = 'ci/very-important and style/very-important-too are required for deploy but were not sent'
|
15
|
+
assert_equal message, @status.description
|
16
|
+
end
|
17
|
+
|
18
|
+
test "#success? is false" do
|
19
|
+
refute_predicate @status, :success?
|
20
|
+
end
|
21
|
+
end
|
@@ -3,7 +3,7 @@ require 'test_helper'
|
|
3
3
|
class StatusGroupTest < ActiveSupport::TestCase
|
4
4
|
setup do
|
5
5
|
@commit = commits(:second)
|
6
|
-
@group = StatusGroup.new(@commit)
|
6
|
+
@group = StatusGroup.new(@commit.significant_status, @commit.visible_statuses)
|
7
7
|
end
|
8
8
|
|
9
9
|
test "#description is a summary of the statuses" do
|