delayed_job_web 1.2.7 → 1.2.8

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of delayed_job_web might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7e6e33e8e74cc8589aca16c329768759d121c601
4
- data.tar.gz: dc970de848037b101f3fae0cecba7bf810647b91
3
+ metadata.gz: 7179527cc2cebed1494d856765bac6dbb0657b8b
4
+ data.tar.gz: 887a714ebd1e601459994058b90fe04f4e538eb2
5
5
  SHA512:
6
- metadata.gz: 11e5a3d6a19be9a1e519481a14aad6ece4cc98650f5c8401225a9c6efd796363a3f06efad7da60025faa1705c173bf17f6b70f8bba6480bbea01aaa4e3e77406
7
- data.tar.gz: 65d82c28cf62bd6f07f81fd1d214b79238b801680a82bf0d401d1548acd875ac6e22ed400343427cf786c51becffedbb4ddc668de982ca6d97cba68b86f31093
6
+ metadata.gz: 069cc73508226c8e1dde5a1b37aa8641cc9438d58386c48a8db0fdb93e253d58dcedf30aa0e30daa8b3b010d640cc62ed3113169e5054cafbe557fa1f85161c0
7
+ data.tar.gz: afcff45a056936ed64488f3c3b5c79953d8a486529231bef7dfb39693fcba46753a7f785883adf8517612383b572fd277de503e9130fb100d31e560f49001be3
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = "delayed_job_web"
3
- gem.version = "1.2.7"
3
+ gem.version = "1.2.8"
4
4
  gem.author = "Erick Schmitt"
5
5
  gem.email = "ejschmitt@gmail.com"
6
6
  gem.homepage = "https://github.com/ejschmitt/delayed_job_web"
@@ -1 +1,2 @@
1
1
  require 'delayed_job_web/application/app'
2
+ require 'delayed_job_web/railtie' if defined?(Rails)
@@ -10,9 +10,7 @@ class DelayedJobWeb < Sinatra::Base
10
10
  set :views, File.expand_path('../views', __FILE__)
11
11
 
12
12
  # Enable sessions so we can use CSRF protection
13
- set :sessions,
14
- # Unique cookie key that won't clash with Rails etc
15
- :key => "rack.delayed-job-web-session"
13
+ enable :sessions
16
14
 
17
15
  set :protection,
18
16
  # Various session protections
@@ -84,7 +82,11 @@ class DelayedJobWeb < Sinatra::Base
84
82
  end
85
83
 
86
84
  def csrf_token_tag
87
- "<input type='hidden' name='authenticity_token' value='#{h csrf_token}'>"
85
+ # If csrf_token is nil, and we submit a blank string authenticity_token
86
+ # param, Rack::Protection will fail.
87
+ if csrf_token
88
+ "<input type='hidden' name='authenticity_token' value='#{h csrf_token}'>"
89
+ end
88
90
  end
89
91
 
90
92
  get '/overview' do
@@ -0,0 +1,7 @@
1
+ # Sinatra will automatically use Rails sessions if mounted within a Rails app.
2
+ #
3
+ # If you enable sessions in a Sinatra app, and then mount it in a Rails 4 app,
4
+ # Rack::Session will blow up because ActionDispatch::Request::Session does not
5
+ # implement #each.
6
+
7
+ DelayedJobWeb.disable :sessions
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: delayed_job_web
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.7
4
+ version: 1.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erick Schmitt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-11 00:00:00.000000000 Z
11
+ date: 2014-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sinatra
@@ -113,6 +113,7 @@ files:
113
113
  - lib/delayed_job_web/application/views/pending.erb
114
114
  - lib/delayed_job_web/application/views/stats.erb
115
115
  - lib/delayed_job_web/application/views/working.erb
116
+ - lib/delayed_job_web/railtie.rb
116
117
  - test/helper.rb
117
118
  - test/test_delayed_job_web.rb
118
119
  homepage: https://github.com/ejschmitt/delayed_job_web