forked from colincasey/arcserver.rb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
62 lines (49 loc) · 1.36 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
$LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
require 'fileutils'
require 'arcserver/version'
desc "Run all tests"
task :test => ["test:unit", "test:functional"]
task :default => :test
namespace :test do
desc "Run unit tests"
Rake::TestTask.new(:unit) do |test|
test.libs << 'lib' << 'test'
test.pattern = 'test/unit/**/*_test.rb'
test.verbose = true
end
desc "Run functional tests"
Rake::TestTask.new(:functional) do |test|
test.libs << 'lib' << 'test'
test.pattern = 'test/functional/**/*_test.rb'
test.verbose = true
end
end
Rake::RDocTask.new do |rdoc|
rdoc.rdoc_dir = 'rdoc'
rdoc.title = "arcserver.rb #{ArcServer::VERSION}"
rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
end
begin
require 'yard'
YARD::Rake::YardocTask.new do |t|
t.files = ['lib/**/*.rb']
end
rescue LoadError
end
desc "Build arcserver.rb gem"
task :build do
system "gem build arcserver.rb.gemspec"
base_dir = File.dirname(__FILE__)
pkg_dir = File.join(base_dir, "pkg")
FileUtils.mkdir_p pkg_dir
gem_file_name = File.join(base_dir, "arcserver.rb-#{ArcServer::VERSION}.gem")
FileUtils.mv(gem_file_name, pkg_dir)
end
desc "Release arcserver.rb gem"
task :release => :build do
system "gem push pkg/arcserver.rb-#{ArcServer::VERSION}"
end