Skip to content

Commit

Permalink
Prep 0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rwojsznis committed Jun 14, 2017
1 parent dfc45e3 commit ccf4410
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 22 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ test/version_tmp
tmp
.ruby-version
.ruby-gemset
.coveralls.yml
14 changes: 3 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,9 @@ sudo: false
cache: bundler

rvm:
- 2.1.7
- 2.0.0
- 2.2.3
- jruby
- jruby-head
- rbx-2
matrix:
allow_failures:
- rvm: rbx-2
- rvm: jruby-head
- rvm: jruby
- 2.3.4
- 2.4.1
- 2.2.7

services:
- redis-server
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.3.0

- require Sidekiq >= 4.2.0 (after Sinatra dependency was removed)

## 0.2.5

- add csrf tag for sidekiq >= 3.4.2
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ end

Just be sure to load this one after `sidekiq-failures`, otherwise failed jobs will end up logged twice - and you probably don't want that.

If you want to load the web panel be sure to require `sidekiq/expected_failures/web` after `sidekiq/web`.

### Clearing failures

At the moment you have 3 public methods in `Sidekiq::ExpectedFailures` module:
Expand Down
2 changes: 1 addition & 1 deletion lib/sidekiq/expected_failures/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Sidekiq
module ExpectedFailures
VERSION = "0.2.5"
VERSION = "0.3.0"
end
end
9 changes: 2 additions & 7 deletions lib/sidekiq/expected_failures/web.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,10 @@ def link_to_details(job)
end

app.get "/expected_failures/stats" do
@counters = Sidekiq::ExpectedFailures.counters

content_type :json
Sidekiq.dump_json({
failures: @counters
})
json(failures: Sidekiq::ExpectedFailures.counters)
end

app.get "/expected_failures/?:date?" do
app.get "/expected_failures" do
@dates = Sidekiq::ExpectedFailures.dates
@count = (params[:count] || 50).to_i

Expand Down
2 changes: 1 addition & 1 deletion sidekiq-expected_failures.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ["lib"]

spec.add_dependency "sidekiq", ">= 2.15.0"
spec.add_dependency "sidekiq", ">= 4.2.0"

spec.add_development_dependency "bundler", "~> 1.3"
spec.add_development_dependency "rake"
Expand Down
4 changes: 2 additions & 2 deletions web/views/expected_failures.erb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@

<p class="clearfix"></p>

<%= erb :_paging, :locals => { :url => "#{root_path}expected_failures/#{@date}" } %>
<%= erb :_paging, locals: { url: "#{root_path}expected_failures?date=#{@date}" } %>

<table id="expected" class="queues table table-hover table-bordered table-striped table-white">
<thead>
Expand All @@ -99,7 +99,7 @@
<% end %>
</table>

<%= erb :_paging, :locals => { :url => "#{root_path}expected_failures/#{@date}" } %>
<%= erb :_paging, locals: { url: "#{root_path}expected_failures/#{@date}" } %>
<% else %>
<p class="clearfix"></p>
Expand Down

0 comments on commit ccf4410

Please sign in to comment.