Module: Hudson

Defined in:
lib/api/job.rb,
lib/hudson-api.rb,
lib/api/job_config.rb,
lib/api/job_instance.rb

Defined Under Namespace

Classes: HudsonBase, Job, JobConfig, JobInstance

Constant Summary collapse

@@settings =

set default settings

{:url => 'http://localhost:8080/hudson', :user => nil, :password => nil, :api_suffix=>"/api/json" }

Class Method Summary collapse

Class Method Details

.[](param) ⇒ Object



9
10
11
# File 'lib/hudson-api.rb', line 9

def self.[](param)
  return @@settings[param]
end

.[]=(param, value) ⇒ Object



13
14
15
16
17
18
19
20
21
# File 'lib/hudson-api.rb', line 13

def self.[]=(param,value)
  param = param.to_sym if param.kind_of?(String)
  if param == :host or param == :url
    value = "http://#{value}" if value !~ /https?:\/\//
    @@settings[:url] = value
  else
    @@settings[param]=value
  end
end