forked from pierre/galaxy
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathRakefile
82 lines (72 loc) · 2.5 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
# encoding: utf-8
$:.unshift File.join(File.dirname(__FILE__), 'lib', 'galaxy')
require 'version'
require 'rubygems'
require 'rake'
PACKAGE_NAME = 'galaxy'
PACKAGE_VERSION = Galaxy::Version
GEM_VERSION = PACKAGE_VERSION.split('-')[0]
require 'jeweler'
Jeweler::Tasks.new do |gem|
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
gem.name = PACKAGE_NAME
gem.version = GEM_VERSION
gem.homepage = "http://github.com/hgschmie/galaxy"
gem.summary = %Q{Galaxy is a lightweight software deployment and management tool.}
gem.description = %Q{Galaxy}
gem.email = "[email protected]"
gem.authors = ["Henning Schmiedehausen"]
# dependencies defined in Gemfile
end
Jeweler::RubygemsDotOrgTasks.new
require 'rake/testtask'
Rake::TestTask.new(:test) do |test|
test.libs << 'test'
test.pattern = 'test/**/test_*.rb'
test.verbose = true
end
if RUBY_VERSION =~ /^1\.9/
desc "Code coverage detail"
task :simplecov do
ENV['COVERAGE'] = "true"
Rake::Task['test'].execute
end
else
require 'rcov/rcovtask'
Rcov::RcovTask.new do |test|
test.libs << 'test'
test.pattern = 'test/test*.rb'
test.verbose = true
test.rcov_opts << '--exclude "gems/*"'
end
end
task :default => :test
require 'fileutils'
require 'tmpdir'
require 'rake/clean'
PWD = File.expand_path(File.dirname(__FILE__))
RUBY = File.join(RbConfig::CONFIG['bindir'], RbConfig::CONFIG['ruby_install_name'])
namespace :run do
desc "Run a Galaxy Console locally"
task :gonsole do
# Note that -i localhost is needed. Otherwise the DRb server will bind to the
# hostname, which can be as ugly as "Pierre-Alexandre-Meyers-MacBook-Pro.local"
system(RUBY, "-I", File.join(PWD, "lib"),
File.join(PWD, "bin", "galaxy-console"), "--start",
"--announcement-url", "http://localhost:4442",
"-i", "localhost",
"--ping-interval", "10", "-f", "-l", "STDOUT", "-L", "DEBUG", "-v")
end
desc "Run a Galaxy Agent locally"
task :gagent do
system(RUBY, "-I", File.join(PWD, "lib"),
File.join(PWD, "bin", "galaxy-agent"), "--start",
"-i", "local_test", "-g", "local_group",
"-U", "druby://localhost:4441", "-c", "localhost",
"-r", "http://localhost/config/trunk/qa",
"-b", "http://localhost/binaries",
"-d", "/tmp/deploy", "-x", "/tmp/extract",
"--console", "http://localhost:4442",
"--announce-interval", "10", "-f", "-l", "STDOUT", "-L", "DEBUG", "-v")
end
end