Permalink
Browse files

Optional sudo usage

  • Loading branch information...
1 parent c66f278 commit 875111bd49495bc6767b3a90126624a9f020e61c @alno alno committed May 21, 2009
Showing with 22 additions and 17 deletions.
  1. +1 −1 aasm.rb
  2. +1 −1 acts-as-taggeable-on.rb
  3. +7 −2 app_lego.rb
  4. +2 −2 authlogic.rb
  5. +1 −1 browsercms.rb
  6. +1 −1 clearance.rb
  7. +1 −1 couchdb.rb
  8. +1 −1 cucumber.rb
  9. +1 −1 factory_girl.rb
  10. +1 −1 haml.rb
  11. +1 −1 mocha.rb
  12. +1 −1 rspec.rb
  13. +1 −1 shoulda.rb
  14. +1 −1 sqlite3.rb
  15. +1 −1 webrat.rb
View
@@ -2,7 +2,7 @@
# see http://github.com/rubyist/aasm
gem "rubyist-aasm", :lib => "aasm"
-rake "gems:install", :sudo=>true
+rake "gems:install", :sudo => use_sudo?
git :add => "."
git :commit => "-a -m 'Added aasm state machine'"
View
@@ -2,7 +2,7 @@
# see http://github.com/mbleigh/acts-as-taggable-on
gem "mbleigh-acts-as-taggable-on", :lib => "acts-as-taggable-on"
-rake "gems:install", :sudo=>true
+rake "gems:install", :sudo => use_sudo?
generate "acts_as_taggable_on_migration"
rake "db:migrate"
View
@@ -1,6 +1,11 @@
# environment options
@lego_options = ENV['LEGOS'] ? ENV['LEGOS'].downcase.split(/[,\s]+/) : false
@used_legos = []
+@use_sudo = true
+
+def use_sudo?
+ @use_sudo
+end
# Check for module dependencies
def deps_satisfied?(deps)
@@ -38,7 +43,7 @@ def haml?
if use_lego?("braid", "Use braid for vendor management?")
gem "braid"
- rake "gems:install", :sudo => true
+ rake "gems:install", :sudo => use_sudo?
def braid(repo, dir, type=nil)
run "braid add #{"-t #{type} " if type}#{repo} #{dir}"
@@ -135,6 +140,6 @@ def plugin(name, options)
end
end
- rake "gems:install", :sudo => true
+ rake "gems:install", :sudo => use_sudo?
rake "db:migrate"
end
View
@@ -1,9 +1,9 @@
# This installs Authlogic stuff at the moment but could support others too
gem 'authlogic'
-rake "gems:install", :sudo => true
+rake "gems:install", :sudo => use_sudo?
-rake "gems:install", :sudo=>true
+rake "gems:install", :sudo => use_sudo?
generate 'session', 'user_session'
View
@@ -1,7 +1,7 @@
gem "browsermedia-browsercms", :lib => 'browser_cms', :source => 'http://gems.github.com'
rake "db:create"
-rake "gems:install", :sudo => true
+rake "gems:install", :sudo => use_sudo?
route "map.routes_for_browser_cms"
View
@@ -1,6 +1,6 @@
gem 'thoughtbot-clearance', :lib => "clearance", :source => "http://gems.github.com"
-rake "gems:install", :sudo => true
+rake "gems:install", :sudo => use_sudo?
git :add => '.'
git :commit => "-a -m 'We have clearance, Clarence.'"
View
@@ -2,7 +2,7 @@
:git => 'git://github.com/topfunky/basic_model.git'
gem 'jchris-couchrest', :lib => 'couchrest', :source => 'http://gems.github.com'
-rake "gems:install"
+rake "gems:install", :sudo => use_sudo?
git :add => "."
git :commit => "-a -m 'Added CouchDB support (through CouchRest and BasicModel)'"
View
@@ -3,7 +3,7 @@
gem 'cucumber', :env => :test
gem 'webrat', :env => :test
-rake "gems:install", :sudo => true, :env => :test
+rake "gems:install", :sudo => use_sudo?, :env => :test
generate 'cucumber'
View
@@ -1,5 +1,5 @@
gem "thoughtbot-factory_girl", :lib => "factory_girl", :source => "http://gems.github.com"
-rake "gems:install", :sudo => true
+rake "gems:install", :sudo => use_sudo?
git :add => '.'
git :commit => "-a -m 'Waiting for a girl whos got curlers in her hair; Waiting for a girl, she has no money anywhere; We get buses everywhere; Waiting for a factory girl...'"
View
@@ -15,7 +15,7 @@
end
end
-rake "gems:install", :sudo => true
+rake "gems:install", :sudo => use_sudo?
run "haml --rails ."
View
@@ -2,7 +2,7 @@
# see http://github.com/floehopper/mocha
gem "mocha", :env => :test
-rake "gems:install", :sudo => true, :env => :test
+rake "gems:install", :sudo => use_sudo?, :env => :test
git :add => '.'
git :commit => "-a -m 'Added Mocha mocking and stubbing library.'"
View
@@ -1,6 +1,6 @@
gem 'rspec', :lib => false, :env => :test
gem 'rspec-rails', :lib => false, :env => :test
-rake 'gems:install', :sudo=>true, :env => :test
+rake 'gems:install', :sudo => use_sudo?, :env => :test
generate "rspec"
View
@@ -1,6 +1,6 @@
gem 'thoughtbot-shoulda', :lib => "shoulda", :source => "http://gems.github.com"
-rake "gems:install", :sudo => true
+rake "gems:install", :sudo => use_sudo?
git :add => '.'
git :commit => "-a -m 'Added Shoulda, you shoulda know for features.'"
View
@@ -1,7 +1,7 @@
# Install sqlite3-ruby gem with correct lib (breaks otherwise on some systems)
gem "sqlite3-ruby", :lib => "sqlite3"
-rake "gems:install", :sudo=>true
+rake "gems:install", :sudo => use_sudo?
git :add => "."
git :commit => "-a -m 'Added sqlite3-ruby'"
View
@@ -1,5 +1,5 @@
gem 'webrat', :env => :test
-rake "gems:install", :sudo => true, :env => :test
+rake "gems:install", :sudo => use_sudo?, :env => :test
git :add => '.'
git :commit => "-a -m 'Added Webrat web browser simulator for integration testing.'"

0 comments on commit 875111b

Please sign in to comment.