1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Missed a few

This commit is contained in:
Mike Perham 2018-02-16 13:11:54 -08:00
parent 7de6f4cc2f
commit 2ed92600fa
6 changed files with 19 additions and 19 deletions

View file

@ -3,7 +3,7 @@ module Sidekiq
def call(item, queue)
start = Time.now
logger.info("start".freeze)
logger.info("start")
yield
logger.info("done: #{elapsed(start)} sec")
rescue Exception

View file

@ -19,10 +19,10 @@ require 'rack/session/cookie'
module Sidekiq
class Web
ROOT = File.expand_path("#{File.dirname(__FILE__)}/../../web")
VIEWS = "#{ROOT}/views".freeze
LOCALES = ["#{ROOT}/locales".freeze]
LAYOUT = "#{VIEWS}/layout.erb".freeze
ASSETS = "#{ROOT}/assets".freeze
VIEWS = "#{ROOT}/views"
LOCALES = ["#{ROOT}/locales"]
LAYOUT = "#{VIEWS}/layout.erb"
ASSETS = "#{ROOT}/assets"
DEFAULT_TABS = {
"Dashboard" => '',

View file

@ -2,7 +2,7 @@
module Sidekiq
class WebAction
RACK_SESSION = 'rack.session'.freeze
RACK_SESSION = 'rack.session'
attr_accessor :env, :block, :type

View file

@ -4,8 +4,8 @@ module Sidekiq
class WebApplication
extend WebRouter
CONTENT_LENGTH = "Content-Length".freeze
CONTENT_TYPE = "Content-Type".freeze
CONTENT_LENGTH = "Content-Length"
CONTENT_TYPE = "Content-Type"
REDIS_KEYS = %w(redis_version uptime_in_days connected_clients used_memory_human used_memory_peak_human)
def initialize(klass)

View file

@ -80,7 +80,7 @@ module Sidekiq
# See https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4
def user_preferred_languages
languages = env['HTTP_ACCEPT_LANGUAGE'.freeze]
languages = env['HTTP_ACCEPT_LANGUAGE']
languages.to_s.downcase.gsub(/\s+/, '').split(',').map do |language|
locale, quality = language.split(';q=', 2)
locale = nil if locale == '*' # Ignore wildcards

View file

@ -3,16 +3,16 @@ require 'rack'
module Sidekiq
module WebRouter
GET = 'GET'.freeze
DELETE = 'DELETE'.freeze
POST = 'POST'.freeze
PUT = 'PUT'.freeze
PATCH = 'PATCH'.freeze
HEAD = 'HEAD'.freeze
GET = 'GET'
DELETE = 'DELETE'
POST = 'POST'
PUT = 'PUT'
PATCH = 'PATCH'
HEAD = 'HEAD'
ROUTE_PARAMS = 'rack.route_params'.freeze
REQUEST_METHOD = 'REQUEST_METHOD'.freeze
PATH_INFO = 'PATH_INFO'.freeze
ROUTE_PARAMS = 'rack.route_params'
REQUEST_METHOD = 'REQUEST_METHOD'
PATH_INFO = 'PATH_INFO'
def get(path, &block)
route(GET, path, &block)
@ -64,7 +64,7 @@ module Sidekiq
class WebRoute
attr_accessor :request_method, :pattern, :block, :name
NAMED_SEGMENTS_PATTERN = /\/([^\/]*):([^\.:$\/]+)/.freeze
NAMED_SEGMENTS_PATTERN = /\/([^\/]*):([^\.:$\/]+)/
def initialize(request_method, pattern, block)
@request_method = request_method