Sha256: b5b916242602e0a93b104da0fdc98f2b33f600ff34afaa1614dbc216d853bc28

Contents?: true

Size: 379 Bytes

Versions: 15

Compression:

Stored size: 379 Bytes

Contents

require 'pact_broker/client/error'

module PactBroker
  module Client
    module Git
      COMMAND = 'git rev-parse --abbrev-ref HEAD'

      def self.branch
        `#{COMMAND}`.strip
      rescue StandardError => e
        raise PactBroker::Client::Error, "Could not determine current git branch using command `#{COMMAND}`. #{e.class} #{e.message}"
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
pact_broker-client-1.18.0 lib/pact_broker/client/git.rb
pact_broker-client-1.17.0 lib/pact_broker/client/git.rb
pact_broker-client-1.16.2 lib/pact_broker/client/git.rb
pact_broker-client-1.16.1 lib/pact_broker/client/git.rb
pact_broker-client-1.16.0 lib/pact_broker/client/git.rb
pact_broker-client-1.15.1 lib/pact_broker/client/git.rb
pact_broker-client-1.15.0 lib/pact_broker/client/git.rb
pact_broker-client-1.14.1 lib/pact_broker/client/git.rb
pact_broker-client-1.14.0 lib/pact_broker/client/git.rb
pact_broker-client-1.13.1 lib/pact_broker/client/git.rb
pact_broker-client-1.13.0 lib/pact_broker/client/git.rb
pact_broker-client-1.12.0 lib/pact_broker/client/git.rb
pact_broker-client-1.11.0 lib/pact_broker/client/git.rb
pact_broker-client-1.10.0 lib/pact_broker/client/git.rb
pact_broker-client-1.9.0 lib/pact_broker/client/git.rb