Sha256: d2dd961dd1fd313640b16fa5ce3912ea2d270ac604c87c5f559b1d0dd2538f5a
Contents?: true
Size: 1.15 KB
Versions: 1
Compression:
Stored size: 1.15 KB
Contents
# encoding: utf-8 namespace :integration do APP = ENV['APP'] unless defined?(APP) namespace :heroku do task :add_remote do remote = `git remote |grep heroku` sh "git remote add heroku git@heroku.com:#{APP}.git" if remote.strip.blank? end task :check do var = Bundler.with_clean_env { `heroku config -s --app #{APP}|grep INTEGRATING_BY` } integrating_by = var.split('=')[1] # Eu sei que é tosco, mas foda-se user = `whoami` if !integrating_by.blank? and integrating_by != user p80 "Project is already being integrated by #{integrating_by}" exit end end task :lock do user = `whoami`.strip Bundler.with_clean_env { sh "heroku config:set INTEGRATING_BY=#{user} --app #{APP}" } end task :unlock do Bundler.with_clean_env { sh "heroku config:unset INTEGRATING_BY --app #{APP}" } end end end INTEGRATION_TASKS = %w( integration:heroku:add_remote integration:heroku:check integration:heroku:lock integration:start integration:bundle_install db:migrate spec integration:coverage_verify integration:finish heroku:deploy integration:heroku:unlock )
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pah-0.0.6 | lib/pah/files/lib/tasks/integration.rake |