2008-03-07 20:07:17 -05:00
|
|
|
require 'rake'
|
2009-06-20 18:19:56 -04:00
|
|
|
|
|
|
|
require 'jeweler'
|
|
|
|
|
|
|
|
Jeweler::Tasks.new do |s|
|
2010-02-10 12:07:33 -05:00
|
|
|
s.name = "rest-client"
|
2010-02-08 16:08:18 -05:00
|
|
|
s.description = "A simple HTTP and REST client for Ruby, inspired by the Sinatra microframework style of specifying actions: get, put, post, delete."
|
|
|
|
s.summary = "Simple HTTP and REST client for Ruby, inspired by microframework syntax for specifying actions."
|
2010-09-22 12:24:43 -04:00
|
|
|
s.authors = ["Adam Wiggins", "Julien Kirch"]
|
2010-02-08 16:08:18 -05:00
|
|
|
s.email = "rest.client@librelist.com"
|
|
|
|
s.homepage = "http://github.com/archiloque/rest-client"
|
|
|
|
s.files = FileList["[A-Z]*", "{bin,lib,spec}/**/*"]
|
2011-06-04 19:01:10 -04:00
|
|
|
s.test_files = FileList["{spec}/**/*"]
|
2010-09-22 12:24:43 -04:00
|
|
|
s.add_runtime_dependency("mime-types", ">= 1.16")
|
2010-02-08 16:08:18 -05:00
|
|
|
s.add_development_dependency("webmock", ">= 0.9.1")
|
|
|
|
s.add_development_dependency("rspec")
|
2010-09-22 12:24:43 -04:00
|
|
|
s.extra_rdoc_files = [ 'README.rdoc', 'history.md']
|
2009-06-20 18:19:56 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
############################
|
|
|
|
|
2008-03-07 20:07:17 -05:00
|
|
|
require 'spec/rake/spectask'
|
|
|
|
|
|
|
|
desc "Run all specs"
|
2010-05-13 12:56:56 -04:00
|
|
|
task :spec => ["spec:unit", "spec:integration"]
|
|
|
|
|
|
|
|
desc "Run unit specs"
|
|
|
|
Spec::Rake::SpecTask.new('spec:unit') do |t|
|
2010-02-08 16:08:18 -05:00
|
|
|
t.spec_opts = ['--colour --format progress --loadby mtime --reverse']
|
|
|
|
t.spec_files = FileList['spec/*_spec.rb']
|
2008-03-07 20:07:17 -05:00
|
|
|
end
|
|
|
|
|
2010-05-13 12:56:56 -04:00
|
|
|
desc "Run integration specs"
|
|
|
|
Spec::Rake::SpecTask.new('spec:integration') do |t|
|
|
|
|
t.spec_opts = ['--colour --format progress --loadby mtime --reverse']
|
|
|
|
t.spec_files = FileList['spec/integration/*_spec.rb']
|
|
|
|
end
|
|
|
|
|
2008-03-07 20:07:17 -05:00
|
|
|
desc "Print specdocs"
|
|
|
|
Spec::Rake::SpecTask.new(:doc) do |t|
|
2010-02-08 16:08:18 -05:00
|
|
|
t.spec_opts = ["--format", "specdoc", "--dry-run"]
|
|
|
|
t.spec_files = FileList['spec/*_spec.rb']
|
2008-03-07 20:07:17 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
desc "Run all examples with RCov"
|
|
|
|
Spec::Rake::SpecTask.new('rcov') do |t|
|
2010-02-08 16:08:18 -05:00
|
|
|
t.spec_files = FileList['spec/*_spec.rb']
|
|
|
|
t.rcov = true
|
|
|
|
t.rcov_opts = ['--exclude', 'examples']
|
2008-03-07 20:07:17 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
task :default => :spec
|
2008-03-08 01:18:28 -05:00
|
|
|
|
2009-06-20 18:19:56 -04:00
|
|
|
############################
|
2008-03-08 01:18:28 -05:00
|
|
|
|
|
|
|
require 'rake/rdoctask'
|
|
|
|
|
2008-03-09 16:31:52 -04:00
|
|
|
Rake::RDocTask.new do |t|
|
2010-02-08 16:08:18 -05:00
|
|
|
t.rdoc_dir = 'rdoc'
|
|
|
|
t.title = "rest-client, fetch RESTful resources effortlessly"
|
|
|
|
t.options << '--line-numbers' << '--inline-source' << '-A cattr_accessor=object'
|
|
|
|
t.options << '--charset' << 'utf-8'
|
|
|
|
t.rdoc_files.include('README.rdoc')
|
|
|
|
t.rdoc_files.include('lib/*.rb')
|
2008-03-09 16:31:52 -04:00
|
|
|
end
|
|
|
|
|