embed_workflow 0.0.1 → 0.1.0
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/lib/embed_workflow/catch_hook.rb +24 -0
- data/lib/embed_workflow/version.rb +1 -1
- data/lib/embed_workflow/workflows.rb +6 -7
- data/lib/embed_workflow.rb +5 -0
- metadata +5 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c3fb9638ce655db35c59a036d08ffd08b38bfcc04391e9bd3da8d66d0eb4bc4
|
4
|
+
data.tar.gz: 5c54e0f84a92afe9e8c70bdf2fe27b6c0a03b6b380eac907cb20481705210389
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f479225062e4d0165e0d5bc138102b3a225b3dbfb5d73d01dd30b8cd37c8ab27216e9cfe7c80f9a61b8d5e1991ee52b32837d2d17af8651085fcbdbd511b804
|
7
|
+
data.tar.gz: 7c5bfa850d070b851003c6f170ef0d85362860aab59928ebb6ff6f1e036b389d10c75bf086539dceb9e6cfa4b270aa68d7cca8cdcb3006978e38d05056abe2f3
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "net/http"
|
4
|
+
require "uri"
|
5
|
+
|
6
|
+
module EmbedWorkflow
|
7
|
+
module CatchHook
|
8
|
+
class << self
|
9
|
+
include Base
|
10
|
+
include Client
|
11
|
+
|
12
|
+
RESOURCE_BASE_PATH = "#{BASE_API_PATH}/hooks".freeze
|
13
|
+
|
14
|
+
def create(hook_id:, user_key:, **rest)
|
15
|
+
attrs = { user_key: user_key }.merge(rest).compact
|
16
|
+
|
17
|
+
post_request(
|
18
|
+
path: "#{RESOURCE_BASE_PATH}/#{hook_id}/catch",
|
19
|
+
body: attrs
|
20
|
+
)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -11,13 +11,13 @@ module EmbedWorkflow
|
|
11
11
|
|
12
12
|
RESOURCE_BASE_PATH = "#{BASE_API_PATH}/workflows"
|
13
13
|
|
14
|
-
def create(name:, template: nil,
|
14
|
+
def create(name:, template: nil, user_key: nil, event_trigger: nil, trigger_conditions: nil)
|
15
15
|
attrs = {
|
16
16
|
name: name,
|
17
17
|
template: template,
|
18
|
-
|
19
|
-
|
20
|
-
|
18
|
+
event_trigger: event_trigger,
|
19
|
+
trigger_conditions: trigger_conditions,
|
20
|
+
user_key: user_key
|
21
21
|
}
|
22
22
|
|
23
23
|
post_request(
|
@@ -32,12 +32,11 @@ module EmbedWorkflow
|
|
32
32
|
)
|
33
33
|
end
|
34
34
|
|
35
|
-
def update(hashid:, name: nil, template: nil,
|
35
|
+
def update(hashid:, name: nil, template: nil, user_key: nil)
|
36
36
|
attrs = {
|
37
37
|
name: name,
|
38
38
|
template: template,
|
39
|
-
|
40
|
-
context: context
|
39
|
+
user_key: user_key
|
41
40
|
}.compact
|
42
41
|
|
43
42
|
put_request(
|
data/lib/embed_workflow.rb
CHANGED
@@ -22,6 +22,7 @@ module EmbedWorkflow
|
|
22
22
|
autoload :Actions, "embed_workflow/actions"
|
23
23
|
autoload :Executions, "embed_workflow/executions"
|
24
24
|
autoload :Trigger, "embed_workflow/trigger"
|
25
|
+
autoload :CatchHook, "embed_workflow/catch_hook"
|
25
26
|
autoload :Users, "embed_workflow/users"
|
26
27
|
autoload :Workflows, "embed_workflow/workflows"
|
27
28
|
|
@@ -32,4 +33,8 @@ module EmbedWorkflow
|
|
32
33
|
def self.trigger(**args)
|
33
34
|
Trigger.create(**args)
|
34
35
|
end
|
36
|
+
|
37
|
+
def self.catch_hook(**args)
|
38
|
+
CatchHook.create(**args)
|
39
|
+
end
|
35
40
|
end
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: embed_workflow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Embed Workflow
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-03-05 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: bundler
|
@@ -62,6 +61,7 @@ files:
|
|
62
61
|
- lib/embed_workflow.rb
|
63
62
|
- lib/embed_workflow/actions.rb
|
64
63
|
- lib/embed_workflow/base.rb
|
64
|
+
- lib/embed_workflow/catch_hook.rb
|
65
65
|
- lib/embed_workflow/client.rb
|
66
66
|
- lib/embed_workflow/errors.rb
|
67
67
|
- lib/embed_workflow/executions.rb
|
@@ -73,8 +73,7 @@ homepage: https://github.com/embedworkflow/embed-workflow-ruby
|
|
73
73
|
licenses:
|
74
74
|
- MIT
|
75
75
|
metadata:
|
76
|
-
documentation_uri: https://
|
77
|
-
post_install_message:
|
76
|
+
documentation_uri: https://docs.embedworkflow.com
|
78
77
|
rdoc_options: []
|
79
78
|
require_paths:
|
80
79
|
- lib
|
@@ -89,8 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
89
88
|
- !ruby/object:Gem::Version
|
90
89
|
version: '0'
|
91
90
|
requirements: []
|
92
|
-
rubygems_version: 3.
|
93
|
-
signing_key:
|
91
|
+
rubygems_version: 3.6.2
|
94
92
|
specification_version: 4
|
95
93
|
summary: API client for Embed Workflow
|
96
94
|
test_files: []
|