forked from heroku/legacy-cli
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Rakefile
89 lines (72 loc) · 2.23 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
require 'rake'
require 'spec/rake/spectask'
desc "Run all specs"
Spec::Rake::SpecTask.new('spec') do |t|
t.spec_opts = ['--colour --format progress --loadby mtime --reverse']
t.spec_files = FileList['spec/**/*_spec.rb']
end
desc "Print specdocs"
Spec::Rake::SpecTask.new(:doc) do |t|
t.spec_opts = ["--format", "specdoc", "--dry-run"]
t.spec_files = FileList['spec/*_spec.rb']
end
desc "Generate RCov code coverage report"
Spec::Rake::SpecTask.new('rcov') do |t|
t.spec_files = FileList['spec/*_spec.rb']
t.rcov = true
t.rcov_opts = ['--exclude', 'examples']
end
task :default => :spec
######################################################
require 'rake'
require 'rake/testtask'
require 'rake/clean'
require 'rake/gempackagetask'
require 'rake/rdoctask'
require 'fileutils'
include FileUtils
require 'lib/heroku'
version = Heroku::Client.version
name = "heroku"
spec = Gem::Specification.new do |s|
s.name = name
s.version = version
s.summary = "Client library and CLI to deploy Rails apps on Heroku."
s.description = "Client library and command-line tool to manage and deploy Rails apps on Heroku."
s.author = "Heroku"
s.email = "[email protected]"
s.homepage = "http://heroku.com/"
s.executables = [ "heroku" ]
s.default_executable = "heroku"
s.rubyforge_project = "heroku"
s.platform = Gem::Platform::RUBY
s.has_rdoc = false
s.files = %w(Rakefile) +
Dir.glob("{bin,lib,spec}/**/*")
s.require_path = "lib"
s.bindir = "bin"
s.add_dependency('rest-client', '>= 1.0.3')
s.add_dependency('launchy', '>=0.3.2')
s.add_dependency('json', '>= 1.1.0')
end
desc "Install #{name} gem (#{version})"
task :install => [ :test, :package ] do
sh %{sudo gem install pkg/#{name}-#{version}.gem}
end
desc "Uninstall #{name} gem"
task :uninstall => [ :clean ] do
sh %{sudo gem uninstall #{name}}
end
Rake::TestTask.new do |t|
t.libs << "spec"
t.test_files = FileList['spec/*_spec.rb']
t.verbose = true
end
CLEAN.include [ 'build/*', '**/*.o', '**/*.so', '**/*.a', 'lib/*-*', '**/*.log', 'pkg', 'lib/*.bundle', '*.gem', '.config' ]
begin
require 'jeweler'
Jeweler::Tasks.new(spec)
Jeweler::RubyforgeTasks.new
rescue LoadError
puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
end