Skip to content

Commit

Permalink
Drop Ruby < 1.9.3 support
Browse files Browse the repository at this point in the history
  • Loading branch information
javan committed May 28, 2016
1 parent 334cfa0 commit cf2cebf
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 31 deletions.
6 changes: 1 addition & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
language: ruby
script: bundle exec rake
rvm:
- 1.8.7
- 1.9.2
- 1.9.3
- 2.0.0
- 2.1.0
- 2.2.0
- ree
- 2.3.0
- jruby
- jruby-18mode
- jruby-19mode
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ It's a little bit dated now, but remains a good introduction.

----

Compatible with Ruby 1.8.7-2.2.0, JRuby, and Rubinius. [![Build Status](https://secure.travis-ci.org/javan/whenever.png)](http://travis-ci.org/javan/whenever)
[![Build Status](https://secure.travis-ci.org/javan/whenever.png)](http://travis-ci.org/javan/whenever)

----

Expand Down
13 changes: 3 additions & 10 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
begin
require 'bundler'
rescue LoadError => e
warn("warning: Could not load bundler: #{e}")
warn(" Some rake tasks will not be defined")
else
Bundler::GemHelper.install_tasks
end

require 'bundler/gem_tasks'
require 'rake/testtask'

Rake::TestTask.new(:test) do |test|
test.libs << 'lib' << 'test'
test.pattern = 'test/{functional,unit}/**/*_test.rb'
test.verbose = true
end

task :default => :test
task :default => :test
21 changes: 7 additions & 14 deletions test/test_case.rb
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
module Whenever
require 'minitest/autorun'
begin
require 'minitest/autorun'
begin
# 2.0.0
class TestCase < MiniTest::Test; end
rescue NameError
# 1.9.3
class TestCase < MiniTest::Unit::TestCase; end
end
rescue LoadError
# 1.8.7
require 'test/unit'
class TestCase < Test::Unit::TestCase
def default_test; end
end
# 2.0.0
class TestCase < MiniTest::Test; end
rescue NameError
# 1.9.3
class TestCase < MiniTest::Unit::TestCase; end
end


class TestCase
class << self
def setup(&block)
Expand Down
4 changes: 3 additions & 1 deletion whenever.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ Gem::Specification.new do |s|
s.test_files = `git ls-files -- test/{functional,unit}/*`.split("\n")
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"]
s.required_ruby_version = ">= 1.9.3"

s.add_dependency "chronic", ">= 0.6.3"

s.add_development_dependency "mocha", ">= 0.9.5"
s.add_development_dependency "bundler"
s.add_development_dependency "rake"
s.add_development_dependency "mocha", ">= 0.9.5"
s.add_development_dependency "minitest"
end

0 comments on commit cf2cebf

Please sign in to comment.