Sha256: 077b2cf50c23cd7b8401660ec1bbd66909420785edee23fd4aeea21a9ef728ca

Contents?: true

Size: 838 Bytes

Versions: 618

Compression:

Stored size: 838 Bytes

Contents

require 'puppet/network/http/handler'

class PuppetSpec::Handler
  include Puppet::Network::HTTP::Handler

  def initialize(* routes)
    register(routes)
  end

  def set_content_type(response, format)
    response[:content_type_header] = format
  end

  def set_response(response, body, status = 200)
    response[:body] = body
    response[:status] = status
  end

  def http_method(request)
    request[:method]
  end

  def path(request)
    request[:path]
  end

  def params(request)
    request[:params]
  end

  def client_cert(request)
    request[:client_cert]
  end

  def body(request)
    request[:body]
  end

  def headers(request)
    request[:headers] || {}
  end
end

class PuppetSpec::HandlerProfiler
  def start(metric, description)
  end

  def finish(context, metric, description)
  end

  def shutdown()
  end
end

Version data entries

618 entries across 618 versions & 1 rubygems

Version Path
puppet-8.3.0 spec/lib/puppet_spec/handler.rb
puppet-8.3.0-x86-mingw32 spec/lib/puppet_spec/handler.rb
puppet-8.3.0-x64-mingw32 spec/lib/puppet_spec/handler.rb
puppet-8.3.0-universal-darwin spec/lib/puppet_spec/handler.rb
puppet-8.4.0 spec/lib/puppet_spec/handler.rb
puppet-8.4.0-x86-mingw32 spec/lib/puppet_spec/handler.rb
puppet-8.4.0-x64-mingw32 spec/lib/puppet_spec/handler.rb
puppet-8.4.0-universal-darwin spec/lib/puppet_spec/handler.rb
puppet-7.28.0 spec/lib/puppet_spec/handler.rb
puppet-7.28.0-x86-mingw32 spec/lib/puppet_spec/handler.rb
puppet-7.28.0-x64-mingw32 spec/lib/puppet_spec/handler.rb
puppet-7.28.0-universal-darwin spec/lib/puppet_spec/handler.rb
puppet-8.3.1 spec/lib/puppet_spec/handler.rb
puppet-8.3.1-x86-mingw32 spec/lib/puppet_spec/handler.rb
puppet-8.3.1-x64-mingw32 spec/lib/puppet_spec/handler.rb
puppet-8.3.1-universal-darwin spec/lib/puppet_spec/handler.rb
puppet-7.27.0 spec/lib/puppet_spec/handler.rb
puppet-7.27.0-x86-mingw32 spec/lib/puppet_spec/handler.rb
puppet-7.27.0-x64-mingw32 spec/lib/puppet_spec/handler.rb
puppet-7.27.0-universal-darwin spec/lib/puppet_spec/handler.rb