Class: Scalingo::Endpoint::App
- Inherits:
-
Resource
- Object
- OpenStruct
- Resource
- Scalingo::Endpoint::App
show all
- Defined in:
- lib/scalingo/endpoint/apps.rb
Instance Attribute Summary
Attributes included from Base
#api, #prefix
Instance Method Summary
collapse
Methods inherited from Resource
#initialize
included
#resources
Methods included from Base
#initialize
Instance Method Details
#destroy(current_name) ⇒ Object
21
22
23
|
# File 'lib/scalingo/endpoint/apps.rb', line 21
def destroy(current_name)
delete(nil, {current_name: current_name})
end
|
#destroy! ⇒ Object
25
26
27
|
# File 'lib/scalingo/endpoint/apps.rb', line 25
def destroy!
destroy(prefix)
end
|
#logs ⇒ Object
44
45
46
|
# File 'lib/scalingo/endpoint/apps.rb', line 44
def logs
Scalingo::Logs.new(self)
end
|
#logs_url ⇒ Object
40
41
42
|
# File 'lib/scalingo/endpoint/apps.rb', line 40
def logs_url
get('logs')['logs_url']
end
|
#rename(new_name, current_name) ⇒ Object
29
30
31
|
# File 'lib/scalingo/endpoint/apps.rb', line 29
def rename(new_name, current_name)
post('rename', {new_name: new_name, current_name: current_name})
end
|
#rename!(new_name) ⇒ Object
32
33
34
|
# File 'lib/scalingo/endpoint/apps.rb', line 32
def rename!(new_name)
rename(new_name, prefix)
end
|
#restart(*scopes) ⇒ Object
17
18
19
|
# File 'lib/scalingo/endpoint/apps.rb', line 17
def restart(*scopes)
post('restart', {scope: scopes})
end
|
#run(command, env = {}) ⇒ Object
48
49
50
|
# File 'lib/scalingo/endpoint/apps.rb', line 48
def run(command, env = {})
post('run', {command: command, env: env})
end
|
#scale(containers) ⇒ Object
13
14
15
|
# File 'lib/scalingo/endpoint/apps.rb', line 13
def scale(containers)
post('scale', {containers: containers})
end
|
#transfer(email) ⇒ Object
36
37
38
|
# File 'lib/scalingo/endpoint/apps.rb', line 36
def transfer(email)
patch(nil, {app: {owner: {email: email}}})
end
|