forked from newrelic/rpm_contrib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
77 lines (68 loc) · 2.02 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
require 'rubygems'
require 'rake'
# See http://www.rubygems.org/read/chapter/20
def version
@rpm_contrib_version ||= File.read("CHANGELOG")[/Version ([\d\.]+)$/, 1]
end
RDOC_FILES = FileList['README*','LICENSE','CHANGELOG']
SUMMARY = "Contributed Instrumentation for New Relic RPM"
DESCRIPTION = <<-EOF
Community contributed instrumentation for various frameworks based on
the New Relic Ruby monitoring gem newrelic_rpm.
EOF
begin
require 'jeweler'
Jeweler::Tasks.new do |gem|
gem.name = "rpm_contrib"
gem.summary = SUMMARY
gem.description = DESCRIPTION
gem.email = "[email protected]"
gem.homepage = "http://github.com/newrelic/rpm_contrib"
gem.author = "Bill Kayser"
gem.add_dependency 'newrelic_rpm', '>=2.13.1'
gem.version = version
gem.files = FileList['LICENSE', 'README*', 'lib/**/*.rb', 'bin/*', '[A-Z]*', 'test/**/*'].to_a
gem.rdoc_options <<
"--line-numbers" <<
"--inline-source" <<
"--title" << SUMMARY <<
"-m" << "README.md"
gem.extra_rdoc_files = RDOC_FILES
end
Jeweler::GemcutterTasks.new
rescue LoadError
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
end
require 'rake/testtask'
Rake::TestTask.new(:test) do |test|
test.libs << 'lib' << 'test'
test.pattern = 'test/**/test_*.rb'
test.verbose = true
end
begin
require 'rcov/rcovtask'
Rcov::RcovTask.new do |test|
test.libs << 'test'
test.pattern = 'test/**/test_*.rb'
test.verbose = true
end
rescue LoadError
task :rcov do
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
end
end
#task :test => :check_dependencies
task :default => :test
require 'rake/rdoctask'
Rake::RDocTask.new do |rdoc|
rdoc.rdoc_dir = 'rdoc'
rdoc.title = "rpm_contrib #{version}"
rdoc.main = "README.md"
rdoc.rdoc_files = FileList['lib/**/*.rb'] + RDOC_FILES
rdoc.inline_source = true
end
begin
require 'sdoc_helpers'
rescue LoadError
puts "sdoc support not enabled. Please gem install sdoc-helpers."
end