Browse files

raise error if ruby 1.9.3 is detected.

  • Loading branch information...
1 parent a4c6362 commit c30e2e3bea40e9468c99453f31c5c4d2740a9ae9 @seuros seuros committed Jul 10, 2014
Showing with 6 additions and 6 deletions.
  1. +0 −1 .travis.yml
  2. +6 −4 lib/sidekiq.rb
  3. +0 −1 sidekiq.gemspec
View
1 .travis.yml
@@ -2,7 +2,6 @@ language: ruby
services:
- redis-server
rvm:
- - 1.9.3
- jruby-19mode
- rbx-2
- 2.0.0
View
10 lib/sidekiq.rb
@@ -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 @@ def self.server?
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 @@ def self.error_handlers
# 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
View
1 sidekiq.gemspec
@@ -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'

0 comments on commit c30e2e3

Please sign in to comment.