gumdrop 0.2.16 → 0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. data/ChangeLog.md +11 -1
  2. data/Rakefile +9 -1
  3. data/bin/gumdrop +3 -1
  4. data/lib/gumdrop.rb +45 -73
  5. data/lib/gumdrop/build.rb +92 -0
  6. data/lib/gumdrop/content.rb +3 -2
  7. data/lib/gumdrop/generator.rb +64 -7
  8. data/lib/gumdrop/logging.rb +35 -0
  9. data/lib/gumdrop/pager.rb +4 -4
  10. data/lib/gumdrop/server.rb +26 -10
  11. data/lib/gumdrop/template/default/Gemfile +4 -2
  12. data/lib/gumdrop/template/default/Rakefile +4 -1
  13. data/lib/gumdrop/template/default/config.ru +6 -2
  14. data/lib/gumdrop/template/default/lib/site.rb +15 -5
  15. data/lib/gumdrop/template/default/powrc +2 -0
  16. data/lib/gumdrop/version.rb +2 -2
  17. data/specs/content_spec.rb +31 -0
  18. data/specs/deferred_loader_spec.rb +31 -0
  19. data/specs/hash_object_spec.rb +31 -0
  20. metadata +19 -83
  21. data/lib/gumdrop/template/twitter/Gemfile +0 -28
  22. data/lib/gumdrop/template/twitter/Rakefile +0 -35
  23. data/lib/gumdrop/template/twitter/config.ru +0 -17
  24. data/lib/gumdrop/template/twitter/data/config.yml +0 -4
  25. data/lib/gumdrop/template/twitter/lib/site.rb +0 -43
  26. data/lib/gumdrop/template/twitter/lib/view_helpers.rb +0 -17
  27. data/lib/gumdrop/template/twitter/source/_sidebar.html.slim +0 -1
  28. data/lib/gumdrop/template/twitter/source/container-app.html.slim +0 -89
  29. data/lib/gumdrop/template/twitter/source/default.htaccess +0 -16
  30. data/lib/gumdrop/template/twitter/source/favicon.ico +0 -0
  31. data/lib/gumdrop/template/twitter/source/feed.xml.builder.txt +0 -23
  32. data/lib/gumdrop/template/twitter/source/fluid.html.slim +0 -134
  33. data/lib/gumdrop/template/twitter/source/hero.html.slim +0 -49
  34. data/lib/gumdrop/template/twitter/source/index.html.erb +0 -10
  35. data/lib/gumdrop/template/twitter/source/theme/screen.css.sass +0 -3
  36. data/lib/gumdrop/template/twitter/source/theme/scripts/app.js.coffee +0 -4
  37. data/lib/gumdrop/template/twitter/source/theme/scripts/jquery.js +0 -4
  38. data/lib/gumdrop/template/twitter/source/theme/styles/_tools.scss +0 -434
  39. data/lib/gumdrop/template/twitter/source/theme/templates/site.template.slim +0 -19
  40. data/lib/gumdrop/template/twitter/source/theme/twitter/LICENSE +0 -13
  41. data/lib/gumdrop/template/twitter/source/theme/twitter/Makefile +0 -30
  42. data/lib/gumdrop/template/twitter/source/theme/twitter/README.md +0 -115
  43. data/lib/gumdrop/template/twitter/source/theme/twitter/bootstrap-min.css +0 -330
  44. data/lib/gumdrop/template/twitter/source/theme/twitter/bootstrap.css +0 -2362
  45. data/lib/gumdrop/template/twitter/source/theme/twitter/docs/assets/css/docs.css +0 -317
  46. data/lib/gumdrop/template/twitter/source/theme/twitter/docs/assets/ico/bootstrap-apple-114x114.png +0 -0
  47. data/lib/gumdrop/template/twitter/source/theme/twitter/docs/assets/ico/bootstrap-apple-57x57.png +0 -0
  48. data/lib/gumdrop/template/twitter/source/theme/twitter/docs/assets/ico/bootstrap-apple-72x72.png +0 -0
  49. data/lib/gumdrop/template/twitter/source/theme/twitter/docs/assets/ico/favicon.ico +0 -0
  50. data/lib/gumdrop/template/twitter/source/theme/twitter/docs/assets/img/bird.png +0 -0
  51. data/lib/gumdrop/template/twitter/source/theme/twitter/docs/assets/img/browsers.png +0 -0
  52. data/lib/gumdrop/template/twitter/source/theme/twitter/docs/assets/img/example-diagram-01.png +0 -0
  53. data/lib/gumdrop/template/twitter/source/theme/twitter/docs/assets/img/example-diagram-02.png +0 -0
  54. data/lib/gumdrop/template/twitter/source/theme/twitter/docs/assets/img/example-diagram-03.png +0 -0
  55. data/lib/gumdrop/template/twitter/source/theme/twitter/docs/assets/img/grid-18px.png +0 -0
  56. data/lib/gumdrop/template/twitter/source/theme/twitter/docs/assets/img/twitter-logo-no-bird.png +0 -0
  57. data/lib/gumdrop/template/twitter/source/theme/twitter/docs/assets/js/application.js +0 -52
  58. data/lib/gumdrop/template/twitter/source/theme/twitter/docs/assets/js/google-code-prettify/prettify.css +0 -41
  59. data/lib/gumdrop/template/twitter/source/theme/twitter/docs/assets/js/google-code-prettify/prettify.js +0 -28
  60. data/lib/gumdrop/template/twitter/source/theme/twitter/docs/index.html +0 -1932
  61. data/lib/gumdrop/template/twitter/source/theme/twitter/docs/javascript.html +0 -676
  62. data/lib/gumdrop/template/twitter/source/theme/twitter/examples/container-app.html +0 -119
  63. data/lib/gumdrop/template/twitter/source/theme/twitter/examples/fluid.html +0 -126
  64. data/lib/gumdrop/template/twitter/source/theme/twitter/examples/hero.html +0 -79
  65. data/lib/gumdrop/template/twitter/source/theme/twitter/js/bootstrap-alerts.js +0 -104
  66. data/lib/gumdrop/template/twitter/source/theme/twitter/js/bootstrap-dropdown.js +0 -50
  67. data/lib/gumdrop/template/twitter/source/theme/twitter/js/bootstrap-modal.js +0 -238
  68. data/lib/gumdrop/template/twitter/source/theme/twitter/js/bootstrap-popover.js +0 -77
  69. data/lib/gumdrop/template/twitter/source/theme/twitter/js/bootstrap-scrollspy.js +0 -105
  70. data/lib/gumdrop/template/twitter/source/theme/twitter/js/bootstrap-tabs.js +0 -62
  71. data/lib/gumdrop/template/twitter/source/theme/twitter/js/bootstrap-twipsy.js +0 -307
  72. data/lib/gumdrop/template/twitter/source/theme/twitter/js/tests/index.html +0 -38
  73. data/lib/gumdrop/template/twitter/source/theme/twitter/js/tests/unit/bootstrap-alerts.js +0 -41
  74. data/lib/gumdrop/template/twitter/source/theme/twitter/js/tests/unit/bootstrap-dropdown.js +0 -52
  75. data/lib/gumdrop/template/twitter/source/theme/twitter/js/tests/unit/bootstrap-modal.js +0 -151
  76. data/lib/gumdrop/template/twitter/source/theme/twitter/js/tests/unit/bootstrap-popover.js +0 -76
  77. data/lib/gumdrop/template/twitter/source/theme/twitter/js/tests/unit/bootstrap-scrollspy.js +0 -31
  78. data/lib/gumdrop/template/twitter/source/theme/twitter/js/tests/unit/bootstrap-tabs.js +0 -49
  79. data/lib/gumdrop/template/twitter/source/theme/twitter/js/tests/unit/bootstrap-twipsy.js +0 -81
  80. data/lib/gumdrop/template/twitter/source/theme/twitter/js/tests/vendor/qunit.css +0 -232
  81. data/lib/gumdrop/template/twitter/source/theme/twitter/js/tests/vendor/qunit.js +0 -1510
  82. data/lib/gumdrop/template/twitter/source/theme/twitter/lib/bootstrap.less +0 -26
  83. data/lib/gumdrop/template/twitter/source/theme/twitter/lib/forms.less +0 -465
  84. data/lib/gumdrop/template/twitter/source/theme/twitter/lib/mixins.less +0 -217
  85. data/lib/gumdrop/template/twitter/source/theme/twitter/lib/patterns.less +0 -1005
  86. data/lib/gumdrop/template/twitter/source/theme/twitter/lib/reset.less +0 -141
  87. data/lib/gumdrop/template/twitter/source/theme/twitter/lib/scaffolding.less +0 -135
  88. data/lib/gumdrop/template/twitter/source/theme/twitter/lib/tables.less +0 -171
  89. data/lib/gumdrop/template/twitter/source/theme/twitter/lib/type.less +0 -187
  90. data/lib/gumdrop/template/twitter/source/theme/twitter/lib/variables.less +0 -60
@@ -1,238 +0,0 @@
1
- /* =========================================================
2
- * bootstrap-modal.js v1.3.0
3
- * http://twitter.github.com/bootstrap/javascript.html#modal
4
- * =========================================================
5
- * Copyright 2011 Twitter, Inc.
6
- *
7
- * Licensed under the Apache License, Version 2.0 (the "License");
8
- * you may not use this file except in compliance with the License.
9
- * You may obtain a copy of the License at
10
- *
11
- * http://www.apache.org/licenses/LICENSE-2.0
12
- *
13
- * Unless required by applicable law or agreed to in writing, software
14
- * distributed under the License is distributed on an "AS IS" BASIS,
15
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- * See the License for the specific language governing permissions and
17
- * limitations under the License.
18
- * ========================================================= */
19
-
20
-
21
- !function( $ ){
22
-
23
- /* CSS TRANSITION SUPPORT (https://gist.github.com/373874)
24
- * ======================================================= */
25
-
26
- var transitionEnd
27
-
28
- $(document).ready(function () {
29
-
30
- $.support.transition = (function () {
31
- var thisBody = document.body || document.documentElement
32
- , thisStyle = thisBody.style
33
- , support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined
34
- return support
35
- })()
36
-
37
- // set CSS transition event type
38
- if ( $.support.transition ) {
39
- transitionEnd = "TransitionEnd"
40
- if ( $.browser.webkit ) {
41
- transitionEnd = "webkitTransitionEnd"
42
- } else if ( $.browser.mozilla ) {
43
- transitionEnd = "transitionend"
44
- } else if ( $.browser.opera ) {
45
- transitionEnd = "oTransitionEnd"
46
- }
47
- }
48
-
49
- })
50
-
51
-
52
- /* MODAL PUBLIC CLASS DEFINITION
53
- * ============================= */
54
-
55
- var Modal = function ( content, options ) {
56
- this.settings = $.extend({}, $.fn.modal.defaults)
57
- this.$element = $(content)
58
- .delegate('.close', 'click.modal', $.proxy(this.hide, this))
59
-
60
- if ( options ) {
61
- $.extend( this.settings, options )
62
-
63
- if ( options.show ) {
64
- this.show()
65
- }
66
- }
67
-
68
- return this
69
- }
70
-
71
- Modal.prototype = {
72
-
73
- toggle: function () {
74
- return this[!this.isShown ? 'show' : 'hide']()
75
- }
76
-
77
- , show: function () {
78
- var that = this
79
- this.isShown = true
80
- this.$element.trigger('show')
81
-
82
- escape.call(this)
83
- backdrop.call(this, function () {
84
- that.$element
85
- .appendTo(document.body)
86
- .show()
87
-
88
- if ($.support.transition && that.$element.hasClass('fade')) {
89
- that.$backdrop[0].offsetWidth // force reflow
90
- }
91
-
92
- that.$element
93
- .addClass('in')
94
- .trigger('shown')
95
- })
96
-
97
- return this
98
- }
99
-
100
- , hide: function (e) {
101
- e && e.preventDefault()
102
-
103
- var that = this
104
- this.isShown = false
105
-
106
- escape.call(this)
107
-
108
- this.$element
109
- .trigger('hide')
110
- .removeClass('in')
111
-
112
- function removeElement () {
113
- that.$element
114
- .hide()
115
- .trigger('hidden')
116
-
117
- backdrop.call(that)
118
- }
119
-
120
- $.support.transition && this.$element.hasClass('fade') ?
121
- this.$element.one(transitionEnd, removeElement) :
122
- removeElement()
123
-
124
- return this
125
- }
126
-
127
- }
128
-
129
-
130
- /* MODAL PRIVATE METHODS
131
- * ===================== */
132
-
133
- function backdrop ( callback ) {
134
- var that = this
135
- , animate = this.$element.hasClass('fade') ? 'fade' : ''
136
- if ( this.isShown && this.settings.backdrop ) {
137
- var doAnimate = $.support.transition && animate
138
-
139
- this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
140
- .appendTo(document.body)
141
-
142
- if ( this.settings.backdrop != 'static' ) {
143
- this.$backdrop.click($.proxy(this.hide, this))
144
- }
145
-
146
- if ( doAnimate ) {
147
- that.$backdrop[0].offsetWidth // force reflow
148
- }
149
-
150
- that.$backdrop && that.$backdrop.addClass('in')
151
-
152
- doAnimate ?
153
- that.$backdrop.one(transitionEnd, callback) :
154
- callback()
155
-
156
- } else if ( !this.isShown && this.$backdrop ) {
157
- this.$backdrop.removeClass('in')
158
-
159
- function removeElement() {
160
- that.$backdrop.remove()
161
- that.$backdrop = null
162
- }
163
-
164
- $.support.transition && this.$element.hasClass('fade')?
165
- this.$backdrop.one(transitionEnd, removeElement) :
166
- removeElement()
167
- } else if ( callback ) {
168
- callback()
169
- }
170
- }
171
-
172
- function escape() {
173
- var that = this
174
- if ( this.isShown && this.settings.keyboard ) {
175
- $(document).bind('keyup.modal', function ( e ) {
176
- if ( e.which == 27 ) {
177
- that.hide()
178
- }
179
- })
180
- } else if ( !this.isShown ) {
181
- $(document).unbind('keyup.modal')
182
- }
183
- }
184
-
185
-
186
- /* MODAL PLUGIN DEFINITION
187
- * ======================= */
188
-
189
- $.fn.modal = function ( options ) {
190
- var modal = this.data('modal')
191
-
192
- if (!modal) {
193
-
194
- if (typeof options == 'string') {
195
- options = {
196
- show: /show|toggle/.test(options)
197
- }
198
- }
199
-
200
- return this.each(function () {
201
- $(this).data('modal', new Modal(this, options))
202
- })
203
- }
204
-
205
- if ( options === true ) {
206
- return modal
207
- }
208
-
209
- if ( typeof options == 'string' ) {
210
- modal[options]()
211
- } else if ( modal ) {
212
- modal.toggle()
213
- }
214
-
215
- return this
216
- }
217
-
218
- $.fn.modal.Modal = Modal
219
-
220
- $.fn.modal.defaults = {
221
- backdrop: false
222
- , keyboard: false
223
- , show: true
224
- }
225
-
226
-
227
- /* MODAL DATA- IMPLEMENTATION
228
- * ========================== */
229
-
230
- $(document).ready(function () {
231
- $('body').delegate('[data-controls-modal]', 'click', function (e) {
232
- e.preventDefault()
233
- var $this = $(this).data('show', true)
234
- $('#' + $this.attr('data-controls-modal')).modal( $this.data() )
235
- })
236
- })
237
-
238
- }( window.jQuery || window.ender )
@@ -1,77 +0,0 @@
1
- /* ===========================================================
2
- * bootstrap-popover.js v1.3.0
3
- * http://twitter.github.com/bootstrap/javascript.html#popover
4
- * ===========================================================
5
- * Copyright 2011 Twitter, Inc.
6
- *
7
- * Licensed under the Apache License, Version 2.0 (the "License");
8
- * you may not use this file except in compliance with the License.
9
- * You may obtain a copy of the License at
10
- *
11
- * http://www.apache.org/licenses/LICENSE-2.0
12
- *
13
- * Unless required by applicable law or agreed to in writing, software
14
- * distributed under the License is distributed on an "AS IS" BASIS,
15
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- * See the License for the specific language governing permissions and
17
- * limitations under the License.
18
- * =========================================================== */
19
-
20
-
21
- !function( $ ) {
22
-
23
- var Popover = function ( element, options ) {
24
- this.$element = $(element)
25
- this.options = options
26
- this.enabled = true
27
- this.fixTitle()
28
- }
29
-
30
- /* NOTE: POPOVER EXTENDS BOOTSTRAP-TWIPSY.js
31
- ========================================= */
32
-
33
- Popover.prototype = $.extend({}, $.fn.twipsy.Twipsy.prototype, {
34
-
35
- setContent: function () {
36
- var $tip = this.tip()
37
- $tip.find('.title')[this.options.html ? 'html' : 'text'](this.getTitle())
38
- $tip.find('.content p')[this.options.html ? 'html' : 'text'](this.getContent())
39
- $tip[0].className = 'popover'
40
- }
41
-
42
- , getContent: function () {
43
- var content
44
- , $e = this.$element
45
- , o = this.options
46
-
47
- if (typeof this.options.content == 'string') {
48
- content = $e.attr(o.content)
49
- } else if (typeof this.options.content == 'function') {
50
- content = this.options.content.call(this.$element[0])
51
- }
52
- return content
53
- }
54
-
55
- , tip: function() {
56
- if (!this.$tip) {
57
- this.$tip = $('<div class="popover" />')
58
- .html('<div class="arrow"></div><div class="inner"><h3 class="title"></h3><div class="content"><p></p></div></div>')
59
- }
60
- return this.$tip
61
- }
62
-
63
- })
64
-
65
-
66
- /* POPOVER PLUGIN DEFINITION
67
- * ======================= */
68
-
69
- $.fn.popover = function (options) {
70
- if (typeof options == 'object') options = $.extend({}, $.fn.popover.defaults, options)
71
- $.fn.twipsy.initWith.call(this, options, Popover, 'popover')
72
- return this
73
- }
74
-
75
- $.fn.popover.defaults = $.extend({} , $.fn.twipsy.defaults, { content: 'data-content', placement: 'right'})
76
-
77
- }( window.jQuery || window.ender )
@@ -1,105 +0,0 @@
1
- /* =============================================================
2
- * bootstrap-scrollspy.js v1.3.0
3
- * http://twitter.github.com/bootstrap/javascript.html#scrollspy
4
- * =============================================================
5
- * Copyright 2011 Twitter, Inc.
6
- *
7
- * Licensed under the Apache License, Version 2.0 (the "License");
8
- * you may not use this file except in compliance with the License.
9
- * You may obtain a copy of the License at
10
- *
11
- * http://www.apache.org/licenses/LICENSE-2.0
12
- *
13
- * Unless required by applicable law or agreed to in writing, software
14
- * distributed under the License is distributed on an "AS IS" BASIS,
15
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- * See the License for the specific language governing permissions and
17
- * limitations under the License.
18
- * ============================================================== */
19
-
20
-
21
- !function ( $ ) {
22
-
23
- var $window = $(window)
24
-
25
- function ScrollSpy( topbar, selector ) {
26
- var processScroll = $.proxy(this.processScroll, this)
27
- this.$topbar = $(topbar)
28
- this.selector = selector || 'li > a'
29
- this.refresh()
30
- this.$topbar.delegate(this.selector, 'click', processScroll)
31
- $window.scroll(processScroll)
32
- this.processScroll()
33
- }
34
-
35
- ScrollSpy.prototype = {
36
-
37
- refresh: function () {
38
- this.targets = this.$topbar.find(this.selector).map(function () {
39
- var href = $(this).attr('href')
40
- return /^#\w/.test(href) && $(href).length ? href : null
41
- })
42
-
43
- this.offsets = $.map(this.targets, function (id) {
44
- return $(id).offset().top
45
- })
46
- }
47
-
48
- , processScroll: function () {
49
- var scrollTop = $window.scrollTop() + 10
50
- , offsets = this.offsets
51
- , targets = this.targets
52
- , activeTarget = this.activeTarget
53
- , i
54
-
55
- for (i = offsets.length; i--;) {
56
- activeTarget != targets[i]
57
- && scrollTop >= offsets[i]
58
- && (!offsets[i + 1] || scrollTop <= offsets[i + 1])
59
- && this.activateButton( targets[i] )
60
- }
61
- }
62
-
63
- , activateButton: function (target) {
64
- this.activeTarget = target
65
-
66
- this.$topbar
67
- .find(this.selector).parent('.active')
68
- .removeClass('active')
69
-
70
- this.$topbar
71
- .find(this.selector + '[href="' + target + '"]')
72
- .parent('li')
73
- .addClass('active')
74
- }
75
-
76
- }
77
-
78
- /* SCROLLSPY PLUGIN DEFINITION
79
- * =========================== */
80
-
81
- $.fn.scrollSpy = function( options ) {
82
- var scrollspy = this.data('scrollspy')
83
-
84
- if (!scrollspy) {
85
- return this.each(function () {
86
- $(this).data('scrollspy', new ScrollSpy( this, options ))
87
- })
88
- }
89
-
90
- if ( options === true ) {
91
- return scrollspy
92
- }
93
-
94
- if ( typeof options == 'string' ) {
95
- scrollspy[options]()
96
- }
97
-
98
- return this
99
- }
100
-
101
- $(document).ready(function () {
102
- $('body').scrollSpy('[data-scrollspy] li > a')
103
- })
104
-
105
- }( window.jQuery || window.ender )
@@ -1,62 +0,0 @@
1
- /* ========================================================
2
- * bootstrap-tabs.js v1.3.0
3
- * http://twitter.github.com/bootstrap/javascript.html#tabs
4
- * ========================================================
5
- * Copyright 2011 Twitter, Inc.
6
- *
7
- * Licensed under the Apache License, Version 2.0 (the "License");
8
- * you may not use this file except in compliance with the License.
9
- * You may obtain a copy of the License at
10
- *
11
- * http://www.apache.org/licenses/LICENSE-2.0
12
- *
13
- * Unless required by applicable law or agreed to in writing, software
14
- * distributed under the License is distributed on an "AS IS" BASIS,
15
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- * See the License for the specific language governing permissions and
17
- * limitations under the License.
18
- * ======================================================== */
19
-
20
-
21
- !function( $ ){
22
-
23
- function activate ( element, container ) {
24
- container.find('.active').removeClass('active')
25
- element.addClass('active')
26
- }
27
-
28
- function tab( e ) {
29
- var $this = $(this)
30
- , href = $this.attr('href')
31
- , $ul = $this.closest('ul')
32
- , $controlled
33
-
34
- if (/^#\w+/.test(href)) {
35
- e.preventDefault()
36
-
37
- if ($this.hasClass('active')) {
38
- return
39
- }
40
-
41
- $href = $(href)
42
-
43
- activate($this.parent('li'), $ul)
44
- activate($href, $href.parent())
45
- }
46
- }
47
-
48
-
49
- /* TABS/PILLS PLUGIN DEFINITION
50
- * ============================ */
51
-
52
- $.fn.tabs = $.fn.pills = function ( selector ) {
53
- return this.each(function () {
54
- $(this).delegate(selector || '.tabs li > a, .pills > li > a', 'click', tab)
55
- })
56
- }
57
-
58
- $(document).ready(function () {
59
- $('body').tabs('ul[data-tabs] li > a, ul[data-pills] > li > a')
60
- })
61
-
62
- }( window.jQuery || window.ender )