baseboard 1.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 +15 -0
- data/README.md +4 -0
- data/bin/baseboard +9 -0
- data/javascripts/batman.jquery.js +163 -0
- data/javascripts/batman.js +13680 -0
- data/javascripts/dashing.coffee +125 -0
- data/javascripts/es5-shim.js +1021 -0
- data/javascripts/jquery.js +4 -0
- data/lib/baseboard/app.rb +178 -0
- data/lib/baseboard/cli.rb +109 -0
- data/lib/baseboard/downloader.rb +18 -0
- data/lib/baseboard.rb +6 -0
- data/templates/dashboard/%name%.erb.tt +7 -0
- data/templates/job/%name%.rb +4 -0
- data/templates/project/.gitignore +2 -0
- data/templates/project/Gemfile +6 -0
- data/templates/project/README.md +1 -0
- data/templates/project/assets/fonts/fontawesome-webfont.eot +0 -0
- data/templates/project/assets/fonts/fontawesome-webfont.svg +399 -0
- data/templates/project/assets/fonts/fontawesome-webfont.ttf +0 -0
- data/templates/project/assets/fonts/fontawesome-webfont.woff +0 -0
- data/templates/project/assets/images/logo.png +0 -0
- data/templates/project/assets/javascripts/application.coffee +25 -0
- data/templates/project/assets/javascripts/d3-3.2.8.js +5 -0
- data/templates/project/assets/javascripts/dashing.gridster.coffee +37 -0
- data/templates/project/assets/javascripts/gridster/jquery.gridster.js +3263 -0
- data/templates/project/assets/javascripts/gridster/jquery.leanModal.min.js +5 -0
- data/templates/project/assets/javascripts/jquery.knob.js +646 -0
- data/templates/project/assets/javascripts/rickshaw-1.4.3.min.js +2 -0
- data/templates/project/assets/stylesheets/application.scss +258 -0
- data/templates/project/assets/stylesheets/font-awesome.css +1479 -0
- data/templates/project/assets/stylesheets/jquery.gridster.css +57 -0
- data/templates/project/config.ru +18 -0
- data/templates/project/dashboards/layout.erb +32 -0
- data/templates/project/dashboards/sample.erb +25 -0
- data/templates/project/dashboards/sampletv.erb +56 -0
- data/templates/project/jobs/buzzwords.rb +9 -0
- data/templates/project/jobs/convergence.rb +14 -0
- data/templates/project/jobs/sample.rb +13 -0
- data/templates/project/jobs/twitter.rb +28 -0
- data/templates/project/lib/.empty_directory +1 -0
- data/templates/project/public/404.html +26 -0
- data/templates/project/public/favicon.ico +0 -0
- data/templates/project/widgets/clock/clock.coffee +18 -0
- data/templates/project/widgets/clock/clock.html +2 -0
- data/templates/project/widgets/clock/clock.scss +13 -0
- data/templates/project/widgets/comments/comments.coffee +24 -0
- data/templates/project/widgets/comments/comments.html +7 -0
- data/templates/project/widgets/comments/comments.scss +33 -0
- data/templates/project/widgets/graph/graph.coffee +37 -0
- data/templates/project/widgets/graph/graph.html +5 -0
- data/templates/project/widgets/graph/graph.scss +65 -0
- data/templates/project/widgets/iframe/iframe.coffee +9 -0
- data/templates/project/widgets/iframe/iframe.html +1 -0
- data/templates/project/widgets/iframe/iframe.scss +8 -0
- data/templates/project/widgets/image/image.coffee +9 -0
- data/templates/project/widgets/image/image.html +1 -0
- data/templates/project/widgets/image/image.scss +13 -0
- data/templates/project/widgets/list/list.coffee +6 -0
- data/templates/project/widgets/list/list.html +18 -0
- data/templates/project/widgets/list/list.scss +60 -0
- data/templates/project/widgets/meter/meter.coffee +14 -0
- data/templates/project/widgets/meter/meter.html +7 -0
- data/templates/project/widgets/meter/meter.scss +35 -0
- data/templates/project/widgets/number/number.coffee +24 -0
- data/templates/project/widgets/number/number.html +11 -0
- data/templates/project/widgets/number/number.scss +39 -0
- data/templates/project/widgets/text/text.coffee +1 -0
- data/templates/project/widgets/text/text.html +7 -0
- data/templates/project/widgets/text/text.scss +32 -0
- data/templates/widget/%name%/%name%.coffee.tt +9 -0
- data/templates/widget/%name%/%name%.html +1 -0
- data/templates/widget/%name%/%name%.scss.tt +3 -0
- metadata +339 -0
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
YjY2MDliZjYwOTkwZjhkNjNlMGVjMTMxOGI3MjU4NzVlYjdkNmQ0Mg==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
Nzg2NGUyMWMzMGFmZWIxYWEwNzM2OGIxOTIwYjUzZTJhNDRiMmZkZA==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
MjY0ZDU0ZTA1Mjc5ZmM3MThjZWNiZWY1MmQ2MmMxYzc0OWFlZTA2YzJjZGU1
|
10
|
+
ZmJhYTIwYjQ0NmU2ODA0MjM0NTZhMGZiNzAwMTEwNzRkYmMxMmIzM2U3MGE0
|
11
|
+
ZjQwYjBkNWUxNTI3OTcyMDY2OTMxZjA2OGQ0YmVkNmU0NjM2ZjE=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
NzBjYjgzNWY5ZWI4ZDUwNjVkOTk5ZGE2NDkzM2RjYzQzNDcwMDU5OWMyMzRm
|
14
|
+
NWVjZTFmY2FkMzgzZDEwNGM2ZjllODE3YmY0NGJmMzRhZGI2OTJlZTJkZWY4
|
15
|
+
YzVhOGY5MTZiZTA1OWJhZDcwMmE4ZDM3Njk2YmYxZmIzZGViZGY=
|
data/README.md
ADDED
data/bin/baseboard
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require "pathname"
|
3
|
+
bin_file = Pathname.new(__FILE__).realpath
|
4
|
+
$:.unshift File.expand_path("../../lib", bin_file)
|
5
|
+
|
6
|
+
require 'baseboard/cli'
|
7
|
+
require 'baseboard/downloader'
|
8
|
+
Baseboard::CLI.source_root(File.expand_path('../../templates', bin_file))
|
9
|
+
Baseboard::CLI.start(ARGV)
|
@@ -0,0 +1,163 @@
|
|
1
|
+
(function() {
|
2
|
+
|
3
|
+
Batman.extend(Batman.DOM, {
|
4
|
+
querySelectorAll: function(node, selector) {
|
5
|
+
return jQuery(selector, node);
|
6
|
+
},
|
7
|
+
querySelector: function(node, selector) {
|
8
|
+
return jQuery(selector, node)[0];
|
9
|
+
},
|
10
|
+
setInnerHTML: function(node, html) {
|
11
|
+
var child, childNodes, result, _i, _j, _len, _len1;
|
12
|
+
childNodes = (function() {
|
13
|
+
var _i, _len, _ref, _results;
|
14
|
+
_ref = node.childNodes;
|
15
|
+
_results = [];
|
16
|
+
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
17
|
+
child = _ref[_i];
|
18
|
+
_results.push(child);
|
19
|
+
}
|
20
|
+
return _results;
|
21
|
+
})();
|
22
|
+
for (_i = 0, _len = childNodes.length; _i < _len; _i++) {
|
23
|
+
child = childNodes[_i];
|
24
|
+
Batman.DOM.willRemoveNode(child);
|
25
|
+
}
|
26
|
+
result = jQuery(node).html(html);
|
27
|
+
for (_j = 0, _len1 = childNodes.length; _j < _len1; _j++) {
|
28
|
+
child = childNodes[_j];
|
29
|
+
Batman.DOM.didRemoveNode(child);
|
30
|
+
}
|
31
|
+
return result;
|
32
|
+
},
|
33
|
+
removeNode: function(node) {
|
34
|
+
var _ref;
|
35
|
+
Batman.DOM.willRemoveNode(node);
|
36
|
+
if ((_ref = node.parentNode) != null) {
|
37
|
+
_ref.removeChild(node);
|
38
|
+
}
|
39
|
+
return Batman.DOM.didRemoveNode(node);
|
40
|
+
},
|
41
|
+
destroyNode: function(node) {
|
42
|
+
Batman.DOM.willDestroyNode(node);
|
43
|
+
Batman.DOM.willRemoveNode(node);
|
44
|
+
jQuery(node).remove();
|
45
|
+
Batman.DOM.didRemoveNode(node);
|
46
|
+
return Batman.DOM.didDestroyNode(node);
|
47
|
+
},
|
48
|
+
appendChild: function(parent, child) {
|
49
|
+
Batman.DOM.willInsertNode(child);
|
50
|
+
jQuery(parent).append(child);
|
51
|
+
return Batman.DOM.didInsertNode(child);
|
52
|
+
},
|
53
|
+
innerText: function(node) {
|
54
|
+
return jQuery(node).text();
|
55
|
+
}
|
56
|
+
});
|
57
|
+
|
58
|
+
Batman.Request.prototype._parseResponseHeaders = function(xhr) {
|
59
|
+
var headers;
|
60
|
+
return headers = xhr.getAllResponseHeaders().split('\n').reduce(function(acc, header) {
|
61
|
+
var key, matches, value;
|
62
|
+
if (matches = header.match(/([^:]*):\s*(.*)/)) {
|
63
|
+
key = matches[1];
|
64
|
+
value = matches[2];
|
65
|
+
acc[key] = value;
|
66
|
+
}
|
67
|
+
return acc;
|
68
|
+
}, {});
|
69
|
+
};
|
70
|
+
|
71
|
+
Batman.Request.prototype._prepareOptions = function(data) {
|
72
|
+
var options, _ref, _this = this;
|
73
|
+
options = {
|
74
|
+
url: this.get('url'),
|
75
|
+
type: this.get('method'),
|
76
|
+
dataType: this.get('type'),
|
77
|
+
data: data || this.get('data'),
|
78
|
+
username: this.get('username'),
|
79
|
+
password: this.get('password'),
|
80
|
+
headers: this.get('headers'),
|
81
|
+
beforeSend: function() {
|
82
|
+
return _this.fire('loading');
|
83
|
+
},
|
84
|
+
success: function(response, textStatus, xhr) {
|
85
|
+
_this.mixin({
|
86
|
+
xhr: xhr,
|
87
|
+
status: xhr.status,
|
88
|
+
response: response,
|
89
|
+
responseHeaders: _this._parseResponseHeaders(xhr)
|
90
|
+
});
|
91
|
+
return _this.fire('success', response);
|
92
|
+
},
|
93
|
+
error: function(xhr, status, error) {
|
94
|
+
_this.mixin({
|
95
|
+
xhr: xhr,
|
96
|
+
status: xhr.status,
|
97
|
+
response: xhr.responseText,
|
98
|
+
responseHeaders: _this._parseResponseHeaders(xhr)
|
99
|
+
});
|
100
|
+
xhr.request = _this;
|
101
|
+
return _this.fire('error', xhr);
|
102
|
+
},
|
103
|
+
complete: function() {
|
104
|
+
return _this.fire('loaded');
|
105
|
+
}
|
106
|
+
};
|
107
|
+
if ((_ref = this.get('method')) === 'PUT' || _ref === 'POST') {
|
108
|
+
if (!this.hasFileUploads()) {
|
109
|
+
options.contentType = this.get('contentType');
|
110
|
+
if (typeof options.data === 'object') {
|
111
|
+
options.processData = false;
|
112
|
+
options.data = Batman.URI.queryFromParams(options.data);
|
113
|
+
}
|
114
|
+
} else {
|
115
|
+
options.contentType = false;
|
116
|
+
options.processData = false;
|
117
|
+
options.data = this.constructor.objectToFormData(options.data);
|
118
|
+
}
|
119
|
+
}
|
120
|
+
return options;
|
121
|
+
};
|
122
|
+
|
123
|
+
Batman.Request.prototype.send = function(data) {
|
124
|
+
return jQuery.ajax(this._prepareOptions(data));
|
125
|
+
};
|
126
|
+
|
127
|
+
Batman.mixins.animation = {
|
128
|
+
show: function(addToParent) {
|
129
|
+
var jq, show, _ref, _ref1;
|
130
|
+
jq = $(this);
|
131
|
+
show = function() {
|
132
|
+
return jq.show(600);
|
133
|
+
};
|
134
|
+
if (addToParent) {
|
135
|
+
if ((_ref = addToParent.append) != null) {
|
136
|
+
_ref.appendChild(this);
|
137
|
+
}
|
138
|
+
if ((_ref1 = addToParent.before) != null) {
|
139
|
+
_ref1.parentNode.insertBefore(this, addToParent.before);
|
140
|
+
}
|
141
|
+
jq.hide();
|
142
|
+
setTimeout(show, 0);
|
143
|
+
} else {
|
144
|
+
show();
|
145
|
+
}
|
146
|
+
return this;
|
147
|
+
},
|
148
|
+
hide: function(removeFromParent) {
|
149
|
+
var _this = this;
|
150
|
+
$(this).hide(600, function() {
|
151
|
+
var _ref;
|
152
|
+
if (removeFromParent) {
|
153
|
+
if ((_ref = _this.parentNode) != null) {
|
154
|
+
_ref.removeChild(_this);
|
155
|
+
}
|
156
|
+
}
|
157
|
+
return Batman.DOM.didRemoveNode(_this);
|
158
|
+
});
|
159
|
+
return this;
|
160
|
+
}
|
161
|
+
};
|
162
|
+
|
163
|
+
}).call(this);
|