shipit-engine 0.4.8 → 0.4.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/shipit_controller.rb +1 -1
  3. data/db/migrate/20151112152113_reduce_tasks_stats_size.rb +5 -0
  4. data/lib/shipit/version.rb +1 -1
  5. data/test/controllers/stacks_controller_test.rb +1 -1
  6. data/test/dummy/db/development.sqlite3 +0 -0
  7. data/test/dummy/db/test.sqlite3 +0 -0
  8. data/test/dummy/log/development.log +14492 -0
  9. data/test/dummy/log/test.log +41089 -0
  10. data/test/dummy/tmp/cache/5F5/7B0/task%3A644540443%3Apid +1 -1
  11. data/test/dummy/tmp/cache/5F7/AA0/task%3A496901070%3Apid +1 -1
  12. data/test/dummy/tmp/cache/5FD/BF0/task%3A616453971%3Apid +1 -1
  13. data/test/dummy/tmp/cache/7E3/0B0/stacks%3A1%3Aci_enabled +1 -1
  14. data/test/dummy/tmp/cache/7E4/190/stacks%3A2%3Aci_enabled +1 -1
  15. data/test/dummy/tmp/cache/7E5/270/stacks%3A3%3Aci_enabled +1 -1
  16. data/test/dummy/tmp/cache/98C/C60/stacks%3A616453971%3Aci_enabled +1 -1
  17. data/test/dummy/tmp/cache/991/020/stacks%3A805262699%3Aci_enabled +1 -1
  18. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/-XhVyuOLxQ9lICl9M65_yrNHAPCvvhLozbIJEzLHAVo.cache +0 -0
  19. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/0vd_N1Hic9fb8HYrW8gwl41NWLFBJtesVNdYEVHPdDY.cache +0 -0
  20. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/1y_ZL7effP9hskGHi26SSssmo45A6Pur9E2_7b2tb3Y.cache +0 -0
  21. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/2BehGSEBw23wTmFhrEppo8dGMqYx9_h1HnPnpVKYvAE.cache +0 -0
  22. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/2cYitdxZWAsgjTbp-d9mHRO-TvA94L2oVgM1ismexb0.cache +0 -0
  23. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/4RJoPjM6TIIfRH-YZz3j1sTsIOuBG17A616Jttioveo.cache +0 -0
  24. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/6EBcPORAyq-H-k9xyn9kcKdLD4DpeEA8z7QBajAasKk.cache +1 -0
  25. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/6dmTJIeVb_clll5M5sXaue6G5SbKbQkanhoJ3XPx5Io.cache +0 -0
  26. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/8U8wM23CZGXEKMtkHQTSwImnNwwQqmwOO8-G_5MYeuw.cache +1 -0
  27. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/9-m6kv81IS8A8zfr5Sn4ZIj9dGygLnLan_zfFa7bO4E.cache +0 -0
  28. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/9MschgQ4_HiW3Z6u4iBCgY103zENimZpNhXFjgkIF_o.cache +1 -0
  29. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/9Qz2pIp-mxjL8bu_dTMa8KVHuy8Fm55SOWS9d4jlrxQ.cache +52 -0
  30. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/AabXYXVOc57olkgEpqzBgoul30nc0U4ekwyqkJgu4l4.cache +0 -0
  31. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/DQDt7RsWmW89tgReZALUHn4nJbaBCE-_GKfSyocqwzw.cache +0 -0
  32. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/DxUdnaAU8RZCRXc8ABiCldVnHry4bFO3EPrCohq4FEI.cache +0 -0
  33. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/Ed5D-0u0BKMms6OQSiLZLSYbzsvm-_TEiZ97ueqpY44.cache +0 -0
  34. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/GjzHbFeaFoOvC8CJaPq8D7peK9Y6BleJruxF8TH2Cl0.cache +64 -0
  35. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/Hcs7avkdizKbFbJWWzjMGRTVn0mWGc5zbGy3rcHDF78.cache +0 -0
  36. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/IRSIXqzwg_kQIEO5syk6Ej1l4XLi3IcYB70A5IHctAA.cache +105 -0
  37. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/JGCxw9zP8hS9l1Ho313CAIdBiHYi68-xJ1haqSAaalQ.cache +28 -0
  38. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/JQ8n4TH3kuPzDkGXdft77ktId3xDdNuPysNdAIrlVsw.cache +63 -0
  39. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/KdooW3a2i6i7_5PjBcoeGqmFBMNJKlGNoYdGtdmdods.cache +30 -0
  40. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/LKVcVo5127myQDUf1RPyi0Og8TrHa5Zr9ohfo0JlhEA.cache +35 -0
  41. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/MwX_oS7STvHHd11eeacJJMThTPAsd8c0-5kPXpH0BKY.cache +1 -0
  42. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/Nud6-hEkHwBvKLpMMjnSejU9P9d-ONvOznYGWNVJqvc.cache +0 -0
  43. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/PFwzNcPXocqNBN-T-R0IcLMpGnPueKC-frMqt7ydXgE.cache +17 -0
  44. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/QCr3WPcPkQqDKsm0UADGgT1VZJ_vYA7wXPzD-ISACcE.cache +0 -0
  45. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/Q_nuuoYmC6r9chLr10vE1HDOoVcMTQCQ8QaustQA078.cache +1 -0
  46. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/RCwEyQE4DefenQqdSqnh0WV6Nl6xbqJlYaUK6ztHGuM.cache +1 -0
  47. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/RacQBgjyAwx_GgAY811XGnBflvfM_STswwRJwcPQxv0.cache +1 -0
  48. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/SpC9c458aDyelAUhVbFaSRU6pe6xNk3VYs_Qq8B_yiM.cache +0 -0
  49. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/TKeNIG8auoAZfh_l71khs3nB3_Xs-YieTJ1OVKc5T3o.cache +0 -0
  50. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/TZ9u5d2xfH0Hhr6drrkdyg0p4BGQWEqAt5G6jXH2SCM.cache +1 -0
  51. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/UjjjQ0uu3m1EAa2pZII56gqMK5kkqIJAuRjIC_xEUh0.cache +0 -0
  52. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/VKZjmgNi6nsZ_lenJip0iNammCuBNW2z5oIvRniTJ-w.cache +0 -0
  53. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/W3JpGFR_4F0RfRrDTsXyU0Nio5OKFvmvZUeb81tt4RM.cache +9 -0
  54. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/WhTkOXhnBVdZN7CDX7QGjRSo7H2jPG8oDa1RT3kRqEI.cache +0 -0
  55. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/Wv4EOarouKJg2_O41NPnoWTZxpM9eZFMfidiK-_SkQA.cache +0 -0
  56. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/XUfFYpuckB2d3prNDaCDT_AQBjBSvFdE3DExflZjzuQ.cache +128 -0
  57. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/ZFXLwZ6yzf3Z2ZWX2hUb4jJZCBU-lBMwPbQMKSzNNvA.cache +11 -0
  58. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/Zm7XUcI996G2YV1E60HsUmJEaqrG5rRGarZQjkMkEqw.cache +0 -0
  59. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/_t5QFEhnjjkO_god2dG6L5DNzghprl7r8vraXXUYSGQ.cache +1 -0
  60. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/a2Gk1Fj6ihYGDqwkTj0TDvalu8Szvd5gyoiz0iH7oHI.cache +0 -0
  61. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/eRw6YZNFr_Y68h7DEgeRs11JCF41N0HsHklUT8qQNFU.cache +0 -0
  62. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/g86U7e1QqDQ4ZmShNbO0pUjlP-t04lR6gLlbDaCVCgw.cache +0 -0
  63. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/gMmdmmexTGqU7e5fNGQ1TC4ujI-DqBCgVtM4ASKKytw.cache +0 -0
  64. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/gMmpywAwZ6bKN7vqWoP-IDxBfLoOGUhRaW3oY_sELsE.cache +0 -0
  65. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/gNv5lItMIlrPt1bx4PK5w53tEGwzDhTnwDvx6KeR2ZQ.cache +1 -0
  66. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/g_OnKtCoJHs6Vwslpt6jHI8P22LBegrtDW6r1fzg7ak.cache +1 -0
  67. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/jr0OQHxL2m9s4ytG85H-zzyTHIrdPsnUp0sU15kEqVQ.cache +145 -0
  68. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/mAG0HzHvBku4frSoq_P9zd5FRLih9ph-p84ocp0CBN0.cache +1 -0
  69. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/mAcfXZ-lWbAGimbbd0XbJ9v8p6d3ot2X-FBpQSSYtyc.cache +1 -0
  70. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/nrV5QMx0DB1aSJ1uDwdmc-MAmL4N3bMTzmPMbMbWtnc.cache +0 -0
  71. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/oNQ876QVmb8eSyzSt8RPtKyUPX4KUSsOWYuhGOtYCJk.cache +1 -0
  72. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/owLq3jYdcnrpSkEGnMjO2C3EdNP8-fR8Z1H4EAa_oUQ.cache +1 -0
  73. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/p8PoBJeYtCNp2Cq6WuU_qEJU7rncSDU5TzkUFKkVQHA.cache +17 -0
  74. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/sR8yfgzv9nmMx8vLv9PCe7_fTyO0pIiyY4CCR25jopA.cache +0 -0
  75. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/uTu85-gh6J9wpl0OO_2DRzg-FvFWfusDoERCnucOg2Y.cache +1 -0
  76. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/uiH5GPD0so8JcSwrfuudyrcwDv6pwOU-G0yoXt5V6q0.cache +0 -0
  77. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/vaYm-hYQGfqQV7izliGnlCuQ4Ot8x_0PYDRFpHE4O1A.cache +20 -0
  78. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/whTZ5nBzqTzMtlljJzRtBpjEK69EeCSXcZjIXfgYGN8.cache +0 -0
  79. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/wiQFE8Zd8qIhUAtCW5QRiGHH2QOhSVBF71yJWjpvceY.cache +0 -0
  80. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/wx25QHoWVG1N4sek-Gl6v5tL052-drOLmDTyhzmUMJg.cache +0 -0
  81. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/x_VNON7YJCfpXT3e11ycWhruUQzTjee2GyYCoKCQTYo.cache +1 -0
  82. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/yVBVZ0mwLoGexBn4BqkI4IP0EHm6cgSJxDl13lutNAY.cache +98 -0
  83. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/zwA-o2IDU0VCCaDQj3nnLvhJAI_HFO6x2hIxWqAaKAY.cache +0 -0
  84. metadata +103 -4
@@ -1,2 +1,2 @@
1
- o: ActiveSupport::Cache::Entry: @valuei/:@created_atf1447428198.6347:@expires_inf
1
+ o: ActiveSupport::Cache::Entry: @valuei/:@created_atf1449161893.645691:@expires_inf
2
2
  3.6e3
@@ -1,2 +1,2 @@
1
- o: ActiveSupport::Cache::Entry: @valueiWM:@created_atf1447428197.126276:@expires_inf
1
+ o: ActiveSupport::Cache::Entry: @valuei��:@created_atf1449161894.402316:@expires_inf
2
2
  3.6e3
@@ -1,2 +1,2 @@
1
- o: ActiveSupport::Cache::Entry: @valuei/:@created_atf1447428198.7964008:@expires_inf
1
+ o: ActiveSupport::Cache::Entry: @valuei/:@created_atf1449161892.203928:@expires_inf
2
2
  3.6e3
@@ -1 +1 @@
1
- o: ActiveSupport::Cache::Entry: @valueT:@created_atf1446562280.0650508:@expires_in0
1
+ o: ActiveSupport::Cache::Entry: @valueT:@created_atf1447784377.539061:@expires_in0
@@ -1 +1 @@
1
- o: ActiveSupport::Cache::Entry: @valueT:@created_atf1446562281.558563:@expires_in0
1
+ o: ActiveSupport::Cache::Entry: @valueT:@created_atf1447784378.9457989:@expires_in0
@@ -1 +1 @@
1
- o: ActiveSupport::Cache::Entry: @valueT:@created_atf1446562283.093948:@expires_in0
1
+ o: ActiveSupport::Cache::Entry: @valueT:@created_atf1447784380.354361:@expires_in0
@@ -1 +1 @@
1
- o: ActiveSupport::Cache::Entry: @valueT:@created_atf1447428199.963833:@expires_in0
1
+ o: ActiveSupport::Cache::Entry: @valueT:@created_atf1449161896.1173482:@expires_in0
@@ -1 +1 @@
1
- o: ActiveSupport::Cache::Entry: @valueT:@created_atf1447428195.328033:@expires_in0
1
+ o: ActiveSupport::Cache::Entry: @valueT:@created_atf1449161896.0518699:@expires_in0
@@ -0,0 +1 @@
1
+ I"�/Users/byroot/workspace/shopify/shipit-engine/app/assets/javascripts/shipit/search.js.coffee?type=application/javascript&pipeline=self&id=da73b00786d0ccb1a87f3cb4fcc460935655150322bd38ec9f2fe6388e03f2d6:ET
@@ -0,0 +1 @@
1
+ I"�/Users/byroot/workspace/shopify/shipit-engine/app/assets/javascripts/task/ansi_colors.js.coffee?type=application/javascript&pipeline=self&id=fb8817bc2f28af666d38eea87fb5083429eeb66e474222bfac056f81241ef763:ET
@@ -0,0 +1 @@
1
+ I"�/Users/byroot/workspace/shopify/shipit-engine/app/assets/javascripts/shipit.js.coffee?type=application/javascript&id=bfeb53f0ea29e4e0615716d6ea2b512abd27a6094805011298d95280d90781b9:ET
@@ -0,0 +1,52 @@
1
+ I"�(function() {
2
+ var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
3
+
4
+ this.Notifications = (function() {
5
+ var IMAGES;
6
+
7
+ IMAGES = {
8
+ success: '/assets/deploy_success.jpg',
9
+ failed: '/assets/deploy_failed.jpg',
10
+ error: '/assets/deploy_error.jpg'
11
+ };
12
+
13
+ Notifications.init = function(outputStream, task) {
14
+ return outputStream.addEventListener('status', new this(task).statusUpdated);
15
+ };
16
+
17
+ function Notifications(arg) {
18
+ this.repo = arg.repo, this.description = arg.description;
19
+ this.statusUpdated = bind(this.statusUpdated, this);
20
+ }
21
+
22
+ Notifications.prototype.statusUpdated = function(status) {
23
+ if (!(status in IMAGES)) {
24
+ return;
25
+ }
26
+ if ($.notifyCheck() !== $.NOTIFY_ALLOWED) {
27
+ return;
28
+ }
29
+ return $.notify(IMAGES[status], this.repo, this.message(status));
30
+ };
31
+
32
+ Notifications.prototype.message = function(status) {
33
+ var deployShortSha;
34
+ deployShortSha = $('.short-sha').text();
35
+ switch (status) {
36
+ case 'success':
37
+ return "Your " + this.description + " was successful!";
38
+ case 'failed':
39
+ return "Your " + this.description + " failed.";
40
+ case 'error':
41
+ return "Error during " + this.description + ".";
42
+ default:
43
+ return "Your " + this.description + " ended with status: " + status;
44
+ }
45
+ };
46
+
47
+ return Notifications;
48
+
49
+ })();
50
+
51
+ }).call(this);
52
+ :ET
@@ -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
@@ -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,28 @@
1
+ I"N(function() {
2
+ this.OutputStream = new Stream;
3
+
4
+ jQuery(function() {
5
+ var $code, task, tty;
6
+ OutputStream.addEventListener('status', function(status, response) {
7
+ $('[data-status]').attr('data-status', status);
8
+ if (status === 'aborted' && response.rollback_url) {
9
+ return window.location = response.rollback_url;
10
+ }
11
+ });
12
+ tty = new TTY($('body'));
13
+ OutputStream.addEventListener('chunk', tty.appendChunk);
14
+ if (task = $('[data-task]').data('task')) {
15
+ Notifications.init(OutputStream, task);
16
+ }
17
+ $code = $('code');
18
+ OutputStream.init({
19
+ status: $code.closest('[data-status]').data('status'),
20
+ url: $code.data('next-chunks-url'),
21
+ text: tty.popInitialOutput()
22
+ });
23
+ StickyElement.init('.deploy-banner');
24
+ return StickyElement.init('.sidebar');
25
+ });
26
+
27
+ }).call(this);
28
+ :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,30 @@
1
+ I"�(function() {
2
+ this.Sidebar = (function() {
3
+ var INSTANCE;
4
+
5
+ INSTANCE = null;
6
+
7
+ Sidebar.instance = function() {
8
+ return INSTANCE || (INSTANCE = new this($('.sidebar'), $('.sidebar-plugins')));
9
+ };
10
+
11
+ Sidebar.newWidgetContainer = function() {
12
+ return Sidebar.instance().newWidgetContainer();
13
+ };
14
+
15
+ function Sidebar($sidebar, $container) {
16
+ this.$sidebar = $sidebar;
17
+ this.$container = $container;
18
+ }
19
+
20
+ Sidebar.prototype.newWidgetContainer = function() {
21
+ this.$sidebar.addClass('enabled');
22
+ return $(document.createElement('div')).addClass('sidebar-plugin').prependTo(this.$container);
23
+ };
24
+
25
+ return Sidebar;
26
+
27
+ })();
28
+
29
+ }).call(this);
30
+ :ET
@@ -0,0 +1,35 @@
1
+ I"�(function() {
2
+ var bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
3
+
4
+ this.StickyElement = (function() {
5
+ StickyElement.init = function(selector) {
6
+ var $element;
7
+ $element = $(selector);
8
+ if (!$element.length) {
9
+ return;
10
+ }
11
+ return new this($element);
12
+ };
13
+
14
+ function StickyElement($element1) {
15
+ this.$element = $element1;
16
+ this.refresh = bind(this.refresh, this);
17
+ this.staticElementTop = this.$element.position().top;
18
+ this.refresh();
19
+ }
20
+
21
+ StickyElement.prototype.refresh = function() {
22
+ this.toggleStickyClass();
23
+ return window.requestAnimationFrame(this.refresh);
24
+ };
25
+
26
+ StickyElement.prototype.toggleStickyClass = function() {
27
+ return this.$element.toggleClass('sticky', window.pageYOffset >= this.staticElementTop);
28
+ };
29
+
30
+ return StickyElement;
31
+
32
+ })();
33
+
34
+ }).call(this);
35
+ :ET