sidekiq_status 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +4 -5
- data/README.md +4 -0
- data/lib/sidekiq_status/version.rb +1 -1
- data/lib/sidekiq_status/web.rb +14 -4
- data/sidekiq_status.gemspec +1 -1
- data/spec/dummy/boot.rb +1 -5
- data/web/views/status.erb +1 -1
- data/web/views/statuses.erb +11 -11
- metadata +4 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 376e629c68f174cace73a5c67c23a4b5cf65b0a5
|
4
|
+
data.tar.gz: c7e5a9e689c9ec74120f426e5937aad621b7dc10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 008af9ea34701fc54d72d47cbb5f98a13a20763d92da4fd7c75e7bed07ebb4795cec853956f44ab37bc66db2594314db2dc3451c70bd56958224b5a8a1ae7f3b
|
7
|
+
data.tar.gz: f5980070fb532c61230bd70b3574bd2f598eb024015a5af56f977ec5b3f29c0c5ceafa933e5411132b91a0f3e9ca69b9183b6363ce31c4ffea14a4a28450916b
|
data/.travis.yml
CHANGED
@@ -1,18 +1,17 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
|
-
|
4
|
-
- 2.2.
|
5
|
-
- 2.3.
|
6
|
-
- rbx-3.14
|
3
|
+
#- rbx
|
4
|
+
- 2.2.5
|
5
|
+
- 2.3.1
|
7
6
|
env:
|
8
7
|
global:
|
9
8
|
- SHOW_SIDEKIQ=true
|
10
9
|
matrix:
|
10
|
+
- SIDEKIQ_VERSION="~>4.2.0"
|
11
11
|
- SIDEKIQ_VERSION="~>4.1.0"
|
12
12
|
- SIDEKIQ_VERSION="~>4.0.2"
|
13
13
|
- SIDEKIQ_VERSION="~>3.5.4"
|
14
14
|
- SIDEKIQ_VERSION="~>3.4.2"
|
15
|
-
- SIDEKIQ_VERSION="~>3.3.4"
|
16
15
|
|
17
16
|
before_install:
|
18
17
|
- sudo apt-get -qq update
|
data/README.md
CHANGED
data/lib/sidekiq_status/web.rb
CHANGED
@@ -11,6 +11,16 @@ module SidekiqStatus
|
|
11
11
|
path = File.join(VIEW_PATH, name.to_s) + ".erb"
|
12
12
|
File.open(path).read
|
13
13
|
end
|
14
|
+
|
15
|
+
def redirect_to(subpath)
|
16
|
+
if respond_to?(:to)
|
17
|
+
# Sinatra-based web UI
|
18
|
+
redirect to(subpath)
|
19
|
+
else
|
20
|
+
# Non-Sinatra based web UI (Sidekiq 4.2+)
|
21
|
+
redirect "#{root_path}#{subpath}"
|
22
|
+
end
|
23
|
+
end
|
14
24
|
end
|
15
25
|
|
16
26
|
app.get '/statuses' do
|
@@ -34,22 +44,22 @@ module SidekiqStatus
|
|
34
44
|
|
35
45
|
app.get '/statuses/:jid/kill' do
|
36
46
|
SidekiqStatus::Container.load(params[:jid]).request_kill
|
37
|
-
|
47
|
+
redirect_to :statuses
|
38
48
|
end
|
39
49
|
|
40
50
|
app.get '/statuses/delete/all' do
|
41
51
|
SidekiqStatus::Container.delete
|
42
|
-
|
52
|
+
redirect_to :statuses
|
43
53
|
end
|
44
54
|
|
45
55
|
app.get '/statuses/delete/complete' do
|
46
56
|
SidekiqStatus::Container.delete('complete')
|
47
|
-
|
57
|
+
redirect_to :statuses
|
48
58
|
end
|
49
59
|
|
50
60
|
app.get '/statuses/delete/finished' do
|
51
61
|
SidekiqStatus::Container.delete(SidekiqStatus::Container::FINISHED_STATUS_NAMES)
|
52
|
-
|
62
|
+
redirect_to :statuses
|
53
63
|
end
|
54
64
|
end
|
55
65
|
end
|
data/sidekiq_status.gemspec
CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |gem|
|
|
16
16
|
gem.require_paths = ["lib"]
|
17
17
|
gem.version = SidekiqStatus::VERSION
|
18
18
|
|
19
|
-
gem.add_runtime_dependency("sidekiq", ">= 3.3", "<
|
19
|
+
gem.add_runtime_dependency("sidekiq", ">= 3.3", "< 5")
|
20
20
|
|
21
21
|
gem.add_development_dependency("activesupport")
|
22
22
|
gem.add_development_dependency("rspec", '>= 3.4.0')
|
data/spec/dummy/boot.rb
CHANGED
@@ -2,14 +2,10 @@ require 'rubygems'
|
|
2
2
|
require 'bundler'
|
3
3
|
Bundler.require
|
4
4
|
|
5
|
+
require 'active_support'
|
5
6
|
require 'active_support/dependencies'
|
6
7
|
|
7
8
|
DUMMY_APP_ROOT = Pathname.new(File.expand_path('../', __FILE__))
|
8
9
|
Sidekiq.redis = {:url => "redis://localhost/15", :size => 5}
|
9
10
|
|
10
11
|
ActiveSupport::Dependencies.autoload_paths += Dir.glob(DUMMY_APP_ROOT.join('app/*'))
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
data/web/views/status.erb
CHANGED
data/web/views/statuses.erb
CHANGED
@@ -2,15 +2,15 @@
|
|
2
2
|
|
3
3
|
<div class="delete_jobs">
|
4
4
|
Delete jobs in
|
5
|
-
<a href="<%=
|
5
|
+
<a href="<%= root_path %>statuses/delete/complete" onclick="return confirm('Are you sure? Delete is irreversible')">
|
6
6
|
complete
|
7
7
|
</a>
|
8
8
|
,
|
9
|
-
<a href="<%=
|
9
|
+
<a href="<%= root_path %>statuses/delete/finished" onclick="return confirm('Are you sure? Delete is irreversible')" title="<%= SidekiqStatus::Container::FINISHED_STATUS_NAMES.join(', ') %>">
|
10
10
|
finished
|
11
11
|
</a>
|
12
12
|
,
|
13
|
-
<a href="<%=
|
13
|
+
<a href="<%= root_path %>statuses/delete/all" onclick="return confirm('Are you sure? Delete is irreversible')">
|
14
14
|
all
|
15
15
|
</a>
|
16
16
|
statuses
|
@@ -25,10 +25,10 @@
|
|
25
25
|
<th>Message</th>
|
26
26
|
<th>Actions</th>
|
27
27
|
</tr>
|
28
|
-
<% @statuses.each do |container|
|
28
|
+
<% @statuses.each do |container| %>
|
29
29
|
<tr>
|
30
30
|
<td>
|
31
|
-
<a href="<%=
|
31
|
+
<a href="<%= root_path %>/statuses/<%= container.jid %>">
|
32
32
|
<%= container.worker %>
|
33
33
|
<br />
|
34
34
|
<%= container.jid %>
|
@@ -44,19 +44,19 @@
|
|
44
44
|
</div>
|
45
45
|
<td><%= container.message %></td>
|
46
46
|
<td>
|
47
|
-
<% if container.killable?
|
48
|
-
<a class="kill" href="<%=
|
49
|
-
<% elsif container.kill_requested?
|
47
|
+
<% if container.killable? %>
|
48
|
+
<a class="kill" href="<%= root_path %>statuses/<%= container.jid %>/kill" onclick="return confirm('Are you sure?')">Kill</a>
|
49
|
+
<% elsif container.kill_requested? %>
|
50
50
|
Kill requested
|
51
51
|
<% end %>
|
52
52
|
</td>
|
53
53
|
</tr>
|
54
|
-
<% end
|
55
|
-
<% if @statuses.empty?
|
54
|
+
<% end %>
|
55
|
+
<% if @statuses.empty? %>
|
56
56
|
<tr>
|
57
57
|
<td colspan="6"></td>
|
58
58
|
</tr>
|
59
|
-
<% end
|
59
|
+
<% end %>
|
60
60
|
</table>
|
61
61
|
|
62
62
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq_status
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Artem Ignatyev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sidekiq
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: '3.3'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '5'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: '3.3'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '5'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: activesupport
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -211,4 +211,3 @@ test_files:
|
|
211
211
|
- spec/integration/sidekiq_spec.rb
|
212
212
|
- spec/spec_helper.rb
|
213
213
|
- spec/worker_spec.rb
|
214
|
-
has_rdoc:
|