Class: Ploy::LocalPackage::Config
- Inherits:
-
Object
- Object
- Ploy::LocalPackage::Config
- Defined in:
- lib/ploy/localpackage/config.rb
Class Method Summary collapse
Instance Method Summary collapse
- #builder ⇒ Object
-
#initialize(conf) ⇒ Config
constructor
A new instance of Config.
- #remote_package ⇒ Object
Constructor Details
#initialize(conf) ⇒ Config
Returns a new instance of Config.
6 7 8 |
# File 'lib/ploy/localpackage/config.rb', line 6 def initialize(conf) @conf = conf end |
Class Method Details
.load(conf_source = '.ploy-publisher.yml') ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/ploy/localpackage/config.rb', line 35 def self.load(conf_source = '.ploy-publisher.yml') conf = nil if (/^---/ =~ conf_source) then conf = YAML::load(conf_source) else conf = YAML::load_file(conf_source) end lps = [] if conf.key? "packages" conf['packages'].each do |pkg| lps.push(self.new(conf.merge(pkg))) end else lps.push(self.new(conf)) end return lps end |
Instance Method Details
#builder ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/ploy/localpackage/config.rb', line 10 def builder builder = Ploy::LocalPackage::DebBuilder.new( :name => @conf['deploy_name'], :sha => git_revision, :branch => git_branch, :timestamp => , :upstart_files => @conf['upstart_files'], :dist_dirs => @conf['dist_dirs'], :dist_dir => @conf['dist_dir'], :prefix => @conf['prefix'], :prep_cmd => @conf['prep_cmd'], :postinst => @conf['postinst'] ); return builder end |