hudson 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/bin/hudson +29 -3
  2. data/lib/hudson.rb +2 -0
  3. data/lib/hudson/hudson.war +0 -0
  4. metadata +13 -6
data/bin/hudson CHANGED
@@ -5,17 +5,38 @@ require 'optparse'
5
5
 
6
6
 
7
7
  options = {
8
- :port => 3001
8
+ :port => 3001,
9
+ :control => 3002
9
10
  }
10
11
  args = ARGV.dup
11
12
 
12
13
  opts = OptionParser.new do |opts|
13
14
  opts.banner = "Usage: hudson [options] DIR"
14
15
 
15
- opts.on("-p", "--port [3001]", "Run Hudson on specified port ") do |port|
16
+ opts.on("-d", "--daemon", "fork into background and run as daemon") do
17
+ options[:daemon] = true
18
+ end
19
+
20
+ opts.on("-p", "--port [3001]", "run hudson on specified port ") do |port|
16
21
  options[:port] = port
17
22
  end
18
23
 
24
+ opts.on("-c", "--control-port [3002]", Integer, "set the shutdown/control port") do |port|
25
+ options[:control] = cport
26
+ end
27
+
28
+ opts.on_tail("-k", "--kill", "send shutdown signal to control port") do
29
+ require 'socket'
30
+ TCPSocket.open("localhost", options[:control]) do |sock|
31
+ sock.write("0")
32
+ end
33
+ exit
34
+ end
35
+
36
+ opts.on_tail("-v", "--version", "show version information") do
37
+ puts "#{Hudson::VERSION} (Hudson Server #{Hudson::HUDSON_VERSION})"
38
+ exit
39
+ end
19
40
  opts.on_tail("-h", "--help") do
20
41
  puts opts
21
42
  exit
@@ -31,5 +52,10 @@ end
31
52
  FileUtils.mkdir_p dir
32
53
  FileUtils.cp_r Hudson::PLUGINS, dir
33
54
  ENV['HUDSON_HOME'] = dir
34
- exec("java", "-jar", Hudson::WAR, "--httpPort=#{options[:port]}")
55
+ cmd = ["java", "-jar", Hudson::WAR]
56
+ cmd << "--httpPort=#{options[:port]}"
57
+ cmd << "--controlPort=#{options[:control]}"
58
+ cmd << "--daemon" if options[:daemon]
59
+ puts cmd.join(" ")
60
+ exec(*cmd)
35
61
 
@@ -1,4 +1,6 @@
1
1
  module Hudson
2
+ VERSION = "0.2.1"
3
+ HUDSON_VERSION = "1.352"
2
4
  WAR = File.expand_path(File.dirname(__FILE__) + "/hudson/hudson.war")
3
5
  PLUGINS = File.expand_path(File.dirname(__FILE__) + "/hudson/plugins")
4
6
  end
Binary file
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hudson
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 2
8
+ - 1
9
+ version: 0.2.1
5
10
  platform: ruby
6
11
  authors:
7
12
  - Charles Lowell
@@ -9,7 +14,7 @@ autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2010-03-13 00:00:00 -06:00
17
+ date: 2010-03-25 00:00:00 -05:00
13
18
  default_executable:
14
19
  dependencies: []
15
20
 
@@ -31,7 +36,7 @@ files:
31
36
  - lib/hudson/plugins/ruby.hpi
32
37
  - lib/hudson.rb
33
38
  has_rdoc: true
34
- homepage:
39
+ homepage: http://github.com/cowboyd/hudson.rb
35
40
  licenses: []
36
41
 
37
42
  post_install_message:
@@ -43,18 +48,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
43
48
  requirements:
44
49
  - - ">="
45
50
  - !ruby/object:Gem::Version
51
+ segments:
52
+ - 0
46
53
  version: "0"
47
- version:
48
54
  required_rubygems_version: !ruby/object:Gem::Requirement
49
55
  requirements:
50
56
  - - ">="
51
57
  - !ruby/object:Gem::Version
58
+ segments:
59
+ - 0
52
60
  version: "0"
53
- version:
54
61
  requirements: []
55
62
 
56
63
  rubyforge_project:
57
- rubygems_version: 1.3.5
64
+ rubygems_version: 1.3.6
58
65
  signing_key:
59
66
  specification_version: 3
60
67
  summary: Run a Hudson continuous integration server