Class: Docman::Builders::DrupalDrushBuilder
- Defined in:
- lib/docman/builders/drupal_drush_builder.rb
Instance Attribute Summary
Attributes inherited from Command
Instance Method Summary collapse
Methods inherited from Builder
#changed?, #config, create, #describe, #prefix, register_builder, #validate_command
Methods inherited from Command
#add_action, #add_actions, #config, create, #describe, #initialize, #perform, #prefix, register_command, #replace_placeholder, #run_actions, #run_with_hooks
Methods included from Logging
#log, logger, #logger, #prefix, #properties_info, #with_logging
Constructor Details
This class inherits a constructor from Docman::Command
Instance Method Details
#execute ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/docman/builders/drupal_drush_builder.rb', line 9 def execute return if @build_mode == :none #return unless @context.need_rebuild? puts 'Download drupal through drush' FileUtils.mkdir_p(@context['temp_path']) Dir.chdir @context['temp_path'] `drush dl drupal-#{@context.version} --yes` FileUtils.mkdir_p(@context['full_build_path']) FileUtils.cp_r(Dir["#{@context['temp_path']}/drupal-#{@context.version}/."], @context['full_build_path']) @context.version end |
#version ⇒ Object
21 22 23 |
# File 'lib/docman/builders/drupal_drush_builder.rb', line 21 def version @context.version end |