Skip to content
Newer
Older
100644 70 lines (60 sloc) 2.42 KB
e7303c0 Added license and copyright message to source files.
Phillip Toland authored
1 ## -------------------------------------------------------------------
2 ##
3 ## Copyright (c) 2008 The Hive http://www.thehive.com/
4 ##
5 ## Permission is hereby granted, free of charge, to any person obtaining a copy
6 ## of this software and associated documentation files (the "Software"), to deal
7 ## in the Software without restriction, including without limitation the rights
8 ## to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 ## copies of the Software, and to permit persons to whom the Software is
10 ## furnished to do so, subject to the following conditions:
11 ##
12 ## The above copyright notice and this permission notice shall be included in
13 ## all copies or substantial portions of the Software.
14 ##
15 ## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 ## IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 ## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 ## AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 ## LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 ## OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 ## THE SOFTWARE.
22 ##
23 ## -------------------------------------------------------------------
ec59de4 Initial commit.
Phillip Toland authored
24 require 'rake/clean'
25 require 'rake/rdoctask'
4309062 @toland New build system and rspec upgrade
authored
26 require 'rake/extensiontask'
27 require 'rspec/core/rake_task'
28 require 'bundler'
29
30 Rake::ExtensionTask.new do |ext|
31 ext.name = 'session_ext' # indicate the name of the extension.
32 ext.ext_dir = 'ext/patron' # search for 'hello_world' inside it.
33 ext.lib_dir = 'lib/patron' # put binaries into this folder.
ec59de4 Initial commit.
Phillip Toland authored
34 end
35
4309062 @toland New build system and rspec upgrade
authored
36 Bundler::GemHelper.install_tasks
ec59de4 Initial commit.
Phillip Toland authored
37
4309062 @toland New build system and rspec upgrade
authored
38 CLEAN.include FileList["ext/patron/*"].exclude(/^.*\.(rb|c)$/)
39 CLOBBER.include %w( doc coverage pkg )
ec59de4 Initial commit.
Phillip Toland authored
40
3f99b15 Added shell task to Rakefile
Phillip Toland authored
41 desc "Start an IRB shell"
42 task :shell => :compile do
43 sh 'irb -I./lib -I./ext -r patron'
44 end
45
ec59de4 Initial commit.
Phillip Toland authored
46 Rake::RDocTask.new do |rdoc|
4cbdf04 @toland Fixed generation and upload of docs.
authored
47 rdoc.rdoc_dir = 'rdoc'
48 rdoc.title = 'Patron documentation'
ec59de4 Initial commit.
Phillip Toland authored
49 rdoc.main = 'README.txt'
50 rdoc.rdoc_files.include('README.txt')
51 rdoc.rdoc_files.include('lib/**/*.rb')
52 end
53
54 desc "Run specs"
4309062 @toland New build system and rspec upgrade
authored
55 RSpec::Core::RakeTask.new do |t|
56 t.rspec_opts = %w( --colour --format progress )
57 t.pattern = 'spec/**/*_spec.rb'
ec59de4 Initial commit.
Phillip Toland authored
58 end
59
60 task :spec => [:compile]
61
62 desc "Run specs with RCov"
4309062 @toland New build system and rspec upgrade
authored
63 RSpec::Core::RakeTask.new('spec:rcov') do |t|
64 t.pattern = 'spec/**/*_spec.rb'
ec59de4 Initial commit.
Phillip Toland authored
65 t.rcov = true
4309062 @toland New build system and rspec upgrade
authored
66 t.rcov_opts = %q(--sort coverage --comments --exclude "spec")
ec59de4 Initial commit.
Phillip Toland authored
67 end
68
69 task :default => :spec
Something went wrong with that request. Please try again.