Skip to content
Newer
Older
100644 86 lines (67 sloc) 2.17 KB
71b61e8 @adamwiggins init
authored Mar 7, 2008
1 require 'rake'
2 require 'spec/rake/spectask'
3
4 desc "Run all specs"
5 Spec::Rake::SpecTask.new('spec') do |t|
b90383b add color and format progress in the rake spec task
Pedro Belo authored Jun 11, 2008
6 t.spec_opts = ['--colour --format progress --loadby mtime --reverse']
71b61e8 @adamwiggins init
authored Mar 8, 2008
7 t.spec_files = FileList['spec/*_spec.rb']
8 end
9
10 desc "Print specdocs"
11 Spec::Rake::SpecTask.new(:doc) do |t|
12 t.spec_opts = ["--format", "specdoc", "--dry-run"]
13 t.spec_files = FileList['spec/*_spec.rb']
14 end
15
16 desc "Run all examples with RCov"
17 Spec::Rake::SpecTask.new('rcov') do |t|
18 t.spec_files = FileList['spec/*_spec.rb']
19 t.rcov = true
20 t.rcov_opts = ['--exclude', 'examples']
21 end
22
23 task :default => :spec
ba86257 @adamwiggins gemspec
authored Mar 7, 2008
24
25 ######################################################
26
27 require 'rake'
28 require 'rake/testtask'
29 require 'rake/clean'
30 require 'rake/gempackagetask'
31 require 'rake/rdoctask'
32 require 'fileutils'
33
fe05bb0 @adamwiggins v1.0
authored May 28, 2009
34 version = "1.0"
ba86257 @adamwiggins gemspec
authored Mar 8, 2008
35 name = "rest-client"
36
37 spec = Gem::Specification.new do |s|
38 s.name = name
39 s.version = version
40 s.summary = "Simple REST client for Ruby, inspired by microframework syntax for specifying actions."
5f27560 @adamwiggins gem version 0.5
authored Jun 20, 2008
41 s.description = "A simple REST client for Ruby, inspired by the Sinatra microframework style of specifying actions: get, put, post, delete."
ba86257 @adamwiggins gemspec
authored Mar 8, 2008
42 s.author = "Adam Wiggins"
43 s.email = "adam@heroku.com"
c1b242d @adamwiggins link homepage
authored Mar 9, 2008
44 s.homepage = "http://rest-client.heroku.com/"
15f58e6 @adamwiggins rdocs
authored Mar 9, 2008
45 s.rubyforge_project = "rest-client"
ba86257 @adamwiggins gemspec
authored Mar 8, 2008
46
47 s.platform = Gem::Platform::RUBY
15f58e6 @adamwiggins rdocs
authored Mar 9, 2008
48 s.has_rdoc = true
ba86257 @adamwiggins gemspec
authored Mar 8, 2008
49
f8dd948 @adamwiggins readme included in gem
authored Mar 12, 2009
50 s.files = %w(Rakefile README.rdoc) + Dir.glob("{lib,spec}/**/*")
7e3df03 @bmizerany Easy to use shell!
bmizerany authored Jul 7, 2008
51 s.executables = ['restclient']
ba86257 @adamwiggins gemspec
authored Mar 8, 2008
52
53 s.require_path = "lib"
54 end
55
56 Rake::GemPackageTask.new(spec) do |p|
57 p.need_tar = true if RUBY_PLATFORM !~ /mswin/
58 end
59
60 task :install => [ :package ] do
61 sh %{sudo gem install pkg/#{name}-#{version}.gem}
62 end
63
64 task :uninstall => [ :clean ] do
65 sh %{sudo gem uninstall #{name}}
66 end
67
68 Rake::TestTask.new do |t|
69 t.libs << "spec"
70 t.test_files = FileList['spec/*_spec.rb']
71 t.verbose = true
72 end
73
15f58e6 @adamwiggins rdocs
authored Mar 9, 2008
74 Rake::RDocTask.new do |t|
75 t.rdoc_dir = 'rdoc'
76 t.title = "rest-client, fetch RESTful resources effortlessly"
77 t.options << '--line-numbers' << '--inline-source' << '-A cattr_accessor=object'
78 t.options << '--charset' << 'utf-8'
74cd64d @adamwiggins rdocs for the reorganized classes
authored Jan 24, 2009
79 t.rdoc_files.include('README.rdoc')
80 t.rdoc_files.include('lib/restclient.rb')
81 t.rdoc_files.include('lib/restclient/*.rb')
15f58e6 @adamwiggins rdocs
authored Mar 9, 2008
82 end
83
ba86257 @adamwiggins gemspec
authored Mar 8, 2008
84 CLEAN.include [ 'pkg', '*.gem', '.config' ]
85
Something went wrong with that request. Please try again.