Gem version 1.4.10
[stomp.git] / Rakefile
blob2e4040311792d05a62dd4f696c4d7a38a081490f
1 #   Copyright 2005-2006 Brian McCallister
3 #   Licensed under the Apache License, Version 2.0 (the "License");
4 #   you may not use this file except in compliance with the License.
5 #   You may obtain a copy of the License at
7 #       http://www.apache.org/licenses/LICENSE-2.0
9 #   Unless required by applicable law or agreed to in writing, software
10 #   distributed under the License is distributed on an "AS IS" BASIS,
11 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 #   See the License for the specific language governing permissions and
13 #   limitations under the License.
14 $:.unshift(File.dirname(__FILE__) + "/lib")
15 require 'rubygems'
16 require 'rake'
17 require 'rake/testtask'
18 require 'rspec/core/rake_task'
19 require "stomp/version"
21 begin
22   require "hanna-nouveau"
23   have_hanna = true
24 rescue LoadError => e
25   have_hanna = false
26 end
27 require "rdoc/task"
29 begin
30   require 'jeweler'
31   Jeweler::Tasks.new do |gem|
32     gem.name = "stomp"
33     gem.version = Stomp::Version::STRING
34     gem.summary = %Q{Ruby client for the Stomp messaging protocol}
35     gem.license = "Apache-2.0"
36     gem.description = %Q{Ruby client for the Stomp messaging protocol.}
37     gem.email = ["brianm@apache.org", 'marius@stones.com', 'morellon@gmail.com',
38        'allard.guy.m@gmail.com' ]
39     gem.homepage = "https://github.com/stompgem/stomp"
40     gem.authors = ["Brian McCallister", 'Marius Mathiesen', 'Thiago Morello',
41         'Guy M. Allard']
42     gem.add_development_dependency 'rspec', '~> 2.14', '>= 2.14.1'
43   end
44   Jeweler::GemcutterTasks.new
45 rescue LoadError
46   puts "Jeweler not available. Install it with: gem install jeweler"
47 end
49 desc 'Run the specs'
50 RSpec::Core::RakeTask.new(:spec) do |t|
51   t.rspec_opts = ['--colour']
52   t.pattern = 'spec/**/*_spec.rb'
53 end
55 desc "Rspec : run all with RCov"
56 RSpec::Core::RakeTask.new('spec:rcov') do |t|
57   t.pattern = 'spec/**/*_spec.rb'
58   t.rcov = true
59   t.rcov_opts = ['--exclude', 'gems', '--exclude', 'spec']
60 end
62 Rake::RDocTask.new do |rdoc|
63   rdoc.main = "README.md"
64   rdoc.rdoc_dir = "doc"
65   rdoc.title = "Stomp"
66   rdoc.options += %w[ --line-numbers --inline-source --charset utf-8 ]
67   if have_hanna
68     rdoc.options += %w[ --format hanna  ]
69   end
70   rdoc.rdoc_files.include("README.md", "CHANGELOG.md", "lib/**/*.rb")
71 end
73 Rake::TestTask.new do |t|
74   t.libs << "test"
75   t.test_files = FileList['test/test*.rb']
76   t.verbose = true
77 end
79 task :default => :spec