sidekiq 2.2.1 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of sidekiq might be problematic. Click here for more details.
- data/Changes.md +9 -0
- data/Gemfile +1 -2
- data/README.md +2 -2
- data/examples/sinkiq.rb +2 -2
- data/lib/sidekiq.rb +2 -0
- data/lib/sidekiq/cli.rb +4 -0
- data/lib/sidekiq/client.rb +13 -3
- data/lib/sidekiq/exception_handler.rb +1 -1
- data/lib/sidekiq/manager.rb +1 -2
- data/lib/sidekiq/middleware/server/logging.rb +1 -1
- data/lib/sidekiq/middleware/server/retry_jobs.rb +3 -3
- data/lib/sidekiq/processor.rb +12 -15
- data/lib/sidekiq/stats.rb +36 -0
- data/lib/sidekiq/testing/inline.rb +6 -6
- data/lib/sidekiq/util.rb +2 -2
- data/lib/sidekiq/version.rb +1 -1
- data/lib/sidekiq/web.rb +21 -8
- data/sidekiq.gemspec +3 -2
- data/test/helper.rb +2 -0
- data/test/test_client.rb +7 -0
- data/test/test_exception_handler.rb +1 -1
- data/test/test_stats.rb +47 -8
- data/test/test_testing.rb +7 -0
- data/test/test_testing_inline.rb +4 -4
- data/web/assets/images/bootstrap/glyphicons-halflings-white.png +0 -0
- data/web/assets/images/bootstrap/glyphicons-halflings.png +0 -0
- data/web/assets/javascripts/application.js +7 -0
- data/web/assets/javascripts/vendor/bootstrap.js +2027 -12
- data/web/assets/stylesheets/layout.css +5 -1
- data/web/assets/stylesheets/vendor/bootstrap-responsive.css +841 -368
- data/web/assets/stylesheets/vendor/bootstrap.css +3565 -1306
- data/web/views/_summary.slim +6 -6
- data/web/views/index.slim +6 -5
- data/web/views/layout.slim +1 -1
- data/web/views/queues.slim +2 -2
- metadata +21 -55
- data/myapp/.gitignore +0 -15
- data/myapp/Capfile +0 -5
- data/myapp/Gemfile +0 -19
- data/myapp/Rakefile +0 -7
- data/myapp/app/controllers/application_controller.rb +0 -3
- data/myapp/app/controllers/work_controller.rb +0 -38
- data/myapp/app/helpers/application_helper.rb +0 -2
- data/myapp/app/mailers/.gitkeep +0 -0
- data/myapp/app/mailers/user_mailer.rb +0 -9
- data/myapp/app/models/.gitkeep +0 -0
- data/myapp/app/models/post.rb +0 -5
- data/myapp/app/views/layouts/application.html.erb +0 -14
- data/myapp/app/views/user_mailer/greetings.html.erb +0 -3
- data/myapp/app/views/work/index.html.erb +0 -1
- data/myapp/app/workers/hard_worker.rb +0 -10
- data/myapp/config.ru +0 -4
- data/myapp/config/application.rb +0 -59
- data/myapp/config/boot.rb +0 -6
- data/myapp/config/database.yml +0 -25
- data/myapp/config/deploy.rb +0 -15
- data/myapp/config/environment.rb +0 -5
- data/myapp/config/environments/development.rb +0 -38
- data/myapp/config/environments/production.rb +0 -67
- data/myapp/config/environments/test.rb +0 -37
- data/myapp/config/initializers/backtrace_silencers.rb +0 -7
- data/myapp/config/initializers/inflections.rb +0 -15
- data/myapp/config/initializers/mime_types.rb +0 -5
- data/myapp/config/initializers/secret_token.rb +0 -7
- data/myapp/config/initializers/session_store.rb +0 -8
- data/myapp/config/initializers/sidekiq.rb +0 -6
- data/myapp/config/initializers/wrap_parameters.rb +0 -14
- data/myapp/config/locales/en.yml +0 -5
- data/myapp/config/routes.rb +0 -10
- data/myapp/db/migrate/20120123214055_create_posts.rb +0 -10
- data/myapp/db/seeds.rb +0 -7
- data/myapp/lib/assets/.gitkeep +0 -0
- data/myapp/lib/tasks/.gitkeep +0 -0
- data/myapp/log/.gitkeep +0 -0
- data/myapp/script/rails +0 -6
- data/web/assets/javascripts/vendor/bootstrap/bootstrap-alert.js +0 -91
- data/web/assets/javascripts/vendor/bootstrap/bootstrap-button.js +0 -98
- data/web/assets/javascripts/vendor/bootstrap/bootstrap-carousel.js +0 -154
- data/web/assets/javascripts/vendor/bootstrap/bootstrap-collapse.js +0 -136
- data/web/assets/javascripts/vendor/bootstrap/bootstrap-dropdown.js +0 -92
- data/web/assets/javascripts/vendor/bootstrap/bootstrap-modal.js +0 -210
- data/web/assets/javascripts/vendor/bootstrap/bootstrap-popover.js +0 -95
- data/web/assets/javascripts/vendor/bootstrap/bootstrap-scrollspy.js +0 -125
- data/web/assets/javascripts/vendor/bootstrap/bootstrap-tab.js +0 -130
- data/web/assets/javascripts/vendor/bootstrap/bootstrap-tooltip.js +0 -270
- data/web/assets/javascripts/vendor/bootstrap/bootstrap-transition.js +0 -51
- data/web/assets/javascripts/vendor/bootstrap/bootstrap-typeahead.js +0 -271
@@ -1,51 +0,0 @@
|
|
1
|
-
/* ===================================================
|
2
|
-
* bootstrap-transition.js v2.0.0
|
3
|
-
* http://twitter.github.com/bootstrap/javascript.html#transitions
|
4
|
-
* ===================================================
|
5
|
-
* Copyright 2012 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
|
-
!function( $ ) {
|
21
|
-
|
22
|
-
$(function () {
|
23
|
-
|
24
|
-
"use strict"
|
25
|
-
|
26
|
-
/* CSS TRANSITION SUPPORT (https://gist.github.com/373874)
|
27
|
-
* ======================================================= */
|
28
|
-
|
29
|
-
$.support.transition = (function () {
|
30
|
-
var thisBody = document.body || document.documentElement
|
31
|
-
, thisStyle = thisBody.style
|
32
|
-
, support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined
|
33
|
-
|
34
|
-
return support && {
|
35
|
-
end: (function () {
|
36
|
-
var transitionEnd = "TransitionEnd"
|
37
|
-
if ( $.browser.webkit ) {
|
38
|
-
transitionEnd = "webkitTransitionEnd"
|
39
|
-
} else if ( $.browser.mozilla ) {
|
40
|
-
transitionEnd = "transitionend"
|
41
|
-
} else if ( $.browser.opera ) {
|
42
|
-
transitionEnd = "oTransitionEnd"
|
43
|
-
}
|
44
|
-
return transitionEnd
|
45
|
-
}())
|
46
|
-
}
|
47
|
-
})()
|
48
|
-
|
49
|
-
})
|
50
|
-
|
51
|
-
}( window.jQuery )
|
@@ -1,271 +0,0 @@
|
|
1
|
-
/* =============================================================
|
2
|
-
* bootstrap-typeahead.js v2.0.0
|
3
|
-
* http://twitter.github.com/bootstrap/javascript.html#typeahead
|
4
|
-
* =============================================================
|
5
|
-
* Copyright 2012 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
|
-
!function( $ ){
|
21
|
-
|
22
|
-
"use strict"
|
23
|
-
|
24
|
-
var Typeahead = function ( element, options ) {
|
25
|
-
this.$element = $(element)
|
26
|
-
this.options = $.extend({}, $.fn.typeahead.defaults, options)
|
27
|
-
this.matcher = this.options.matcher || this.matcher
|
28
|
-
this.sorter = this.options.sorter || this.sorter
|
29
|
-
this.highlighter = this.options.highlighter || this.highlighter
|
30
|
-
this.$menu = $(this.options.menu).appendTo('body')
|
31
|
-
this.source = this.options.source
|
32
|
-
this.shown = false
|
33
|
-
this.listen()
|
34
|
-
}
|
35
|
-
|
36
|
-
Typeahead.prototype = {
|
37
|
-
|
38
|
-
constructor: Typeahead
|
39
|
-
|
40
|
-
, select: function () {
|
41
|
-
var val = this.$menu.find('.active').attr('data-value')
|
42
|
-
this.$element.val(val)
|
43
|
-
return this.hide()
|
44
|
-
}
|
45
|
-
|
46
|
-
, show: function () {
|
47
|
-
var pos = $.extend({}, this.$element.offset(), {
|
48
|
-
height: this.$element[0].offsetHeight
|
49
|
-
})
|
50
|
-
|
51
|
-
this.$menu.css({
|
52
|
-
top: pos.top + pos.height
|
53
|
-
, left: pos.left
|
54
|
-
})
|
55
|
-
|
56
|
-
this.$menu.show()
|
57
|
-
this.shown = true
|
58
|
-
return this
|
59
|
-
}
|
60
|
-
|
61
|
-
, hide: function () {
|
62
|
-
this.$menu.hide()
|
63
|
-
this.shown = false
|
64
|
-
return this
|
65
|
-
}
|
66
|
-
|
67
|
-
, lookup: function (event) {
|
68
|
-
var that = this
|
69
|
-
, items
|
70
|
-
, q
|
71
|
-
|
72
|
-
this.query = this.$element.val()
|
73
|
-
|
74
|
-
if (!this.query) {
|
75
|
-
return this.shown ? this.hide() : this
|
76
|
-
}
|
77
|
-
|
78
|
-
items = $.grep(this.source, function (item) {
|
79
|
-
if (that.matcher(item)) return item
|
80
|
-
})
|
81
|
-
|
82
|
-
items = this.sorter(items)
|
83
|
-
|
84
|
-
if (!items.length) {
|
85
|
-
return this.shown ? this.hide() : this
|
86
|
-
}
|
87
|
-
|
88
|
-
return this.render(items.slice(0, this.options.items)).show()
|
89
|
-
}
|
90
|
-
|
91
|
-
, matcher: function (item) {
|
92
|
-
return ~item.toLowerCase().indexOf(this.query.toLowerCase())
|
93
|
-
}
|
94
|
-
|
95
|
-
, sorter: function (items) {
|
96
|
-
var beginswith = []
|
97
|
-
, caseSensitive = []
|
98
|
-
, caseInsensitive = []
|
99
|
-
, item
|
100
|
-
|
101
|
-
while (item = items.shift()) {
|
102
|
-
if (!item.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item)
|
103
|
-
else if (~item.indexOf(this.query)) caseSensitive.push(item)
|
104
|
-
else caseInsensitive.push(item)
|
105
|
-
}
|
106
|
-
|
107
|
-
return beginswith.concat(caseSensitive, caseInsensitive)
|
108
|
-
}
|
109
|
-
|
110
|
-
, highlighter: function (item) {
|
111
|
-
return item.replace(new RegExp('(' + this.query + ')', 'ig'), function ($1, match) {
|
112
|
-
return '<strong>' + match + '</strong>'
|
113
|
-
})
|
114
|
-
}
|
115
|
-
|
116
|
-
, render: function (items) {
|
117
|
-
var that = this
|
118
|
-
|
119
|
-
items = $(items).map(function (i, item) {
|
120
|
-
i = $(that.options.item).attr('data-value', item)
|
121
|
-
i.find('a').html(that.highlighter(item))
|
122
|
-
return i[0]
|
123
|
-
})
|
124
|
-
|
125
|
-
items.first().addClass('active')
|
126
|
-
this.$menu.html(items)
|
127
|
-
return this
|
128
|
-
}
|
129
|
-
|
130
|
-
, next: function (event) {
|
131
|
-
var active = this.$menu.find('.active').removeClass('active')
|
132
|
-
, next = active.next()
|
133
|
-
|
134
|
-
if (!next.length) {
|
135
|
-
next = $(this.$menu.find('li')[0])
|
136
|
-
}
|
137
|
-
|
138
|
-
next.addClass('active')
|
139
|
-
}
|
140
|
-
|
141
|
-
, prev: function (event) {
|
142
|
-
var active = this.$menu.find('.active').removeClass('active')
|
143
|
-
, prev = active.prev()
|
144
|
-
|
145
|
-
if (!prev.length) {
|
146
|
-
prev = this.$menu.find('li').last()
|
147
|
-
}
|
148
|
-
|
149
|
-
prev.addClass('active')
|
150
|
-
}
|
151
|
-
|
152
|
-
, listen: function () {
|
153
|
-
this.$element
|
154
|
-
.on('blur', $.proxy(this.blur, this))
|
155
|
-
.on('keypress', $.proxy(this.keypress, this))
|
156
|
-
.on('keyup', $.proxy(this.keyup, this))
|
157
|
-
|
158
|
-
if ($.browser.webkit || $.browser.msie) {
|
159
|
-
this.$element.on('keydown', $.proxy(this.keypress, this))
|
160
|
-
}
|
161
|
-
|
162
|
-
this.$menu
|
163
|
-
.on('click', $.proxy(this.click, this))
|
164
|
-
.on('mouseenter', 'li', $.proxy(this.mouseenter, this))
|
165
|
-
}
|
166
|
-
|
167
|
-
, keyup: function (e) {
|
168
|
-
e.stopPropagation()
|
169
|
-
e.preventDefault()
|
170
|
-
|
171
|
-
switch(e.keyCode) {
|
172
|
-
case 40: // down arrow
|
173
|
-
case 38: // up arrow
|
174
|
-
break
|
175
|
-
|
176
|
-
case 9: // tab
|
177
|
-
case 13: // enter
|
178
|
-
if (!this.shown) return
|
179
|
-
this.select()
|
180
|
-
break
|
181
|
-
|
182
|
-
case 27: // escape
|
183
|
-
this.hide()
|
184
|
-
break
|
185
|
-
|
186
|
-
default:
|
187
|
-
this.lookup()
|
188
|
-
}
|
189
|
-
|
190
|
-
}
|
191
|
-
|
192
|
-
, keypress: function (e) {
|
193
|
-
e.stopPropagation()
|
194
|
-
if (!this.shown) return
|
195
|
-
|
196
|
-
switch(e.keyCode) {
|
197
|
-
case 9: // tab
|
198
|
-
case 13: // enter
|
199
|
-
case 27: // escape
|
200
|
-
e.preventDefault()
|
201
|
-
break
|
202
|
-
|
203
|
-
case 38: // up arrow
|
204
|
-
e.preventDefault()
|
205
|
-
this.prev()
|
206
|
-
break
|
207
|
-
|
208
|
-
case 40: // down arrow
|
209
|
-
e.preventDefault()
|
210
|
-
this.next()
|
211
|
-
break
|
212
|
-
}
|
213
|
-
}
|
214
|
-
|
215
|
-
, blur: function (e) {
|
216
|
-
var that = this
|
217
|
-
e.stopPropagation()
|
218
|
-
e.preventDefault()
|
219
|
-
setTimeout(function () { that.hide() }, 150)
|
220
|
-
}
|
221
|
-
|
222
|
-
, click: function (e) {
|
223
|
-
e.stopPropagation()
|
224
|
-
e.preventDefault()
|
225
|
-
this.select()
|
226
|
-
}
|
227
|
-
|
228
|
-
, mouseenter: function (e) {
|
229
|
-
this.$menu.find('.active').removeClass('active')
|
230
|
-
$(e.currentTarget).addClass('active')
|
231
|
-
}
|
232
|
-
|
233
|
-
}
|
234
|
-
|
235
|
-
|
236
|
-
/* TYPEAHEAD PLUGIN DEFINITION
|
237
|
-
* =========================== */
|
238
|
-
|
239
|
-
$.fn.typeahead = function ( option ) {
|
240
|
-
return this.each(function () {
|
241
|
-
var $this = $(this)
|
242
|
-
, data = $this.data('typeahead')
|
243
|
-
, options = typeof option == 'object' && option
|
244
|
-
if (!data) $this.data('typeahead', (data = new Typeahead(this, options)))
|
245
|
-
if (typeof option == 'string') data[option]()
|
246
|
-
})
|
247
|
-
}
|
248
|
-
|
249
|
-
$.fn.typeahead.defaults = {
|
250
|
-
source: []
|
251
|
-
, items: 8
|
252
|
-
, menu: '<ul class="typeahead dropdown-menu"></ul>'
|
253
|
-
, item: '<li><a href="#"></a></li>'
|
254
|
-
}
|
255
|
-
|
256
|
-
$.fn.typeahead.Constructor = Typeahead
|
257
|
-
|
258
|
-
|
259
|
-
/* TYPEAHEAD DATA-API
|
260
|
-
* ================== */
|
261
|
-
|
262
|
-
$(function () {
|
263
|
-
$('body').on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
|
264
|
-
var $this = $(this)
|
265
|
-
if ($this.data('typeahead')) return
|
266
|
-
e.preventDefault()
|
267
|
-
$this.typeahead($this.data())
|
268
|
-
})
|
269
|
-
})
|
270
|
-
|
271
|
-
}( window.jQuery )
|