opsask 2.0.0

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.
Files changed (63) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +14 -0
  3. data/.yardoc/checksums +4 -0
  4. data/.yardoc/object_types +0 -0
  5. data/.yardoc/objects/root.dat +0 -0
  6. data/.yardoc/proxy_types +0 -0
  7. data/Gemfile +15 -0
  8. data/Gemfile.lock +75 -0
  9. data/LICENSE +13 -0
  10. data/Rakefile +30 -0
  11. data/Readme.md +3 -0
  12. data/VERSION +1 -0
  13. data/bin/opsask +4 -0
  14. data/lib/opsask/app.rb +540 -0
  15. data/lib/opsask/main.rb +54 -0
  16. data/lib/opsask/metadata.rb +29 -0
  17. data/lib/opsask.rb +3 -0
  18. data/opsask.gemspec +29 -0
  19. data/public/css/foundation.css +5068 -0
  20. data/public/css/foundation.min.css +1 -0
  21. data/public/css/normalize.css +410 -0
  22. data/public/css/style.css +152 -0
  23. data/public/favicon.ico +0 -0
  24. data/public/fonts/DINMittelschriftStd.woff +0 -0
  25. data/public/img/.gitkeep +1 -0
  26. data/public/js/foundation/foundation.abide.js +256 -0
  27. data/public/js/foundation/foundation.accordion.js +49 -0
  28. data/public/js/foundation/foundation.alert.js +37 -0
  29. data/public/js/foundation/foundation.clearing.js +485 -0
  30. data/public/js/foundation/foundation.dropdown.js +208 -0
  31. data/public/js/foundation/foundation.equalizer.js +64 -0
  32. data/public/js/foundation/foundation.interchange.js +326 -0
  33. data/public/js/foundation/foundation.joyride.js +848 -0
  34. data/public/js/foundation/foundation.js +587 -0
  35. data/public/js/foundation/foundation.magellan.js +171 -0
  36. data/public/js/foundation/foundation.offcanvas.js +39 -0
  37. data/public/js/foundation/foundation.orbit.js +464 -0
  38. data/public/js/foundation/foundation.reveal.js +399 -0
  39. data/public/js/foundation/foundation.tab.js +58 -0
  40. data/public/js/foundation/foundation.tooltip.js +215 -0
  41. data/public/js/foundation/foundation.topbar.js +387 -0
  42. data/public/js/foundation/jquery.cookie.js +8 -0
  43. data/public/js/foundation.min.js +10 -0
  44. data/public/js/opsask.js +19 -0
  45. data/public/js/vendor/fastclick.js +9 -0
  46. data/public/js/vendor/jquery.cookie.js +8 -0
  47. data/public/js/vendor/jquery.js +26 -0
  48. data/public/js/vendor/modernizr.js +8 -0
  49. data/public/js/vendor/placeholder.js +2 -0
  50. data/tasks/generate-email-summary.rb +73 -0
  51. data/tasks/send-email-summary.sh +13 -0
  52. data/views/_components.erb +6 -0
  53. data/views/_count.erb +11 -0
  54. data/views/_flash.erb +3 -0
  55. data/views/_form.erb +37 -0
  56. data/views/_queue.erb +16 -0
  57. data/views/agile.erb +6 -0
  58. data/views/glance.erb +19 -0
  59. data/views/index.erb +27 -0
  60. data/views/layout.erb +43 -0
  61. data/views/stragglers.erb +6 -0
  62. data/views/untracked.erb +6 -0
  63. metadata +217 -0
@@ -0,0 +1,64 @@
1
+ ;(function ($, window, document, undefined) {
2
+ 'use strict';
3
+
4
+ Foundation.libs.equalizer = {
5
+ name : 'equalizer',
6
+
7
+ version : '5.1.1',
8
+
9
+ settings : {
10
+ use_tallest: true,
11
+ before_height_change: $.noop,
12
+ after_height_change: $.noop
13
+ },
14
+
15
+ init : function (scope, method, options) {
16
+ this.bindings(method, options);
17
+ this.reflow();
18
+ },
19
+
20
+ events : function () {
21
+ this.S(window).off('.equalizer').on('resize.fndtn.equalizer', function(e){
22
+ this.reflow();
23
+ }.bind(this));
24
+ },
25
+
26
+ equalize: function(equalizer) {
27
+ var isStacked = false,
28
+ vals = equalizer.find('[' + this.attr_name() + '-watch]'),
29
+ firstTopOffset = vals.first().offset().top,
30
+ settings = equalizer.data(this.attr_name(true)+'-init');
31
+
32
+ if (vals.length === 0) return;
33
+ settings.before_height_change();
34
+ equalizer.trigger('before-height-change');
35
+ vals.height('inherit');
36
+ vals.each(function(){
37
+ var el = $(this);
38
+ if (el.offset().top !== firstTopOffset) {
39
+ isStacked = true;
40
+ }
41
+ });
42
+ if (isStacked) return;
43
+
44
+ var heights = vals.map(function(){ return $(this).outerHeight() });
45
+ if (settings.use_tallest) {
46
+ var max = Math.max.apply(null, heights);
47
+ vals.height(max);
48
+ } else {
49
+ var min = Math.min.apply(null, heights);
50
+ vals.height(min);
51
+ }
52
+ settings.after_height_change();
53
+ equalizer.trigger('after-height-change');
54
+ },
55
+
56
+ reflow : function () {
57
+ var self = this;
58
+
59
+ this.S('[' + this.attr_name() + ']', this.scope).each(function(){
60
+ self.equalize($(this));
61
+ });
62
+ }
63
+ };
64
+ }(jQuery, this, this.document));
@@ -0,0 +1,326 @@
1
+ ;(function ($, window, document, undefined) {
2
+ 'use strict';
3
+
4
+ Foundation.libs.interchange = {
5
+ name : 'interchange',
6
+
7
+ version : '5.1.1',
8
+
9
+ cache : {},
10
+
11
+ images_loaded : false,
12
+ nodes_loaded : false,
13
+
14
+ settings : {
15
+ load_attr : 'interchange',
16
+
17
+ named_queries : {
18
+ 'default' : 'only screen',
19
+ small : Foundation.media_queries.small,
20
+ medium : Foundation.media_queries.medium,
21
+ large : Foundation.media_queries.large,
22
+ xlarge : Foundation.media_queries.xlarge,
23
+ xxlarge: Foundation.media_queries.xxlarge,
24
+ landscape : 'only screen and (orientation: landscape)',
25
+ portrait : 'only screen and (orientation: portrait)',
26
+ retina : 'only screen and (-webkit-min-device-pixel-ratio: 2),' +
27
+ 'only screen and (min--moz-device-pixel-ratio: 2),' +
28
+ 'only screen and (-o-min-device-pixel-ratio: 2/1),' +
29
+ 'only screen and (min-device-pixel-ratio: 2),' +
30
+ 'only screen and (min-resolution: 192dpi),' +
31
+ 'only screen and (min-resolution: 2dppx)'
32
+ },
33
+
34
+ directives : {
35
+ replace: function (el, path, trigger) {
36
+ // The trigger argument, if called within the directive, fires
37
+ // an event named after the directive on the element, passing
38
+ // any parameters along to the event that you pass to trigger.
39
+ //
40
+ // ex. trigger(), trigger([a, b, c]), or trigger(a, b, c)
41
+ //
42
+ // This allows you to bind a callback like so:
43
+ // $('#interchangeContainer').on('replace', function (e, a, b, c) {
44
+ // console.log($(this).html(), a, b, c);
45
+ // });
46
+
47
+ if (/IMG/.test(el[0].nodeName)) {
48
+ var orig_path = el[0].src;
49
+
50
+ if (new RegExp(path, 'i').test(orig_path)) return;
51
+
52
+ el[0].src = path;
53
+
54
+ return trigger(el[0].src);
55
+ }
56
+ var last_path = el.data(this.data_attr + '-last-path');
57
+
58
+ if (last_path == path) return;
59
+
60
+ return $.get(path, function (response) {
61
+ el.html(response);
62
+ el.data(this.data_attr + '-last-path', path);
63
+ trigger();
64
+ });
65
+
66
+ }
67
+ }
68
+ },
69
+
70
+ init : function (scope, method, options) {
71
+ Foundation.inherit(this, 'throttle random_str');
72
+
73
+ this.data_attr = this.set_data_attr();
74
+ $.extend(true, this.settings, method, options);
75
+
76
+ this.bindings(method, options);
77
+ this.load('images');
78
+ this.load('nodes');
79
+ },
80
+
81
+ events : function () {
82
+ var self = this;
83
+
84
+ $(window)
85
+ .off('.interchange')
86
+ .on('resize.fndtn.interchange', self.throttle(function () {
87
+ self.resize();
88
+ }, 50));
89
+
90
+ return this;
91
+ },
92
+
93
+ resize : function () {
94
+ var cache = this.cache;
95
+
96
+ if(!this.images_loaded || !this.nodes_loaded) {
97
+ setTimeout($.proxy(this.resize, this), 50);
98
+ return;
99
+ }
100
+
101
+ for (var uuid in cache) {
102
+ if (cache.hasOwnProperty(uuid)) {
103
+ var passed = this.results(uuid, cache[uuid]);
104
+
105
+ if (passed) {
106
+ this.settings.directives[passed
107
+ .scenario[1]].call(this, passed.el, passed.scenario[0], function () {
108
+ if (arguments[0] instanceof Array) {
109
+ var args = arguments[0];
110
+ } else {
111
+ var args = Array.prototype.slice.call(arguments, 0);
112
+ }
113
+
114
+ passed.el.trigger(passed.scenario[1], args);
115
+ });
116
+ }
117
+ }
118
+ }
119
+
120
+ },
121
+
122
+ results : function (uuid, scenarios) {
123
+ var count = scenarios.length;
124
+
125
+ if (count > 0) {
126
+ var el = this.S('[' + this.add_namespace('data-uuid') + '="' + uuid + '"]');
127
+
128
+ while (count--) {
129
+ var mq, rule = scenarios[count][2];
130
+ if (this.settings.named_queries.hasOwnProperty(rule)) {
131
+ mq = matchMedia(this.settings.named_queries[rule]);
132
+ } else {
133
+ mq = matchMedia(rule);
134
+ }
135
+ if (mq.matches) {
136
+ return {el: el, scenario: scenarios[count]};
137
+ }
138
+ }
139
+ }
140
+
141
+ return false;
142
+ },
143
+
144
+ load : function (type, force_update) {
145
+ if (typeof this['cached_' + type] === 'undefined' || force_update) {
146
+ this['update_' + type]();
147
+ }
148
+
149
+ return this['cached_' + type];
150
+ },
151
+
152
+ update_images : function () {
153
+ var images = this.S('img[' + this.data_attr + ']'),
154
+ count = images.length,
155
+ i = count,
156
+ loaded_count = 0,
157
+ data_attr = this.data_attr;
158
+
159
+ this.cache = {};
160
+ this.cached_images = [];
161
+ this.images_loaded = (count === 0);
162
+
163
+ while (i--) {
164
+ loaded_count++;
165
+ if (images[i]) {
166
+ var str = images[i].getAttribute(data_attr) || '';
167
+
168
+ if (str.length > 0) {
169
+ this.cached_images.push(images[i]);
170
+ }
171
+ }
172
+
173
+ if (loaded_count === count) {
174
+ this.images_loaded = true;
175
+ this.enhance('images');
176
+ }
177
+ }
178
+
179
+ return this;
180
+ },
181
+
182
+ update_nodes : function () {
183
+ var nodes = this.S('[' + this.data_attr + ']').not('img'),
184
+ count = nodes.length,
185
+ i = count,
186
+ loaded_count = 0,
187
+ data_attr = this.data_attr;
188
+
189
+ this.cached_nodes = [];
190
+ // Set nodes_loaded to true if there are no nodes
191
+ // this.nodes_loaded = false;
192
+ this.nodes_loaded = (count === 0);
193
+
194
+
195
+ while (i--) {
196
+ loaded_count++;
197
+ var str = nodes[i].getAttribute(data_attr) || '';
198
+
199
+ if (str.length > 0) {
200
+ this.cached_nodes.push(nodes[i]);
201
+ }
202
+
203
+ if(loaded_count === count) {
204
+ this.nodes_loaded = true;
205
+ this.enhance('nodes');
206
+ }
207
+ }
208
+
209
+ return this;
210
+ },
211
+
212
+ enhance : function (type) {
213
+ var i = this['cached_' + type].length;
214
+
215
+ while (i--) {
216
+ this.object($(this['cached_' + type][i]));
217
+ }
218
+
219
+ return $(window).trigger('resize');
220
+ },
221
+
222
+ parse_params : function (path, directive, mq) {
223
+ return [this.trim(path), this.convert_directive(directive), this.trim(mq)];
224
+ },
225
+
226
+ convert_directive : function (directive) {
227
+ var trimmed = this.trim(directive);
228
+
229
+ if (trimmed.length > 0) {
230
+ return trimmed;
231
+ }
232
+
233
+ return 'replace';
234
+ },
235
+
236
+ object : function(el) {
237
+ var raw_arr = this.parse_data_attr(el),
238
+ scenarios = [],
239
+ i = raw_arr.length;
240
+
241
+ if (i > 0) {
242
+ while (i--) {
243
+ var split = raw_arr[i].split(/\((.*?)(\))$/);
244
+
245
+ if (split.length > 1) {
246
+ var cached_split = split[0].split(','),
247
+ params = this.parse_params(cached_split[0],
248
+ cached_split[1], split[1]);
249
+
250
+ scenarios.push(params);
251
+ }
252
+ }
253
+ }
254
+
255
+ return this.store(el, scenarios);
256
+ },
257
+
258
+ uuid : function (separator) {
259
+ var delim = separator || "-",
260
+ self = this;
261
+
262
+ function S4() {
263
+ return self.random_str(6);
264
+ }
265
+
266
+ return (S4() + S4() + delim + S4() + delim + S4()
267
+ + delim + S4() + delim + S4() + S4() + S4());
268
+ },
269
+
270
+ store : function (el, scenarios) {
271
+ var uuid = this.uuid(),
272
+ current_uuid = el.data(this.add_namespace('uuid', true));
273
+
274
+ if (this.cache[current_uuid]) return this.cache[current_uuid];
275
+
276
+ el.attr(this.add_namespace('data-uuid'), uuid);
277
+
278
+ return this.cache[uuid] = scenarios;
279
+ },
280
+
281
+ trim : function(str) {
282
+ if (typeof str === 'string') {
283
+ return $.trim(str);
284
+ }
285
+
286
+ return str;
287
+ },
288
+
289
+ set_data_attr: function (init) {
290
+ if (init) {
291
+ if (this.namespace.length > 0) {
292
+ return this.namespace + '-' + this.settings.load_attr;
293
+ }
294
+
295
+ return this.settings.load_attr;
296
+ }
297
+
298
+ if (this.namespace.length > 0) {
299
+ return 'data-' + this.namespace + '-' + this.settings.load_attr;
300
+ }
301
+
302
+ return 'data-' + this.settings.load_attr;
303
+ },
304
+
305
+ parse_data_attr : function (el) {
306
+ var raw = el.attr(this.attr_name()).split(/\[(.*?)\]/),
307
+ i = raw.length,
308
+ output = [];
309
+
310
+ while (i--) {
311
+ if (raw[i].replace(/[\W\d]+/, '').length > 4) {
312
+ output.push(raw[i]);
313
+ }
314
+ }
315
+
316
+ return output;
317
+ },
318
+
319
+ reflow : function () {
320
+ this.load('images', true);
321
+ this.load('nodes', true);
322
+ }
323
+
324
+ };
325
+
326
+ }(jQuery, this, this.document));