sidekiq 4.2.0 → 4.2.1
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.
- checksums.yaml +4 -4
- data/Changes.md +6 -0
- data/README.md +2 -2
- data/lib/sidekiq/version.rb +1 -1
- data/lib/sidekiq/web.rb +5 -0
- data/lib/sidekiq/web/action.rb +4 -8
- data/test/test_web.rb +5 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b58398d83dbfb9cc56c80dfe0745ed41205a6587
|
4
|
+
data.tar.gz: 4720f2338df1fbe4922f7e417fa4b50f61f84827
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77d880117249a7ee38f7c40fd3b3b1ade91091b2da7182fe4ffc9c2d9494825d5b1e70ec6cf6b26bb0b74d172f0dee5a7d26ffe8a04d80c29a70d5daf8274bf7
|
7
|
+
data.tar.gz: bf99316c61de44f0d8d1332d6841b6b60e00fa7639d6a2fa04a4f273eb22c0ec8c3aa7c38a5068322a2d6a023d7918f39e7392d98d3926776192868fb5c44a14
|
data/Changes.md
CHANGED
data/README.md
CHANGED
@@ -84,8 +84,8 @@ Useful resources:
|
|
84
84
|
|
85
85
|
**No support via Twitter, 140 characters is not enough.**
|
86
86
|
|
87
|
-
Every Friday morning
|
88
|
-
See the [Sidekiq support page](http://sidekiq.org/support).
|
87
|
+
Every Friday morning is Sidekiq happy hour: I video chat and answer questions.
|
88
|
+
See the [Sidekiq support page](http://sidekiq.org/support) for details.
|
89
89
|
|
90
90
|
Thanks
|
91
91
|
-----------------
|
data/lib/sidekiq/version.rb
CHANGED
data/lib/sidekiq/web.rb
CHANGED
@@ -63,6 +63,11 @@ module Sidekiq
|
|
63
63
|
@views ||= VIEWS
|
64
64
|
end
|
65
65
|
|
66
|
+
# Helper for the Sinatra syntax: Sidekiq::Web.set(:session_secret, Rails.application.secrets...)
|
67
|
+
def set(attribute, value)
|
68
|
+
send(:"#{attribute}=", value)
|
69
|
+
end
|
70
|
+
|
66
71
|
attr_accessor :app_url, :session_secret, :redis_pool
|
67
72
|
attr_writer :locales, :views
|
68
73
|
end
|
data/lib/sidekiq/web/action.rb
CHANGED
@@ -2,13 +2,9 @@
|
|
2
2
|
|
3
3
|
module Sidekiq
|
4
4
|
class WebAction
|
5
|
-
RACK_SESSION = 'rack.session'
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
CONTENT_TYPE = "Content-Type".freeze
|
10
|
-
TEXT_HTML = { CONTENT_TYPE => "text/html".freeze, "Cache-Control" => "no-cache" }
|
11
|
-
APPLICATION_JSON = { CONTENT_TYPE => "application/json".freeze }
|
5
|
+
RACK_SESSION = 'rack.session'
|
6
|
+
TEXT_HTML = { "Content-Type" => "text/html", "Cache-Control" => "no-cache" }
|
7
|
+
APPLICATION_JSON = { "Content-Type" => "application/json", "Cache-Control" => "no-cache" }
|
12
8
|
|
13
9
|
attr_accessor :env, :block, :type
|
14
10
|
|
@@ -25,7 +21,7 @@ module Sidekiq
|
|
25
21
|
end
|
26
22
|
|
27
23
|
def redirect(location)
|
28
|
-
throw :halt, [302, {
|
24
|
+
throw :halt, [302, { "Location" => "#{request.base_url}#{location}" }, []]
|
29
25
|
end
|
30
26
|
|
31
27
|
def params
|
data/test/test_web.rb
CHANGED
@@ -28,6 +28,11 @@ class TestWeb < Sidekiq::Test
|
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
31
|
+
it 'can configure via set() syntax' do
|
32
|
+
app.set(:session_secret, "foo")
|
33
|
+
assert_equal "foo", app.session_secret
|
34
|
+
end
|
35
|
+
|
31
36
|
it 'can show text with any locales' do
|
32
37
|
rackenv = {'HTTP_ACCEPT_LANGUAGE' => 'ru,en'}
|
33
38
|
get '/', {}, rackenv
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.2.
|
4
|
+
version: 4.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Perham
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-09-
|
11
|
+
date: 2016-09-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis
|