Class: Vigil::Project
- Inherits:
-
Object
- Object
- Vigil::Project
- Defined in:
- lib/vigil/project.rb
Instance Attribute Summary collapse
-
#branch ⇒ Object
readonly
Returns the value of attribute branch.
-
#git_url ⇒ Object
readonly
Returns the value of attribute git_url.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#working_dir ⇒ Object
readonly
Returns the value of attribute working_dir.
Instance Method Summary collapse
-
#initialize(args) ⇒ Project
constructor
A new instance of Project.
- #run_pipeline ⇒ Object
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
#branch ⇒ Object (readonly)
Returns the value of attribute branch.
6 7 8 |
# File 'lib/vigil/project.rb', line 6 def branch @branch end |
#git_url ⇒ Object (readonly)
Returns the value of attribute git_url.
5 6 7 |
# File 'lib/vigil/project.rb', line 5 def git_url @git_url end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/vigil/project.rb', line 3 def name @name end |
#working_dir ⇒ Object (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_pipeline ⇒ Object
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 |