rvnstat 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (271) hide show
  1. checksums.yaml +7 -0
  2. data/._README.md +0 -0
  3. data/._ss.png +0 -0
  4. data/.gitignore +17 -0
  5. data/Gemfile +6 -0
  6. data/LICENSE.txt +22 -0
  7. data/README.md +34 -0
  8. data/Rakefile +1 -0
  9. data/bin/._rvnstat +0 -0
  10. data/bin/rvnstat +9 -0
  11. data/config.ru +4 -0
  12. data/config.yml +3 -0
  13. data/lib/._app.rb +0 -0
  14. data/lib/._config.rb +0 -0
  15. data/lib/._require.rb +0 -0
  16. data/lib/._rvnstat.rb +0 -0
  17. data/lib/._vnstat.rb +0 -0
  18. data/lib/app.rb +102 -0
  19. data/lib/config.rb +13 -0
  20. data/lib/require.rb +10 -0
  21. data/lib/rvnstat.rb +5 -0
  22. data/lib/rvnstat/._version.rb +0 -0
  23. data/lib/rvnstat/version.rb +3 -0
  24. data/lib/vnstat.rb +74 -0
  25. data/public/CNAME +1 -0
  26. data/public/CONTRIBUTING.md +192 -0
  27. data/public/Gruntfile.js +418 -0
  28. data/public/LICENSE +21 -0
  29. data/public/README.md +173 -0
  30. data/public/_config.yml +35 -0
  31. data/public/bower.json +24 -0
  32. data/public/browserstack.json +44 -0
  33. data/public/composer.json +25 -0
  34. data/public/dist/css/._custom.css +0 -0
  35. data/public/dist/css/bootstrap-theme.css +347 -0
  36. data/public/dist/css/bootstrap-theme.css.map +1 -0
  37. data/public/dist/css/bootstrap-theme.min.css +7 -0
  38. data/public/dist/css/bootstrap.css +5831 -0
  39. data/public/dist/css/bootstrap.css.map +1 -0
  40. data/public/dist/css/bootstrap.min.css +7 -0
  41. data/public/dist/css/custom.css +20 -0
  42. data/public/dist/fonts/glyphicons-halflings-regular.eot +0 -0
  43. data/public/dist/fonts/glyphicons-halflings-regular.svg +229 -0
  44. data/public/dist/fonts/glyphicons-halflings-regular.ttf +0 -0
  45. data/public/dist/fonts/glyphicons-halflings-regular.woff +0 -0
  46. data/public/dist/js/bootstrap.js +1951 -0
  47. data/public/dist/js/bootstrap.min.js +6 -0
  48. data/public/docs/LICENSE +319 -0
  49. data/public/docs/_data/glyphicons.yml +203 -0
  50. data/public/docs/_data/showcase.yml +19 -0
  51. data/public/docs/_includes/ads.html +1 -0
  52. data/public/docs/_includes/customizer-variables.html +1690 -0
  53. data/public/docs/_includes/footer.html +70 -0
  54. data/public/docs/_includes/header.html +42 -0
  55. data/public/docs/_includes/nav-about.html +9 -0
  56. data/public/docs/_includes/nav-components.html +138 -0
  57. data/public/docs/_includes/nav-css.html +127 -0
  58. data/public/docs/_includes/nav-customize.html +46 -0
  59. data/public/docs/_includes/nav-getting-started.html +62 -0
  60. data/public/docs/_includes/nav-javascript.html +89 -0
  61. data/public/docs/_includes/nav-main.html +36 -0
  62. data/public/docs/_includes/nav-migration.html +12 -0
  63. data/public/docs/_includes/social-buttons.html +16 -0
  64. data/public/docs/_layouts/default.html +55 -0
  65. data/public/docs/_layouts/home.html +18 -0
  66. data/public/docs/about.html +149 -0
  67. data/public/docs/assets/css/docs.css +1394 -0
  68. data/public/docs/assets/css/docs.min.css +6 -0
  69. data/public/docs/assets/css/pygments-manni.css +66 -0
  70. data/public/docs/assets/ico/apple-touch-icon-144-precomposed.png +0 -0
  71. data/public/docs/assets/ico/favicon.ico +0 -0
  72. data/public/docs/assets/img/components.png +0 -0
  73. data/public/docs/assets/img/devices.png +0 -0
  74. data/public/docs/assets/img/sass-less.png +0 -0
  75. data/public/docs/assets/js/application.js +101 -0
  76. data/public/docs/assets/js/customize.min.js +49 -0
  77. data/public/docs/assets/js/customizer.js +348 -0
  78. data/public/docs/assets/js/docs.min.js +16 -0
  79. data/public/docs/assets/js/ie8-responsive-file-warning.js +12 -0
  80. data/public/docs/assets/js/raw-files.min.js +8 -0
  81. data/public/docs/assets/js/vendor/blob.js +166 -0
  82. data/public/docs/assets/js/vendor/filesaver.js +236 -0
  83. data/public/docs/assets/js/vendor/holder.js +645 -0
  84. data/public/docs/assets/js/vendor/jszip.js +1474 -0
  85. data/public/docs/assets/js/vendor/less.min.js +16 -0
  86. data/public/docs/assets/js/vendor/uglify.min.js +14 -0
  87. data/public/docs/components.html +3001 -0
  88. data/public/docs/css.html +3346 -0
  89. data/public/docs/customize.html +356 -0
  90. data/public/docs/customizer-nav.jade +15 -0
  91. data/public/docs/customizer-variables.jade +21 -0
  92. data/public/docs/dist/css/bootstrap-theme.css.map +1 -0
  93. data/public/docs/dist/css/bootstrap-theme.min.css +7 -0
  94. data/public/docs/dist/css/bootstrap.css.map +1 -0
  95. data/public/docs/dist/css/bootstrap.min.css +7 -0
  96. data/public/docs/dist/fonts/glyphicons-halflings-regular.eot +0 -0
  97. data/public/docs/dist/fonts/glyphicons-halflings-regular.svg +229 -0
  98. data/public/docs/dist/fonts/glyphicons-halflings-regular.ttf +0 -0
  99. data/public/docs/dist/fonts/glyphicons-halflings-regular.woff +0 -0
  100. data/public/docs/dist/js/bootstrap.min.js +7 -0
  101. data/public/docs/examples/blog/blog.css +168 -0
  102. data/public/docs/examples/blog/index.html +171 -0
  103. data/public/docs/examples/carousel/carousel.css +148 -0
  104. data/public/docs/examples/carousel/index.html +206 -0
  105. data/public/docs/examples/cover/cover.css +161 -0
  106. data/public/docs/examples/cover/index.html +75 -0
  107. data/public/docs/examples/dashboard/dashboard.css +93 -0
  108. data/public/docs/examples/dashboard/index.html +243 -0
  109. data/public/docs/examples/grid/grid.css +28 -0
  110. data/public/docs/examples/grid/index.html +152 -0
  111. data/public/docs/examples/jumbotron-narrow/index.html +82 -0
  112. data/public/docs/examples/jumbotron-narrow/jumbotron-narrow.css +79 -0
  113. data/public/docs/examples/jumbotron/index.html +99 -0
  114. data/public/docs/examples/jumbotron/jumbotron.css +5 -0
  115. data/public/docs/examples/justified-nav/index.html +84 -0
  116. data/public/docs/examples/justified-nav/justified-nav.css +88 -0
  117. data/public/docs/examples/navbar-fixed-top/index.html +91 -0
  118. data/public/docs/examples/navbar-fixed-top/navbar-fixed-top.css +4 -0
  119. data/public/docs/examples/navbar-static-top/index.html +92 -0
  120. data/public/docs/examples/navbar-static-top/navbar-static-top.css +7 -0
  121. data/public/docs/examples/navbar/index.html +90 -0
  122. data/public/docs/examples/navbar/navbar.css +8 -0
  123. data/public/docs/examples/non-responsive/index.html +105 -0
  124. data/public/docs/examples/non-responsive/non-responsive.css +120 -0
  125. data/public/docs/examples/offcanvas/index.html +130 -0
  126. data/public/docs/examples/offcanvas/offcanvas.css +51 -0
  127. data/public/docs/examples/offcanvas/offcanvas.js +5 -0
  128. data/public/docs/examples/screenshots/blog.jpg +0 -0
  129. data/public/docs/examples/screenshots/carousel.jpg +0 -0
  130. data/public/docs/examples/screenshots/cover.jpg +0 -0
  131. data/public/docs/examples/screenshots/dashboard.jpg +0 -0
  132. data/public/docs/examples/screenshots/grid.jpg +0 -0
  133. data/public/docs/examples/screenshots/jumbotron-narrow.jpg +0 -0
  134. data/public/docs/examples/screenshots/jumbotron.jpg +0 -0
  135. data/public/docs/examples/screenshots/justified-nav.jpg +0 -0
  136. data/public/docs/examples/screenshots/navbar-fixed.jpg +0 -0
  137. data/public/docs/examples/screenshots/navbar-static.jpg +0 -0
  138. data/public/docs/examples/screenshots/navbar.jpg +0 -0
  139. data/public/docs/examples/screenshots/non-responsive.jpg +0 -0
  140. data/public/docs/examples/screenshots/offcanvas.jpg +0 -0
  141. data/public/docs/examples/screenshots/sign-in.jpg +0 -0
  142. data/public/docs/examples/screenshots/starter-template.jpg +0 -0
  143. data/public/docs/examples/screenshots/sticky-footer-navbar.jpg +0 -0
  144. data/public/docs/examples/screenshots/sticky-footer.jpg +0 -0
  145. data/public/docs/examples/screenshots/theme.jpg +0 -0
  146. data/public/docs/examples/signin/index.html +50 -0
  147. data/public/docs/examples/signin/signin.css +40 -0
  148. data/public/docs/examples/starter-template/index.html +68 -0
  149. data/public/docs/examples/starter-template/starter-template.css +7 -0
  150. data/public/docs/examples/sticky-footer-navbar/index.html +91 -0
  151. data/public/docs/examples/sticky-footer-navbar/sticky-footer-navbar.css +45 -0
  152. data/public/docs/examples/sticky-footer/index.html +55 -0
  153. data/public/docs/examples/sticky-footer/sticky-footer.css +38 -0
  154. data/public/docs/examples/theme/index.html +384 -0
  155. data/public/docs/examples/theme/theme.css +14 -0
  156. data/public/docs/getting-started.html +773 -0
  157. data/public/docs/grunt/bs-glyphicons-data-generator.js +33 -0
  158. data/public/docs/grunt/bs-lessdoc-parser.js +236 -0
  159. data/public/docs/grunt/bs-raw-files-generator.js +31 -0
  160. data/public/docs/index.html +72 -0
  161. data/public/docs/javascript.html +2141 -0
  162. data/public/docs/migration.html +423 -0
  163. data/public/fonts/glyphicons-halflings-regular.eot +0 -0
  164. data/public/fonts/glyphicons-halflings-regular.svg +229 -0
  165. data/public/fonts/glyphicons-halflings-regular.ttf +0 -0
  166. data/public/fonts/glyphicons-halflings-regular.woff +0 -0
  167. data/public/js/._exporting.js +0 -0
  168. data/public/js/._highcharts-all.js +0 -0
  169. data/public/js/._jquery-min.js +0 -0
  170. data/public/js/.jscs.json +15 -0
  171. data/public/js/.jshintrc +14 -0
  172. data/public/js/affix.js +137 -0
  173. data/public/js/alert.js +88 -0
  174. data/public/js/bootstrap.min.js +6 -0
  175. data/public/js/button.js +107 -0
  176. data/public/js/carousel.js +205 -0
  177. data/public/js/collapse.js +170 -0
  178. data/public/js/dropdown.js +147 -0
  179. data/public/js/highcharts.js +294 -0
  180. data/public/js/jquery-1.11.0.min.js +4 -0
  181. data/public/js/modal.js +243 -0
  182. data/public/js/popover.js +110 -0
  183. data/public/js/scrollspy.js +153 -0
  184. data/public/js/tab.js +125 -0
  185. data/public/js/tests/index.html +54 -0
  186. data/public/js/tests/unit/affix.js +50 -0
  187. data/public/js/tests/unit/alert.js +62 -0
  188. data/public/js/tests/unit/button.js +122 -0
  189. data/public/js/tests/unit/carousel.js +110 -0
  190. data/public/js/tests/unit/collapse.js +164 -0
  191. data/public/js/tests/unit/dropdown.js +218 -0
  192. data/public/js/tests/unit/modal.js +195 -0
  193. data/public/js/tests/unit/phantom.js +69 -0
  194. data/public/js/tests/unit/popover.js +133 -0
  195. data/public/js/tests/unit/scrollspy.js +36 -0
  196. data/public/js/tests/unit/tab.js +86 -0
  197. data/public/js/tests/unit/tooltip.js +432 -0
  198. data/public/js/tests/vendor/jquery.js +6 -0
  199. data/public/js/tests/vendor/qunit.css +245 -0
  200. data/public/js/tests/vendor/qunit.js +2210 -0
  201. data/public/js/tooltip.js +399 -0
  202. data/public/js/transition.js +48 -0
  203. data/public/less/.csscomb.json +297 -0
  204. data/public/less/.csslintrc +19 -0
  205. data/public/less/alerts.less +67 -0
  206. data/public/less/badges.less +55 -0
  207. data/public/less/bootstrap.less +49 -0
  208. data/public/less/breadcrumbs.less +26 -0
  209. data/public/less/button-groups.less +226 -0
  210. data/public/less/buttons.less +155 -0
  211. data/public/less/carousel.less +232 -0
  212. data/public/less/close.less +33 -0
  213. data/public/less/code.less +63 -0
  214. data/public/less/component-animations.less +29 -0
  215. data/public/less/dropdowns.less +213 -0
  216. data/public/less/forms.less +419 -0
  217. data/public/less/glyphicons.less +233 -0
  218. data/public/less/grid.less +100 -0
  219. data/public/less/input-groups.less +157 -0
  220. data/public/less/jumbotron.less +44 -0
  221. data/public/less/labels.less +64 -0
  222. data/public/less/list-group.less +110 -0
  223. data/public/less/media.less +56 -0
  224. data/public/less/mixins.less +926 -0
  225. data/public/less/modals.less +138 -0
  226. data/public/less/navbar.less +616 -0
  227. data/public/less/navs.less +242 -0
  228. data/public/less/normalize.less +423 -0
  229. data/public/less/pager.less +55 -0
  230. data/public/less/pagination.less +88 -0
  231. data/public/less/panels.less +230 -0
  232. data/public/less/popovers.less +133 -0
  233. data/public/less/print.less +101 -0
  234. data/public/less/progress-bars.less +80 -0
  235. data/public/less/responsive-utilities.less +93 -0
  236. data/public/less/scaffolding.less +134 -0
  237. data/public/less/tables.less +233 -0
  238. data/public/less/theme.less +247 -0
  239. data/public/less/thumbnails.less +36 -0
  240. data/public/less/tooltip.less +95 -0
  241. data/public/less/type.less +296 -0
  242. data/public/less/utilities.less +56 -0
  243. data/public/less/variables.less +827 -0
  244. data/public/less/wells.less +29 -0
  245. data/public/package.json +71 -0
  246. data/public/test-infra/README.md +100 -0
  247. data/public/test-infra/npm-shrinkwrap.canonical.json +1 -0
  248. data/public/test-infra/requirements.txt +1 -0
  249. data/public/test-infra/s3_cache.py +107 -0
  250. data/public/test-infra/sauce_browsers.yml +83 -0
  251. data/public/test-infra/shrinkwrap.js +24 -0
  252. data/public/test-infra/uncached-npm-install.sh +4 -0
  253. data/rvnstat.gemspec +26 -0
  254. data/rvnstat.yml +3 -0
  255. data/ss.png +0 -0
  256. data/untitled.txt +0 -0
  257. data/views/._hourly.erb +0 -0
  258. data/views/._index.erb +0 -0
  259. data/views/._live_traffic.erb +0 -0
  260. data/views/._monthly.erb +0 -0
  261. data/views/._top_ten.erb +0 -0
  262. data/views/day_detail.erb +44 -0
  263. data/views/day_total.erb +42 -0
  264. data/views/graph_test.erb +2 -0
  265. data/views/hourly.erb +19 -0
  266. data/views/index.erb +71 -0
  267. data/views/layout.erb +28 -0
  268. data/views/live_traffic.erb +57 -0
  269. data/views/monthly.erb +21 -0
  270. data/views/top_ten.erb +21 -0
  271. metadata +385 -0
@@ -0,0 +1,418 @@
1
+ /*!
2
+ * Bootstrap's Gruntfile
3
+ * http://getbootstrap.com
4
+ * Copyright 2013-2014 Twitter, Inc.
5
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
6
+ */
7
+
8
+ module.exports = function (grunt) {
9
+ 'use strict';
10
+
11
+ // Force use of Unix newlines
12
+ grunt.util.linefeed = '\n';
13
+
14
+ RegExp.quote = function (string) {
15
+ return string.replace(/[-\\^$*+?.()|[\]{}]/g, '\\$&');
16
+ };
17
+
18
+ var fs = require('fs');
19
+ var path = require('path');
20
+ var generateGlyphiconsData = require('./docs/grunt/bs-glyphicons-data-generator.js');
21
+ var BsLessdocParser = require('./docs/grunt/bs-lessdoc-parser.js');
22
+ var generateRawFilesJs = require('./docs/grunt/bs-raw-files-generator.js');
23
+ var updateShrinkwrap = require('./test-infra/shrinkwrap.js');
24
+
25
+ // Project configuration.
26
+ grunt.initConfig({
27
+
28
+ // Metadata.
29
+ pkg: grunt.file.readJSON('package.json'),
30
+ banner: '/*!\n' +
31
+ ' * Bootstrap v<%= pkg.version %> (<%= pkg.homepage %>)\n' +
32
+ ' * Copyright 2011-<%= grunt.template.today("yyyy") %> <%= pkg.author %>\n' +
33
+ ' * Licensed under <%= _.pluck(pkg.licenses, "type") %> (<%= _.pluck(pkg.licenses, "url") %>)\n' +
34
+ ' */\n',
35
+ jqueryCheck: 'if (typeof jQuery === \'undefined\') { throw new Error(\'Bootstrap requires jQuery\') }\n\n',
36
+
37
+ // Task configuration.
38
+ clean: {
39
+ dist: 'dist'
40
+ },
41
+
42
+ jshint: {
43
+ options: {
44
+ jshintrc: 'js/.jshintrc'
45
+ },
46
+ grunt: {
47
+ src: ['Gruntfile.js', 'docs/grunt/*.js', 'test-infra/shrinkwrap.js']
48
+ },
49
+ src: {
50
+ src: 'js/*.js'
51
+ },
52
+ test: {
53
+ src: 'js/tests/unit/*.js'
54
+ },
55
+ assets: {
56
+ src: ['docs/assets/js/application.js', 'docs/assets/js/customizer.js']
57
+ }
58
+ },
59
+
60
+ jscs: {
61
+ options: {
62
+ config: 'js/.jscs.json',
63
+ },
64
+ grunt: {
65
+ src: ['Gruntfile.js', 'docs/grunt/*.js', 'test-infra/shrinkwrap.js']
66
+ },
67
+ src: {
68
+ src: 'js/*.js'
69
+ },
70
+ test: {
71
+ src: 'js/tests/unit/*.js'
72
+ },
73
+ assets: {
74
+ src: ['docs/assets/js/application.js', 'docs/assets/js/customizer.js']
75
+ }
76
+ },
77
+
78
+ csslint: {
79
+ options: {
80
+ csslintrc: 'less/.csslintrc'
81
+ },
82
+ src: [
83
+ 'dist/css/bootstrap.css',
84
+ 'dist/css/bootstrap-theme.css',
85
+ 'docs/assets/css/docs.css'
86
+ ]
87
+ },
88
+
89
+ concat: {
90
+ options: {
91
+ banner: '<%= banner %>\n<%= jqueryCheck %>',
92
+ stripBanners: false
93
+ },
94
+ bootstrap: {
95
+ src: [
96
+ 'js/transition.js',
97
+ 'js/alert.js',
98
+ 'js/button.js',
99
+ 'js/carousel.js',
100
+ 'js/collapse.js',
101
+ 'js/dropdown.js',
102
+ 'js/modal.js',
103
+ 'js/tooltip.js',
104
+ 'js/popover.js',
105
+ 'js/scrollspy.js',
106
+ 'js/tab.js',
107
+ 'js/affix.js'
108
+ ],
109
+ dest: 'dist/js/<%= pkg.name %>.js'
110
+ }
111
+ },
112
+
113
+ uglify: {
114
+ bootstrap: {
115
+ options: {
116
+ banner: '<%= banner %>',
117
+ report: 'min'
118
+ },
119
+ src: '<%= concat.bootstrap.dest %>',
120
+ dest: 'dist/js/<%= pkg.name %>.min.js'
121
+ },
122
+ customize: {
123
+ options: {
124
+ preserveComments: 'some',
125
+ report: 'min'
126
+ },
127
+ src: [
128
+ 'docs/assets/js/vendor/less.min.js',
129
+ 'docs/assets/js/vendor/jszip.js',
130
+ 'docs/assets/js/vendor/uglify.min.js',
131
+ 'docs/assets/js/vendor/blob.js',
132
+ 'docs/assets/js/vendor/filesaver.js',
133
+ 'docs/assets/js/raw-files.min.js',
134
+ 'docs/assets/js/customizer.js'
135
+ ],
136
+ dest: 'docs/assets/js/customize.min.js'
137
+ },
138
+ docsJs: {
139
+ options: {
140
+ preserveComments: 'some',
141
+ report: 'min'
142
+ },
143
+ src: [
144
+ 'docs/assets/js/vendor/holder.js',
145
+ 'docs/assets/js/application.js'
146
+ ],
147
+ dest: 'docs/assets/js/docs.min.js'
148
+ }
149
+ },
150
+
151
+ less: {
152
+ compileCore: {
153
+ options: {
154
+ strictMath: true,
155
+ sourceMap: true,
156
+ outputSourceFiles: true,
157
+ sourceMapURL: '<%= pkg.name %>.css.map',
158
+ sourceMapFilename: 'dist/css/<%= pkg.name %>.css.map'
159
+ },
160
+ files: {
161
+ 'dist/css/<%= pkg.name %>.css': 'less/bootstrap.less'
162
+ }
163
+ },
164
+ compileTheme: {
165
+ options: {
166
+ strictMath: true,
167
+ sourceMap: true,
168
+ outputSourceFiles: true,
169
+ sourceMapURL: '<%= pkg.name %>-theme.css.map',
170
+ sourceMapFilename: 'dist/css/<%= pkg.name %>-theme.css.map'
171
+ },
172
+ files: {
173
+ 'dist/css/<%= pkg.name %>-theme.css': 'less/theme.less'
174
+ }
175
+ },
176
+ minify: {
177
+ options: {
178
+ cleancss: true,
179
+ report: 'min'
180
+ },
181
+ files: {
182
+ 'dist/css/<%= pkg.name %>.min.css': 'dist/css/<%= pkg.name %>.css',
183
+ 'dist/css/<%= pkg.name %>-theme.min.css': 'dist/css/<%= pkg.name %>-theme.css'
184
+ }
185
+ }
186
+ },
187
+
188
+ cssmin: {
189
+ compress: {
190
+ options: {
191
+ keepSpecialComments: '*',
192
+ noAdvanced: true, // turn advanced optimizations off until the issue is fixed in clean-css
193
+ report: 'min',
194
+ selectorsMergeMode: 'ie8'
195
+ },
196
+ src: [
197
+ 'docs/assets/css/docs.css',
198
+ 'docs/assets/css/pygments-manni.css'
199
+ ],
200
+ dest: 'docs/assets/css/docs.min.css'
201
+ }
202
+ },
203
+
204
+ usebanner: {
205
+ dist: {
206
+ options: {
207
+ position: 'top',
208
+ banner: '<%= banner %>'
209
+ },
210
+ files: {
211
+ src: [
212
+ 'dist/css/<%= pkg.name %>.css',
213
+ 'dist/css/<%= pkg.name %>.min.css',
214
+ 'dist/css/<%= pkg.name %>-theme.css',
215
+ 'dist/css/<%= pkg.name %>-theme.min.css'
216
+ ]
217
+ }
218
+ }
219
+ },
220
+
221
+ csscomb: {
222
+ sort: {
223
+ options: {
224
+ config: 'less/.csscomb.json'
225
+ },
226
+ files: {
227
+ 'dist/css/<%= pkg.name %>.css': 'dist/css/<%= pkg.name %>.css',
228
+ 'dist/css/<%= pkg.name %>-theme.css': 'dist/css/<%= pkg.name %>-theme.css'
229
+ }
230
+ }
231
+ },
232
+
233
+ copy: {
234
+ fonts: {
235
+ expand: true,
236
+ src: 'fonts/*',
237
+ dest: 'dist/'
238
+ },
239
+ docs: {
240
+ expand: true,
241
+ cwd: './dist',
242
+ src: [
243
+ '{css,js}/*.min.*',
244
+ 'css/*.map',
245
+ 'fonts/*'
246
+ ],
247
+ dest: 'docs/dist'
248
+ }
249
+ },
250
+
251
+ qunit: {
252
+ options: {
253
+ inject: 'js/tests/unit/phantom.js'
254
+ },
255
+ files: 'js/tests/*.html'
256
+ },
257
+
258
+ connect: {
259
+ server: {
260
+ options: {
261
+ port: 3000,
262
+ base: '.'
263
+ }
264
+ }
265
+ },
266
+
267
+ jekyll: {
268
+ docs: {}
269
+ },
270
+
271
+ jade: {
272
+ compile: {
273
+ options: {
274
+ pretty: true,
275
+ data: function () {
276
+ var filePath = path.join(__dirname, 'less/variables.less');
277
+ var fileContent = fs.readFileSync(filePath, {encoding: 'utf8'});
278
+ var parser = new BsLessdocParser(fileContent);
279
+ return {sections: parser.parseFile()};
280
+ }
281
+ },
282
+ files: {
283
+ 'docs/_includes/customizer-variables.html': 'docs/customizer-variables.jade',
284
+ 'docs/_includes/nav-customize.html': 'docs/customizer-nav.jade'
285
+ }
286
+ }
287
+ },
288
+
289
+ validation: {
290
+ options: {
291
+ charset: 'utf-8',
292
+ doctype: 'HTML5',
293
+ failHard: true,
294
+ reset: true,
295
+ relaxerror: [
296
+ 'Bad value X-UA-Compatible for attribute http-equiv on element meta.',
297
+ 'Element img is missing required attribute src.'
298
+ ]
299
+ },
300
+ files: {
301
+ src: '_gh_pages/**/*.html'
302
+ }
303
+ },
304
+
305
+ watch: {
306
+ src: {
307
+ files: '<%= jshint.src.src %>',
308
+ tasks: ['jshint:src', 'qunit']
309
+ },
310
+ test: {
311
+ files: '<%= jshint.test.src %>',
312
+ tasks: ['jshint:test', 'qunit']
313
+ },
314
+ less: {
315
+ files: 'less/*.less',
316
+ tasks: 'less'
317
+ }
318
+ },
319
+
320
+ sed: {
321
+ versionNumber: {
322
+ pattern: (function () {
323
+ var old = grunt.option('oldver');
324
+ return old ? RegExp.quote(old) : old;
325
+ })(),
326
+ replacement: grunt.option('newver'),
327
+ recursive: true
328
+ }
329
+ },
330
+
331
+ 'saucelabs-qunit': {
332
+ all: {
333
+ options: {
334
+ build: process.env.TRAVIS_JOB_ID,
335
+ concurrency: 10,
336
+ urls: ['http://127.0.0.1:3000/js/tests/index.html'],
337
+ browsers: grunt.file.readYAML('test-infra/sauce_browsers.yml')
338
+ }
339
+ }
340
+ },
341
+
342
+ exec: {
343
+ npmUpdate: {
344
+ command: 'npm update'
345
+ },
346
+ npmShrinkWrap: {
347
+ command: 'npm shrinkwrap --dev'
348
+ }
349
+ }
350
+ });
351
+
352
+
353
+ // These plugins provide necessary tasks.
354
+ require('load-grunt-tasks')(grunt, {scope: 'devDependencies'});
355
+ grunt.loadNpmTasks('browserstack-runner');
356
+
357
+ // Docs HTML validation task
358
+ grunt.registerTask('validate-html', ['jekyll', 'validation']);
359
+
360
+ // Test task.
361
+ var testSubtasks = [];
362
+ // Skip core tests if running a different subset of the test suite
363
+ if (!process.env.TWBS_TEST || process.env.TWBS_TEST === 'core') {
364
+ testSubtasks = testSubtasks.concat(['dist-css', 'csslint', 'jshint', 'jscs', 'qunit', 'build-customizer-html']);
365
+ }
366
+ // Skip HTML validation if running a different subset of the test suite
367
+ if (!process.env.TWBS_TEST || process.env.TWBS_TEST === 'validate-html') {
368
+ testSubtasks.push('validate-html');
369
+ }
370
+ // Only run Sauce Labs tests if there's a Sauce access key
371
+ if (typeof process.env.SAUCE_ACCESS_KEY !== 'undefined' &&
372
+ // Skip Sauce if running a different subset of the test suite
373
+ (!process.env.TWBS_TEST || process.env.TWBS_TEST === 'sauce-js-unit')) {
374
+ testSubtasks.push('connect');
375
+ testSubtasks.push('saucelabs-qunit');
376
+ }
377
+ // Only run BrowserStack tests if there's a BrowserStack access key
378
+ if (typeof process.env.BROWSERSTACK_KEY !== 'undefined' &&
379
+ // Skip BrowserStack if running a different subset of the test suite
380
+ (!process.env.TWBS_TEST || process.env.TWBS_TEST === 'browserstack-js-unit')) {
381
+ testSubtasks.push('browserstack_runner');
382
+ }
383
+ grunt.registerTask('test', testSubtasks);
384
+
385
+ // JS distribution task.
386
+ grunt.registerTask('dist-js', ['concat', 'uglify']);
387
+
388
+ // CSS distribution task.
389
+ grunt.registerTask('dist-css', ['less', 'cssmin', 'csscomb', 'usebanner']);
390
+
391
+ // Docs distribution task.
392
+ grunt.registerTask('dist-docs', 'copy:docs');
393
+
394
+ // Full distribution task.
395
+ grunt.registerTask('dist', ['clean', 'dist-css', 'copy:fonts', 'dist-docs', 'dist-js']);
396
+
397
+ // Default task.
398
+ grunt.registerTask('default', ['test', 'dist', 'build-glyphicons-data', 'build-customizer', 'update-shrinkwrap']);
399
+
400
+ // Version numbering task.
401
+ // grunt change-version-number --oldver=A.B.C --newver=X.Y.Z
402
+ // This can be overzealous, so its changes should always be manually reviewed!
403
+ grunt.registerTask('change-version-number', 'sed');
404
+
405
+ grunt.registerTask('build-glyphicons-data', generateGlyphiconsData);
406
+
407
+ // task for building customizer
408
+ grunt.registerTask('build-customizer', ['build-customizer-html', 'build-raw-files']);
409
+ grunt.registerTask('build-customizer-html', 'jade');
410
+ grunt.registerTask('build-raw-files', 'Add scripts/less files to customizer.', function () {
411
+ var banner = grunt.template.process('<%= banner %>');
412
+ generateRawFilesJs(banner);
413
+ });
414
+
415
+ // Task for updating the npm packages used by the Travis build.
416
+ grunt.registerTask('update-shrinkwrap', ['exec:npmUpdate', 'exec:npmShrinkWrap', '_update-shrinkwrap']);
417
+ grunt.registerTask('_update-shrinkwrap', function () { updateShrinkwrap.call(this, grunt); });
418
+ };
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2011-2014 Twitter, Inc
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,173 @@
1
+ # [Bootstrap](http://getbootstrap.com) [![Build Status](https://secure.travis-ci.org/twbs/bootstrap.png)](http://travis-ci.org/twbs/bootstrap) [![devDependency Status](https://david-dm.org/twbs/bootstrap/dev-status.png?theme=shields.io)](https://david-dm.org/twbs/bootstrap#info=devDependencies)
2
+ [![Selenium Test Status](https://saucelabs.com/browser-matrix/bootstrap.svg)](https://saucelabs.com/u/bootstrap)
3
+
4
+ Bootstrap is a sleek, intuitive, and powerful front-end framework for faster and easier web development, created by [Mark Otto](http://twitter.com/mdo) and [Jacob Thornton](http://twitter.com/fat), and maintained by the [core team](https://github.com/twbs?tab=members) with the massive support and involvement of the community.
5
+
6
+ To get started, check out <http://getbootstrap.com>!
7
+
8
+ ## Table of contents
9
+
10
+ - [Quick start](#quick-start)
11
+ - [Bugs and feature requests](#bugs-and-feature-requests)
12
+ - [Documentation](#documentation)
13
+ - [Compiling CSS and JavaScript](#compiling-css-and-javascript)
14
+ - [Contributing](#contributing)
15
+ - [Community](#community)
16
+ - [Versioning](#versioning)
17
+ - [Authors](#authors)
18
+ - [Copyright and license](#copyright-and-license)
19
+
20
+ ## Quick start
21
+
22
+ Three quick start options are available:
23
+
24
+ - [Download the latest release](https://github.com/twbs/bootstrap/archive/v3.1.0.zip).
25
+ - Clone the repo: `git clone https://github.com/twbs/bootstrap.git`.
26
+ - Install with [Bower](http://bower.io): `bower install bootstrap`.
27
+
28
+ Read the [Getting Started page](http://getbootstrap.com/getting-started/) for information on the framework contents, templates and examples, and more.
29
+
30
+ ### What's included
31
+
32
+ Within the download you'll find the following directories and files, logically grouping common assets and providing both compiled and minified variations. You'll see something like this:
33
+
34
+ ```
35
+ bootstrap/
36
+ ├── css/
37
+ │ ├── bootstrap.css
38
+ │ ├── bootstrap.min.css
39
+ │ ├── bootstrap-theme.css
40
+ │ └── bootstrap-theme.min.css
41
+ ├── js/
42
+ │ ├── bootstrap.js
43
+ │ └── bootstrap.min.js
44
+ └── fonts/
45
+ ├── glyphicons-halflings-regular.eot
46
+ ├── glyphicons-halflings-regular.svg
47
+ ├── glyphicons-halflings-regular.ttf
48
+ └── glyphicons-halflings-regular.woff
49
+ ```
50
+
51
+ We provide compiled CSS and JS (`bootstrap.*`), as well as compiled and minified CSS and JS (`bootstrap.min.*`). Fonts from Glyphicons are included, as is the optional Bootstrap theme.
52
+
53
+
54
+
55
+ ## Bugs and feature requests
56
+
57
+ Have a bug or a feature request? Please first read the [issue guidelines](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md#using-the-issue-tracker) and search for existing and closed issues. If your problem or idea is not addressed yet, [please open a new issue](https://github.com/twbs/bootstrap/issues/new).
58
+
59
+
60
+ ## Documentation
61
+
62
+ Bootstrap's documentation, included in this repo in the root directory, is built with [Jekyll](http://jekyllrb.com) and publicly hosted on GitHub Pages at <http://getbootstrap.com>. The docs may also be run locally.
63
+
64
+ ### Running documentation locally
65
+
66
+ 1. If necessary, [install Jekyll](http://jekyllrb.com/docs/installation) (requires v1.x).
67
+ - **Windows users:** Read [this unofficial guide](https://github.com/juthilo/run-jekyll-on-windows/) to get Jekyll up and running without problems. We use Pygments for syntax highlighting, so make sure to read the sections on installing Python and Pygments.
68
+ 2. From the root `/bootstrap` directory, run `jekyll serve` in the command line.
69
+ - **Windows users:** While we use Jekyll's `encoding` setting, you might still need to change the command prompt's character encoding ([code page](http://en.wikipedia.org/wiki/Windows_code_page)) to UTF-8 so Jekyll runs without errors. For Ruby 2.0.0, run `chcp 65001` first. For Ruby 1.9.3, you can alternatively do `SET LANG=en_EN.UTF-8`.
70
+ 3. Open <http://localhost:9001> in your browser, and voilà.
71
+
72
+ Learn more about using Jekyll by reading its [documentation](http://jekyllrb.com/docs/home/).
73
+
74
+ ### Documentation for previous releases
75
+
76
+ Documentation for v2.3.2 has been made available for the time being at <http://getbootstrap.com/2.3.2/> while folks transition to Bootstrap 3.
77
+
78
+ [Previous releases](https://github.com/twbs/bootstrap/releases) and their documentation are also available for download.
79
+
80
+
81
+
82
+ ## Compiling CSS and JavaScript
83
+
84
+ Bootstrap uses [Grunt](http://gruntjs.com/) with convenient methods for working with the framework. It's how we compile our code, run tests, and more. To use it, install the required dependencies as directed and then run some Grunt commands.
85
+
86
+ ### Install Grunt
87
+
88
+ From the command line:
89
+
90
+ 1. Install `grunt-cli` globally with `npm install -g grunt-cli`.
91
+ 2. Navigate to the root `/bootstrap` directory, then run `npm install`. npm will look at [package.json](https://github.com/twbs/bootstrap/blob/master/package.json) and automatically install the necessary local dependencies listed there.
92
+
93
+ When completed, you'll be able to run the various Grunt commands provided from the command line.
94
+
95
+ **Unfamiliar with `npm`? Don't have node installed?** That's a-okay. npm stands for [node packaged modules](http://npmjs.org/) and is a way to manage development dependencies through node.js. [Download and install node.js](http://nodejs.org/download/) before proceeding.
96
+
97
+ ### Available Grunt commands
98
+
99
+ #### Build - `grunt`
100
+ Run `grunt` to run tests locally and compile the CSS and JavaScript into `/dist`. **Uses [Less](http://lesscss.org/) and [UglifyJS](http://lisperator.net/uglifyjs/).**
101
+
102
+ #### Only compile CSS and JavaScript - `grunt dist`
103
+ `grunt dist` creates the `/dist` directory with compiled files. **Uses [Less](http://lesscss.org/) and [UglifyJS](http://lisperator.net/uglifyjs/).**
104
+
105
+ #### Tests - `grunt test`
106
+ Runs [JSHint](http://jshint.com) and [QUnit](http://qunitjs.com/) tests headlessly in [PhantomJS](http://phantomjs.org/) (used for CI).
107
+
108
+ #### Watch - `grunt watch`
109
+ This is a convenience method for watching just Less files and automatically building them whenever you save.
110
+
111
+ ### Troubleshooting dependencies
112
+
113
+ Should you encounter problems with installing dependencies or running Grunt commands, uninstall all previous dependency versions (global and local). Then, rerun `npm install`.
114
+
115
+
116
+
117
+ ## Contributing
118
+
119
+ Please read through our [contributing guidelines](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md). Included are directions for opening issues, coding standards, and notes on development.
120
+
121
+ Moreover, if your pull request contains JavaScript patches or features, you must include relevant unit tests. All HTML and CSS should conform to the [Code Guide](http://github.com/mdo/code-guide), maintained by [Mark Otto](http://github.com/mdo).
122
+
123
+ Editor preferences are available in the [editor config](https://github.com/twbs/bootstrap/blob/master/.editorconfig) for easy use in common text editors. Read more and download plugins at <http://editorconfig.org>.
124
+
125
+
126
+
127
+ ## Community
128
+
129
+ Keep track of development and community news.
130
+
131
+ - Follow [@twbootstrap on Twitter](http://twitter.com/twbootstrap).
132
+ - Read and subscribe to [The Official Bootstrap Blog](http://blog.getbootstrap.com).
133
+ - Chat with fellow Bootstrappers in IRC. On the `irc.freenode.net` server, in the `##twitter-bootstrap` channel.
134
+ - Implementation help may be found at Stack Overflow (tagged [`twitter-bootstrap-3`](http://stackoverflow.com/questions/tagged/twitter-bootstrap-3)).
135
+
136
+
137
+
138
+
139
+ ## Versioning
140
+
141
+ For transparency into our release cycle and in striving to maintain backward compatibility, Bootstrap is maintained under the Semantic Versioning guidelines. Sometimes we screw up, but we'll adhere to these rules whenever possible.
142
+
143
+ Releases will be numbered with the following format:
144
+
145
+ `<major>.<minor>.<patch>`
146
+
147
+ And constructed with the following guidelines:
148
+
149
+ - Breaking backward compatibility **bumps the major** while resetting minor and patch
150
+ - New additions without breaking backward compatibility **bumps the minor** while resetting the patch
151
+ - Bug fixes and misc changes **bumps only the patch**
152
+
153
+ For more information on SemVer, please visit <http://semver.org/>.
154
+
155
+
156
+
157
+ ## Authors
158
+
159
+ **Mark Otto**
160
+
161
+ - <http://twitter.com/mdo>
162
+ - <http://github.com/mdo>
163
+
164
+ **Jacob Thornton**
165
+
166
+ - <http://twitter.com/fat>
167
+ - <http://github.com/fat>
168
+
169
+
170
+
171
+ ## Copyright and license
172
+
173
+ Code and documentation copyright 2011-2014 Twitter, Inc. Code released under [the MIT license](LICENSE). Docs released under [Creative Commons](docs/LICENSE).