lib/attractor/reporters/sinatra_reporter.rb in attractor-1.0.1 vs lib/attractor/reporters/sinatra_reporter.rb in attractor-1.0.2

- old
+ new

@@ -45,21 +45,28 @@ super app = AttractorApp.new(self) puts 'Serving attractor at http://localhost:7890' - Launchy.open('http://localhost:7890') + if @open_browser + Launchy.open('http://localhost:7890') if @open_browser + puts "Opening browser window..." + end + Rack::Handler::WEBrick.run app, Port: 7890 end def watch @suggestions = @suggester.suggest app = AttractorApp.new(self) puts 'Serving attractor at http://localhost:7890' - Launchy.open('http://localhost:7890') + if @open_browser + Launchy.open('http://localhost:7890') + puts "Opening browser window..." + end Rack::Handler::WEBrick.run Rack::LiveReload.new(app), Port: 7890 end def values(type: 'rb')