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|
|
|
|
|
s.name = "rest-client"
|
|
|
|
s.description = "A simple REST client for Ruby, inspired by the Sinatra microframework style of specifying actions: get, put, post, delete."
|
2010-01-25 13:35:53 -05:00
|
|
|
s.summary = "Simple HTTP and REST client for Ruby, inspired by microframework syntax for specifying actions."
|
2009-06-20 18:19:56 -04:00
|
|
|
s.author = "Adam Wiggins"
|
2010-01-03 16:36:54 -05:00
|
|
|
s.email = "rest.client@librelist.com"
|
|
|
|
s.homepage = "http://github.com/archiloque/rest-client"
|
2009-06-20 18:19:56 -04:00
|
|
|
s.rubyforge_project = "rest-client"
|
|
|
|
s.has_rdoc = true
|
|
|
|
s.files = FileList["[A-Z]*", "{bin,lib,spec}/**/*"]
|
|
|
|
s.executables = %w(restclient)
|
|
|
|
end
|
|
|
|
|
|
|
|
Jeweler::RubyforgeTasks.new
|
|
|
|
|
|
|
|
############################
|
|
|
|
|
2008-03-07 20:07:17 -05:00
|
|
|
require 'spec/rake/spectask'
|
|
|
|
|
|
|
|
desc "Run all specs"
|
|
|
|
Spec::Rake::SpecTask.new('spec') do |t|
|
2008-06-11 15:22:25 -04:00
|
|
|
t.spec_opts = ['--colour --format progress --loadby mtime --reverse']
|
2008-03-07 20:07:17 -05:00
|
|
|
t.spec_files = FileList['spec/*_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']
|
|
|
|
end
|
|
|
|
|
|
|
|
desc "Run all examples with RCov"
|
|
|
|
Spec::Rake::SpecTask.new('rcov') do |t|
|
|
|
|
t.spec_files = FileList['spec/*_spec.rb']
|
|
|
|
t.rcov = true
|
|
|
|
t.rcov_opts = ['--exclude', 'examples']
|
|
|
|
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|
|
|
|
|
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'
|
2009-01-24 20:12:38 -05:00
|
|
|
t.rdoc_files.include('README.rdoc')
|
2008-03-10 20:20:57 -04:00
|
|
|
t.rdoc_files.include('lib/*.rb')
|
2008-03-09 16:31:52 -04:00
|
|
|
end
|
|
|
|
|