lib/site_hook/webhook.rb in site_hook-0.6.23 vs lib/site_hook/webhook.rb in site_hook-0.7.0
- old
+ new
@@ -13,12 +13,13 @@
class Webhook < Sinatra::Base
HOOKLOG = SiteHook::HookLogger::HookLog.new(SiteHook::Logs.log_levels['hook']).log
BUILDLOG = SiteHook::HookLogger::BuildLog.new(SiteHook::Logs.log_levels['build']).log
APPLOG = SiteHook::HookLogger::AppLog.new(SiteHook::Logs.log_levels['app']).log
JPHRC = YAML.load_file(Pathname(Dir.home).join('.jph', 'config'))
-
- set port: JPHRC.fetch('port', 9090)
- set bind: '127.0.0.1'
+ def self.set_bind(host, port)
+ self.set port: port
+ self.set bind: host
+ end
set server: %w[thin]
set quiet: true
set raise_errors: true
set views: Pathname(SiteHook::Paths.lib_dir).join('site_hook', 'views')
set :public_folder, Pathname(SiteHook::Paths.lib_dir).join('site_hook', 'static')