Class: Deployments::Build

Inherits:
Object
  • Object
show all
Defined in:
lib/deployments/build.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(env, project) ⇒ Build

Returns a new instance of Build.



7
8
9
10
# File 'lib/deployments/build.rb', line 7

def initialize(env, project)
  @env = env
  @project = project
end

Instance Attribute Details

#envObject (readonly)

Returns the value of attribute env.



5
6
7
# File 'lib/deployments/build.rb', line 5

def env
  @env
end

#projectObject (readonly)

Returns the value of attribute project.



5
6
7
# File 'lib/deployments/build.rb', line 5

def project
  @project
end

Instance Method Details

#to_paramsObject



12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/deployments/build.rb', line 12

def to_params
  {
    :deployment => {
      :author => username,
      :env => env,
      :version  => tag,
      :commit_attributes => commits,
      :host_name => domain
    },
    :api_key => api_key
  }
end