/usr/lib/ruby/vendor_ruby/berkshelf/api/rspec/server.rb is in berkshelf-api 2.2.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | module Berkshelf::API::RSpec
module Server
class << self
include Berkshelf::API::Mixin::Services
def clear_cache
cache_manager.clear
end
def instance
Berkshelf::API::Application.instance
end
def running?
Berkshelf::API::Application.running?
end
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
def stop
Berkshelf::API::Application.shutdown
end
end
end
end
|