Permalink
Browse files
Skip development / test gems in bundle install.
- Loading branch information...
Showing
with
7 additions
and
5 deletions.
-
+2
−0
CHANGELOG
-
+5
−5
lib/rails_pwnerer/app/gems.rb
|
|
@@ -1,3 +1,5 @@ |
|
|
+v0.7.12. Skip development / test gems in bundle install.
|
|
|
+
|
|
|
v0.7.11. Replace gems that don't build in MRI 2.0.
|
|
|
|
|
|
v0.7.10. Properly remove bootstrap Ruby version.
|
|
|
|
@@ -2,10 +2,10 @@ |
|
|
|
|
|
class RailsPwnerer::App::Gems
|
|
|
include RailsPwnerer::Base
|
|
|
-
|
|
|
+
|
|
|
def update(app_name, instance_name)
|
|
|
app_config = RailsPwnerer::Config[app_name, instance_name]
|
|
|
-
|
|
|
+
|
|
|
Dir.chdir app_config[:app_path] do
|
|
|
# Phase 1: app-directed install
|
|
|
if !File.exist?('Gemfile') && app_config[:gems]
|
|
@@ -22,18 +22,18 @@ def update(app_name, instance_name) |
|
|
end
|
|
|
end
|
|
|
end
|
|
|
-
|
|
|
+
|
|
|
# Phase 2: bundler / rails install
|
|
|
# Install the gems needed by the app.
|
|
|
if File.exist? 'Gemfile'
|
|
|
unless /^\s+gem\s+['"]thin['"]/ =~ File.read('Gemfile')
|
|
|
File.open('Gemfile', 'a') { |f| f.write "\ngem 'thin'\n"}
|
|
|
end
|
|
|
- Kernel.system "bundle install"
|
|
|
+ Kernel.system "bundle install --without development test"
|
|
|
else
|
|
|
Kernel.system "rake gems:install RAILS_ENV=production"
|
|
|
end
|
|
|
- end
|
|
|
+ end
|
|
|
end
|
|
|
|
|
|
def manage(app_name, instance_name, action)
|
|
|
0 comments on commit
2dee860