site_hook 1.0.27 → 1.0.28
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/site_hook/commands/server_class.rb +12 -3
- data/lib/site_hook/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3989178c47d8634c927a8baf022540b039a40e2a589119f05a51dd57a049cf2
|
4
|
+
data.tar.gz: 3a556d41a9eeb26a20c3e38046950fd98826e647047682525d532738e7d3edd9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e013f5e94d6ce86185a19b2633fc7eebb8e2f6740c76598f7b6ccf43b2eee82658be83768df820fe70df7808ee1534d21124f71efd3355e3aa874c1a5f24c4b2
|
7
|
+
data.tar.gz: c3ea932fcda0c99e4d456fc33ee46708acedc551eba2eb3c9e023c2e9d3fea7eb9e288397c08d4ba8825bbe6580647d6deb683a80c71bf75fd9d70dca0afd0af
|
@@ -13,13 +13,22 @@ module SiteHook
|
|
13
13
|
# puts SiteHook::VERSION
|
14
14
|
# end
|
15
15
|
# map ['-v', '--version'] => __version
|
16
|
-
method_option(:host, banner: 'HOST', aliases: ['-h'], type: :string
|
17
|
-
method_option(:port, banner: 'PORT', aliases: ['-p'], type: :numeric
|
16
|
+
method_option(:host, banner: 'HOST', aliases: ['-h'], type: :string)
|
17
|
+
method_option(:port, banner: 'PORT', aliases: ['-p'], type: :numeric)
|
18
18
|
desc 'listen [options]', ''
|
19
19
|
def listen
|
20
|
+
host = SiteHook::Config.webhook.host
|
21
|
+
port = SiteHook::Config.webhook.port
|
22
|
+
if options['host']
|
23
|
+
host = options['host']
|
24
|
+
end
|
25
|
+
if options['port']
|
26
|
+
port = options['port']
|
27
|
+
end
|
28
|
+
|
20
29
|
$threads << Thread.new do
|
21
30
|
PreLogger.debug options
|
22
|
-
::Thin::Server.start(
|
31
|
+
::Thin::Server.start(host, port, SiteHook::Server, debug: true)
|
23
32
|
end
|
24
33
|
$threads << Thread.new do
|
25
34
|
loop do
|
data/lib/site_hook/version.rb
CHANGED