Module: Berkshelf::API::RSpec::Server
- Extended by:
- Mixin::Services
- Defined in:
- lib/berkshelf/api/rspec/server.rb
Class Method Summary collapse
- .clear_cache ⇒ Object
- .instance ⇒ Object
- .running? ⇒ Boolean
- .start(options = {}) ⇒ Object
- .stop ⇒ Object
Methods included from Mixin::Services
Class Method Details
.clear_cache ⇒ Object
6 7 8 |
# File 'lib/berkshelf/api/rspec/server.rb', line 6 def clear_cache cache_manager.clear end |
.instance ⇒ Object
10 11 12 |
# File 'lib/berkshelf/api/rspec/server.rb', line 10 def instance Berkshelf::API::Application.instance end |
.running? ⇒ Boolean
14 15 16 |
# File 'lib/berkshelf/api/rspec/server.rb', line 14 def running? Berkshelf::API::Application.running? end |
.start(options = {}) ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/berkshelf/api/rspec/server.rb', line 18 def start( = {}) = .reverse_merge(port: 26210, log_location: "/dev/null", endpoints: []) Berkshelf::API::Application.config.endpoints = [:endpoints] unless running? Berkshelf::API::Application.run!() cache_builder.build end end |
.stop ⇒ Object
27 28 29 |
# File 'lib/berkshelf/api/rspec/server.rb', line 27 def stop Berkshelf::API::Application.shutdown end |