From 82b2394cf14a1592aba061f21c2aee172036838e Mon Sep 17 00:00:00 2001 From: Larry Gilbert Date: Tue, 4 Feb 2014 22:38:34 -0800 Subject: [PATCH] Update Rakefile tasks for RDoc and RSpec; update dependencies in gemspec --- Rakefile | 20 ++++++++++---------- rest-client.gemspec | 3 ++- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/Rakefile b/Rakefile index 8c9c279..50c94e4 100644 --- a/Rakefile +++ b/Rakefile @@ -10,24 +10,24 @@ desc "Run all specs" task :spec => ["spec:unit", "spec:integration"] desc "Run unit specs" -Spec::Rake::SpecTask.new('spec:unit') do |t| - t.spec_files = FileList['spec/*_spec.rb'] +RSpec::Core::RakeTask.new('spec:unit') do |t| + t.pattern = ['spec/*_spec.rb'] end desc "Run integration specs" -Spec::Rake::SpecTask.new('spec:integration') do |t| - t.spec_files = FileList['spec/integration/*_spec.rb'] +RSpec::Core::RakeTask.new('spec:integration') do |t| + t.pattern = ['spec/integration/*_spec.rb'] end desc "Print specdocs" -Spec::Rake::SpecTask.new(:doc) do |t| - t.spec_opts = ["--format", "specdoc", "--dry-run"] - t.spec_files = FileList['spec/*_spec.rb'] +RSpec::Core::RakeTask.new(:doc) do |t| + t.rspec_opts = ["--format", "specdoc", "--dry-run"] + t.pattern = ['spec/*_spec.rb'] end desc "Run all examples with RCov" -Spec::Rake::SpecTask.new('rcov') do |t| - t.spec_files = FileList['spec/*_spec.rb'] +RSpec::Core::RakeTask.new('rcov') do |t| + t.pattern = ['spec/*_spec.rb'] t.rcov = true t.rcov_opts = ['--exclude', 'examples'] end @@ -36,7 +36,7 @@ task :default => :spec ############################ -require 'rake/rdoctask' +require 'rdoc/task' Rake::RDocTask.new do |t| t.rdoc_dir = 'rdoc' diff --git a/rest-client.gemspec b/rest-client.gemspec index cae4227..97931d4 100644 --- a/rest-client.gemspec +++ b/rest-client.gemspec @@ -14,7 +14,8 @@ Gem::Specification.new do |s| s.homepage = 'http://github.com/rest-client/rest-client' s.summary = 'Simple HTTP and REST client for Ruby, inspired by microframework syntax for specifying actions.' - s.add_runtime_dependency(%q, ["~> 1.16"]) + s.add_dependency(%q, ["~> 1.16"]) + s.add_dependency(%q, [">= 2.4.2"]) s.add_development_dependency(%q, ["~> 10.0"]) s.add_development_dependency(%q, ["~> 1.4"]) s.add_development_dependency(%q, ["~> 2.4"])