-
Notifications
You must be signed in to change notification settings - Fork 3
/
Rakefile
76 lines (57 loc) · 2.12 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
require 'rake'
require 'rake/clean'
require 'rake/gempackagetask'
require 'rake/testtask'
require 'fileutils'
$LOAD_PATH << 'lib'
require 'crazy_ivan'
include FileUtils
version = CrazyIvan::VERSION
name = "crazy_ivan"
spec = Gem::Specification.new do |s|
s.name = name
s.version = version
s.summary = 'Crazy Ivan (CI) is simplest possible continuous integration tool.'
s.description = "Continuous integration should really just be a script that captures the output of running your project update & test commands and presents recent results in a static html page.
By keeping test reports in json, per-project CI configuration in 3 probably-one-line scripts, things are kept simple, quick, and super extensible.
Want to use git, svn, or hg? No problem.
Need to fire off results to Campfire? It's built-in.
CI depends on cron."
s.authors = "Edward Ocampo-Gooding"
s.email = '[email protected]'
s.homepage = "http://github.com/edward/crazy_ivan"
s.executables = ["crazy_ivan", "test_report2campfire"]
s.default_executable = "crazy_ivan"
s.rubyforge_project = "crazy_ivan"
s.platform = Gem::Platform::RUBY
s.has_rdoc = false
s.files = Dir.glob("{bin,lib}/**/*") + FileList['LICENSE', 'README.rdoc'].to_a
s.require_path = "lib"
s.bindir = "bin"
s.add_development_dependency('gemcutter', '>= 0.2.1')
s.add_development_dependency('mocha')
readme = File.read('README.rdoc')
s.post_install_message = '\n' + readme[0...readme.index('== How this works')]
end
Rake::GemPackageTask.new(spec) do |p|
p.need_tar = true if RUBY_PLATFORM !~ /mswin/
end
desc "Install #{name} gem (#{version})"
# task :install => [ :test, :package ] do
task :install => [ :package ] do
sh %{gem install pkg/#{name}-#{version}.gem --no-rdoc --no-ri}
end
desc "Uninstall #{name} gem"
task :uninstall => [ :clean ] do
sh %{gem uninstall #{name}}
end
desc "Release #{name} gem (#{version})"
task :release => [ :test, :package ] do
sh %{gem push pkg/#{name}-#{version}.gem}
end
task :default => :test
Rake::TestTask.new(:test) do |test|
test.libs << 'lib' << 'test'
test.pattern = 'test/**/*_test.rb'
test.verbose = true
end