forked from newrelic/newrelic-ruby-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
111 lines (93 loc) · 3.29 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
require 'rubygems'
require 'rake'
require "#{File.dirname(__FILE__)}/lib/new_relic/version.rb"
require 'rake/testtask'
GEM_NAME = "newrelic_rpm"
GEM_VERSION = NewRelic::VERSION::STRING
AUTHORS = "Bill Kayser", "Justin George"
EMAIL = "[email protected]"
HOMEPAGE = "http://www.github.com/newrelic/rpm"
SUMMARY = "New Relic Ruby Performance Monitoring Agent"
INSTALLATION_NOTES = "InstallationNotes.md"
RDOC_FILES = FileList['README*','LICENSE','newrelic.yml', 'CHANGELOG']
DESCRIPTION = <<-EOF
New Relic RPM is a Ruby performance management system, developed by
New Relic, Inc (http://www.newrelic.com). RPM provides you with deep
information about the performance of your Ruby on Rails or Merb
application as it runs in production. The New Relic Agent is
dual-purposed as a either a Rails plugin or a Gem, hosted on
http://github.com/newrelic/rpm/tree/master.
EOF
INSTALLATION_POSTSCRIPT = <<-EOF
Please see http://support.newrelic.com/faqs/docs/ruby-agent-release-notes
for a complete description of the features and enhancements available
in version #{GEM_VERSION.split('.')[0..1].join('.')} of the Ruby Agent.
For details on this specific release, refer to the CHANGELOG file.
Notice: Developer Mode now supports only Rails 2.3+ - refer to README
for instructions for previous versions
EOF
# See http://www.rubygems.org/read/chapter/20
begin
require 'jeweler'
Jeweler::Tasks.new do |gem|
gem.name = GEM_NAME
gem.description = DESCRIPTION
gem.summary = SUMMARY
gem.email = EMAIL
gem.homepage = HOMEPAGE
gem.authors = AUTHORS
gem.version = GEM_VERSION
gem.files = FileList['**/*']
gem.test_files = [] # You can't really run the tests unless the gem is installed.
gem.rdoc_options <<
"--line-numbers" <<
"--inline-source" <<
"--title" << SUMMARY
"-m" << "README.rdoc"
gem.files.reject! { |fn| fn =~ /Rakefile|init.rb|#{INSTALLATION_NOTES}|pkg\// }
gem.add_development_dependency "jeweler"
gem.add_development_dependency "mocha"
gem.add_development_dependency "shoulda"
gem.extra_rdoc_files = RDOC_FILES
if File.exists?(INSTALLATION_NOTES)
gem.post_install_message = File.read(INSTALLATION_NOTES) + INSTALLATION_POSTSCRIPT
else
gem.post_install_message = INSTALLATION_POSTSCRIPT
end
end
Jeweler::GemcutterTasks.new
rescue LoadError
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
end
load "#{File.dirname(__FILE__)}/lib/tasks/all.rb"
task :manifest do
puts "Manifest task is no longer used since switching to jeweler."
end
task :test => Rake::Task['test:newrelic']
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 = "#{SUMMARY} (v#{GEM_VERSION})"
rdoc.main = "README.rdoc"
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