Module: Jenkins2::API::Root

Included in:
Jenkins2::API
Defined in:
lib/jenkins2/api/root.rb

Defined Under Namespace

Classes: Proxy

Instance Method Summary collapse

Instance Method Details

#cancel_quiet_downObject



18
19
20
# File 'lib/jenkins2/api/root.rb', line 18

def cancel_quiet_down
	connection.post('cancelQuietDown').code == '302'
end

#quiet_downObject



14
15
16
# File 'lib/jenkins2/api/root.rb', line 14

def quiet_down
	connection.post('quietDown').code == '302'
end

#restartObject



22
23
24
# File 'lib/jenkins2/api/root.rb', line 22

def restart
	connection.post('safeRestart').code == '302'
end

#restart!Object



26
27
28
# File 'lib/jenkins2/api/root.rb', line 26

def restart!
	connection.post('restart').code == '302'
end

#root(**params) ⇒ Object



6
7
8
# File 'lib/jenkins2/api/root.rb', line 6

def root(**params)
	Proxy.new connection, '', params
end

#versionObject



10
11
12
# File 'lib/jenkins2/api/root.rb', line 10

def version
	connection.head('/')['X-Jenkins']
end