module Sitespec

Constants

VERSION

Public Class Methods

artifacts_count() click to toggle source

Return how many artifacts (files) generated on this process. This count is to be shown after all examples are finished. @return [Integer]

# File lib/sitespec.rb, line 10
def artifacts_count
  @artifacts_count || 0
end
configuration() click to toggle source

Provide singleton configuration object shared with the current process. All of user-configuration should be stored in this singleton object. @example

Sitespec.configuration.build_path = "artifacts"
# File lib/sitespec.rb, line 18
def configuration
  @configuration ||= Sitespec::Configuration.new
end
configure(&block) click to toggle source

Provide friendly interface to access to Sitespec.configuration. The configuration object passed to given block is same with `Sitespec.configuration`. @example

Sitespec.configure do |configuration|
  configuration.build_path = "artifacts"
end
# File lib/sitespec.rb, line 29
def configure(&block)
  block.call(configuration)
end
increment_artifacts_count() click to toggle source

Use this method when a new artifact is generated. In almost cases, it's called from Sitespec::Artifact class.

# File lib/sitespec.rb, line 35
def increment_artifacts_count
  @artifacts_count = artifacts_count + 1
end