hooksmith 0.1.0 → 0.1.1
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 +4 -4
- data/hooksmith-0.1.0.gem +0 -0
- data/lib/hooksmith/configuration.rb +6 -6
- data/lib/hooksmith/dispatcher.rb +1 -1
- data/lib/hooksmith/version.rb +1 -1
- metadata +6 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f854886a5db2a889088434912c1ee095998ec9cf1c6f1fab8a516e4d9de3fe2a
|
4
|
+
data.tar.gz: 3cfe3db3c0746db88d5d3cf8a9f4b40e5fcecd5f1e204f74eaea7123aca1f6a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eed80e32167d30bad4ddcfd39483517ba61ec5c8644cd71e9bc0a2b6d9bc138b937c0699034b686358155145705dc0d2fd3f731d4ce5a23eb4e59d66c798be6d
|
7
|
+
data.tar.gz: 48fa0d24f3b0e6f236c69eb809d71ec2b689c63eca38760484283459048bb6df5d5b0e7fc240306a204c41a68a3a60d21d064f1c86577f473f26fb61686b23f9
|
data/hooksmith-0.1.0.gem
ADDED
Binary file
|
@@ -27,9 +27,9 @@ module Hooksmith
|
|
27
27
|
#
|
28
28
|
# @param provider [Symbol, String] the provider name
|
29
29
|
# @param event [Symbol, String] the event name
|
30
|
-
# @param
|
31
|
-
def register_processor(provider, event,
|
32
|
-
registry[provider.to_sym] << { event: event.to_sym, processor:
|
30
|
+
# @param processor_class_name [String] the processor class name
|
31
|
+
def register_processor(provider, event, processor_class_name)
|
32
|
+
registry[provider.to_sym] << { event: event.to_sym, processor: processor_class_name }
|
33
33
|
end
|
34
34
|
|
35
35
|
# Returns all processor entries for a given provider and event.
|
@@ -57,9 +57,9 @@ module Hooksmith
|
|
57
57
|
# Registers a processor for a specific event.
|
58
58
|
#
|
59
59
|
# @param event [Symbol, String] the event name.
|
60
|
-
# @param
|
61
|
-
def register(event,
|
62
|
-
entries << { event: event.to_sym, processor:
|
60
|
+
# @param processor_class_name [String] the processor class name.
|
61
|
+
def register(event, processor_class_name)
|
62
|
+
entries << { event: event.to_sym, processor: processor_class_name }
|
63
63
|
end
|
64
64
|
end
|
65
65
|
end
|
data/lib/hooksmith/dispatcher.rb
CHANGED
@@ -33,7 +33,7 @@ module Hooksmith
|
|
33
33
|
|
34
34
|
# Instantiate each processor and filter by condition.
|
35
35
|
matching_processors = entries.map do |entry|
|
36
|
-
processor = entry[:processor].new(@payload)
|
36
|
+
processor = Object.const_get(entry[:processor]).new(@payload)
|
37
37
|
processor if processor.can_handle?(@payload)
|
38
38
|
end.compact
|
39
39
|
|
data/lib/hooksmith/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hooksmith
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- gregoryrivage
|
@@ -10,6 +10,10 @@ cert_chain: []
|
|
10
10
|
date: 2025-03-12 00:00:00.000000000 Z
|
11
11
|
dependencies: []
|
12
12
|
description: Hooksmith is a gem that allows you to handle webhooks in your Rails application.
|
13
|
+
It provides a simple and flexible way to receive, validate, and process webhooks
|
14
|
+
from various services. With Hooksmith, you can easily configure webhook endpoints,
|
15
|
+
handle authentication, retry failed webhooks, and manage webhook payloads in a consistent
|
16
|
+
manner.
|
13
17
|
email:
|
14
18
|
- gregory@rivage.immo
|
15
19
|
executables: []
|
@@ -23,6 +27,7 @@ files:
|
|
23
27
|
- LICENSE.txt
|
24
28
|
- README.md
|
25
29
|
- Rakefile
|
30
|
+
- hooksmith-0.1.0.gem
|
26
31
|
- lib/hooksmith.rb
|
27
32
|
- lib/hooksmith/configuration.rb
|
28
33
|
- lib/hooksmith/dispatcher.rb
|