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 +4 -4
- data/exe/souls +0 -1
- data/lib/souls/api/generate/manager.rb +1 -1
- data/lib/souls/api/generate/mutation.rb +10 -10
- data/lib/souls/api/generate/query.rb +3 -3
- data/lib/souls/api/index.rb +3 -2
- data/lib/souls/cli/create/index.rb +4 -2
- data/lib/souls/cli/gcloud/index.rb +1 -0
- data/lib/souls/cli/sync/pubsub.rb +4 -4
- data/lib/souls/version.rb +1 -1
- data/lib/souls/versions/.souls_api_version +1 -1
- data/lib/souls/versions/.souls_worker_version +1 -1
- data/lib/souls/worker/index.rb +3 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c1fc9772856d936fd0736885d412e15d60094daec790001e2c530c0a05e758c3
|
4
|
+
data.tar.gz: ca5a614a7c34c6002769d2dceb720d7036ce1bfa376217dd1d1d50e9a637257b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0968ce4aac80f3f22da301a0c89dd69b00628730010d3ea07609c6dc50d8d524d2996f4ea28cf301c08e90168376266a5be3260588fd8e9950c0df34018f0809'
|
7
|
+
data.tar.gz: 55c05a2a726b45f991cfb8c98f36abc6e3486d52a38a15987c7fe783a4afb6194fd4e76bc77b26a003d0b380fcbadd474331acbfa0754db7748c92c60beab087
|
data/exe/souls
CHANGED
@@ -55,13 +55,13 @@ module Souls
|
|
55
55
|
if @user_exist
|
56
56
|
new_line.write(<<-TEXT)
|
57
57
|
|
58
|
-
def resolve
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
56
|
+
GraphQL::ExecutionError.new(error.message)
|
57
57
|
end
|
58
58
|
end
|
59
59
|
end
|
data/lib/souls/api/index.rb
CHANGED
@@ -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:
|
15
|
-
souls_conf_update(worker_name:
|
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])
|
@@ -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
|
-
|
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(
|
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 +1 @@
|
|
1
|
-
0.33.
|
1
|
+
0.33.6
|
@@ -1 +1 @@
|
|
1
|
-
0.33.
|
1
|
+
0.33.6
|
data/lib/souls/worker/index.rb
CHANGED
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.
|
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-
|
13
|
+
date: 2021-09-24 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|