File: Rakefile

package info (click to toggle)
librestclient-ruby 1.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 276 kB
  • ctags: 133
  • sloc: ruby: 1,994; makefile: 5
file content (69 lines) | stat: -rw-r--r-- 2,061 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
require 'rake'

require 'jeweler'

Jeweler::Tasks.new do |s|
  s.name = "rest-client"
  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."
  s.author = "Adam Wiggins"
  s.email = "rest.client@librelist.com"
  s.homepage = "http://github.com/archiloque/rest-client"
  s.rubyforge_project = "rest-client"
  s.has_rdoc = true
  s.files = FileList["[A-Z]*", "{bin,lib,spec}/**/*"]
  s.executables = %w(restclient)
  s.add_dependency("mime-types", ">= 1.16")
  s.add_development_dependency("webmock", ">= 0.9.1")
  s.add_development_dependency("rspec")
end

Jeweler::RubyforgeTasks.new

############################

require 'spec/rake/spectask'

desc "Run all specs"
task :spec => ["spec:unit", "spec:integration"]

desc "Run unit specs"
Spec::Rake::SpecTask.new('spec:unit') do |t|
  t.spec_opts = ['--colour --format progress --loadby mtime --reverse']
  t.spec_files = FileList['spec/*_spec.rb']
end

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

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

############################

require 'rake/rdoctask'

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'
  t.rdoc_files.include('README.rdoc')
  t.rdoc_files.include('lib/*.rb')
end