Module: Promotion::Generator
- Defined in:
- lib/promotion/generator.rb,
lib/promotion/generator/rcconf.rb,
lib/promotion/generator/crontab.rb,
lib/promotion/generator/profile.rb,
lib/promotion/generator/sudoers.rb,
lib/promotion/generator/newsyslog.rb
Defined Under Namespace
Modules: Crontab, Newsyslog, Profile, Rcconf, Sudoers
Class Method Summary collapse
-
.gather_specs ⇒ Object
Gathers specs from all deployment descriptors in folders with the staging area.
- .start ⇒ Object
Class Method Details
.gather_specs ⇒ Object
Gathers specs from all deployment descriptors in folders with the staging area
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/promotion/generator.rb', line 22 def self.gather_specs() specs = [] begin search = Folders::Staging + "/*/" + Files::Spec $log.debug("Searching for application specs with Dir[#{search}]") specfiles = Dir[search] specfiles.each { |filename| specfile = File.new(filename, File::RDONLY) doc = ::REXML::Document.new(specfile) specs << doc.root specfile.close() } return(specs) rescue => e $log.error("Error while gathering application specs\n#{e.}" + e.backtrace.join("\n")) exit 1 end end |
.start ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/promotion/generator.rb', line 11 def self.start() $log.info("\n#{'_'*40}\nChecking common environment files") specs = self.gather_specs() Profile.check(specs) Rcconf.check(specs) Newsyslog.check(specs) Sudoers.check(specs) Crontab.check(specs) end |