forked from typhoeus/typhoeus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
56 lines (48 loc) · 1.7 KB
/
Rakefile
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
$LOAD_PATH.unshift(File.dirname(__FILE__))
require "spec"
require "spec/rake/spectask"
require "lib/typhoeus/version"
begin
require 'jeweler'
Jeweler::Tasks.new do |gemspec|
gemspec.name = "typhoeus"
gemspec.summary = "A library for interacting with web services (and building SOAs) at blinding speed."
gemspec.description = "Like a modern code version of the mythical beast with 100 serpent heads, Typhoeus runs HTTP requests in parallel while cleanly encapsulating handling logic."
gemspec.email = "dbalatero@gmail.com"
gemspec.homepage = "http://github.com/dbalatero/typhoeus"
gemspec.authors = ["Paul Dix", "David Balatero"]
gemspec.add_dependency "mime-types"
gemspec.add_development_dependency "rspec"
gemspec.add_development_dependency "jeweler"
gemspec.add_development_dependency "diff-lcs"
gemspec.add_development_dependency "sinatra"
gemspec.add_development_dependency "json"
end
Jeweler::GemcutterTasks.new
rescue LoadError
puts "Jeweler not available. Install it with: gem install jeweler"
end
Spec::Rake::SpecTask.new do |t|
t.spec_opts = ['--options', "\"#{File.dirname(__FILE__)}/spec/spec.opts\""]
t.spec_files = FileList['spec/**/*_spec.rb']
end
task :install do
rm_rf "*.gem"
puts `gem build typhoeus.gemspec`
puts `gem install typhoeus-#{Typhoeus::VERSION}.gem`
end
desc "Builds the native code"
task :build_native do
system("cd ext/typhoeus && ruby extconf.rb && make")
end
desc "Start up the test servers"
task :start_test_servers do
puts "Starting 3 test servers"
(3000..3002).map do |port|
Thread.new do
system("ruby spec/servers/app.rb -p #{port}")
end
end.each(&:join)
end
desc "Run all the tests"
task :default => :spec