module LapisLazuli

LapisLazuli github.com/spriteCloud/lapis-lazuli

Copyright © 2015 spriteCloud B.V. and other LapisLazuli contributors. All rights reserved.

LapisLazuli github.com/spriteCloud/lapis-lazuli

Copyright © 2013-2017 spriteCloud B.V. and other LapisLazuli contributors. All rights reserved.

LapisLazuli github.com/spriteCloud/lapis-lazuli

Copyright © 2013-2019 spriteCloud B.V. and other LapisLazuli contributors. All rights reserved.

LapisLazuli github.com/spriteCloud/lapis-lazuli

Copyright © 2013-2019 spriteCloud B.V. and other LapisLazuli contributors. All rights reserved.

LapisLazuli github.com/spriteCloud/lapis-lazuli

Copyright © 2013-2019 spriteCloud B.V. and other LapisLazuli contributors. All rights reserved.

LapisLazuli github.com/spriteCloud/lapis-lazuli

Copyright © 2013-2019 spriteCloud B.V. and other LapisLazuli contributors. All rights reserved.

LapisLazuli github.com/spriteCloud/lapis-lazuli

Copyright © 2013-2019 spriteCloud B.V. and other LapisLazuli contributors. All rights reserved.

LapisLazuli github.com/spriteCloud/lapis-lazuli

Copyright © 2013-2017 spriteCloud B.V. and other LapisLazuli contributors. All rights reserved.

LapisLazuli github.com/spriteCloud/lapis-lazuli

Copyright © 2013-2017 spriteCloud B.V. and other LapisLazuli contributors. All rights reserved.

Constants

CONFIG_OPTIONS

Configuration options and their default values

PLACEHOLDERS

Placeholders and their meanings. The first value is a string to be eval'd to determine the value the placeholder is to be replaced with. The second value describes the meaning.

VERSION

Attributes

software_versions[RW]

Given a versions string or hash, stores it for later use with the library.

Public Class Methods

After(&block) click to toggle source
# File lib/lapis_lazuli.rb, line 63
def self.After(&block)
  LapisLazuli::WorldModule::Hooks.add_hook(:after, block)
end
Before(&block) click to toggle source

Export equivalents to cucumber's Before/After functions

# File lib/lapis_lazuli.rb, line 59
def self.Before(&block)
  LapisLazuli::WorldModule::Hooks.add_hook(:before, block)
end
Start(&block) click to toggle source
# File lib/lapis_lazuli.rb, line 67
def self.Start(&block)
  LapisLazuli::WorldModule::Hooks.add_hook(:start, block)
end
fetch_versions(url, endpoint = nil) click to toggle source

Connedt to the endpoint or to ENV, then retrieve the url. The contents should be the software versions used.

# File lib/lapis_lazuli/versions.rb, line 20
def self.fetch_versions(url, endpoint = nil)
  # Set the connection endpoint. This is either the endpoint, or the
  # environment variable 'VERSION_ENDPOINT'.
  if ENV.has_key?('VERSION_ENDPOINT')
    endpoint = ENV['VERSION_ENDPOINT']
  end

  # Connect to the endpoint
  api = API.new
  api.set_conn(endpoint)

  # Fetch versions
  response = api.get(url)
  if 2 != response.status / 100
    raise "Error retrieving software versions, got status code #{response.status}"
  end

  # Store that stuff for later.
  self.software_versions = response.body
end