mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
raise error if ruby 1.9.3 is detected.
This commit is contained in:
parent
a4c6362014
commit
c30e2e3bea
3 changed files with 6 additions and 6 deletions
|
@ -2,7 +2,6 @@ language: ruby
|
|||
services:
|
||||
- redis-server
|
||||
rvm:
|
||||
- 1.9.3
|
||||
- jruby-19mode
|
||||
- rbx-2
|
||||
- 2.0.0
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
# encoding: utf-8
|
||||
require 'sidekiq/version'
|
||||
fail "Sidekiq #{Sidekiq::VERSION} does not support Ruby 1.9." if RUBY_PLATFORM != 'java' && RUBY_VERSION < '2.0.0'
|
||||
|
||||
require 'sidekiq/logging'
|
||||
require 'sidekiq/client'
|
||||
require 'sidekiq/worker'
|
||||
|
@ -23,7 +25,7 @@ module Sidekiq
|
|||
:startup => [],
|
||||
:quiet => [],
|
||||
:shutdown => [],
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
def self.❨╯°□°❩╯︵┻━┻
|
||||
|
@ -66,7 +68,7 @@ module Sidekiq
|
|||
end
|
||||
|
||||
def self.redis(&block)
|
||||
raise ArgumentError, "requires a block" if !block
|
||||
raise ArgumentError, "requires a block" unless block
|
||||
redis_pool.with(&block)
|
||||
end
|
||||
|
||||
|
@ -143,8 +145,8 @@ module Sidekiq
|
|||
# end
|
||||
# end
|
||||
def self.on(event, &block)
|
||||
raise ArgumentError, "Symbols only please: #{event}" if !event.is_a?(Symbol)
|
||||
raise ArgumentError, "Invalid event name: #{event}" if !options[:lifecycle_events].keys.include?(event)
|
||||
raise ArgumentError, "Symbols only please: #{event}" unless event.is_a?(Symbol)
|
||||
raise ArgumentError, "Invalid event name: #{event}" unless options[:lifecycle_events].keys.include?(event)
|
||||
options[:lifecycle_events][event] << block
|
||||
end
|
||||
end
|
||||
|
|
|
@ -13,7 +13,6 @@ Gem::Specification.new do |gem|
|
|||
gem.test_files = `git ls-files -- test/*`.split("\n")
|
||||
gem.name = "sidekiq"
|
||||
gem.require_paths = ["lib"]
|
||||
gem.required_ruby_version = '>= 2.0.0'
|
||||
gem.version = Sidekiq::VERSION
|
||||
gem.add_dependency 'redis', '>= 3.0.6'
|
||||
gem.add_dependency 'redis-namespace', '>= 1.3.1'
|
||||
|
|
Loading…
Reference in a new issue