Sha256: 2ea61d537a3f1e8775cfcc4daa93338bc497ba435ad989918af4452aa829271e

Contents?: true

Size: 208 Bytes

Versions: 10

Compression:

Stored size: 208 Bytes

Contents

module Helpers
  def app
    @app ||= Rack::API
  end

  def basic_auth(username, password)
    "Basic " + Base64.encode64("#{username}:#{password}")
  end

  def json(string)
    JSON.load(string)
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rack-api-1.1.0 spec/support/helpers.rb
rack-api-1.0.2 spec/support/helpers.rb
rack-api-1.0.1 spec/support/helpers.rb
rack-api-1.0.0 spec/support/helpers.rb
rack-api-0.3.1 spec/support/helpers.rb
rack-api-0.3.0 spec/support/helpers.rb
rack-api-0.2.2 spec/support/helpers.rb
rack-api-0.2.1 spec/support/helpers.rb
rack-api-0.2.0 spec/support/helpers.rb
rack-api-0.1.2 spec/support/helpers.rb