forked from librato/librato-rails
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Rakefile
executable file
·37 lines (31 loc) · 824 Bytes
/
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
#!/usr/bin/env rake
begin
require 'bundler/setup'
rescue LoadError
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
end
task 'before_build' do
signing_key = File.expand_path("~/.gem/librato-private_key.pem")
if File.exists?(signing_key)
puts "Key found: signing gem..."
ENV['GEM_SIGNING_KEY'] = signing_key
else
puts "WARN: signing key not found, gem not signed"
end
end
task :build => :before_build
# IRB
desc "Open an irb session preloaded with this library"
task :console do
sh "pry -rubygems -r rails -r ./lib/librato-rails.rb"
end
Bundler::GemHelper.install_tasks
require 'rake/testtask'
Rake::TestTask.new(:test) do |t|
t.libs << 'lib'
t.libs << 'test'
t.pattern = 'test/**/*_test.rb'
t.verbose = false
t.warning = false
end
task :default => :test