Sha256: ae035b9a3d175f0b3e45e0118e8f6a868f28180ca9fd8b672563ebf816ae45ee

Contents?: true

Size: 536 Bytes

Versions: 3

Compression:

Stored size: 536 Bytes

Contents

class BenchHost
  include Sanford::Host

  port     12000
  pid_dir  File.expand_path("../../tmp", __FILE__)

  logger           Logger.new(STDOUT)
  verbose_logging  false

  version 'v1' do
    service 'simple', 'BenchHost::Simple'
  end

  class Simple
    include Sanford::ServiceHandler

    def run!
      { :string => 'test', :int => 1, :float => 2.1, :boolean => true,
        :hash => { :something => 'else' }, :array => [ 1, 2, 3 ],
        :request_number => self.request.params['request_number']
      }
    end

  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sanford-0.4.0 bench/services.rb
sanford-0.3.0 bench/services.rb
sanford-0.2.0 bench/services.rb