Sha256: f68faa7760d14f7999db8a93bc79bc7144e6663aa4e1d6129d05e450c5b712f6

Contents?: true

Size: 527 Bytes

Versions: 159

Compression:

Stored size: 527 Bytes

Contents

require 'sequel'
require 'pact_broker/messages'

module PactBroker
  module DB

    class ConnectionConfigurationError < StandardError; end

    class ValidateEncoding

      extend PactBroker::Messages

      def self.call connection
        encoding = connection.opts[:encoding] || connection.opts['encoding']
        unless encoding =~ /utf\-?8/i
          raise ConnectionConfigurationError.new(message('errors.validation.connection_encoding_not_utf8', encoding: encoding.inspect))
        end
      end

    end
  end
end

Version data entries

159 entries across 159 versions & 1 rubygems

Version Path
pact_broker-2.79.1 lib/pact_broker/db/validate_encoding.rb
pact_broker-2.79.0 lib/pact_broker/db/validate_encoding.rb
pact_broker-2.78.1 lib/pact_broker/db/validate_encoding.rb
pact_broker-2.78.0 lib/pact_broker/db/validate_encoding.rb
pact_broker-2.77.0 lib/pact_broker/db/validate_encoding.rb
pact_broker-2.76.2 lib/pact_broker/db/validate_encoding.rb
pact_broker-2.76.1 lib/pact_broker/db/validate_encoding.rb
pact_broker-2.76.0 lib/pact_broker/db/validate_encoding.rb
pact_broker-2.75.0 lib/pact_broker/db/validate_encoding.rb
pact_broker-2.74.1 lib/pact_broker/db/validate_encoding.rb
pact_broker-2.74.0 lib/pact_broker/db/validate_encoding.rb
pact_broker-2.73.0 lib/pact_broker/db/validate_encoding.rb
pact_broker-2.72.0 lib/pact_broker/db/validate_encoding.rb
pact_broker-2.71.0 lib/pact_broker/db/validate_encoding.rb
pact_broker-2.70.0 lib/pact_broker/db/validate_encoding.rb
pact_broker-2.69.0 lib/pact_broker/db/validate_encoding.rb
pact_broker-2.68.1 lib/pact_broker/db/validate_encoding.rb
pact_broker-2.68.0 lib/pact_broker/db/validate_encoding.rb
pact_broker-2.67.0 lib/pact_broker/db/validate_encoding.rb
pact_broker-2.66.0 lib/pact_broker/db/validate_encoding.rb