Forked from chrisberkhout/dynamic removal of a dep, based on a condition.rb
Created
February 16, 2010 14:20
-
-
Save benhoskings/305550 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# dynamic removal of a dep requirement, | |
# based on a condition evaluated after previous requires have been processed | |
dep 'site' do | |
requires [ | |
'system', | |
'account', | |
'site dir', | |
'site options' | |
] | |
end | |
dep 'site options' do | |
setup { | |
definer.requires 'rvm user' if confirm "System ruby is #{shell 'ruby -v'}; do you want to install your own in an RVM?" | |
} | |
end | |
dep 'rvm user' do | |
# ... | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment