xforty / drush-deploy

Drupal deploy tool based on Capistrano and Drush
https://github.com/xforty/drush-deploy/wiki
Other
35 stars 4 forks source link

Refactor php execution #7

Open medlefsen opened 12 years ago

medlefsen commented 12 years ago

Provide general php executor function that handled the boilerplate conversion between Ruby and PHP. Add a new verb to the DSL.

i = php <<-END, :var1 => 1, :var2 => [3,2,1,4]
  foreach($var2 as $i => $v) {
    if ( $var1 == $v ) {
      return $i;
    }
  }
 END

# i is now 2

Also provide a php_locally for a local executing version. Currently php is executed via drush exec, which will probably stay the same. Replace all current instances in the code where we execute php with calls to the php functions.