souls 0.68.1 → 0.68.5
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/README.md +3 -0
- data/lib/souls/cli/sync/pubsub.rb +1 -1
- data/lib/souls/cli/update/mutation_rbs.rb +86 -0
- data/lib/souls/cli/update/resolver_rbs.rb +0 -0
- 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
- metadata +8 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50e374db1891821d585cf2e326ec95d76b1727b4eb8abb7fb2b450df2e56419c
|
4
|
+
data.tar.gz: b43541b3a9c59a8cd6486e6760b0600783c976b5165ab7418fca23b0c90da671
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 28648c3fc8fe7ad1801a8d9813898c7eeb0f0fbf92f2425dfe4e586f6c679fd56688821a17d5b22709a94b44034586bd51f8403803b6630bb0f7549f7ebb70ad
|
7
|
+
data.tar.gz: 4d0de95b86254a8ce0a6cebe33ee2b31c8a1e4e0d06243d925e33d86575665c46f47cf8b3ddc8244c3725e57968e87bbcb553e693b4610bb34797782bd37414a
|
data/README.md
CHANGED
@@ -21,6 +21,9 @@
|
|
21
21
|
|
22
22
|
Welcome to SOULs Serverless Application Framework!
|
23
23
|
|
24
|
+
Build Serverless Apps faster like Rails.
|
25
|
+
Powered by Ruby GraphQL, RBS/Steep, Active Record, RSpec, RuboCop, and Google Cloud.
|
26
|
+
|
24
27
|
- Focus on business logic in serverless environment
|
25
28
|
- Maximize development efficiency with CI / CD standard schema-driven Scaffold
|
26
29
|
- Achieve global scale with lower management costs
|
@@ -68,7 +68,7 @@ module Souls
|
|
68
68
|
project_id = Souls.configuration.project_id
|
69
69
|
pubsub = Google::Cloud::Pubsub.new(project_id: project_id)
|
70
70
|
|
71
|
-
topic = pubsub.topic(
|
71
|
+
topic = pubsub.topic(topic_id)
|
72
72
|
sub = topic.subscribe(subscription_id, endpoint: endpoint, deadline: 20)
|
73
73
|
sub.expires_in = nil
|
74
74
|
puts("Push subscription #{subscription_id} created.")
|
@@ -0,0 +1,86 @@
|
|
1
|
+
module Souls
|
2
|
+
class Update < Thor
|
3
|
+
desc "create_mutation_rbs [CLASS_NAME]", "Update GraphQL Type from schema.rb"
|
4
|
+
def create_mutation_rbs(class_name)
|
5
|
+
singularized_class_name = class_name.singularize.underscore
|
6
|
+
new_cols = Souls.get_columns_num(class_name: singularized_class_name)
|
7
|
+
dir_name = "./sig/api/app/graphql/mutations/base/#{singularized_class_name}"
|
8
|
+
new_file_path = "tmp/create_mutation.rbs"
|
9
|
+
file_path = "#{dir_name}/create_#{singularized_class_name}.rbs"
|
10
|
+
argument = false
|
11
|
+
File.open(file_path) do |f|
|
12
|
+
File.open(new_file_path, "w") do |new_line|
|
13
|
+
f.each_line do |line|
|
14
|
+
new_line.write(line)
|
15
|
+
next unless line.include?("argument") && !argument
|
16
|
+
|
17
|
+
new_cols.each do |col|
|
18
|
+
type = Souls.type_check(col[:type])
|
19
|
+
type = "[#{type}]" if col[:array]
|
20
|
+
args = check_mutation_argument(class_name: class_name)
|
21
|
+
next if args.include?(col[:column_name])
|
22
|
+
next if col[:column_name] == "created_at" || col[:column_name] == "updated_at"
|
23
|
+
|
24
|
+
new_line.write(" argument :#{col[:column_name]}, #{type}, required: false\n")
|
25
|
+
end
|
26
|
+
argument = true
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
FileUtils.rm(file_path)
|
31
|
+
FileUtils.mv(new_file_path, file_path)
|
32
|
+
puts(Paint % ["Updated file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }])
|
33
|
+
rescue Thor::Error => e
|
34
|
+
raise(Thor::Error, e)
|
35
|
+
end
|
36
|
+
|
37
|
+
desc "update_mutation [CLASS_NAME]", "Update GraphQL Type from schema.rb"
|
38
|
+
def update_mutation(class_name)
|
39
|
+
singularized_class_name = class_name.singularize.underscore
|
40
|
+
new_cols = Souls.get_columns_num(class_name: singularized_class_name)
|
41
|
+
dir_name = "./app/graphql/mutations/base/#{singularized_class_name}"
|
42
|
+
new_file_path = "tmp/update_mutation.rb"
|
43
|
+
file_path = "#{dir_name}/update_#{singularized_class_name}.rb"
|
44
|
+
argument = false
|
45
|
+
File.open(file_path) do |f|
|
46
|
+
File.open(new_file_path, "w") do |new_line|
|
47
|
+
f.each_line do |line|
|
48
|
+
new_line.write(line)
|
49
|
+
next unless line.include?("argument") && !argument
|
50
|
+
|
51
|
+
new_cols.each do |col|
|
52
|
+
type = Souls.type_check(col[:type])
|
53
|
+
type = "[#{type}]" if col[:array]
|
54
|
+
args = check_mutation_argument(class_name: class_name, action: "update")
|
55
|
+
next if args.include?(col[:column_name])
|
56
|
+
next if col[:column_name] == "created_at" || col[:column_name] == "updated_at"
|
57
|
+
|
58
|
+
new_line.write(" argument :#{col[:column_name]}, #{type}, required: false\n")
|
59
|
+
end
|
60
|
+
argument = true
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
FileUtils.rm(file_path)
|
65
|
+
FileUtils.mv(new_file_path, file_path)
|
66
|
+
puts(Paint % ["Updated file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }])
|
67
|
+
rescue Thor::Error => e
|
68
|
+
raise(Thor::Error, e)
|
69
|
+
end
|
70
|
+
|
71
|
+
private
|
72
|
+
|
73
|
+
def check_mutation_argument(class_name: "user", action: "create")
|
74
|
+
singularized_class_name = class_name.singularize.underscore
|
75
|
+
dir_name = "./app/graphql/mutations/base/#{singularized_class_name}"
|
76
|
+
file_path = "#{dir_name}/#{action}_#{singularized_class_name}.rb"
|
77
|
+
args = []
|
78
|
+
File.open(file_path) do |f|
|
79
|
+
f.each_line do |line|
|
80
|
+
args << line.split(",")[0].gsub("argument :", "").strip.underscore if line.include?("argument")
|
81
|
+
end
|
82
|
+
end
|
83
|
+
args
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
File without changes
|
data/lib/souls/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.47.
|
1
|
+
0.47.5
|
@@ -1 +1 @@
|
|
1
|
-
0.47.
|
1
|
+
0.47.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: 0.68.
|
4
|
+
version: 0.68.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-10-
|
13
|
+
date: 2021-10-06 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|
@@ -110,14 +110,8 @@ dependencies:
|
|
110
110
|
- - ">="
|
111
111
|
- !ruby/object:Gem::Version
|
112
112
|
version: 1.1.0
|
113
|
-
description:
|
114
|
-
|
115
|
-
|
116
|
-
- Focus on business logic in serverless environment
|
117
|
-
|
118
|
-
- Maximize development efficiency with CI / CD standard schema-driven Scaffold
|
119
|
-
|
120
|
-
- Achieve global scale with lower management costs
|
113
|
+
description: "Build Serverless Apps faster like Rails.\n Powered by Ruby GraphQL,
|
114
|
+
RBS/Steep, Active Record, RSpec, RuboCop, and Google Cloud. "
|
121
115
|
email:
|
122
116
|
- f.kawasaki@elsoul.nl
|
123
117
|
- s.kishi@elsoul.nl
|
@@ -187,7 +181,9 @@ files:
|
|
187
181
|
- lib/souls/cli/sync/pubsub.rb
|
188
182
|
- lib/souls/cli/update/index.rb
|
189
183
|
- lib/souls/cli/update/mutation.rb
|
184
|
+
- lib/souls/cli/update/mutation_rbs.rb
|
190
185
|
- lib/souls/cli/update/resolver.rb
|
186
|
+
- lib/souls/cli/update/resolver_rbs.rb
|
191
187
|
- lib/souls/cli/update/rspec_factory.rb
|
192
188
|
- lib/souls/cli/update/rspec_mutation.rb
|
193
189
|
- lib/souls/cli/update/rspec_resolver.rb
|
@@ -225,7 +221,6 @@ requirements: []
|
|
225
221
|
rubygems_version: 3.2.22
|
226
222
|
signing_key:
|
227
223
|
specification_version: 4
|
228
|
-
summary:
|
229
|
-
|
230
|
-
schema-driven Scaffold - Achieve global scale with lower management costs
|
224
|
+
summary: Build Serverless Apps faster like Rails. Powered by Ruby GraphQL, RBS/Steep,
|
225
|
+
Active Record, RSpec, RuboCop, and Google Cloud.
|
231
226
|
test_files: []
|