Permalink
Browse files

Buildpacks should not create a staging.log

Change-Id: Idda5a5585d9c66b59e76f761d01267df86388cb5
  • Loading branch information...
1 parent 5f757b2 commit fd5824353ebd14006ad7ee9fa0be04375cd9320c Jennifer Hickey committed Feb 8, 2013
View
@@ -1,5 +1,4 @@
.rvmrc
.idea
-logs
/*.gem
pkg
@@ -1,6 +1,6 @@
require "open3"
-class BuildpackInstaller < Struct.new(:path, :app_dir, :logger)
+class BuildpackInstaller < Struct.new(:path, :app_dir)
def detect
@detect_output, status = Open3.capture2 command('detect')
@@ -12,7 +12,7 @@ def name
end
def compile
- logger.info "Installing #{path.basename}."
+ puts "Installing #{path.basename}."
ok = system "#{command('compile')} /tmp/bundler_cache"
raise "Buildpack compilation step failed:\n" unless ok
end
@@ -23,7 +23,7 @@ def clone_buildpack(buildpack_url)
buildpack_path = "#{app_dir}/.buildpacks/#{File.basename(buildpack_url)}"
ok = system("git clone #{buildpack_url} #{buildpack_path}")
raise "Failed to git clone buildpack" unless ok
- BuildpackInstaller.new(Pathname.new(buildpack_path), app_dir, logger)
+ BuildpackInstaller.new(Pathname.new(buildpack_path), app_dir)
end
def build_pack
@@ -44,7 +44,7 @@ def buildpacks_path
def installers
buildpacks_path.children.map do |buildpack|
- BuildpackInstaller.new(buildpack, app_dir, logger)
+ BuildpackInstaller.new(buildpack, app_dir)
end
end
@@ -82,7 +82,7 @@
end
context "when the cloning fails" do
- it "gives up and logs an error" do
+ it "gives up and raises an error" do
stub(plugin).system(anything) { false }
expect { subject }.to raise_error("Failed to git clone buildpack")

0 comments on commit fd58243

Please sign in to comment.