Sha256: 9eec3fbb0c7cd615c44a6cc4b87bde1f616ca4f56b69e0c1c07ce9bb9e31a82a

Contents?: true

Size: 566 Bytes

Versions: 249

Compression:

Stored size: 566 Bytes

Contents

module DPL
  class Provider
    module Heroku
      class Git < Generic
        requires 'netrc'

        def git_url
          "https://git.heroku.com/#{option(:app)}.git"
        end

        def push_app
          git_remote = options[:git] || git_url
          write_netrc if git_remote.start_with?("https://")
          context.shell "git push #{git_remote} HEAD:refs/heads/master -f"
        end

        def write_netrc
          n = Netrc.read
          n['git.heroku.com'] = [user, option(:api_key)]
          n.save
        end
      end
    end
  end
end

Version data entries

249 entries across 249 versions & 1 rubygems

Version Path
dpl-1.8.21 lib/dpl/provider/heroku/git.rb
dpl-1.8.22.travis.1670.3 lib/dpl/provider/heroku/git.rb
dpl-1.8.21.travis.1669.3 lib/dpl/provider/heroku/git.rb
dpl-1.8.21.travis.1668.3 lib/dpl/provider/heroku/git.rb
dpl-1.8.20.travis.1666.3 lib/dpl/provider/heroku/git.rb
dpl-1.8.20.travis.1667.3 lib/dpl/provider/heroku/git.rb
dpl-1.8.20.travis.1665.3 lib/dpl/provider/heroku/git.rb
dpl-1.8.20.travis.1655.3 lib/dpl/provider/heroku/git.rb
dpl-1.8.19 lib/dpl/provider/heroku/git.rb
dpl-1.8.19.travis.1652.3 lib/dpl/provider/heroku/git.rb
dpl-1.8.19.travis.1649.3 lib/dpl/provider/heroku/git.rb
dpl-1.8.19.travis.1647.3 lib/dpl/provider/heroku/git.rb
dpl-1.8.19.travis.1646.3 lib/dpl/provider/heroku/git.rb
dpl-1.8.19.travis.1619.3 lib/dpl/provider/heroku/git.rb
dpl-1.8.19.travis.1576.3 lib/dpl/provider/heroku/git.rb
dpl-1.8.19.travis.1574.3 lib/dpl/provider/heroku/git.rb
dpl-1.8.19.travis.1566.3 lib/dpl/provider/heroku/git.rb
dpl-1.8.18 lib/dpl/provider/heroku/git.rb
dpl-1.8.18.travis.1564.3 lib/dpl/provider/heroku/git.rb
dpl-1.8.18.travis.1563.3 lib/dpl/provider/heroku/git.rb