souls 1.7.30 → 1.7.34
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 25c619a30215d16befde46911bea7ba0427fa8097289ab923d0426ca2273517d
|
|
4
|
+
data.tar.gz: 8d2315ddb192e36cc674283a49bcc6df91cb6fcb0e1ff958ece61010d1ac143d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f0df6dd7f748b84bec722a59aff91af7c1e80556d6417df9e74f08556a40e29f8fd68bece82ce97ad675004b635abf842d466580b3b6098719062a8c7cb8a351
|
|
7
|
+
data.tar.gz: 9be13096ecb8fc5ed4dcd6369108fc80cf2144ac753da28ac4e11816ff1dc764c4215affce7a431655d54888dec2e695441932409cb85956948b819f11a8cf25
|
|
@@ -77,7 +77,7 @@ module Souls
|
|
|
77
77
|
|
|
78
78
|
def resolve
|
|
79
79
|
# First, instantiate the Mailgun Client with your API key
|
|
80
|
-
mg_client = ::Mailgun::Client.new(
|
|
80
|
+
mg_client = ::Mailgun::Client.new(ENV['MAILGUN_KEY'])
|
|
81
81
|
|
|
82
82
|
# Define your message parameters
|
|
83
83
|
message_params = {
|
|
@@ -88,7 +88,7 @@ module Souls
|
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
# Send your message through the client
|
|
91
|
-
mg_client.send_message(
|
|
91
|
+
mg_client.send_message(ENV['MAILGUN_DOMAIN'], message_params)
|
|
92
92
|
{ response: "Job done!" }
|
|
93
93
|
rescue StandardError => e
|
|
94
94
|
GraphQL::ExecutionError.new(e.to_s)
|
|
@@ -6,8 +6,10 @@ module Souls
|
|
|
6
6
|
file_path = ".env.production"
|
|
7
7
|
File.open(file_path, "r") do |file|
|
|
8
8
|
file.each_line do |line|
|
|
9
|
-
key_and_value = line.
|
|
10
|
-
|
|
9
|
+
key_and_value = line.match(/([A-Z_]+)="?([^"]*)"?/)
|
|
10
|
+
next if key_and_value.nil?
|
|
11
|
+
|
|
12
|
+
system("gh secret set #{key_and_value[1]} -b \"#{key_and_value[2]}\"")
|
|
11
13
|
end
|
|
12
14
|
end
|
|
13
15
|
end
|
|
@@ -74,9 +76,10 @@ module Souls
|
|
|
74
76
|
Dir.chdir(Souls.get_mother_path.to_s) do
|
|
75
77
|
file_paths = Dir[".github/workflows/*.yml"]
|
|
76
78
|
file_paths.each do |file_path|
|
|
77
|
-
File.
|
|
78
|
-
|
|
79
|
-
|
|
79
|
+
worker_workflow = File.readlines(file_path)
|
|
80
|
+
worker_workflow[worker_workflow.size - 1] = worker_workflow.last.chomp
|
|
81
|
+
worker_workflow << " \\ \n --set-env-vars=\"#{key.upcase}=${{ secrets.#{key.upcase} }}\""
|
|
82
|
+
File.open(file_path, "w") { |f| f.write(worker_workflow.join) }
|
|
80
83
|
puts(Paint % ["Updated file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }])
|
|
81
84
|
end
|
|
82
85
|
end
|
data/lib/souls/cli/sync/model.rb
CHANGED
|
@@ -9,6 +9,7 @@ module Souls
|
|
|
9
9
|
cp_dir = %w[db app/models spec/factories]
|
|
10
10
|
cp_dir.each do |dir|
|
|
11
11
|
cp_and_dl_files(dir: dir)
|
|
12
|
+
cp_env_files
|
|
12
13
|
end
|
|
13
14
|
puts(Paint % ["Synced! : %{white_text}", :green, { white_text: [cp_dir.to_s, :white] }])
|
|
14
15
|
rescue Thor::Error => e
|
|
@@ -23,6 +24,7 @@ module Souls
|
|
|
23
24
|
worker_paths.each do |path|
|
|
24
25
|
cp_path = "./apps/api/#{dir}"
|
|
25
26
|
old_path = "./apps/#{path}/#{dir}"
|
|
27
|
+
|
|
26
28
|
system("rm -rf #{old_path}", chdir: Souls.get_mother_path)
|
|
27
29
|
system("mkdir -p #{old_path}", chdir: Souls.get_mother_path)
|
|
28
30
|
system("cp -r #{cp_path}/* #{old_path}", chdir: Souls.get_mother_path)
|
|
@@ -30,5 +32,15 @@ module Souls
|
|
|
30
32
|
# Do nothing
|
|
31
33
|
end
|
|
32
34
|
end
|
|
35
|
+
|
|
36
|
+
def cp_env_files
|
|
37
|
+
return unless system("cat ./apps/api/.env", out: File::NULL, chdir: Souls.get_mother_path)
|
|
38
|
+
|
|
39
|
+
worker_paths = Souls.configuration.workers.map { |n| n[:name].split("-").last }
|
|
40
|
+
worker_paths.each do |path|
|
|
41
|
+
system("rm ./apps/#{path}/.env", chdir: Souls.get_mother_path)
|
|
42
|
+
system("cp ./apps/api/.env #{apps}/path/.env", chdir: Souls.get_mother_path)
|
|
43
|
+
end
|
|
44
|
+
end
|
|
33
45
|
end
|
|
34
46
|
end
|
data/lib/souls/version.rb
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.7.
|
|
1
|
+
1.7.34
|
|
@@ -1 +1 @@
|
|
|
1
|
-
1.7.
|
|
1
|
+
1.7.34
|