-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopts.rb
79 lines (72 loc) · 2.49 KB
/
opts.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
require "json"
space_slug = "training"
space_name = "Training Template"
scheme = "https"
domain = "kinops.io"
integration_username = "integration-user"
integration_password = "changeit"
task_signature_secret = "1234asdf5678jkl;"
requesting_user_displayname = "Some User"
requesting_user_username = "some.user@example.com"
requesting_user_email = "some.user@example.com"
smtp_server = ""
smtp_port = "587"
smtp_tls = "true"
smtp_username = "sample-user"
smtp_password = "changeit"
smtp_from_address = "support@example.com"
opts = {
"core" => {
"api" => "#{scheme}://#{space_slug}.#{domain}/app/api/v1",
"agent_api" => "#{scheme}://#{space_slug}.#{domain}/app/components/agents/system/app/api/v1",
"proxy_url" => "#{scheme}://#{space_slug}.#{domain}/app/components",
"server" => "#{scheme}://#{space_slug}.#{domain}",
"space_slug" => "#{space_slug}",
"space_name" => "#{space_name}",
"service_user_username" => "#{integration_username}",
"service_user_password" => "#{integration_password}",
"task_api_v1" => "#{scheme}://#{space_slug}.#{domain}/app/components/task/app/api/v1",
"task_api_v2" => "#{scheme}://#{space_slug}.#{domain}/app/components/task/app/api/v2"
},
"task" => {
"api" => "#{scheme}://#{space_slug}.#{domain}/kinetic-task/app/api/v1",
"api_v2" => "#{scheme}://#{space_slug}.#{domain}/kinetic-task/app/api/v2",
"component_type" => "task",
"server" => "#{scheme}://#{space_slug}.#{domain}/kinetic-task",
"space_slug" => "#{space_slug}",
"signature_secret" => "#{task_signature_secret}"
},
"http_options" => {
"log_level" => "info",
"log_output" => "stdout"
},
"data" => {
"requesting_user" => {
"username" => "#{requesting_user_username}",
"displayName" => "#{requesting_user_displayname}",
"email" => "#{requesting_user_email}",
},
"users" => [],
"space" => {
"attributesMap" => {
"Platform Host URL" => [ "#{scheme}://#{space_slug}.#{domain}" ]
}
},
"handlers" => {
"kinetic_core_system_api_v1" => {
"api_username" => "#{integration_username}",
"api_password" => "#{integration_password}",
"api_location" => "#{scheme}://#{space_slug}.#{domain}/app/api/v1"
}
},
"smtp" => {
"server" => "#{smtp_server}",
"port" => "#{smtp_port}",
"tls" => "#{smtp_tls}",
"username" => "#{smtp_username}",
"password" => "#{smtp_password}",
"from_address" => "#{smtp_from_address}"
}
}
}
puts opts.to_json.inspect