Sha256: 7f20f2a239fbb2212808cd61a7e5e7f35a32e813fe013b09d7ded87237251ebe

Contents?: true

Size: 429 Bytes

Versions: 3

Compression:

Stored size: 429 Bytes

Contents

module GitHttpsable
  module Push
    class GitHttpsablePushError < StandardError
      def initialize(message = nil)
        return super unless message
        super(mask_token(message.to_s))
      end

      def mask_token(text)
        text.gsub(%r{://[^/@]*@}) { '://MASKED@' }
      end
    end

    class NotExistRemoteUrlError < GitHttpsablePushError; end
    class NoAuthDataError < GitHttpsablePushError; end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
git_httpsable-push-0.1.2 lib/git_httpsable/push/error.rb
git_httpsable-push-0.1.1 lib/git_httpsable/push/error.rb
git_httpsable-push-0.1.0 lib/git_httpsable/push/error.rb