Sha256: d3195117ccdccf25350c035127fcce2c420cba12d017a7a8d573f36a2176e3b2

Contents?: true

Size: 754 Bytes

Versions: 5

Compression:

Stored size: 754 Bytes

Contents

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

		puts "-----> Could not continue ... Launch Failed."
	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")
				puts "-----> Running Web Server ... "
				if system("foreman start -f Procfile")
					puts "-----> Launched Application ... Success."
				end
			end
		end		
	end
end

buildpacker = Buildpacker.new
buildpacker.pack

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
smartcloud-0.0.73 lib/smartcloud/grids/grid-runner/buildpacks/buildpacker.rb
smartcloud-0.0.72 lib/smartcloud/grids/grid-runner/buildpacks/buildpacker.rb
smartcloud-0.0.71 lib/smartcloud/grids/grid-runner/buildpacks/buildpacker.rb
smartcloud-0.0.70 lib/smartcloud/grids/grid-runner/buildpacks/buildpacker.rb
smartcloud-0.0.69 lib/smartcloud/grids/grid-runner/buildpacks/buildpacker.rb