Skip to content

Instantly share code, notes, and snippets.

@patcon
Created April 11, 2012 23:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save patcon/2363364 to your computer and use it in GitHub Desktop.
Save patcon/2363364 to your computer and use it in GitHub Desktop.
[Thu, 12 Apr 2012 10:13:03 -0700] INFO: Processing ruby_block[check_pear_version] action create (drush::upgrade_pear line 25)
[Thu, 12 Apr 2012 10:13:03 -0700] INFO: ruby_block[check_pear_version] called
[Thu, 12 Apr 2012 10:13:04 -0700] INFO: Processing log[original_pear_version: ] action write (drush::upgrade_pear line 35)
[Thu, 12 Apr 2012 10:13:04 -0700] INFO: original_pear_version:
[Thu, 12 Apr 2012 10:13:04 -0700] INFO: Processing log[declared_pear_version: 1.9.4] action write (drush::upgrade_pear line 34)
[Thu, 12 Apr 2012 10:13:04 -0700] INFO: declared_pear_version: 1.9.4
[Thu, 12 Apr 2012 10:13:04 -0700] INFO: Processing php_pear[PEAR] action install (drush::upgrade_pear line 37)
original_pear_version = nil
ruby_block "check_pear_version" do
block do
original_pear_version = %x[ pear -V 2>&1 ].match(/PEAR.*(\d+\.\d+\.\d+)/)[1]
original_pear_version = Gem::Version.create(original_pear_version)
end
end
declared_pear_version = Gem::Version.create("1.6.1")
log "original_pear_version: #{original_pear_version}"
log "declared_pear_version: #{declared_pear_version}"
php_pear "PEAR" do
version declared_pear_version.to_s
options "--force"
action :install
only_if { original_pear_version != declared_pear_version }
end
@patcon
Copy link
Author

patcon commented Apr 12, 2012

@yfeldblum any quick thoughts on this behaviour? original_pear_version doesn't seem to make it outside the resource

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment