瀏覽代碼

errors in the setup files for the 'stripped' version of django and rails

Patrick Falls 12 年之前
父節點
當前提交
b3274d3398
共有 3 個文件被更改,包括 21 次插入21 次删除
  1. 2 2
      django-stripped/setup.py
  2. 10 10
      rails-stripped/setup_jruby.py
  3. 9 9
      rails-stripped/setup_ruby.py

+ 2 - 2
django-stripped/setup.py

@@ -5,9 +5,9 @@ import setup_util
 import os
 
 def start(args):
-  setup_util.replace_text("django-optimized/hello/hello/settings.py", "HOST': '.*'", "HOST': '" + args.database_host + "'")
+  setup_util.replace_text("django-stripped/hello/hello/settings.py", "HOST': '.*'", "HOST': '" + args.database_host + "'")
 
-  subprocess.Popen("gunicorn hello.wsgi:application -k gevent -b 0.0.0.0:8080 -w " + str((args.max_threads * 2)) + " --log-level=critical", shell=True, cwd="django-optimized/hello")
+  subprocess.Popen("gunicorn hello.wsgi:application -k gevent -b 0.0.0.0:8080 -w " + str((args.max_threads * 2)) + " --log-level=critical", shell=True, cwd="django-stripped/hello")
   return 0
 def stop():
   p = subprocess.Popen(['ps', 'aux'], stdout=subprocess.PIPE)

+ 10 - 10
rails-stripped/setup_jruby.py

@@ -4,17 +4,17 @@ import sys
 import setup_util
 
 def start(args):
-  setup_util.replace_text("rails-optimized/config/database-jruby.yml", "host: .*", "host: " + args.database_host)
-  setup_util.replace_text("rails-optimized/resin-web.xml", "mysql:\/\/.*:3306", "mysql://" + args.database_host + ":3306")
+  setup_util.replace_text("rails-stripped/config/database-jruby.yml", "host: .*", "host: " + args.database_host)
+  setup_util.replace_text("rails-stripped/resin-web.xml", "mysql:\/\/.*:3306", "mysql://" + args.database_host + ":3306")
 
   try:
-    subprocess.check_call("rvm jruby-1.7.3 do bundle install --gemfile=Gemfile-jruby", shell=True, cwd="rails-optimized")
-    subprocess.check_call("cp Gemfile-jruby Gemfile", shell=True, cwd="rails-optimized")
-    subprocess.check_call("cp Gemfile-jruby.lock Gemfile.lock", shell=True, cwd="rails-optimized")
-    subprocess.check_call("cp config/database-jruby.yml config/database.yml", shell=True, cwd="rails-optimized")
-    subprocess.check_call("rvm jruby-1.7.3 do warble war", shell=True, cwd="rails-optimized")
+    subprocess.check_call("rvm jruby-1.7.3 do bundle install --gemfile=Gemfile-jruby", shell=True, cwd="rails-stripped")
+    subprocess.check_call("cp Gemfile-jruby Gemfile", shell=True, cwd="rails-stripped")
+    subprocess.check_call("cp Gemfile-jruby.lock Gemfile.lock", shell=True, cwd="rails-stripped")
+    subprocess.check_call("cp config/database-jruby.yml config/database.yml", shell=True, cwd="rails-stripped")
+    subprocess.check_call("rvm jruby-1.7.3 do warble war", shell=True, cwd="rails-stripped")
     subprocess.check_call("rm -rf $RESIN_HOME/webapps/*", shell=True)
-    subprocess.check_call("cp rails-optimized.war $RESIN_HOME/webapps/rails.war", shell=True, cwd="rails-optimized")
+    subprocess.check_call("cp rails-optimized.war $RESIN_HOME/webapps/rails.war", shell=True, cwd="rails-stripped")
     subprocess.check_call("$RESIN_HOME/bin/resinctl start", shell=True)
     return 0
   except subprocess.CalledProcessError:
@@ -22,8 +22,8 @@ def start(args):
 def stop():
   try:
     subprocess.check_call("$RESIN_HOME/bin/resinctl shutdown", shell=True)
-    subprocess.check_call("rm Gemfile", shell=True, cwd="rails-optimized")
-    subprocess.check_call("rm Gemfile.lock", shell=True, cwd="rails-optimized")
+    subprocess.check_call("rm Gemfile", shell=True, cwd="rails-stripped")
+    subprocess.check_call("rm Gemfile.lock", shell=True, cwd="rails-stripped")
     return 0
   except subprocess.CalledProcessError:
     return 1

+ 9 - 9
rails-stripped/setup_ruby.py

@@ -4,22 +4,22 @@ import sys
 import setup_util
 
 def start(args):
-  setup_util.replace_text("rails-optimized/config/database-ruby.yml", "host: .*", "host: " + args.database_host)
+  setup_util.replace_text("rails-stripped/config/database-ruby.yml", "host: .*", "host: " + args.database_host)
   
   try:
-    subprocess.check_call("rvm ruby-2.0.0-p0 do bundle install --gemfile=Gemfile-ruby", shell=True, cwd="rails-optimized")
-    subprocess.check_call("cp Gemfile-ruby Gemfile", shell=True, cwd="rails-optimized")
-    subprocess.check_call("cp Gemfile-ruby.lock Gemfile.lock", shell=True, cwd="rails-optimized")
-    subprocess.check_call("cp config/database-ruby.yml config/database.yml", shell=True, cwd="rails-optimized")
-    subprocess.check_call("rvm ruby-2.0.0-p0 do bundle exec passenger start -p 8080 -d -e production --pid-file=$HOME/FrameworkBenchmarks/rails/rails.pid --nginx-version=1.2.7 --max-pool-size=24", shell=True, cwd="rails-optimized")
+    subprocess.check_call("rvm ruby-2.0.0-p0 do bundle install --gemfile=Gemfile-ruby", shell=True, cwd="rails-stripped")
+    subprocess.check_call("cp Gemfile-ruby Gemfile", shell=True, cwd="rails-stripped")
+    subprocess.check_call("cp Gemfile-ruby.lock Gemfile.lock", shell=True, cwd="rails-stripped")
+    subprocess.check_call("cp config/database-ruby.yml config/database.yml", shell=True, cwd="rails-stripped")
+    subprocess.check_call("rvm ruby-2.0.0-p0 do bundle exec passenger start -p 8080 -d -e production --pid-file=$HOME/FrameworkBenchmarks/rails/rails.pid --nginx-version=1.2.7 --max-pool-size=24", shell=True, cwd="rails-stripped")
     return 0
   except subprocess.CalledProcessError:
     return 1
 def stop():
   try:
-    subprocess.check_call("rvm ruby-2.0.0-p0 do bundle exec passenger stop --pid-file=$HOME/FrameworkBenchmarks/rails/rails.pid", shell=True, cwd='rails-optimized')
-    subprocess.check_call("rm Gemfile", shell=True, cwd="rails-optimized")
-    subprocess.check_call("rm Gemfile.lock", shell=True, cwd="rails-optimized")
+    subprocess.check_call("rvm ruby-2.0.0-p0 do bundle exec passenger stop --pid-file=$HOME/FrameworkBenchmarks/rails/rails.pid", shell=True, cwd='rails-stripped')
+    subprocess.check_call("rm Gemfile", shell=True, cwd="rails-stripped")
+    subprocess.check_call("rm Gemfile.lock", shell=True, cwd="rails-stripped")
     return 0
   except subprocess.CalledProcessError:
     return 1