Sha256: 7d634b7cf2f9c15058b00b044babf7dbcb931240de21b84e9fbb50854ddb3709
Contents?: true
Size: 374 Bytes
Versions: 15
Compression:
Stored size: 374 Bytes
Contents
require "puma/plugin" Puma::Plugin.create do def start(launcher) return unless defined?(Rails) && defined?(Launchy) return unless Rails.env.development? binding = launcher.options[:binds].grep(/^tcp|ssl/).first return if binding.nil? url = binding.sub(/^tcp/, "http").sub(/^ssl/, "https").sub("0.0.0.0", "localhost") Launchy.open(url) end end
Version data entries
15 entries across 15 versions & 1 rubygems