Module: Jenkins2::API::Root
- Included in:
- Jenkins2::API
- Defined in:
- lib/jenkins2/api/root.rb
Defined Under Namespace
Classes: Proxy
Instance Method Summary collapse
- #cancel_quiet_down ⇒ Object
- #quiet_down ⇒ Object
- #restart ⇒ Object
- #restart! ⇒ Object
- #root(**params) ⇒ Object
- #version ⇒ Object
Instance Method Details
#cancel_quiet_down ⇒ Object
18 19 20 |
# File 'lib/jenkins2/api/root.rb', line 18 def cancel_quiet_down connection.post('cancelQuietDown').code == '302' end |
#quiet_down ⇒ Object
14 15 16 |
# File 'lib/jenkins2/api/root.rb', line 14 def quiet_down connection.post('quietDown').code == '302' end |
#restart ⇒ Object
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 |
#version ⇒ Object
10 11 12 |
# File 'lib/jenkins2/api/root.rb', line 10 def version connection.head('/')['X-Jenkins'] end |