Permalink
Browse files

Drop Ruby < 1.9.3 support

  • Loading branch information...
1 parent 334cfa0 commit cf2cebf79ecda58c664652ee2491c7bec0c433e6 @javan committed May 28, 2016
Showing with 15 additions and 31 deletions.
  1. +1 −5 .travis.yml
  2. +1 −1 README.md
  3. +3 −10 Rakefile
  4. +7 −14 test/test_case.rb
  5. +3 −1 whenever.gemspec
View
@@ -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
View
@@ -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)
----
View
@@ -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
View
@@ -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)
View
@@ -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

5 comments on commit cf2cebf

@benlangfeld
Collaborator

@javan What support policy would you like to follow for Ruby versions? I typically follow an approach of dropping support for EOL'd Ruby versions in the following major release of my projects. This would mean that a potential Whenever 0.10.0 would drop support for Ruby 1.9 and 2.0.

@javan
Owner
javan commented on cf2cebf May 28, 2016

Let's stick with 1.9.3+ until there's a compelling reason to drop more. I'm not terribly concerned about security since Whenever is rarely directly connected to anything public facing.

I want Whenever to be convenient for as many people as possible to use, which is why I hung on to 1.8.7 for so long, but I can't bare to write the old-style hash syntax any longer. ;)

@javan
Owner
javan commented on cf2cebf May 28, 2016

Let's yank jruby too. Takes forever to spin up the VM on travis. We can add it back in if specific issues arise.

@benlangfeld
Collaborator

but I can't bare to write the old-style hash syntax any longer

It'd be nice to make use of named parameters also. Happy to stick to the "until it's unbearable" policy if that's your preference though.

Let's yank jruby too.

I don't think it's materially slowing us down at this point; I'd prefer to leave it in if possible.

@javan
Owner
javan commented on cf2cebf May 28, 2016

How about we get a release or two out and then reconsider what Ruby versions to support for a 1.0 release?

I'd prefer to leave it in if possible

Fine by me. Perhaps we can specify a version that Travis has preinstalled for faster test runs. I think my last commit pointed to jruby head, which gets downloaded and installed each time.

screen shot 2016-05-28 at 7 17 40 pm

Please sign in to comment.