class Assembla::Client::Spaces::Ssh::Actions
Constants
- VALID_PARAMS_NAMES
- VALID_REQUEST_PARAM_VALUES
Public Instance Methods
create(*args)
click to toggle source
@example api.spaces.ssh.actions.create ‘project1’, ssh_action: { name: ‘Stage’ }
# File lib/assembla_api/client/spaces/ssh/actions.rb, line 24 def create(*args) arguments(args, required: [:space]) do permit VALID_PARAMS_NAMES, recursive: true assert_required %w[ name command username ] assert_values VALID_REQUEST_PARAM_VALUES end post_request("/spaces/#{arguments.space}/ssh/actions", arguments.params) end
delete(*args)
click to toggle source
Delete ssh action by ID @example api.spaces.ssh.actions.delete ‘project1’, 7
# File lib/assembla_api/client/spaces/ssh/actions.rb, line 62 def delete(*args) arguments(args, required: [:space, :id]) delete_request("/spaces/#{arguments.space}/ssh/actions/#{arguments.id}", arguments.params) end
edit(*args)
click to toggle source
@example api.spaces.ssh.actions.edit ‘project1’, 7, ssh_action: { description: ‘Do not deploy!’ }
# File lib/assembla_api/client/spaces/ssh/actions.rb, line 50 def edit(*args) arguments(args, required: [:space, :id]) do permit VALID_PARAMS_NAMES , recursive: true assert_values VALID_REQUEST_PARAM_VALUES end put_request("/spaces/#{arguments.space}/ssh/actions/#{arguments.id}", arguments.params) end
get(*args)
click to toggle source
@example api.spaces.ssh.actions.get ‘project1’, 7
# File lib/assembla_api/client/spaces/ssh/actions.rb, line 36 def get(*args) arguments(args, required: [:space, :id]) get_request("/spaces/#{arguments.space}/ssh/actions/#{arguments.id}", arguments.params) end
list(*args) { |el| ... }
click to toggle source
@example api.spaces.ssh.actions.list ‘project1’
# File lib/assembla_api/client/spaces/ssh/actions.rb, line 69 def list(*args) arguments(args, required: [:space]) response = get_request("/spaces/#{arguments.space}/ssh/actions", arguments.params) return response unless block_given? response.each { |el| yield el } end
run(*args)
click to toggle source
@example api.spaces.ssh.actions.run ‘project1’, 7
# File lib/assembla_api/client/spaces/ssh/actions.rb, line 43 def run(*args) arguments(args, required: [:space, :id]) get_request("/spaces/#{arguments.space}/ssh/actions/#{arguments.id}/run", arguments.params) end