Class: Vigil::Project

Inherits:
Object
  • Object
show all
Defined in:
lib/vigil/project.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Project

Returns a new instance of Project.



8
9
10
11
12
13
14
15
# File 'lib/vigil/project.rb', line 8

def initialize(args)
  @name = args.fetch(:name)
  @working_dir = File.join(Vigil.run_dir, @name)
  @os = Vigil.os
  @git_url = args.fetch(:git_url)
  @branch = args.fetch(:branch)
  @revision_repository = RevisionRepository.new(self)
end

Instance Attribute Details

#branchObject (readonly)

Returns the value of attribute branch.



6
7
8
# File 'lib/vigil/project.rb', line 6

def branch
  @branch
end

#git_urlObject (readonly)

Returns the value of attribute git_url.



5
6
7
# File 'lib/vigil/project.rb', line 5

def git_url
  @git_url
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/vigil/project.rb', line 3

def name
  @name
end

#working_dirObject (readonly)

Returns the value of attribute working_dir.



4
5
6
# File 'lib/vigil/project.rb', line 4

def working_dir
  @working_dir
end

Instance Method Details

#run_pipelineObject



17
18
19
20
21
# File 'lib/vigil/project.rb', line 17

def run_pipeline
  @os.mkdir_p @working_dir
  revision = @revision_repository.new
  revision.run_pipeline
end