Class: Bookbinder::Deploy::Deployment

Inherits:
Object
  • Object
show all
Defined in:
lib/bookbinder/deploy/deployment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(app_dir: nil, aws_credentials: nil, book_repo: nil, build_number: nil, cf_credentials: nil) ⇒ Deployment

Returns a new instance of Deployment.



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/bookbinder/deploy/deployment.rb', line 6

def initialize(app_dir: nil,
               aws_credentials: nil,
               book_repo: nil,
               build_number: nil,
               cf_credentials: nil)
  @app_dir = app_dir
  @aws_credentials = aws_credentials
  @book_repo = book_repo
  @build_number = build_number
  @cf_credentials = cf_credentials
end

Instance Attribute Details

#app_dirObject (readonly)

Returns the value of attribute app_dir.



4
5
6
# File 'lib/bookbinder/deploy/deployment.rb', line 4

def app_dir
  @app_dir
end

#build_numberObject (readonly)

Returns the value of attribute build_number.



4
5
6
# File 'lib/bookbinder/deploy/deployment.rb', line 4

def build_number
  @build_number
end

#cf_credentialsObject (readonly)

Returns the value of attribute cf_credentials.



4
5
6
# File 'lib/bookbinder/deploy/deployment.rb', line 4

def cf_credentials
  @cf_credentials
end

Instance Method Details

#artifact_filenameObject



18
19
20
# File 'lib/bookbinder/deploy/deployment.rb', line 18

def artifact_filename
  artifact.filename
end

#artifact_full_pathObject



22
23
24
# File 'lib/bookbinder/deploy/deployment.rb', line 22

def artifact_full_path
  artifact.full_path
end

#aws_access_keyObject



26
27
28
# File 'lib/bookbinder/deploy/deployment.rb', line 26

def aws_access_key
  aws_credentials.access_key
end

#aws_secret_keyObject



30
31
32
# File 'lib/bookbinder/deploy/deployment.rb', line 30

def aws_secret_key
  aws_credentials.secret_key
end

#flat_routesObject



34
35
36
# File 'lib/bookbinder/deploy/deployment.rb', line 34

def flat_routes
  cf_credentials.flat_routes
end

#green_builds_bucketObject



38
39
40
# File 'lib/bookbinder/deploy/deployment.rb', line 38

def green_builds_bucket
  aws_credentials.green_builds_bucket
end

#namespaceObject



42
43
44
# File 'lib/bookbinder/deploy/deployment.rb', line 42

def namespace
  Ingest::DestinationDirectory.new(book_repo)
end