module Berkshelf::API::RSpec::Server

Public Class Methods

clear_cache() click to toggle source
# File lib/berkshelf/api/rspec/server.rb, line 6
def clear_cache
  cache_manager.clear
end
instance() click to toggle source
# File lib/berkshelf/api/rspec/server.rb, line 10
def instance
  Berkshelf::API::Application.instance
end
running?() click to toggle source
# File lib/berkshelf/api/rspec/server.rb, line 14
def running?
  Berkshelf::API::Application.running?
end
start(options = {}) click to toggle source
# File lib/berkshelf/api/rspec/server.rb, line 18
def start(options = {})
  options = options.reverse_merge(port: 26210, log_location: "/dev/null", endpoints: [])
  Berkshelf::API::Application.config.endpoints = options[:endpoints]
  unless running?
    Berkshelf::API::Application.run!(options)
    cache_builder.build
  end
end
stop() click to toggle source
# File lib/berkshelf/api/rspec/server.rb, line 27
def stop
  Berkshelf::API::Application.shutdown
end