Sha256: bbd2ee2b76d35d1a0d8696d867c2fdac3e38a0562984a88d4afee24c65e94fd1

Contents?: true

Size: 1.2 KB

Versions: 5

Compression:

Stored size: 1.2 KB

Contents

config_ssh = <<-RUBY

Host heroku.com
    StrictHostKeyChecking no
    CheckHostIP no
    UserKnownHostsFile=/dev/null
Host github.com
    StrictHostKeyChecking no
RUBY

namespace :hatchet do
  task :setup_travis do
    puts "== Setting Up Travis =="
    [
     "bundle exec hatchet install",
     "if [ `git config --get user.email` ]; then echo 'already set'; else `git config --global user.email 'buildpack@example.com'`; fi",
     "if [ `git config --get user.name` ];  then echo 'already set'; else `git config --global user.name  'BuildpackTester'`      ; fi",
     "echo '#{config_ssh}' >> ~/.ssh/config",
     "curl --fail --retry 3 --retry-delay 1 --connect-timeout 3 --max-time 30 https://toolbelt.heroku.com/install-ubuntu.sh | sh",
     "ssh-keygen -f ~/.ssh/id_rsa -t rsa -N ''",
     "yes | heroku keys:add"
    ].each do |command|
      puts "== Running: #{command}"
      Bundler.with_clean_env do
        result = `#{command}`
        raise "Command failed: #{command.inspect}\nResult: #{result}" unless $?.success?
      end
    end
    puts "== Done =="
  end

  task :teardown_travis do
    ['heroku keys:remove'].each do |command|
      puts "== Running: #{command}"
      `#{command}`
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
heroku_hatchet-1.4.2 lib/hatchet/tasks.rb
heroku_hatchet-1.4.1 lib/hatchet/tasks.rb
heroku_hatchet-1.4.0 lib/hatchet/tasks.rb
heroku_hatchet-1.3.7 lib/hatchet/tasks.rb
heroku_hatchet-1.3.6 lib/hatchet/tasks.rb