Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 68 lines (58 sloc) 1.964 kb
7a1a3d5 @blaine Initial Import
blaine authored
1 require 'rubygems'
9ee6290 @chrisk Switch to Jeweler
chrisk authored
2 require 'rake'
3
809ab3d @chrisk Release 1.3.0
chrisk authored
4 version = '1.3.0'
ba72aba @chrisk Make sure our RDoc task can find the VERSION file, too
chrisk authored
5
05c85a5 @chrisk Print a nicer error when you try to run `rake` and your RDoc is out-of-d...
chrisk authored
6 begin
9ee6290 @chrisk Switch to Jeweler
chrisk authored
7 require 'jeweler'
8 Jeweler::Tasks.new do |gem|
9 gem.name = "fakeweb"
10 gem.rubyforge_project = "fakeweb"
ba72aba @chrisk Make sure our RDoc task can find the VERSION file, too
chrisk authored
11 gem.version = version
9ee6290 @chrisk Switch to Jeweler
chrisk authored
12 gem.summary = "A tool for faking responses to HTTP requests"
13 gem.description = "FakeWeb is a helper for faking web requests in Ruby. It works at a global level, without modifying code or writing extensive stubs."
14 gem.email = ["chris@kampers.net", "romeda@gmail.com"]
15 gem.authors = ["Chris Kampmeier", "Blaine Cook"]
16 gem.homepage = "http://github.com/chrisk/fakeweb"
17 gem.add_development_dependency "mocha", ">= 0.9.5"
18 end
05c85a5 @chrisk Print a nicer error when you try to run `rake` and your RDoc is out-of-d...
chrisk authored
19 rescue LoadError
dc53bf9 @chrisk Docs: remove the sudos everywhere
chrisk authored
20 puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
05c85a5 @chrisk Print a nicer error when you try to run `rake` and your RDoc is out-of-d...
chrisk authored
21 end
7a1a3d5 @blaine Initial Import
blaine authored
22
23
9ee6290 @chrisk Switch to Jeweler
chrisk authored
24 require 'rake/testtask'
25 Rake::TestTask.new(:test) do |test|
22533e2 @chrisk Print a warning when FakeWeb is loaded after Samuel
chrisk authored
26 test.test_files = FileList["test/**/*.rb"].exclude("test/test_helper.rb", "test/vendor")
dedfac1 @chrisk Remove all the File.dirname(__FILE__) code
chrisk authored
27 test.libs << "test"
c47c26a @chrisk Tweak rake options to not print the huge ruby command at the start of th...
chrisk authored
28 test.verbose = false
b957050 @chrisk Enable warnings when running tests
chrisk authored
29 test.warning = true
7a1a3d5 @blaine Initial Import
blaine authored
30 end
31
3e7ab2f @chrisk Check that the dev dependencies are installed before trying to run tests
chrisk authored
32 task :default => [:check_dependencies, :test]
67e0765 @chrisk Merge branch 'mislav/master' (early part)
chrisk authored
33
a24e332 @MarkMenard Wrapped rcov in a guard so it is bypassed when using JRuby.
MarkMenard authored
34
9ee6290 @chrisk Switch to Jeweler
chrisk authored
35 begin
a24e332 @MarkMenard Wrapped rcov in a guard so it is bypassed when using JRuby.
MarkMenard authored
36 require 'rcov/rcovtask'
37 Rcov::RcovTask.new do |t|
22533e2 @chrisk Print a warning when FakeWeb is loaded after Samuel
chrisk authored
38 t.test_files = FileList["test/**/*.rb"].exclude("test/test_helper.rb", "test/vendor")
dedfac1 @chrisk Remove all the File.dirname(__FILE__) code
chrisk authored
39 t.libs << "test"
a24e332 @MarkMenard Wrapped rcov in a guard so it is bypassed when using JRuby.
MarkMenard authored
40 t.rcov_opts << "--sort coverage"
41 t.rcov_opts << "--exclude gems"
b957050 @chrisk Enable warnings when running tests
chrisk authored
42 t.warning = true
a24e332 @MarkMenard Wrapped rcov in a guard so it is bypassed when using JRuby.
MarkMenard authored
43 end
51ebb22 @chrisk Make a blind rescue more specific in our Rakefile
chrisk authored
44 rescue LoadError
9ee6290 @chrisk Switch to Jeweler
chrisk authored
45 print "rcov support disabled "
46 if RUBY_PLATFORM =~ /java/
47 puts "(running under JRuby)"
48 else
49 puts "(install RCov to enable the `rcov` task)"
50 end
6ce864f @chrisk Re-add 'rake/gempackagetask' instead of manually building releases
chrisk authored
51 end
52
9ee6290 @chrisk Switch to Jeweler
chrisk authored
53
54 begin
acc404b @chrisk Switch to SDoc for RDoc output
chrisk authored
55 require 'sdoc'
9ee6290 @chrisk Switch to Jeweler
chrisk authored
56 require 'rdoc/task'
57 Rake::RDocTask.new do |rdoc|
58 rdoc.main = "README.rdoc"
59 rdoc.rdoc_files.include("README.rdoc", "CHANGELOG", "LICENSE.txt", "lib/*.rb")
60 rdoc.title = "FakeWeb #{version} API Documentation"
acc404b @chrisk Switch to SDoc for RDoc output
chrisk authored
61 rdoc.rdoc_dir = "doc"
62 rdoc.template = "direct"
63 rdoc.options << "--line-numbers" << "--show-hash" << "--charset=utf-8"
9ee6290 @chrisk Switch to Jeweler
chrisk authored
64 end
65 rescue LoadError
acc404b @chrisk Switch to SDoc for RDoc output
chrisk authored
66 puts "SDoc (or a dependency) not available. Install it with: gem install sdoc"
6ce864f @chrisk Re-add 'rake/gempackagetask' instead of manually building releases
chrisk authored
67 end
Something went wrong with that request. Please try again.