hudson 0.3.0.beta.8 → 0.3.0.beta.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hudson (0.3.0.beta.8)
4
+ hudson (0.3.0.beta.9)
5
5
  builder (~> 2.1.2)
6
6
  hpricot
7
7
  httparty (~> 0.6.1)
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{hudson}
5
- s.version = "0.3.0.beta.8"
5
+ s.version = "0.3.0.beta.9"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Charles Lowell", "Dr Nic Williams"]
@@ -1,5 +1,5 @@
1
1
  module Hudson
2
- VERSION = "0.3.0.beta.8"
2
+ VERSION = "0.3.0.beta.9"
3
3
  HUDSON_VERSION = "1.380"
4
4
  WAR = File.expand_path(File.dirname(__FILE__) + "/hudson/hudson.war")
5
5
  PLUGINS = File.expand_path(File.dirname(__FILE__) + "/hudson/plugins")
@@ -11,7 +11,7 @@ module Hudson
11
11
 
12
12
  headers 'content-type' => 'application/json'
13
13
  format :json
14
- http_proxy 'localhost', '8888'
14
+ # http_proxy 'localhost', '8888'
15
15
 
16
16
  JobAlreadyExistsError = Class.new(Exception)
17
17
 
@@ -41,9 +41,7 @@ module Hudson
41
41
  res = post "/createItem/api/xml?name=#{CGI.escape(name)}", {
42
42
  :body => job_config.to_xml, :format => :xml, :headers => { 'content-type' => 'application/xml' }
43
43
  }
44
- p res.code
45
- puts res.body
46
- if res.code == 200
44
+ if res.code.to_i == 200
47
45
  cache_base_uri
48
46
  true
49
47
  else
@@ -49,13 +49,17 @@ module Hudson
49
49
  desc "create project_path [options]", "create a build for your project"
50
50
  common_options
51
51
  method_option :override, :desc => "override if job exists", :type => :boolean, :default => false
52
+ method_option :assigned_node, :desc => "only use slave nodes with this label"
52
53
  def create(project_path)
53
54
  select_hudson_server(options)
54
55
  FileUtils.chdir(project_path) do
55
56
  unless scm = Hudson::ProjectScm.discover
56
57
  error "Cannot determine project SCM. Currently supported: #{Hudson::ProjectScm.supported}"
57
58
  end
58
- job_config = Hudson::JobConfigBuilder.new(:rubygem) { |c| c.scm = scm.url }
59
+ job_config = Hudson::JobConfigBuilder.new(:rubygem) do |c|
60
+ c.scm = scm.url
61
+ c.assigned_node = options[:assigned_node] if options[:assigned_node]
62
+ end
59
63
  name = File.basename(FileUtils.pwd)
60
64
  begin
61
65
  if Hudson::Api.create_job(name, job_config, options)
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hudson
3
3
  version: !ruby/object:Gem::Version
4
- hash: 62196355
4
+ hash: 62196353
5
5
  prerelease: true
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
9
  - 0
10
10
  - beta
11
- - 8
12
- version: 0.3.0.beta.8
11
+ - 9
12
+ version: 0.3.0.beta.9
13
13
  platform: ruby
14
14
  authors:
15
15
  - Charles Lowell