Sha256: 1b2b099caf8a0ebbf106e2e8556682920905cc8b924fd8adc0eef5278eec3b78

Contents?: true

Size: 445 Bytes

Versions: 9

Compression:

Stored size: 445 Bytes

Contents

require 'guard/compat/plugin'
require_relative 'command/puma'

module ::Guard

    class ReloadableSinatra < ::Guard::Plugin
        def start
            Hippo.logger.info "RELOADING WebServer"
            @puma = ::Hippo::Command::Puma.new
            @puma.start
        end

        def run_on_modifications(paths)
            @puma.stop
            @puma.start
        end

        def stop
            @puma.stop
        end

    end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
hippo-fw-0.9.9 lib/hippo/reloadable_sinatra.rb
hippo-fw-0.9.8 lib/hippo/reloadable_sinatra.rb
hippo-fw-0.9.7 lib/hippo/reloadable_sinatra.rb
hippo-fw-0.9.6 lib/hippo/reloadable_sinatra.rb
hippo-fw-0.9.5 lib/hippo/reloadable_sinatra.rb
hippo-fw-0.9.4 lib/hippo/reloadable_sinatra.rb
hippo-fw-0.9.3 lib/hippo/reloadable_sinatra.rb
hippo-fw-0.9.2 lib/hippo/reloadable_sinatra.rb
hippo-fw-0.9.1 lib/hippo/reloadable_sinatra.rb