1
0
Fork 0
mirror of https://github.com/rest-client/rest-client.git synced 2022-11-09 13:49:40 -05:00
rest-client--rest-client/Rakefile

86 lines
2.2 KiB
Text
Raw Normal View History

2008-03-07 20:07:17 -05:00
require 'rake'
require 'spec/rake/spectask'
desc "Run all specs"
Spec::Rake::SpecTask.new('spec') do |t|
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
######################################################
require 'rake'
require 'rake/testtask'
require 'rake/clean'
require 'rake/gempackagetask'
require 'rake/rdoctask'
require 'fileutils'
2009-06-05 19:42:36 -04:00
version = "1.0.1"
2008-03-08 01:18:28 -05:00
name = "rest-client"
spec = Gem::Specification.new do |s|
s.name = name
s.version = version
s.summary = "Simple REST client for Ruby, inspired by microframework syntax for specifying actions."
2008-06-20 23:53:18 -04:00
s.description = "A simple REST client for Ruby, inspired by the Sinatra microframework style of specifying actions: get, put, post, delete."
2008-03-08 01:18:28 -05:00
s.author = "Adam Wiggins"
s.email = "adam@heroku.com"
2008-03-09 16:42:44 -04:00
s.homepage = "http://rest-client.heroku.com/"
2008-03-09 16:31:52 -04:00
s.rubyforge_project = "rest-client"
2008-03-08 01:18:28 -05:00
s.platform = Gem::Platform::RUBY
2008-03-09 16:31:52 -04:00
s.has_rdoc = true
2008-03-08 01:18:28 -05:00
2009-03-12 20:13:01 -04:00
s.files = %w(Rakefile README.rdoc) + Dir.glob("{lib,spec}/**/*")
2008-07-07 22:49:10 -04:00
s.executables = ['restclient']
2008-03-08 01:18:28 -05:00
s.require_path = "lib"
end
Rake::GemPackageTask.new(spec) do |p|
p.need_tar = true if RUBY_PLATFORM !~ /mswin/
end
task :install => [ :package ] do
sh %{sudo gem install pkg/#{name}-#{version}.gem}
end
task :uninstall => [ :clean ] do
sh %{sudo gem uninstall #{name}}
end
Rake::TestTask.new do |t|
t.libs << "spec"
t.test_files = FileList['spec/*_spec.rb']
t.verbose = true
end
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')
t.rdoc_files.include('lib/restclient.rb')
t.rdoc_files.include('lib/restclient/*.rb')
2008-03-09 16:31:52 -04:00
end
2008-03-08 01:18:28 -05:00
CLEAN.include [ 'pkg', '*.gem', '.config' ]