travis-ci
18 of 18 new or added lines in 1 file covered. (100.0%)
346 of 348 relevant lines covered (99.43%)
98.17 hits per line
|
require 'rack'
|
4✔ |
2 |
|
|
|
module Lotus |
4✔ |
|
module Commands |
4✔ |
|
class Console |
4✔ |
|
attr_reader :options
|
4✔ |
7 |
|
|
|
def initialize(options) |
4✔ |
|
@options = default_options.merge(options)
|
8✔ |
10 |
end
|
|
11 |
|
|
|
def start |
4✔ |
|
Rack::Builder.parse_file(options[:config]) |
4✔ |
14 |
|
|
|
begin
|
4✔ |
|
require 'pry'
|
4✔ |
|
Pry.start
|
× |
|
rescue LoadError |
4✔ |
|
require 'irb'
|
4✔ |
|
IRB.start
|
4✔ |
21 |
end
|
|
22 |
end
|
|
23 |
|
|
|
private |
4✔ |
25 |
|
|
|
def default_options |
4✔ |
27 |
{ |
|
28 |
config: 'config.ru' |
|
|
} |
8✔ |
30 |
end
|
|
31 |
end
|
|
32 |
end
|
|
33 |
end
|