Class: Coatepec::Project
- Inherits:
-
Object
- Object
- Coatepec::Project
- Defined in:
- lib/coatepec/project.rb
Overview
A Rails application checkout rooted at an absolute path (must contain a Gemfile); knows where its own and pack/engine/gem spec directories live.
Instance Attribute Summary collapse
-
#root ⇒ Object
readonly
Returns the value of attribute root.
Instance Method Summary collapse
- #config ⇒ Object
-
#initialize(root) ⇒ Project
constructor
A new instance of Project.
- #spec_root_candidates ⇒ Object
Constructor Details
Instance Attribute Details
#root ⇒ Object (readonly)
Returns the value of attribute root.
7 8 9 |
# File 'lib/coatepec/project.rb', line 7 def root @root end |
Instance Method Details
#config ⇒ Object
26 27 28 |
# File 'lib/coatepec/project.rb', line 26 def config @config ||= ProjectConfig.new(root) end |
#spec_root_candidates ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/coatepec/project.rb', line 17 def spec_root_candidates [ File.join(root, "spec"), *Dir.glob(File.join(root, "packs/*/spec")), *Dir.glob(File.join(root, "engines/*/spec")), *Dir.glob(File.join(root, "gems/*/spec")) ].select { |path| File.directory?(path) } end |