lib/guard/rack.rb in guard-rack-1.4.0 vs lib/guard/rack.rb in guard-rack-2.0.0
- old
+ new
@@ -1,25 +1,25 @@
require 'guard'
-require 'guard/guard'
+require 'guard/plugin'
require 'guard/rack/runner'
require 'rbconfig'
module Guard
- class Rack < ::Guard::Guard
+ class Rack < ::Guard::Plugin
attr_reader :options, :runner
DEFAULT_OPTIONS = {
- port: 9292,
- environment: 'development',
- start_on_start: true,
- force_run: false,
- timeout: 20,
- debugger: false,
- config: 'config.ru'
- }
+ port: 9292,
+ environment: 'development',
+ start_on_start: true,
+ force_run: false,
+ timeout: 20,
+ debugger: false,
+ config: 'config.ru'
+ }
- def initialize(watchers = [], options = {})
+ def initialize(options = {})
super
@options = DEFAULT_OPTIONS.merge(options)
@runner = ::Guard::RackRunner.new(@options)
end
@@ -44,10 +44,10 @@
def stop
Notifier.notify('Until next time...', title: 'Rack shutting down.', image: :pending)
runner.stop
end
- def run_on_changes(paths)
+ def run_on_changes(_paths)
reload
end
end
end