Permalink
Browse files

Better check for thin in application Gemfile.

  • Loading branch information...
1 parent 0d10c29 commit 7e9eb08092554858681b9248534404719fd25962 @pwnall committed Feb 4, 2012
Showing with 5 additions and 3 deletions.
  1. +2 −0 CHANGELOG
  2. +3 −3 lib/rails_pwnerer/app/gems.rb
View
@@ -1,3 +1,5 @@
+v0.6.106. Better check for thin in application Gemfile.
+
v0.6.105. Better check for Rails directory structure.
v0.6.104. Fixed previously introduced bug.
@@ -26,12 +26,12 @@ def update(app_name, instance_name)
# Phase 2: bundler / rails install
# Install the gems needed by the app.
if File.exist? 'Gemfile'
- unless /^gem ['"]thin['"]/ =~ File.read('Gemfile')
+ unless /^\s+gem\s+['"]thin['"]/ =~ File.read('Gemfile')
File.open('Gemfile', 'a') { |f| f.write "\ngem 'thin'\n"}
end
- system "bundle install"
+ Kernel.system "bundle install"
else
- system "rake gems:install RAILS_ENV=production"
+ Kernel.system "rake gems:install RAILS_ENV=production"
end
end
end

0 comments on commit 7e9eb08

Please sign in to comment.