souls 1.7.31 → 1.7.36

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dacaa8204429d10d4c47a1f13dcff780c1e9984314b297d7e99142e34025b4a4
4
- data.tar.gz: 2f75725f2aa4c2364b2a5590408b964079644add22f104a58d7dc805fb21f5f7
3
+ metadata.gz: a7ee9d4f6e8bf7b52ca5903e041ed577174f072a04acdb52c9cb0b65612ec1d7
4
+ data.tar.gz: 06073c4a087485d3edf678e1b3010201b8ed703eba8a24a4396e0f118d64bbb1
5
5
  SHA512:
6
- metadata.gz: 60ceef310ddad467a8c0c54461ece1958e6c27cf707804eee71afd6fa0100554c5ef1e8ca58df63dfb0118aacb8e18ed1d03010d30b57261a35c2fc729987ffe
7
- data.tar.gz: 9da15cc3507dbbbdbc2019dd118d2b674750c08c0ec61737dddc28fe450615b1027149eb56e423cae8796e617d80dcecdf63020197610b513ab1db8477742eb0
6
+ metadata.gz: ae6ad8c7a40c866fa4b5eb0e5a2b6ed7065db367b896032a2b7047c98164f32d515acad4198f3a3c68716d4fa41c1862568f1d10914472c4ad439a83e122b893
7
+ data.tar.gz: 7dee04160574b5644a25de0ef32d036ffef71f5dfb1320c29ac3b183b155dab244ff4be687295e1c9dc10c85578a5e3d7ff48140bb8c347b7b85303745cab422
@@ -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("YOUR-API-KEY")
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("YOUR-MAILGUN-DOMAIN", message_params)
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.split("=")
10
- system("gh secret set #{key_and_value[0]} -b \"#{key_and_value[1].strip}\"")
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
@@ -73,7 +75,6 @@ module Souls
73
75
  def update_github_actions(key:)
74
76
  Dir.chdir(Souls.get_mother_path.to_s) do
75
77
  file_paths = Dir[".github/workflows/*.yml"]
76
- file_paths.delete(".github/workflows/api.yml")
77
78
  file_paths.each do |file_path|
78
79
  worker_workflow = File.readlines(file_path)
79
80
  worker_workflow[worker_workflow.size - 1] = worker_workflow.last.chomp
@@ -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 -f ./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,4 +1,4 @@
1
1
  module Souls
2
- VERSION = "1.7.31".freeze
2
+ VERSION = "1.7.36".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 1.7.31
1
+ 1.7.36
@@ -1 +1 @@
1
- 1.7.31
1
+ 1.7.36
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: souls
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.31
4
+ version: 1.7.36
5
5
  platform: ruby
6
6
  authors:
7
7
  - POPPIN-FUMI