Class: Mushikago::Mitsubachi::ScriptDeployRequest

Inherits:
MultipartRequest show all
Defined in:
lib/mushikago/mitsubachi/script_deploy_request.rb

Constant Summary

Constants inherited from Http::MultipartRequest

CR, EOL, LF

Instance Attribute Summary

Attributes inherited from Http::Request

headers, host, http_method, params, path, port

Instance Method Summary (collapse)

Methods included from Auth::Signature

#add_signature!, #string_to_sign

Methods inherited from Http::MultipartRequest

#multipart_body, #to_http_request

Methods inherited from Http::Request

#[], #[]=, add_param, #to_http_request, #url_encoded_params

Constructor Details

- (ScriptDeployRequest) initialize(project_name, file_or_file_name, options = {})

A new instance of ScriptDeployRequest



10
11
12
13
14
15
16
17
18
19
# File 'lib/mushikago/mitsubachi/script_deploy_request.rb', line 10

def initialize project_name, file_or_file_name, options={}
  super(options)
  self.project_name = project_name
  if(file_or_file_name.kind_of?(File))
    self.file = file_or_file_name
  else
    self.file = File.new(file_or_file_name.to_s)
  end
  self.script_name = options[:script_name] || file.path
end

Instance Method Details

- (Object) method_name



5
# File 'lib/mushikago/mitsubachi/script_deploy_request.rb', line 5

def method_name; 'script/deploy' end

- (Object) new_http_request



21
22
23
# File 'lib/mushikago/mitsubachi/script_deploy_request.rb', line 21

def new_http_request
  new_http_post_request(path)
end