Skip to content

Commit

Permalink
Version bump 1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
cryo28 committed Jan 29, 2016
1 parent 805e384 commit e39cf30
Show file tree
Hide file tree
Showing 11 changed files with 39 additions and 29 deletions.
1 change: 1 addition & 0 deletions .ruby-gemset
@@ -0,0 +1 @@
sidekiq_status
1 change: 1 addition & 0 deletions .ruby-version
@@ -0,0 +1 @@
ruby-2.2.4
1 change: 0 additions & 1 deletion .rvmrc

This file was deleted.

30 changes: 15 additions & 15 deletions .travis.yml
@@ -1,24 +1,24 @@
language: ruby
rvm:
- 1.9.2
- 1.9.3
- 2.0.0
- 2.1.1
# - jruby-19mode # JRuby in 1.9 mode
# - rbx-19mode
- 2.1.4
- 2.2.4
- 2.3.0
env:
global:
- SHOW_SIDEKIQ=true
matrix:
- SIDEKIQ_VERSION="~>2.4.0"
- SIDEKIQ_VERSION="~>2.6.5"
- SIDEKIQ_VERSION="~>2.8.0"
- SIDEKIQ_VERSION="~>2.10.0"
- SIDEKIQ_VERSION="~>2.12.0"
- SIDEKIQ_VERSION="~>2.14.0"
- SIDEKIQ_VERSION="~>2.15.0"
- SIDEKIQ_VERSION="~>2.16.0"
- SIDEKIQ_VERSION="~>2.17.7"
- SIDEKIQ_VERSION="~>4.1.0"
- SIDEKIQ_VERSION="~>4.0.2"
- SIDEKIQ_VERSION="~>3.5.4"
- SIDEKIQ_VERSION="~>3.4.2"
- SIDEKIQ_VERSION="~>3.3.4"

before_install:
- gem update --system
- gem update bundler
- gem --version
- bundle --version

script: bundle exec rake
services:
- redis-server
7 changes: 7 additions & 0 deletions README.md
Expand Up @@ -147,6 +147,13 @@ and clean status containers.

## Changelog

### 1.1.0

* Support for sidekiq 4.1, 4.0, 3.5, 3.4
* Dropped support for sidekiq versions older than 3.3
* Dropped support for ruby 1.9.x, 2.0.x


### 1.0.7

* Sidekiq 2.16 support
Expand Down
2 changes: 1 addition & 1 deletion lib/sidekiq_status/client_middleware.rb
Expand Up @@ -2,7 +2,7 @@

module SidekiqStatus
class ClientMiddleware
def call(worker, item, queue)
def call(worker, item, queue, redis_pool = nil)
worker = worker.constantize if worker.is_a?(String)
return yield unless worker < SidekiqStatus::Worker

Expand Down
2 changes: 1 addition & 1 deletion lib/sidekiq_status/version.rb
@@ -1,5 +1,5 @@
# -*- encoding : utf-8 -*-
module SidekiqStatus
# SidekiqStatus version
VERSION = "1.0.8"
VERSION = "1.1.0"
end
5 changes: 3 additions & 2 deletions sidekiq_status.gemspec
Expand Up @@ -16,10 +16,11 @@ Gem::Specification.new do |gem|
gem.require_paths = ["lib"]
gem.version = SidekiqStatus::VERSION

gem.add_runtime_dependency("sidekiq", ">= 2.4", "< 3.0")
gem.add_runtime_dependency("sidekiq", ">= 3.3", "< 4.2")

gem.add_development_dependency("activesupport")
gem.add_development_dependency("rspec")
gem.add_development_dependency("rspec", '>= 3.4.0')
gem.add_development_dependency("rspec-its")
gem.add_development_dependency("simplecov")
gem.add_development_dependency("rake")
gem.add_development_dependency("timecop")
Expand Down
16 changes: 8 additions & 8 deletions spec/container_spec.rb
Expand Up @@ -102,7 +102,7 @@ def test_container(container, hash, jid = nil)
test_container(container, described_class::DEFAULTS.reject{|k, v| k == 'args' }, jid)

Sidekiq.redis do |conn|
conn.exists(status_key).should be_true
conn.exists(status_key).should be true
end
end

Expand All @@ -112,7 +112,7 @@ def test_container(container, hash, jid = nil)
end

it "loads a container from the redis key" do
json = MultiJson.dump(sample_json_hash)
json = Sidekiq.dump_json(sample_json_hash)
Sidekiq.redis { |conn| conn.set(status_key, json) }

container = described_class.load(jid)
Expand All @@ -128,7 +128,7 @@ def test_container(container, hash, jid = nil)
)
end

json = MultiJson.dump(sample_json_hash)
json = Sidekiq.dump_json(sample_json_hash)
Sidekiq.redis { |conn| conn.set(status_key, json) }
described_class.load(jid)

Expand All @@ -151,7 +151,7 @@ def test_container(container, hash, jid = nil)
described_class.new(jid, hash).save

result = Sidekiq.redis{ |conn| conn.get(status_key) }
result = MultiJson.load(result)
result = Sidekiq.load_json(result)

result.should == hash.merge('last_updated_at' => Time.now.to_i)

Expand All @@ -168,14 +168,14 @@ def test_container(container, hash, jid = nil)
container.delete

Sidekiq.redis do |conn|
conn.exists(status_key).should be_false
conn.exists(status_key).should be false
conn.zscore(described_class.kill_key, jid).should be_nil
end
end

specify "#request_kill, #should_kill?, #killable?" do
container = described_class.new(jid)
container.kill_requested?.should be_false
container.kill_requested?.should be_falsey
container.should be_killable

Sidekiq.redis do |conn|
Expand Down Expand Up @@ -302,10 +302,10 @@ def test_container(container, hash, jid = nil)
context "status is #{status_name1}" do
subject{ described_class.create().tap{|c| c.status = status_name1} }

its("#{status_name1}?") { should be_true }
its("#{status_name1}?") { should be true }

(described_class::STATUS_NAMES - [status_name1]).each do |status_name2|
its("#{status_name2}?") { should be_false }
its("#{status_name2}?") { should be false }
end
end
end
Expand Down
1 change: 1 addition & 0 deletions spec/spec_helper.rb
Expand Up @@ -13,6 +13,7 @@
require 'coveralls'
Coveralls.wear!

require 'rspec/its'
require 'sidekiq_status'
require 'sidekiq/util'

Expand Down
2 changes: 1 addition & 1 deletion spec/worker_spec.rb
Expand Up @@ -44,7 +44,7 @@ def some_method(*args); end
jid = SomeWorker.perform_async(*args)
worker.perform(jid)

has_been_run.should be_true
has_been_run.should be true
worker.status_container.reload.status.should == 'complete'
end

Expand Down

0 comments on commit e39cf30

Please sign in to comment.