Class: Lambom::Converger
- Inherits:
-
Object
- Object
- Lambom::Converger
- Includes:
- ShellMixin
- Defined in:
- lib/lambom/converger.rb
Constant Summary collapse
- DEFAULT_CHEF_PATH =
'/var/chef'
- CACHE_PATH =
"#{DEFAULT_CHEF_PATH}/cache"
- ENV_VARS_DELETE =
%w{ GEM_PATH RUBY_VERSION GEM_HOME MY_RUBY_HOME rvm_bin_path rvm_path rvm_gem_options rvm_prefix rvm_version }
- CHEF_CONF_FILE =
"#{Lambom::Config::CONFIG_DIR}/solo.rb"
- CHEF_CONF_DEV =
<<EOF cookbook_path ["/mnt/opscode/cookbooks", "/mnt/others/cookbooks", "/mnt/riyic/cookbooks"] file_cache_path "#{CACHE_PATH}" EOF
- CHEF_CONF_OTHER =
<<EOF cookbook_path ["#{DEFAULT_CHEF_PATH}/cookbooks", "#{DEFAULT_CHEF_PATH}/site-cookbooks"] file_cache_path "#{CACHE_PATH}" EOF
- CHEF_CONF =
{ :development => CHEF_CONF_DEV, :other => CHEF_CONF_OTHER, }
Constants included from ShellMixin
Instance Attribute Summary collapse
-
#attributes_json ⇒ Object
readonly
Returns the value of attribute attributes_json.
-
#conf ⇒ Object
readonly
Returns the value of attribute conf.
Instance Method Summary collapse
-
#initialize(conf) ⇒ Converger
constructor
A new instance of Converger.
- #run ⇒ Object
Methods included from ShellMixin
Constructor Details
Instance Attribute Details
#attributes_json ⇒ Object (readonly)
Returns the value of attribute attributes_json.
46 47 48 |
# File 'lib/lambom/converger.rb', line 46 def attributes_json @attributes_json end |
#conf ⇒ Object (readonly)
Returns the value of attribute conf.
46 47 48 |
# File 'lib/lambom/converger.rb', line 46 def conf @conf end |
Instance Method Details
#run ⇒ Object
48 49 50 51 52 53 54 55 56 |
# File 'lib/lambom/converger.rb', line 48 def run preparar_entorno descargar_atributos unless conf.json_file descargar_cookbooks unless conf.cached || conf.environment == 'development' ejecutar_converger end |