sidekiq-expected_failures 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9e25fbc9e0f8ec213cdd6737e9a512829b84bd0c
4
- data.tar.gz: 0c1d1cfdf2fa3be4dfdadd1be0cf9ccba959f580
3
+ metadata.gz: 404307f9e03e8e58ef7a6be8fb34ec76f8c8ef83
4
+ data.tar.gz: 338f2f0f65c12783680768b6991463944c9dadec
5
5
  SHA512:
6
- metadata.gz: a18b6fea8db4e17c0110a3c52e27a9ae4cd055804536f7e6d1b9d8aa3d2e87c811a09484cca87a30559649caf91b23ff6cf440de561dec0d205f861122ce3f0c
7
- data.tar.gz: 3e01243030006b880b7d421d994a867002b8030129d99672c3eb19e3695d8188c455e9a8631de8c3d36c9e52e27a704c851df974a117d550a677065bdf8a5044
6
+ metadata.gz: 2c40178c14c25969a1c92d6af0a07941854afab2bdc12aa8d72cb39d050b1544161cdd21967501f92329253fa39778803251c815ceb680a9d212bb17298565f2
7
+ data.tar.gz: 1ad3a43026173dd331d7ed9c0dc8705d1f247fba9086e567e3c5ee4db2719ccf20c3f5378c85fb699adc7abeeaef2d20127a909db4cdf5d5f3be43d992a853f4
data/.travis.yml CHANGED
@@ -1,12 +1,19 @@
1
1
  language: ruby
2
+ sudo: false
3
+ cache: bundler
2
4
 
3
5
  rvm:
4
- - 1.9.3
5
- - jruby-1.7.11
6
- - rbx-2.2.9
6
+ - 2.1.7
7
7
  - 2.0.0
8
- - 2.1.0
9
- - 2.1.2
8
+ - 2.2.3
9
+ - jruby
10
+ - jruby-head
11
+ - rbx-2
12
+ matrix:
13
+ allow_failures:
14
+ - rvm: rbx-2
15
+ - rvm: jruby-head
16
+ - rvm: jruby
10
17
 
11
18
  services:
12
19
  - redis-server
data/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## 0.2.5
2
+
3
+ - add csrf tag for sidekiq >= 3.4.2
4
+ - **[BREAKING CHANGE]** don't load `sidekiq/web` automagically at
5
+ all (it never made any sense), instead do something like:
6
+
7
+ ``` ruby
8
+ require 'sidekiq/web'
9
+ # then load expected failures panel
10
+ require 'sidekiq/expected_failures/web'
11
+ ```
12
+
1
13
  ## 0.2.4
2
14
 
3
15
  - `Sidekiq::ExpectedFailures.clear_old` can now accept argument - will remove failures
data/Gemfile CHANGED
@@ -1,8 +1,9 @@
1
1
  source 'https://rubygems.org'
2
2
  gemspec
3
3
 
4
+ gem "minitest"
5
+
4
6
  platforms :rbx do
5
7
  gem "rubysl", "~> 2.0" # if using anything in the ruby standard library
6
8
  gem "rubinius-developer_tools", "~> 2.0.0" # if using any of coverage, debugger, profiler
7
- gem "minitest" # if using minitest
8
9
  end
@@ -1,11 +1,6 @@
1
- begin
2
- require "sidekiq/web"
3
- rescue LoadError
4
- end
5
-
6
1
  require "sidekiq/expected_failures/version"
7
2
  require "sidekiq/expected_failures/middleware"
8
- require "sidekiq/expected_failures/web"
3
+
9
4
 
10
5
  module Sidekiq
11
6
 
@@ -59,11 +54,6 @@ module Sidekiq
59
54
  end
60
55
  end
61
56
 
62
- if defined?(Sidekiq::Web)
63
- Sidekiq::Web.register Sidekiq::ExpectedFailures::Web
64
- Sidekiq::Web.tabs["Expected Failures"] = "expected_failures"
65
- end
66
-
67
57
  Sidekiq.configure_server do |config|
68
58
  config.server_middleware do |chain|
69
59
  chain.add Sidekiq::ExpectedFailures::Middleware
@@ -1,5 +1,5 @@
1
1
  module Sidekiq
2
2
  module ExpectedFailures
3
- VERSION = "0.2.4"
3
+ VERSION = "0.2.5"
4
4
  end
5
5
  end
@@ -51,3 +51,6 @@ module Sidekiq
51
51
  end
52
52
  end
53
53
  end
54
+
55
+ Sidekiq::Web.register Sidekiq::ExpectedFailures::Web
56
+ Sidekiq::Web.tabs["Expected Failures"] = "expected_failures"
@@ -26,4 +26,5 @@ Gem::Specification.new do |spec|
26
26
  spec.add_development_dependency "timecop", "~> 0.7.0"
27
27
  spec.add_development_dependency "mocha", "~> 1.0.0"
28
28
  spec.add_development_dependency "coveralls", "~> 0.7.0"
29
+ spec.add_development_dependency "minitest", "~> 5.7", ">= 5.7.0"
29
30
  end
data/test/lib/web_test.rb CHANGED
@@ -1,5 +1,4 @@
1
1
  require "test_helper"
2
- require "sidekiq/web"
3
2
 
4
3
  module Sidekiq
5
4
  describe "WebExtension" do
data/test/test_helper.rb CHANGED
@@ -6,23 +6,26 @@ end
6
6
  Encoding.default_external = Encoding::UTF_8
7
7
  Encoding.default_internal = Encoding::UTF_8
8
8
 
9
+ ENV['RACK_ENV'] = 'test'
10
+
9
11
  require "minitest/autorun"
10
- require "minitest/spec"
11
- require "minitest/mock"
12
12
  require "minitest/pride"
13
- require "mocha/setup"
14
-
15
13
 
14
+ require "mocha/api"
16
15
  require "timecop"
17
16
  require "rack/test"
18
17
 
19
18
  require "sidekiq"
19
+ require "sidekiq/web"
20
+
20
21
  require "sidekiq-expected_failures"
21
- require "test_workers"
22
+ require "sidekiq/expected_failures/web"
23
+
24
+ require_relative "test_workers"
22
25
 
23
26
  Sidekiq.logger.level = Logger::ERROR
24
27
 
25
- REDIS = Sidekiq::RedisConnection.create(url: "redis://localhost/15", namespace: "sidekiq_expected_failures")
28
+ REDIS = Sidekiq::RedisConnection.create(url: "redis://localhost/15")
26
29
 
27
30
  def redis(command, *args)
28
31
  Sidekiq.redis do |c|
@@ -22,6 +22,7 @@
22
22
 
23
23
  <% if @jobs.any? || @counters.any? %>
24
24
  <form id="clear-jobs" method="post" class="form-inline pull-right" action="<%= root_path %>expected_failures/clear">
25
+ <%= csrf_tag if respond_to?(:csrf_tag) %>
25
26
  <label>Clear:</label>
26
27
  <select name="what">
27
28
  <option selected>Choose...</option>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq-expected_failures
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rafal Wojsznis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-23 00:00:00.000000000 Z
11
+ date: 2015-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sidekiq
@@ -122,6 +122,26 @@ dependencies:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
124
  version: 0.7.0
125
+ - !ruby/object:Gem::Dependency
126
+ name: minitest
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '5.7'
132
+ - - ">="
133
+ - !ruby/object:Gem::Version
134
+ version: 5.7.0
135
+ type: :development
136
+ prerelease: false
137
+ version_requirements: !ruby/object:Gem::Requirement
138
+ requirements:
139
+ - - "~>"
140
+ - !ruby/object:Gem::Version
141
+ version: '5.7'
142
+ - - ">="
143
+ - !ruby/object:Gem::Version
144
+ version: 5.7.0
125
145
  description: If you don't rely on sidekiq' retry behavior, you handle exceptions on
126
146
  your own and want to keep track of them - this thing is for you.
127
147
  email:
@@ -171,7 +191,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
171
191
  version: '0'
172
192
  requirements: []
173
193
  rubyforge_project:
174
- rubygems_version: 2.2.1
194
+ rubygems_version: 2.4.8
175
195
  signing_key:
176
196
  specification_version: 4
177
197
  summary: If you don't rely on sidekiq' retry behavior, you handle exceptions on your