Sha256: 6c699bf6a30dc72e414ece9b0cb9c21f71948849de4120da987f628760c74698

Contents?: true

Size: 608 Bytes

Versions: 3

Compression:

Stored size: 608 Bytes

Contents

class Buildpacker
	def initialize		
	end
	
	def pack
		puts "---------------------------------------------------------------"
		
		pack_rails if File.exist? "bin/rails"

		puts "failed."
		exit 1
	end

	def pack_rails
		# Remove server.pid if it exists
		FileUtils.rm("tmp/pids/server.pid") if File.exist? "tmp/pids/server.pid"

		puts "-----> Performing bundle install ... "
		if system("bundle install")
			puts "-----> Compiling Assets ... "
			if system("bundle exec rails assets:precompile")
				system("foreman start -f Procfile")
			end
		end		
	end
end

buildpacker = Buildpacker.new
buildpacker.pack

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
smartcloud-0.0.66 lib/smartcloud/grids/grid-runner/buildpacks/buildpacker.rb
smartcloud-0.0.65 lib/smartcloud/grids/grid-runner/buildpacks/buildpacker.rb
smartcloud-0.0.64 lib/smartcloud/grids/grid-runner/buildpacks/buildpacker.rb