clicksign-webhooks 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b563cd44ac9a368bbaf250193e2dbbff62dff5b4aee62c9587a13dfd3befb21e
4
- data.tar.gz: adfb39017534f74aeac9244711274c662ff07273d85f496ec12c318cc82a5115
3
+ metadata.gz: 456d34b9190af5cc928e36472b9e6d73e97b6917c0574d4f994f72f7de842d29
4
+ data.tar.gz: 221744a6ab4d46c7fa83d04bb45f19e12b2cb00c632e11c16707f99716f43b6c
5
5
  SHA512:
6
- metadata.gz: 4dc440d12165352c1656bf9a01e0716445c8240f66e3060334366087708c189599e8da9f257e1821c83bee7478e58302db38c5a8d3a82e7b5158dbb8cfede6b0
7
- data.tar.gz: 0ad6fa752fbdd86c54b186e53852c80f13ff09aab9b937125f186396e03924e105e4ce720022b2bf0c9cd63bed819cde101baf96db263fdf0f481a917178b146
6
+ metadata.gz: 6d880bcb20ead3c44709abe365a930b773e7d330a5f0ab82b938ffbdeff86e69ba4693995a0fff84bda1a21494c54ff1c33c1ccfaeb9b7192ff8e81760be62d6
7
+ data.tar.gz: 979619e8bdbbc873c66cb16f5b7811131603f874d1e175a5bda2b16a2c9cac82a9b1fda2ae32e92d3b39742d3e2a84008412751fa612f7ab7bbb7ccd7b7b9241
data/README.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Clicksign::Webhooks
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/clicksign-webhooks.svg)](https://badge.fury.io/rb/clicksign-webhooks)
4
+ [![Build Status](https://travis-ci.org/NexoosBR/clicksign-webhooks.svg?branch=master)](https://travis-ci.org/NexoosBR/clicksign-webhooks)
5
+ [![Maintainability](https://api.codeclimate.com/v1/badges/13f56cf85ed77ddf6bd1/maintainability)](https://codeclimate.com/github/NexoosBR/clicksign-webhooks/maintainability)
6
+ [![Test Coverage](https://api.codeclimate.com/v1/badges/13f56cf85ed77ddf6bd1/test_coverage)](https://codeclimate.com/github/NexoosBR/clicksign-webhooks/test_coverage)
7
+
3
8
  To fully understand Clicksign webhooks system, click [here](https://developers.clicksign.com/docs/introducao-a-webhooks)
4
9
 
5
10
  ## Installation
@@ -46,8 +51,11 @@ Then create a initializer using a `Proc` to each possible event:
46
51
 
47
52
  ```ruby
48
53
  Clicksign::Webhooks.configure do |config|
49
- # You have to setup one Proc for each event
54
+ # Setup HMAC
55
+ config.hmac = ENV['CLICKSIGN_HMAC_KEY']
50
56
 
57
+ # You have to setup one Proc for each event
58
+ # Available events are described below
51
59
  config.on_upload = ->(event) {
52
60
  # Do something with sent event parameters
53
61
  }
@@ -97,7 +105,7 @@ The argument `event` is a `Hash`:
97
105
  - on_remove_signer
98
106
  - on_sign
99
107
  - on_close
100
- - on_auto_close,
108
+ - on_auto_close
101
109
  - on_deadline
102
110
  - on_cancel
103
111
  - on_update_deadline
@@ -1,6 +1,14 @@
1
1
  module Clicksign
2
2
  module Webhooks
3
3
  class ApplicationController < ActionController::Base
4
+ before_action do
5
+ Clicksign::Webhooks::HMAC.new(request).validate!
6
+ end
7
+
8
+ rescue_from InvalidHMACError do
9
+ Rails.logger.warn("Invalid HMAC")
10
+ head 401
11
+ end
4
12
  end
5
13
  end
6
14
  end
@@ -1,4 +1,12 @@
1
+ require "clicksign/webhooks/version"
1
2
  require "clicksign/webhooks/engine"
3
+ require "clicksign/webhooks/hmac"
4
+
5
+ begin
6
+ require "dotenv/load"
7
+ require "byebug"
8
+ rescue LoadError
9
+ end
2
10
 
3
11
  module Clicksign
4
12
  module Webhooks
@@ -7,8 +15,15 @@ module Clicksign
7
15
  :deadline, :cancel, :update_deadline, :update_auto_close
8
16
  ].map { |event| "on_#{event}" }
9
17
 
18
+ DEFAULT_EVENT_HANDLER = -> (event) {
19
+ "Missing config for event: #{event.inspect}".tap do |message|
20
+ Rails.logger.debug(message)
21
+ end
22
+ }
23
+
10
24
  class << self
11
- attr_accessor *EVENTS
25
+
26
+ attr_accessor :hmac, *EVENTS
12
27
 
13
28
  def configure
14
29
  yield(self) if block_given?
@@ -0,0 +1,32 @@
1
+ module Clicksign
2
+ module Webhooks
3
+ class HMAC < Struct.new(:request)
4
+ def validate!
5
+ raise InvalidHMACError unless valid?
6
+ end
7
+
8
+ def valid?
9
+ hmac_header.include?(hmac)
10
+ end
11
+
12
+ def digest
13
+ @digest = OpenSSL::Digest::SHA256.new
14
+ end
15
+
16
+ def data
17
+ @data = request.body.read
18
+ end
19
+
20
+ def hmac
21
+ @hmac = OpenSSL::HMAC.hexdigest(digest, ENV['CLICKSIGN_HMAC_KEY'], data)
22
+ end
23
+
24
+ def hmac_header
25
+ @hmac_header = request.headers['Content-Hmac'] || ''
26
+ end
27
+ end
28
+
29
+ class InvalidHMACError < StandardError
30
+ end
31
+ end
32
+ end
@@ -1,5 +1,5 @@
1
1
  module Clicksign
2
2
  module Webhooks
3
- VERSION = '0.0.1'
3
+ VERSION = '0.0.2'
4
4
  end
5
5
  end
@@ -0,0 +1,5 @@
1
+ require 'spec_helper'
2
+
3
+ RSpec.describe Clicksign::Webhooks do
4
+
5
+ end
@@ -5,21 +5,70 @@ RSpec.describe Clicksign::Webhooks::EventsController, type: :request do
5
5
  Proc.new { |event| event }
6
6
  end
7
7
 
8
- before do
9
- Clicksign::Webhooks.configure do |config|
10
- config.on_upload = on_upload
8
+ context 'valid request and valid setup' do
9
+ before do
10
+ Clicksign::Webhooks.configure do |config|
11
+ config.hmac = ENV['CLICKSIGN_HMAC']
12
+ config.on_upload = on_upload
13
+ end
14
+ end
15
+
16
+ # Please, notice that `request.body` will be like:
17
+ # event[name]=upload
18
+ # It will be usefull to generate testing HMACs
19
+ let(:params) {
20
+ { event: { name: 'upload' } }
21
+ }
22
+
23
+ it do
24
+ expect(on_upload).to receive(:call).once
25
+
26
+ post '/clicksign-webhooks/event', params: params, headers: {
27
+ "Content-Hmac": "sha256=\"#{ENV['VALID_CONTENT_HMAC_HEADER']}\""
28
+ }
29
+
30
+ expect(response.code).to eq('200')
11
31
  end
12
32
  end
13
33
 
14
- it do
15
- expect(on_upload).to receive(:call).once
16
- post '/clicksign-webhooks/event', params: { event: { name: 'upload' } }
17
- expect(response.code).to eq('200')
34
+ context 'invalid setup' do
35
+ before do
36
+ Clicksign::Webhooks.configure do |config|
37
+ config.hmac = 'INVALID'
38
+ config.on_upload = on_upload
39
+ end
40
+ end
41
+
42
+ it do
43
+ expect(on_upload).to_not receive(:call)
44
+ post '/clicksign-webhooks/event', params: {}, headers: {}
45
+ expect(response.code).to eq('401')
46
+ end
18
47
  end
19
48
 
20
- it do
21
- expect(on_upload).to_not receive(:call)
22
- post '/clicksign-webhooks/event', params: { event: { name: 'invalid' } }
23
- expect(response.code).to eq('422')
49
+ context 'invalid request' do
50
+ before do
51
+ Clicksign::Webhooks.configure do |config|
52
+ config.hmac = ENV['CLICKSIGN_HMAC']
53
+ config.on_upload = on_upload
54
+ end
55
+ end
56
+
57
+ # Please, notice that `request.body` will be like:
58
+ # event[name]=invalid
59
+ # It will be usefull to generate testing HMACs
60
+ let(:params) do
61
+ { event: { name: 'invalid' } }
62
+ end
63
+
64
+ it do
65
+ expect(on_upload).to_not receive(:call)
66
+ expect(Rails.logger).to receive(:warn).with('Invalid configuration: on_invalid')
67
+
68
+ post '/clicksign-webhooks/event', params: { event: { name: 'invalid' } }, headers: {
69
+ 'Content-Hmac': "sha256=\"#{ENV['INVALID_CONTENT_HMAC_HEADER']}\""
70
+ }
71
+ expect(response.code).to eq('422')
72
+ end
24
73
  end
25
74
  end
@@ -0,0 +1,18 @@
1
+ Clicksign::Webhooks.configure do |config|
2
+ config.hmac = ENV['CLICKSIGN_HMAC_KEY']
3
+
4
+ event_handler = -> (event) {
5
+ Rails.logger.debug("EVENT: #{event.fetch(:name)}")
6
+ }
7
+
8
+ config.on_upload = event_handler
9
+ config.on_add_signer = event_handler
10
+ config.on_remove_signer = event_handler
11
+ config.on_sign = event_handler
12
+ config.on_close = event_handler
13
+ config.on_auto_close = event_handler
14
+ config.on_deadline = event_handler
15
+ config.on_cancel = event_handler
16
+ config.on_update_deadline = event_handler
17
+ config.on_update_auto_close = event_handler
18
+ end
@@ -249,3 +249,452 @@ Processing by Clicksign::Webhooks::EventsController#create as */*
249
249
  Completed 200 OK in 9ms
250
250
 
251
251
 
252
+ Started POST "/clicksign-webhooks/event" for ::1 at 2018-10-29 15:08:17 -0300
253
+ Processing by Clicksign::Webhooks::EventsController#create as */*
254
+ Parameters: {"event"=>{"name"=>"invalid"}}
255
+ Completed 500 Internal Server Error in 102645ms
256
+
257
+
258
+
259
+ SystemExit (exit):
260
+
261
+ (byebug):1:in `exit'
262
+ (byebug):1:in `create'
263
+ Started POST "/clicksign-webhooks/event" for ::1 at 2018-10-29 15:13:32 -0300
264
+ Processing by Clicksign::Webhooks::EventsController#create as */*
265
+ Parameters: {"event"=>{"name"=>"invalid"}}
266
+ Completed 500 Internal Server Error in 101124ms
267
+
268
+
269
+
270
+ SystemExit (exit):
271
+
272
+ (byebug):1:in `exit'
273
+ (byebug):1:in `create'
274
+ Started POST "/clicksign-webhooks/event" for ::1 at 2018-10-29 15:16:33 -0300
275
+ Processing by Clicksign::Webhooks::EventsController#create as */*
276
+ Parameters: {"event"=>{"name"=>"invalid"}}
277
+ Completed 500 Internal Server Error in 4598ms
278
+
279
+
280
+
281
+ SystemExit (exit):
282
+
283
+ (byebug):1:in `exit'
284
+ (byebug):1:in `create'
285
+ Started POST "/clicksign-webhooks/event" for ::1 at 2018-10-29 15:17:17 -0300
286
+ Processing by Clicksign::Webhooks::EventsController#create as */*
287
+ Parameters: {"event"=>{"name"=>"invalid"}}
288
+ Completed 500 Internal Server Error in 3005ms
289
+
290
+
291
+
292
+ SystemExit (exit):
293
+
294
+ (byebug):1:in `exit'
295
+ (byebug):1:in `create'
296
+ Started POST "/clicksign-webhooks/event" for ::1 at 2018-10-29 15:21:21 -0300
297
+ Processing by Clicksign::Webhooks::EventsController#create as */*
298
+ Parameters: {"event"=>{"name"=>"invalid"}}
299
+ Completed 500 Internal Server Error in 4064ms
300
+
301
+
302
+
303
+ SystemExit (exit):
304
+
305
+ (byebug):1:in `exit'
306
+ (byebug):1:in `create'
307
+ Started POST "/clicksign-webhooks/event" for ::1 at 2018-10-29 15:22:03 -0300
308
+ Processing by Clicksign::Webhooks::EventsController#create as */*
309
+ Parameters: {"event"=>{"name"=>"invalid"}}
310
+ Completed 500 Internal Server Error in 11192ms
311
+
312
+
313
+
314
+ SystemExit (exit):
315
+
316
+ (byebug):1:in `exit'
317
+ (byebug):1:in `create'
318
+ Started POST "/clicksign-webhooks/event" for ::1 at 2018-10-29 15:29:51 -0300
319
+ Processing by Clicksign::Webhooks::EventsController#create as */*
320
+ Parameters: {"event"=>{"name"=>"invalid"}}
321
+ Completed 500 Internal Server Error in 304818ms
322
+
323
+
324
+
325
+ SystemExit (exit):
326
+
327
+ (byebug):1:in `exit'
328
+ (byebug):1:in `create'
329
+ Started POST "/clicksign-webhooks/event" for ::1 at 2018-10-29 15:35:04 -0300
330
+ Processing by Clicksign::Webhooks::EventsController#create as */*
331
+ Parameters: {"event"=>{"name"=>"invalid"}}
332
+ Completed 500 Internal Server Error in 9645ms
333
+
334
+
335
+
336
+ SystemExit (exit):
337
+
338
+ (byebug):1:in `exit'
339
+ (byebug):1:in `create'
340
+ Started POST "/clicksign-webhooks/event" for ::1 at 2018-10-29 15:35:42 -0300
341
+ Processing by Clicksign::Webhooks::EventsController#create as */*
342
+ Parameters: {"event"=>{"name"=>"invalid"}}
343
+ Completed 500 Internal Server Error in 3894ms
344
+
345
+
346
+
347
+ SystemExit (exit):
348
+
349
+ (byebug):1:in `exit'
350
+ (byebug):1:in `create'
351
+ Started POST "/clicksign-webhooks/event" for ::1 at 2018-10-29 15:36:56 -0300
352
+ Processing by Clicksign::Webhooks::EventsController#create as */*
353
+ Parameters: {"event"=>{"name"=>"invalid"}}
354
+ Completed 500 Internal Server Error in 1527440ms
355
+
356
+
357
+
358
+ SystemExit (exit):
359
+
360
+ (byebug):1:in `exit'
361
+ (byebug):1:in `create'
362
+ Started POST "/clicksign-webhooks/event" for ::1 at 2018-10-29 16:02:28 -0300
363
+ Processing by Clicksign::Webhooks::EventsController#create as */*
364
+ Parameters: {"event"=>{"name"=>"invalid"}}
365
+ Completed 500 Internal Server Error in 1211662ms
366
+
367
+
368
+
369
+ SystemExit (exit):
370
+
371
+ (byebug):1:in `exit'
372
+ (byebug):1:in `create'
373
+ Started POST "/clicksign-webhooks/event" for ::1 at 2018-10-29 16:22:51 -0300
374
+ Processing by Clicksign::Webhooks::EventsController#create as */*
375
+ Parameters: {"event"=>{"name"=>"invalid"}}
376
+ Completed 500 Internal Server Error in 137406ms
377
+
378
+
379
+
380
+ SystemExit (exit):
381
+
382
+ (byebug):1:in `exit'
383
+ (byebug):1:in `create'
384
+ Started POST "/clicksign-webhooks/event" for ::1 at 2018-10-29 16:25:16 -0300
385
+ Processing by Clicksign::Webhooks::EventsController#create as */*
386
+ Parameters: {"event"=>{"name"=>"invalid"}}
387
+ Completed 500 Internal Server Error in 2ms
388
+
389
+
390
+
391
+ NoMethodError (undefined method `Webhooks' for Clicksign:Module):
392
+
393
+ /Users/nexoos_brasil/dev/clicksign-webhooks/app/controllers/clicksign/webhooks/application_controller.rb:7:in `verify_hmac'
394
+ activesupport (5.2.1) lib/active_support/callbacks.rb:426:in `block in make_lambda'
395
+ activesupport (5.2.1) lib/active_support/callbacks.rb:198:in `block (2 levels) in halting'
396
+ actionpack (5.2.1) lib/abstract_controller/callbacks.rb:34:in `block (2 levels) in <module:Callbacks>'
397
+ activesupport (5.2.1) lib/active_support/callbacks.rb:199:in `block in halting'
398
+ activesupport (5.2.1) lib/active_support/callbacks.rb:513:in `block in invoke_before'
399
+ activesupport (5.2.1) lib/active_support/callbacks.rb:513:in `each'
400
+ activesupport (5.2.1) lib/active_support/callbacks.rb:513:in `invoke_before'
401
+ activesupport (5.2.1) lib/active_support/callbacks.rb:131:in `run_callbacks'
402
+ actionpack (5.2.1) lib/abstract_controller/callbacks.rb:41:in `process_action'
403
+ actionpack (5.2.1) lib/action_controller/metal/rescue.rb:22:in `process_action'
404
+ actionpack (5.2.1) lib/action_controller/metal/instrumentation.rb:34:in `block in process_action'
405
+ activesupport (5.2.1) lib/active_support/notifications.rb:168:in `block in instrument'
406
+ activesupport (5.2.1) lib/active_support/notifications/instrumenter.rb:23:in `instrument'
407
+ activesupport (5.2.1) lib/active_support/notifications.rb:168:in `instrument'
408
+ actionpack (5.2.1) lib/action_controller/metal/instrumentation.rb:32:in `process_action'
409
+ actionpack (5.2.1) lib/action_controller/metal/params_wrapper.rb:256:in `process_action'
410
+ actionpack (5.2.1) lib/abstract_controller/base.rb:134:in `process'
411
+ actionview (5.2.1) lib/action_view/rendering.rb:32:in `process'
412
+ actionpack (5.2.1) lib/action_controller/metal.rb:191:in `dispatch'
413
+ actionpack (5.2.1) lib/action_controller/metal.rb:252:in `dispatch'
414
+ actionpack (5.2.1) lib/action_dispatch/routing/route_set.rb:52:in `dispatch'
415
+ actionpack (5.2.1) lib/action_dispatch/routing/route_set.rb:34:in `serve'
416
+ actionpack (5.2.1) lib/action_dispatch/journey/router.rb:52:in `block in serve'
417
+ actionpack (5.2.1) lib/action_dispatch/journey/router.rb:35:in `each'
418
+ actionpack (5.2.1) lib/action_dispatch/journey/router.rb:35:in `serve'
419
+ actionpack (5.2.1) lib/action_dispatch/routing/route_set.rb:840:in `call'
420
+ railties (5.2.1) lib/rails/engine.rb:524:in `call'
421
+ railties (5.2.1) lib/rails/railtie.rb:190:in `public_send'
422
+ railties (5.2.1) lib/rails/railtie.rb:190:in `method_missing'
423
+ actionpack (5.2.1) lib/action_dispatch/routing/mapper.rb:19:in `block in <class:Constraints>'
424
+ actionpack (5.2.1) lib/action_dispatch/routing/mapper.rb:48:in `serve'
425
+ actionpack (5.2.1) lib/action_dispatch/journey/router.rb:52:in `block in serve'
426
+ actionpack (5.2.1) lib/action_dispatch/journey/router.rb:35:in `each'
427
+ actionpack (5.2.1) lib/action_dispatch/journey/router.rb:35:in `serve'
428
+ actionpack (5.2.1) lib/action_dispatch/routing/route_set.rb:840:in `call'
429
+ rack (2.0.5) lib/rack/tempfile_reaper.rb:15:in `call'
430
+ rack (2.0.5) lib/rack/etag.rb:25:in `call'
431
+ rack (2.0.5) lib/rack/conditional_get.rb:38:in `call'
432
+ rack (2.0.5) lib/rack/head.rb:12:in `call'
433
+ actionpack (5.2.1) lib/action_dispatch/http/content_security_policy.rb:18:in `call'
434
+ rack (2.0.5) lib/rack/session/abstract/id.rb:232:in `context'
435
+ rack (2.0.5) lib/rack/session/abstract/id.rb:226:in `call'
436
+ actionpack (5.2.1) lib/action_dispatch/middleware/cookies.rb:670:in `call'
437
+ actionpack (5.2.1) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
438
+ activesupport (5.2.1) lib/active_support/callbacks.rb:98:in `run_callbacks'
439
+ actionpack (5.2.1) lib/action_dispatch/middleware/callbacks.rb:26:in `call'
440
+ actionpack (5.2.1) lib/action_dispatch/middleware/executor.rb:14:in `call'
441
+ actionpack (5.2.1) lib/action_dispatch/middleware/debug_exceptions.rb:61:in `call'
442
+ actionpack (5.2.1) lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
443
+ railties (5.2.1) lib/rails/rack/logger.rb:38:in `call_app'
444
+ railties (5.2.1) lib/rails/rack/logger.rb:26:in `block in call'
445
+ activesupport (5.2.1) lib/active_support/tagged_logging.rb:71:in `block in tagged'
446
+ activesupport (5.2.1) lib/active_support/tagged_logging.rb:28:in `tagged'
447
+ activesupport (5.2.1) lib/active_support/tagged_logging.rb:71:in `tagged'
448
+ railties (5.2.1) lib/rails/rack/logger.rb:26:in `call'
449
+ actionpack (5.2.1) lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
450
+ actionpack (5.2.1) lib/action_dispatch/middleware/request_id.rb:27:in `call'
451
+ rack (2.0.5) lib/rack/method_override.rb:22:in `call'
452
+ rack (2.0.5) lib/rack/runtime.rb:22:in `call'
453
+ activesupport (5.2.1) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
454
+ actionpack (5.2.1) lib/action_dispatch/middleware/executor.rb:14:in `call'
455
+ actionpack (5.2.1) lib/action_dispatch/middleware/static.rb:127:in `call'
456
+ rack (2.0.5) lib/rack/sendfile.rb:111:in `call'
457
+ railties (5.2.1) lib/rails/engine.rb:524:in `call'
458
+ rack (2.0.5) lib/rack/handler/webrick.rb:86:in `service'
459
+ /Users/nexoos_brasil/.rvm/rubies/ruby-2.5.3/lib/ruby/2.5.0/webrick/httpserver.rb:140:in `service'
460
+ /Users/nexoos_brasil/.rvm/rubies/ruby-2.5.3/lib/ruby/2.5.0/webrick/httpserver.rb:96:in `run'
461
+ /Users/nexoos_brasil/.rvm/rubies/ruby-2.5.3/lib/ruby/2.5.0/webrick/server.rb:307:in `block in start_thread'
462
+ Started POST "/clicksign-webhooks/event" for ::1 at 2018-10-29 16:25:27 -0300
463
+ Processing by Clicksign::Webhooks::EventsController#create as */*
464
+ Parameters: {"event"=>{"name"=>"invalid"}}
465
+ Completed 500 Internal Server Error in 2ms
466
+
467
+
468
+
469
+ NoMethodError (undefined method `Webhooks' for Clicksign:Module):
470
+
471
+ /Users/nexoos_brasil/dev/clicksign-webhooks/app/controllers/clicksign/webhooks/application_controller.rb:7:in `verify_hmac'
472
+ activesupport (5.2.1) lib/active_support/callbacks.rb:426:in `block in make_lambda'
473
+ activesupport (5.2.1) lib/active_support/callbacks.rb:198:in `block (2 levels) in halting'
474
+ actionpack (5.2.1) lib/abstract_controller/callbacks.rb:34:in `block (2 levels) in <module:Callbacks>'
475
+ activesupport (5.2.1) lib/active_support/callbacks.rb:199:in `block in halting'
476
+ activesupport (5.2.1) lib/active_support/callbacks.rb:513:in `block in invoke_before'
477
+ activesupport (5.2.1) lib/active_support/callbacks.rb:513:in `each'
478
+ activesupport (5.2.1) lib/active_support/callbacks.rb:513:in `invoke_before'
479
+ activesupport (5.2.1) lib/active_support/callbacks.rb:131:in `run_callbacks'
480
+ actionpack (5.2.1) lib/abstract_controller/callbacks.rb:41:in `process_action'
481
+ actionpack (5.2.1) lib/action_controller/metal/rescue.rb:22:in `process_action'
482
+ actionpack (5.2.1) lib/action_controller/metal/instrumentation.rb:34:in `block in process_action'
483
+ activesupport (5.2.1) lib/active_support/notifications.rb:168:in `block in instrument'
484
+ activesupport (5.2.1) lib/active_support/notifications/instrumenter.rb:23:in `instrument'
485
+ activesupport (5.2.1) lib/active_support/notifications.rb:168:in `instrument'
486
+ actionpack (5.2.1) lib/action_controller/metal/instrumentation.rb:32:in `process_action'
487
+ actionpack (5.2.1) lib/action_controller/metal/params_wrapper.rb:256:in `process_action'
488
+ actionpack (5.2.1) lib/abstract_controller/base.rb:134:in `process'
489
+ actionview (5.2.1) lib/action_view/rendering.rb:32:in `process'
490
+ actionpack (5.2.1) lib/action_controller/metal.rb:191:in `dispatch'
491
+ actionpack (5.2.1) lib/action_controller/metal.rb:252:in `dispatch'
492
+ actionpack (5.2.1) lib/action_dispatch/routing/route_set.rb:52:in `dispatch'
493
+ actionpack (5.2.1) lib/action_dispatch/routing/route_set.rb:34:in `serve'
494
+ actionpack (5.2.1) lib/action_dispatch/journey/router.rb:52:in `block in serve'
495
+ actionpack (5.2.1) lib/action_dispatch/journey/router.rb:35:in `each'
496
+ actionpack (5.2.1) lib/action_dispatch/journey/router.rb:35:in `serve'
497
+ actionpack (5.2.1) lib/action_dispatch/routing/route_set.rb:840:in `call'
498
+ railties (5.2.1) lib/rails/engine.rb:524:in `call'
499
+ railties (5.2.1) lib/rails/railtie.rb:190:in `public_send'
500
+ railties (5.2.1) lib/rails/railtie.rb:190:in `method_missing'
501
+ actionpack (5.2.1) lib/action_dispatch/routing/mapper.rb:19:in `block in <class:Constraints>'
502
+ actionpack (5.2.1) lib/action_dispatch/routing/mapper.rb:48:in `serve'
503
+ actionpack (5.2.1) lib/action_dispatch/journey/router.rb:52:in `block in serve'
504
+ actionpack (5.2.1) lib/action_dispatch/journey/router.rb:35:in `each'
505
+ actionpack (5.2.1) lib/action_dispatch/journey/router.rb:35:in `serve'
506
+ actionpack (5.2.1) lib/action_dispatch/routing/route_set.rb:840:in `call'
507
+ rack (2.0.5) lib/rack/tempfile_reaper.rb:15:in `call'
508
+ rack (2.0.5) lib/rack/etag.rb:25:in `call'
509
+ rack (2.0.5) lib/rack/conditional_get.rb:38:in `call'
510
+ rack (2.0.5) lib/rack/head.rb:12:in `call'
511
+ actionpack (5.2.1) lib/action_dispatch/http/content_security_policy.rb:18:in `call'
512
+ rack (2.0.5) lib/rack/session/abstract/id.rb:232:in `context'
513
+ rack (2.0.5) lib/rack/session/abstract/id.rb:226:in `call'
514
+ actionpack (5.2.1) lib/action_dispatch/middleware/cookies.rb:670:in `call'
515
+ actionpack (5.2.1) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
516
+ activesupport (5.2.1) lib/active_support/callbacks.rb:98:in `run_callbacks'
517
+ actionpack (5.2.1) lib/action_dispatch/middleware/callbacks.rb:26:in `call'
518
+ actionpack (5.2.1) lib/action_dispatch/middleware/executor.rb:14:in `call'
519
+ actionpack (5.2.1) lib/action_dispatch/middleware/debug_exceptions.rb:61:in `call'
520
+ actionpack (5.2.1) lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
521
+ railties (5.2.1) lib/rails/rack/logger.rb:38:in `call_app'
522
+ railties (5.2.1) lib/rails/rack/logger.rb:26:in `block in call'
523
+ activesupport (5.2.1) lib/active_support/tagged_logging.rb:71:in `block in tagged'
524
+ activesupport (5.2.1) lib/active_support/tagged_logging.rb:28:in `tagged'
525
+ activesupport (5.2.1) lib/active_support/tagged_logging.rb:71:in `tagged'
526
+ railties (5.2.1) lib/rails/rack/logger.rb:26:in `call'
527
+ actionpack (5.2.1) lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
528
+ actionpack (5.2.1) lib/action_dispatch/middleware/request_id.rb:27:in `call'
529
+ rack (2.0.5) lib/rack/method_override.rb:22:in `call'
530
+ rack (2.0.5) lib/rack/runtime.rb:22:in `call'
531
+ activesupport (5.2.1) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
532
+ actionpack (5.2.1) lib/action_dispatch/middleware/executor.rb:14:in `call'
533
+ actionpack (5.2.1) lib/action_dispatch/middleware/static.rb:127:in `call'
534
+ rack (2.0.5) lib/rack/sendfile.rb:111:in `call'
535
+ railties (5.2.1) lib/rails/engine.rb:524:in `call'
536
+ rack (2.0.5) lib/rack/handler/webrick.rb:86:in `service'
537
+ /Users/nexoos_brasil/.rvm/rubies/ruby-2.5.3/lib/ruby/2.5.0/webrick/httpserver.rb:140:in `service'
538
+ /Users/nexoos_brasil/.rvm/rubies/ruby-2.5.3/lib/ruby/2.5.0/webrick/httpserver.rb:96:in `run'
539
+ /Users/nexoos_brasil/.rvm/rubies/ruby-2.5.3/lib/ruby/2.5.0/webrick/server.rb:307:in `block in start_thread'
540
+ Started POST "/clicksign-webhooks/event" for ::1 at 2018-10-29 16:27:07 -0300
541
+ Processing by Clicksign::Webhooks::EventsController#create as */*
542
+ Parameters: {"event"=>{"name"=>"invalid"}}
543
+ Completed 500 Internal Server Error in 14790ms
544
+
545
+
546
+
547
+ SystemExit (exit):
548
+
549
+ (byebug):1:in `exit'
550
+ (byebug):1:in `create'
551
+ Started POST "/clicksign-webhooks/event" for ::1 at 2018-10-29 16:27:45 -0300
552
+ Processing by Clicksign::Webhooks::EventsController#create as */*
553
+ Parameters: {"event"=>{"name"=>"invalid"}}
554
+ Completed 500 Internal Server Error in 106924ms
555
+
556
+
557
+
558
+ SystemExit (exit):
559
+
560
+ (byebug):1:in `exit'
561
+ (byebug):1:in `create'
562
+ Started POST "/clicksign-webhooks/event" for ::1 at 2018-10-29 16:29:36 -0300
563
+ Processing by Clicksign::Webhooks::EventsController#create as */*
564
+ Parameters: {"event"=>{"name"=>"invalid"}}
565
+ Invalid configuration: on_invalid
566
+ Completed 422 Unprocessable Entity in 3ms
567
+
568
+
569
+ Started POST "/clicksign-webhooks/event" for ::1 at 2018-10-29 16:30:04 -0300
570
+ Processing by Clicksign::Webhooks::EventsController#create as */*
571
+ Parameters: {"event"=>{"name"=>"invalid"}}
572
+ Filter chain halted as :verify_hmac rendered or redirected
573
+ Completed 404 Not Found in 3ms
574
+
575
+
576
+ Started POST "/clicksign-webhooks/event" for ::1 at 2018-10-29 16:30:10 -0300
577
+ Processing by Clicksign::Webhooks::EventsController#create as */*
578
+ Parameters: {"event"=>{"name"=>"invalid"}}
579
+ Filter chain halted as :verify_hmac rendered or redirected
580
+ Completed 404 Not Found in 2ms
581
+
582
+
583
+ Started POST "/clicksign-webhooks/event" for ::1 at 2018-10-29 16:30:16 -0300
584
+ Processing by Clicksign::Webhooks::EventsController#create as */*
585
+ Parameters: {"event"=>{"name"=>"invalid"}}
586
+ Filter chain halted as :verify_hmac rendered or redirected
587
+ Completed 404 Not Found in 3ms
588
+
589
+
590
+ Started POST "/clicksign-webhooks/event" for ::1 at 2018-10-29 16:30:29 -0300
591
+ Processing by Clicksign::Webhooks::EventsController#create as */*
592
+ Parameters: {"event"=>{"name"=>"invalid"}}
593
+ Filter chain halted as :verify_hmac rendered or redirected
594
+ Completed 404 Not Found in 2ms
595
+
596
+
597
+ Started POST "/clicksign-webhooks/event" for ::1 at 2018-10-29 16:30:38 -0300
598
+ Processing by Clicksign::Webhooks::EventsController#create as */*
599
+ Parameters: {"event"=>{"name"=>"invalid"}}
600
+ Filter chain halted as :verify_hmac rendered or redirected
601
+ Completed 404 Not Found in 3ms
602
+
603
+
604
+ Started POST "/clicksign-webhooks/event" for ::1 at 2018-10-29 18:20:36 -0300
605
+ Processing by Clicksign::Webhooks::EventsController#create as */*
606
+ Parameters: {"event"=>{"name"=>"invalid"}}
607
+ Invalid configuration: on_invalid
608
+ Completed 422 Unprocessable Entity in 1ms
609
+
610
+
611
+ Started POST "/clicksign-webhooks/event" for ::1 at 2018-10-29 18:20:51 -0300
612
+ Processing by Clicksign::Webhooks::EventsController#create as */*
613
+ Parameters: {"event"=>{"name"=>"invalid"}}
614
+ Invalid configuration: on_invalid
615
+ Completed 422 Unprocessable Entity in 1ms
616
+
617
+
618
+ Started POST "/clicksign-webhooks/event" for ::1 at 2018-10-29 18:21:08 -0300
619
+ Processing by Clicksign::Webhooks::EventsController#create as */*
620
+ Parameters: {"event"=>{"name"=>"invalid"}}
621
+ Invalid configuration: on_invalid
622
+ Completed 422 Unprocessable Entity in 1ms
623
+
624
+
625
+ Started POST "/clicksign-webhooks/event" for ::1 at 2018-10-30 10:54:47 -0300
626
+ Processing by Clicksign::Webhooks::EventsController#create as */*
627
+ Parameters: {"event"=>{"name"=>"invalid"}}
628
+ Invalid configuration: on_invalid
629
+ Completed 422 Unprocessable Entity in 1ms
630
+
631
+
632
+ Started POST "/clicksign-webhooks/event" for ::1 at 2018-10-30 10:54:55 -0300
633
+ Processing by Clicksign::Webhooks::EventsController#create as */*
634
+ Parameters: {"event"=>{"name"=>"upload"}}
635
+ EVENT: upload
636
+ Completed 201 Created in 0ms
637
+
638
+
639
+ Started POST "/clicksign-webhooks/event" for ::1 at 2018-10-30 10:55:06 -0300
640
+ Processing by Clicksign::Webhooks::EventsController#create as */*
641
+ Parameters: {"event"=>{"name"=>"upload"}}
642
+ EVENT: upload
643
+ Completed 201 Created in 1ms
644
+
645
+
646
+ Started POST "/clicksign-webhooks/event" for ::1 at 2018-10-30 10:56:00 -0300
647
+ Processing by Clicksign::Webhooks::EventsController#create as */*
648
+ Parameters: {"event"=>{"name"=>"upload"}}
649
+ Invalid HMAC
650
+ Completed 401 Unauthorized in 3ms
651
+
652
+
653
+ Started POST "/clicksign-webhooks/event" for ::1 at 2018-10-30 10:59:50 -0300
654
+ Processing by Clicksign::Webhooks::EventsController#create as */*
655
+ Parameters: {"event"=>{"name"=>"upload"}}
656
+ Completed 500 Internal Server Error in 7854ms
657
+
658
+
659
+
660
+ SystemExit (exit):
661
+
662
+ (byebug):1:in `exit'
663
+ (byebug):1:in `create'
664
+ Invalid method call: new
665
+ Invalid method call: new
666
+ Invalid method call: new
667
+ Invalid method call: zon_cancel
668
+ Invalid method call: zon_cancel
669
+ Invalid method call: zon_cancel
670
+ Started POST "/clicksign-webhooks/event" for ::1 at 2018-10-30 15:31:27 -0300
671
+ Processing by Clicksign::Webhooks::EventsController#create as */*
672
+ Parameters: {"event"=>{"name"=>"upload"}}
673
+ Invalid HMAC
674
+ Completed 401 Unauthorized in 1ms
675
+
676
+
677
+ Started POST "/clicksign-webhooks/event" for ::1 at 2018-10-30 15:31:33 -0300
678
+ Processing by Clicksign::Webhooks::EventsController#create as */*
679
+ Parameters: {"event"=>{"name"=>"upload"}}
680
+ Invalid HMAC
681
+ Completed 401 Unauthorized in 0ms
682
+
683
+
684
+ Started POST "/clicksign-webhooks/event" for ::1 at 2018-10-30 15:31:56 -0300
685
+ Processing by Clicksign::Webhooks::EventsController#create as */*
686
+ Parameters: {"event"=>{"name"=>"upload"}}
687
+ EVENT: upload
688
+ Completed 201 Created in 0ms
689
+
690
+
691
+ Missing configuration: 1
692
+ Missing configuration: {}
693
+ Missing configuration:
694
+ Missing configuration: 11
695
+ Missing configuration: 11
696
+ Missing configuration: (irb):1:in `irb_binding'
697
+ Missing configuration for current event: 1
698
+ Missing configuration for current event: {}
699
+ Missing configuration for current event: {}
700
+ Missing configuration for current event: {}