souls 1.12.1 → 1.12.5

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: 5891050de11dc08e88a74d2f0aed0751ec65f43eae41658442e2937ecee44ee3
4
- data.tar.gz: 590035d7d3c434261b731e33824d944de9d92543cd8241eb07d964c9952772e9
3
+ metadata.gz: 76ea8477f283467da48f1a39c654ef05bb1c647f1353ba372a2e2eab3e2c9da7
4
+ data.tar.gz: 7a00b7c892c236cfbe63172ac1bfcf1cab904c85a43a3cf3cfd3f036d4307f0d
5
5
  SHA512:
6
- metadata.gz: fcf21e13e208ca4189bc10fdc6f74b7ca7f2a5000a6550d7d97e28ea378ed071be968c2346daed4ec068cefe45156501da676fd9455f190c6f307cc863db3183
7
- data.tar.gz: 20519950d4d793c6b3147c562e90f55492624ded7745dfe3e843367bd9d1f1d6164f2edf655a1f586e55d8cee1180cb999a5be0e776edc1b541b4534ac84e1f5
6
+ metadata.gz: 6953a337239fa68f7f0645256897c1832362b54fb572951776b31095e6134dbabd18a79299aea1eaefe55c27d3548489eef1f5b2b42bd12e13dde28d7a6079b2
7
+ data.tar.gz: '058e5a99f010a13805803da15715378ec73cd87ffd507dcd28740779502657295ef94e794b2a01c6a1e7fe439cd7fab7b05bc4e12d34d69b1055752685700801'
@@ -1,3 +1,3 @@
1
1
  FirebaseIdToken.configure do |config|
2
- config.project_ids = [ENV["GCP_PROJECT_ID"]]
2
+ config.project_ids = [ENV["SOULS_GCP_PROJECT_ID"]]
3
3
  end
@@ -43,7 +43,7 @@ module Souls
43
43
 
44
44
  def self.write_log(message)
45
45
  entry = configuration.logger.entry
46
- entry.payload = "#{message}\n #{message.backtrace.join("\n")}"
46
+ entry.payload = message.backtrace.nil? ? "#{message}\n" : "#{message}\n #{message.backtrace.join("\n")}"
47
47
  entry.log_name = "error"
48
48
  entry.resource.type = "cloud_run_revision"
49
49
  entry.resource.labels[:service_name] = "souls"
@@ -4,11 +4,16 @@ module Souls
4
4
  def setup_key
5
5
  region = Souls.configuration.region
6
6
  Souls::Gcloud.new.auth_login
7
+ Souls::Upgrade.new.config
7
8
  create_service_account
8
9
  create_service_account_key
9
10
  Souls::Gcloud.new.enable_permissions
10
11
  add_permissions
11
- system("gcloud app create --region=#{region} --quiet")
12
+ begin
13
+ system("gcloud app create --region=#{region} --quiet")
14
+ rescue StandardError, error
15
+ puts("gcloud app region is Already exist! - Souls::Gcloud::Iam.setup_key")
16
+ end
12
17
  begin
13
18
  set_gh_secret_json
14
19
  rescue StandardError
@@ -95,7 +100,8 @@ module Souls
95
100
  "roles/storage.admin",
96
101
  "roles/storage.objectAdmin",
97
102
  "roles/cloudscheduler.admin",
98
- "roles/appengine.appCreator"
103
+ "roles/appengine.appCreator",
104
+ "roles/logging.admin"
99
105
  ]
100
106
  roles.each do |role|
101
107
  add_service_account_role(role: role)
@@ -13,7 +13,7 @@ module Souls
13
13
  db_type = options[:mysql] ? "MYSQL_8_0" : "POSTGRES_13"
14
14
 
15
15
  zone = "#{region}-b"
16
- system("gcloud config set project #{project_id}")
16
+ system("gcloud config set project #{project_id} >/dev/null 2>&1")
17
17
  system(
18
18
  "gcloud sql instances create #{instance_name} \
19
19
  --database-version=#{db_type} --cpu=1 --memory=4096MB --zone=#{zone} \
@@ -4,6 +4,11 @@ module Souls
4
4
  method_option :mutation, aliases: "--mutation", required: true, desc: "Mutation File Name"
5
5
  def manager(class_name)
6
6
  singularized_class_name = class_name.underscore.singularize
7
+ current_path = FileUtils.pwd
8
+ unless current_path.split("/").last == "api" || current_path.split("/").last == "souls"
9
+ raise(StandardError, "You Are at Wrong Directory! Please Go to Api Directory!")
10
+ end
11
+
7
12
  create_manager(class_name, options[:mutation])
8
13
  Souls::Generate.new.invoke(:manager_rbs, [singularized_class_name], { mutation: options[:mutation] })
9
14
  Souls::Generate.new.invoke(:rspec_manager, [singularized_class_name], { mutation: options[:mutation] })
@@ -25,15 +30,13 @@ module Souls
25
30
  class #{mutation.underscore.camelize} < BaseMutation
26
31
  description "#{mutation} description"
27
32
  ## Edit `argument` and `field`
28
- argument :argument, String, required: true
33
+ argument :argument, String, required: false
29
34
 
30
35
  field :response, String, null: false
31
36
 
32
37
  def resolve(args)
33
38
  # Define Here
34
39
  { response: "success!" }
35
- rescue StandardError => e
36
- GraphQL::ExecutionError.new(e.message)
37
40
  end
38
41
  end
39
42
  end
@@ -25,7 +25,7 @@ module Souls
25
25
  update_api_env(key: key, value: value, dqm: options[:dqm])
26
26
  update_workers_env(key: key, value: value, dqm: options[:dqm])
27
27
  update_github_actions(key: key)
28
- Souls::Github.new.invoke(:secret_set)
28
+ system("gh secret set #{key} -b \"#{value.strip}\"")
29
29
  end
30
30
 
31
31
  desc "watch", "Watch GitHub Actions Workflow"
@@ -104,7 +104,7 @@ module Souls
104
104
  file_paths.each do |file_path|
105
105
  worker_workflow = File.readlines(file_path)
106
106
  worker_workflow[worker_workflow.size - 1] = worker_workflow.last.chomp
107
- worker_workflow << "\\ \n --set-env-vars=\"#{key.upcase}=${{ secrets.#{key.upcase} }}\""
107
+ worker_workflow << " \\\n --set-env-vars=\"#{key.upcase}=${{ secrets.#{key.upcase} }}\""
108
108
  File.open(file_path, "w") { |f| f.write(worker_workflow.join) }
109
109
  puts(Paint % ["Updated file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }])
110
110
  end
@@ -25,5 +25,8 @@ module Souls
25
25
  File.open(api_conf_path, "w") { |f| f.write(api_conf.join) }
26
26
  end
27
27
  end
28
+ # rubocop:disable Style/StringHashKeys
29
+ map "conf" => "config"
30
+ # rubocop:enable Style/StringHashKeys
28
31
  end
29
32
  end
data/lib/souls/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Souls
2
- VERSION = "1.12.1".freeze
2
+ VERSION = "1.12.5".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 1.12.1
1
+ 1.12.5
@@ -1 +1 @@
1
- 1.12.1
1
+ 1.12.5
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.12.1
4
+ version: 1.12.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - POPPIN-FUMI
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2021-12-10 00:00:00.000000000 Z
13
+ date: 2021-12-12 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport