contentful-webhook-listener 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 382b718018bfcb1215a64a6aeb222c7d54bf9417
|
|
4
|
+
data.tar.gz: ed7e2df879c2878252b5fb56722bbc69408fba49
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e5eccc8b497c478a1ee20e18abd252bca1b603b5e694357fe9008cad6ccc76d1043a1bba52166a4b453170ff85ff1109e14f819dcb2ff64800639eff64e77302
|
|
7
|
+
data.tar.gz: 29ef8f044881f404f0c1cdc870a9c600be03b5095798f93005a50265001641c6917fc2be0ef18d3b269ec75d66192763137194171c1c1a463eeb504df3c0b590
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,13 @@ module Contentful
|
|
|
7
7
|
# Abstract Base Controller
|
|
8
8
|
# Extend and redefine #perform to run a process in background
|
|
9
9
|
class Base < WEBrick::HTTPServlet::AbstractServlet
|
|
10
|
+
attr_reader :logger
|
|
11
|
+
|
|
12
|
+
def initialize(server, logger, *options)
|
|
13
|
+
super(server, options)
|
|
14
|
+
@logger = logger
|
|
15
|
+
end
|
|
16
|
+
|
|
10
17
|
def respond(request, response)
|
|
11
18
|
response.body = ''
|
|
12
19
|
response.status = 200
|
|
@@ -9,8 +9,8 @@ module Contentful
|
|
|
9
9
|
class Wait < Base
|
|
10
10
|
attr_reader :webhook_timeout
|
|
11
11
|
|
|
12
|
-
def initialize(server, wh_timeout, *options)
|
|
13
|
-
super(server, options)
|
|
12
|
+
def initialize(server, logger, wh_timeout, *options)
|
|
13
|
+
super(server, logger, options)
|
|
14
14
|
@webhook_timeout = wh_timeout
|
|
15
15
|
end
|
|
16
16
|
|
|
@@ -2,6 +2,7 @@ require 'thread'
|
|
|
2
2
|
require 'webrick'
|
|
3
3
|
require 'stringio'
|
|
4
4
|
require 'contentful/webhook/listener/controllers'
|
|
5
|
+
require 'contentful/webhook/listener/support'
|
|
5
6
|
|
|
6
7
|
module Contentful
|
|
7
8
|
module Webhook
|
|
@@ -60,7 +61,7 @@ module Contentful
|
|
|
60
61
|
Port: @port,
|
|
61
62
|
BindAddress: @address,
|
|
62
63
|
AccessLog: [],
|
|
63
|
-
Logger:
|
|
64
|
+
Logger: Contentful::Webhook::Listener::Support::NullLogger.new
|
|
64
65
|
)
|
|
65
66
|
end
|
|
66
67
|
|
|
@@ -70,6 +71,7 @@ module Contentful
|
|
|
70
71
|
server.mount(
|
|
71
72
|
endpoint_config[:endpoint],
|
|
72
73
|
endpoint_config[:controller],
|
|
74
|
+
@logger,
|
|
73
75
|
endpoint_config[:timeout]
|
|
74
76
|
)
|
|
75
77
|
|