reducto_ai 0.2.3 → 0.2.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 +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/reducto_ai/version.rb +1 -1
- data/lib/reducto_ai/webhooks/verifier.rb +4 -1
- metadata +11 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 127dfcd60acb9010689d6e348887efd91a5b8c6b90c9c11522bcf6066b410e5b
|
|
4
|
+
data.tar.gz: e11c1568c6518cb4df6065ed368ddb5b77a917f447203cb23509833aee7bfa33
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e413a2350fd0037ad6e34c0cfdc6380e25f7dbba3c5f55ebe4931df0805dd43c0b45e02c36dc6e8ec44fe0bf891f736b4bb34e467034313c40832c6fc29339b1
|
|
7
|
+
data.tar.gz: 98e5d3f5bb576cb143dbf2a49af03ee3bd6d38a92da7dc42e739357af17c92d120dc0d0b9e4fdff9cb713773a8e4fa3078dc5ec2125e4091324c8c972f2cc67e
|
data/CHANGELOG.md
CHANGED
data/lib/reducto_ai/version.rb
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require "json"
|
|
3
4
|
require "svix"
|
|
4
5
|
|
|
5
6
|
module ReductoAI
|
|
@@ -12,7 +13,9 @@ module ReductoAI
|
|
|
12
13
|
|
|
13
14
|
raise WebhookVerificationError, "webhook secret is required" if resolved_secret.to_s.strip.empty?
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
payload_string = payload.to_s
|
|
17
|
+
build_webhook(resolved_secret).verify(payload_string, normalized_headers)
|
|
18
|
+
JSON.parse(payload_string, symbolize_names: true)
|
|
16
19
|
rescue Svix::WebhookVerificationError => e
|
|
17
20
|
raise WebhookVerificationError, e.message
|
|
18
21
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: reducto_ai
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- dpaluy
|
|
@@ -55,16 +55,22 @@ dependencies:
|
|
|
55
55
|
name: svix
|
|
56
56
|
requirement: !ruby/object:Gem::Requirement
|
|
57
57
|
requirements:
|
|
58
|
-
- - "
|
|
58
|
+
- - ">="
|
|
59
59
|
- !ruby/object:Gem::Version
|
|
60
|
-
version: '1
|
|
60
|
+
version: '1'
|
|
61
|
+
- - "<"
|
|
62
|
+
- !ruby/object:Gem::Version
|
|
63
|
+
version: '3'
|
|
61
64
|
type: :runtime
|
|
62
65
|
prerelease: false
|
|
63
66
|
version_requirements: !ruby/object:Gem::Requirement
|
|
64
67
|
requirements:
|
|
65
|
-
- - "
|
|
68
|
+
- - ">="
|
|
66
69
|
- !ruby/object:Gem::Version
|
|
67
|
-
version: '1
|
|
70
|
+
version: '1'
|
|
71
|
+
- - "<"
|
|
72
|
+
- !ruby/object:Gem::Version
|
|
73
|
+
version: '3'
|
|
68
74
|
description: ReductoAI provides a lightweight Faraday-based wrapper for Reducto's
|
|
69
75
|
Parse, Split, Extract, Edit, and Pipeline endpoints including async helpers and
|
|
70
76
|
Rails-friendly configuration.
|