souls 1.7.33 → 1.7.34

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: c07931ef30cc914dbc6e03e9b6eaf87411f927ff17917faf20c9d865308f808b
4
- data.tar.gz: ae6d456bc5df67d66b23393e6dbfd13492220d09266581a459bc323845e50884
3
+ metadata.gz: 25c619a30215d16befde46911bea7ba0427fa8097289ab923d0426ca2273517d
4
+ data.tar.gz: 8d2315ddb192e36cc674283a49bcc6df91cb6fcb0e1ff958ece61010d1ac143d
5
5
  SHA512:
6
- metadata.gz: c428b926587c8f911d055dfdc5d6a928fdcd3e9a3b1f007d9540198eb2ada384463e81d6fb4f550266bb91677c3606f00a81ea449f156e588fe3742888bc8552
7
- data.tar.gz: 05c5652223e43977a053dee4edc9d0c5dc2bce8e209286ec171c6992d443018ac42b44d0ca2ccef3c54532015aef95f8d9f979208ad14a2c6320ae43ff75a6f3
6
+ metadata.gz: f0df6dd7f748b84bec722a59aff91af7c1e80556d6417df9e74f08556a40e29f8fd68bece82ce97ad675004b635abf842d466580b3b6098719062a8c7cb8a351
7
+ data.tar.gz: 9be13096ecb8fc5ed4dcd6369108fc80cf2144ac753da28ac4e11816ff1dc764c4215affce7a431655d54888dec2e695441932409cb85956948b819f11a8cf25
@@ -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
@@ -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,4 +1,4 @@
1
1
  module Souls
2
- VERSION = "1.7.33".freeze
2
+ VERSION = "1.7.34".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 1.7.33
1
+ 1.7.34
@@ -1 +1 @@
1
- 1.7.33
1
+ 1.7.34
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.33
4
+ version: 1.7.34
5
5
  platform: ruby
6
6
  authors:
7
7
  - POPPIN-FUMI