Sha256: 83793970e68575e327477a31f828859817abd249f773eb4687ccd8a6d7968a42

Contents?: true

Size: 619 Bytes

Versions: 1

Compression:

Stored size: 619 Bytes

Contents

# frozen_string_literal: true

module JekyllPush
  #
  #
  module Travis
    #
    # @return [String]
    def commit
      "Updated via JekyllPush Travis \"#{ENV['TRAVIS_COMMIT']}\" at #{@time}."
    end

    #
    # @return [String]
    def origin(opts)
      @repo_slug = ENV['TRAVIS_REPO_SLUG']
      @user      = opts.fetch :user, @repo_slug.split('/').first
      @token     = opts.fetch :pw, ENV['ACCESS_TOKEN']

      "https://#{@user}:#{@token}@github.com/#{@repo_slug}.git"
    end

    #
    # @return [String]
    def msg
      "\nDeploying to branch '#{@target}' from Travis as #{@user}."
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jekyll_push-0.1.2 lib/jekyll_push/travis.rb