souls 0.54.2 → 0.54.6

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: df370fcafee471255bd58aa1e7266cf7c06afeaa4a8f3571d9cdb2ca2df20430
4
- data.tar.gz: 27ff1a8407d23d1559809b9a3724c87830d2faf50101ab1b078e794979b2f301
3
+ metadata.gz: c1fc9772856d936fd0736885d412e15d60094daec790001e2c530c0a05e758c3
4
+ data.tar.gz: ca5a614a7c34c6002769d2dceb720d7036ce1bfa376217dd1d1d50e9a637257b
5
5
  SHA512:
6
- metadata.gz: 5af779a18af112e94dd828aedbfd49d2f334eebcaab1d159b8bcd734f50d13c49532390d9840156c0af4d16ada10c5630176082eddda39704cfb18b107b70c87
7
- data.tar.gz: 658a2da10a07f24459079389d0d4e82e3601dc068ca27db63d1c066b6c94d4f970c13ee585feb96a61ff4af11130d8aff31bbb8d1e52ac4999ef4c66da91fd88
6
+ metadata.gz: '0968ce4aac80f3f22da301a0c89dd69b00628730010d3ea07609c6dc50d8d524d2996f4ea28cf301c08e90168376266a5be3260588fd8e9950c0df34018f0809'
7
+ data.tar.gz: 55c05a2a726b45f991cfb8c98f36abc6e3486d52a38a15987c7fe783a4afb6194fd4e76bc77b26a003d0b380fcbadd474331acbfa0754db7748c92c60beab087
data/exe/souls CHANGED
@@ -11,7 +11,6 @@ begin
11
11
  "help",
12
12
  "api",
13
13
  "create",
14
- "gcloud",
15
14
  "worker",
16
15
  "",
17
16
  nil
@@ -20,7 +20,7 @@ module Souls
20
20
 
21
21
  field :response, String, null: false
22
22
 
23
- def resolve(**args)
23
+ def resolve(args)
24
24
  # Define Here
25
25
  rescue StandardError => e
26
26
  GraphQL::ExecutionError.new(e.to_s)
@@ -55,13 +55,13 @@ module Souls
55
55
  if @user_exist
56
56
  new_line.write(<<-TEXT)
57
57
 
58
- def resolve **args
58
+ def resolve args
59
59
  args[:user_id] = context[:user].id
60
60
  TEXT
61
61
  else
62
62
  new_line.write(<<-TEXT)
63
63
 
64
- def resolve **args
64
+ def resolve args
65
65
  TEXT
66
66
  end
67
67
  break
@@ -109,7 +109,7 @@ module Souls
109
109
 
110
110
  { #{class_name}_edge: { node: data } }
111
111
  rescue StandardError => error
112
- GraphQL::ExecutionError.new error
112
+ GraphQL::ExecutionError.new(error.message)
113
113
  end
114
114
  end
115
115
  end
@@ -149,14 +149,14 @@ module Souls
149
149
  if @user_exist
150
150
  new_line.write(<<-TEXT)
151
151
 
152
- def resolve **args
152
+ def resolve args
153
153
  args[:user_id] = context[:user].id
154
154
  _, args[:id] = SoulsApiSchema.from_global_id(args[:id])
155
155
  TEXT
156
156
  else
157
157
  new_line.write(<<-TEXT)
158
158
 
159
- def resolve **args
159
+ def resolve args
160
160
  _, args[:id] = SoulsApiSchema.from_global_id(args[:id])
161
161
  TEXT
162
162
  end
@@ -204,7 +204,7 @@ module Souls
204
204
  #{class_name}.update args
205
205
  { #{class_name}_edge: { node: ::#{class_name.camelize}.find(args[:id]) } }
206
206
  rescue StandardError => error
207
- GraphQL::ExecutionError.new error
207
+ GraphQL::ExecutionError.new(error.message)
208
208
  end
209
209
  end
210
210
  end
@@ -237,13 +237,13 @@ module Souls
237
237
  field :#{class_name}, Types::#{class_name.camelize}Type, null: false
238
238
  argument :id, String, required: true
239
239
 
240
- def resolve **args
240
+ def resolve args
241
241
  _, data_id = SoulsApiSchema.from_global_id args[:id]
242
242
  #{class_name} = ::#{class_name.camelize}.find data_id
243
243
  #{class_name}.update(is_deleted: true)
244
244
  { #{class_name}: ::#{class_name.camelize}.find(data_id) }
245
245
  rescue StandardError => error
246
- GraphQL::ExecutionError.new error
246
+ GraphQL::ExecutionError.new(error.message)
247
247
  end
248
248
  end
249
249
  end
@@ -266,13 +266,13 @@ module Souls
266
266
  field :#{class_name}, Types::#{class_name.camelize}Type, null: false
267
267
  argument :id, String, required: true
268
268
 
269
- def resolve **args
269
+ def resolve args
270
270
  _, data_id = SoulsApiSchema.from_global_id args[:id]
271
271
  #{class_name} = ::#{class_name.camelize}.find data_id
272
272
  #{class_name}.destroy
273
273
  { #{class_name}: #{class_name} }
274
274
  rescue StandardError => error
275
- GraphQL::ExecutionError.new error
275
+ GraphQL::ExecutionError.new(error.message)
276
276
  end
277
277
  end
278
278
  end
@@ -26,7 +26,7 @@ module Souls
26
26
  def resolve
27
27
  ::#{class_name.camelize}.all
28
28
  rescue StandardError => error
29
- GraphQL::ExecutionError.new error
29
+ GraphQL::ExecutionError.new(error.message)
30
30
  end
31
31
  end
32
32
  end
@@ -49,11 +49,11 @@ module Souls
49
49
  type Types::#{class_name.camelize}Type, null: false
50
50
  argument :id, String, required: true
51
51
 
52
- def resolve **args
52
+ def resolve args
53
53
  _, data_id = SoulsApiSchema.from_global_id args[:id]
54
54
  ::#{class_name.camelize}.find(data_id)
55
55
  rescue StandardError => error
56
- GraphQL::ExecutionError.new error
56
+ GraphQL::ExecutionError.new(error.message)
57
57
  end
58
58
  end
59
59
  end
@@ -7,7 +7,8 @@ module Souls
7
7
 
8
8
  desc "update [COMMAND]", "souls api update Commands"
9
9
  subcommand "update", Update
10
-
11
- map g: :generate
10
+ # rubocop:disable Style/StringHashKeys
11
+ map "g" => :generate
12
+ # rubocop:enable Style/StringHashKeys
12
13
  end
13
14
  end
@@ -9,10 +9,12 @@ module Souls
9
9
  raise(StandardError, "Same Worker Already Exist!") if Dir.exist?(file_dir)
10
10
 
11
11
  workers = Souls.configuration.workers
12
+ app = Souls.configuration.app
12
13
  port = 3000 + workers.size
14
+ souls_worker_name = "souls-#{app}-#{options[:name]}"
13
15
  download_worker(worker_name: options[:name])
14
- souls_conf_update(worker_name: options[:name])
15
- souls_conf_update(worker_name: options[:name], strain: "api")
16
+ souls_conf_update(worker_name: souls_worker_name)
17
+ souls_conf_update(worker_name: souls_worker_name, strain: "api")
16
18
  workflow(worker_name: options[:name])
17
19
  procfile(worker_name: options[:name], port: port)
18
20
  mother_procfile(worker_name: options[:name])
@@ -34,6 +34,7 @@ module Souls
34
34
 
35
35
  desc "config_set", "gcloud config set"
36
36
  def config_set
37
+ require("#{Souls.get_api_path}/config/souls")
37
38
  project_id = Souls.configuration.project_id
38
39
  system("gcloud config set project #{project_id}")
39
40
  end
@@ -22,9 +22,9 @@ module Souls
22
22
  topic.name.gsub("projects/#{project_id}/topics/", "")
23
23
  end
24
24
 
25
- topic_names.select { |n| n.include?("souls_#{app_name}_") }
25
+ souls_topics = topic_names.select { |n| n.include?("souls_#{app_name}_") }
26
26
 
27
- topic_names.each do |name|
27
+ souls_topics.each do |name|
28
28
  value = workers[name.to_sym] || 0
29
29
  workers[name.to_sym] = value - 1
30
30
  end
@@ -58,9 +58,9 @@ module Souls
58
58
 
59
59
  def create_push_subscription(topic_id: "mailer")
60
60
  require("#{Souls.get_mother_path}/config/souls")
61
- worker_name = topic_id.split("_")[0]
62
61
  app_name = Souls.configuration.app
63
62
  topic_name = "souls_#{app_name}_#{topic_id}"
63
+ worker_name = topic_id.split("_")[0]
64
64
 
65
65
  subscription_id = "#{topic_name}_sub"
66
66
  endpoint = ""
@@ -71,7 +71,7 @@ module Souls
71
71
 
72
72
  pubsub = Google::Cloud::Pubsub.new
73
73
 
74
- topic = pubsub.topic(topic_id)
74
+ topic = pubsub.topic(topic_name)
75
75
  sub = topic.subscribe(subscription_id, endpoint: endpoint, deadline: 20)
76
76
  sub.expires_in = nil
77
77
  puts("Push subscription #{subscription_id} created.")
data/lib/souls/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Souls
2
- VERSION = "0.54.2".freeze
2
+ VERSION = "0.54.6".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 0.33.2
1
+ 0.33.6
@@ -1 +1 @@
1
- 0.33.2
1
+ 0.33.6
@@ -5,6 +5,8 @@ module Souls
5
5
  desc "generate [COMMAND]", "souls worker generate Commands"
6
6
  subcommand "generate", Generate
7
7
 
8
- map g: :generate
8
+ # rubocop:disable Style/StringHashKeys
9
+ map "g" => :generate
10
+ # rubocop:enable Style/StringHashKeys
9
11
  end
10
12
  end
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: 0.54.2
4
+ version: 0.54.6
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-09-22 00:00:00.000000000 Z
13
+ date: 2021-09-24 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport