souls 0.17.5 → 0.17.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/Gemfile.lock +3 -2
- data/Steepfile +0 -1
- data/lib/souls.rb +8 -4
- data/lib/souls/generate.rb +24 -30
- data/lib/souls/version.rb +1 -1
- data/souls.gemspec +1 -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: bbb549404b0a81f37dff81fc568f7d93b69f4ef23ac321fd6f7ed4602e1a1195
|
4
|
+
data.tar.gz: 18b4d58e4969cb122387bb893d476fa3bf246a47a9ea31338adb95b80fea3b13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a060e41c870266b1441285ebe87e5cf25aacea694299858ffdf1223aae0b880ca688735a8f8ec5957eae87c0ebf4358365a69673fb33d4379f25c9aa52cb9d2c
|
7
|
+
data.tar.gz: 1fa8878a36982334b4244bd39e90da9010ca8e9a097bc33a75e49ce44360502e4bc6fe05a339cba30cd1ff5e6e6e4f7d7d29bbf769cf9a498579b9244ad0d760
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
souls (0.
|
4
|
+
souls (0.17.5)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
@@ -77,6 +77,7 @@ GEM
|
|
77
77
|
|
78
78
|
PLATFORMS
|
79
79
|
x86_64-darwin-20
|
80
|
+
x86_64-linux
|
80
81
|
|
81
82
|
DEPENDENCIES
|
82
83
|
activesupport (= 6.1.0)
|
@@ -87,4 +88,4 @@ DEPENDENCIES
|
|
87
88
|
steep (= 0.39.0)
|
88
89
|
|
89
90
|
BUNDLED WITH
|
90
|
-
2.2.
|
91
|
+
2.2.14
|
data/Steepfile
CHANGED
data/lib/souls.rb
CHANGED
@@ -118,11 +118,13 @@ module Souls
|
|
118
118
|
app = Souls.configuration.app
|
119
119
|
network = Souls.configuration.network
|
120
120
|
sub_network = Souls.configuration.network
|
121
|
-
system(
|
121
|
+
system(
|
122
|
+
"gcloud compute network-endpoint-groups create #{app} \
|
122
123
|
--default-port=0 \
|
123
124
|
--network #{network} \
|
124
125
|
--subnet #{sub_network} \
|
125
|
-
--global"
|
126
|
+
--global"
|
127
|
+
)
|
126
128
|
end
|
127
129
|
|
128
130
|
def export_network_group
|
@@ -158,7 +160,8 @@ module Souls
|
|
158
160
|
sub_network = Souls.configuration.network
|
159
161
|
machine_type = Souls.configuration.machine_type
|
160
162
|
zone = Souls.configuration.zone
|
161
|
-
system(
|
163
|
+
system(
|
164
|
+
"gcloud container clusters create #{app} \
|
162
165
|
--network #{network} \
|
163
166
|
--subnetwork #{sub_network} \
|
164
167
|
--zone #{zone} \
|
@@ -170,7 +173,8 @@ module Souls
|
|
170
173
|
--enable-autoscaling \
|
171
174
|
--min-nodes 1 \
|
172
175
|
--max-nodes 4 \
|
173
|
-
--tags=allow-health-checks"
|
176
|
+
--tags=allow-health-checks"
|
177
|
+
)
|
174
178
|
end
|
175
179
|
|
176
180
|
def deploy
|
data/lib/souls/generate.rb
CHANGED
@@ -20,6 +20,8 @@ module Souls
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def policy class_name: "souls"
|
23
|
+
dir_name = "./app/policy"
|
24
|
+
FileUtils.mkdir_p dir_name unless Dir.exist? dir_name
|
23
25
|
file_path = "./app/policy/#{class_name.singularize}_policy.rb"
|
24
26
|
File.open(file_path, "w") do |f|
|
25
27
|
f.write <<~EOS
|
@@ -224,18 +226,18 @@ module Souls
|
|
224
226
|
def resolver_end class_name: "souls"
|
225
227
|
file_path = "./app/graphql/resolvers/#{class_name.singularize}_search.rb"
|
226
228
|
File.open(file_path, "a") do |f|
|
227
|
-
f.write
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
end
|
229
|
+
f.write <<~EOS
|
230
|
+
scope = scope.where("created_at >= ?", value[:start_date]) if value[:start_date]
|
231
|
+
scope = scope.where("created_at <= ?", value[:end_date]) if value[:end_date]
|
232
|
+
#{' '}
|
233
|
+
branches << scope
|
234
|
+
#{' '}
|
235
|
+
value[:OR].inject(branches) { |s, v| normalize_filters(v, s) } if value[:OR].present?
|
236
|
+
#{' '}
|
237
|
+
branches
|
238
|
+
end
|
239
|
+
end
|
240
|
+
end
|
239
241
|
EOS
|
240
242
|
end
|
241
243
|
[file_path]
|
@@ -402,11 +404,11 @@ end
|
|
402
404
|
f.each_line.with_index do |line, i|
|
403
405
|
if @on
|
404
406
|
if line.include?("end") || line.include?("t.index")
|
405
|
-
new_line.write
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
end
|
407
|
+
new_line.write <<~EOS
|
408
|
+
)
|
409
|
+
end
|
410
|
+
end
|
411
|
+
end
|
410
412
|
EOS
|
411
413
|
break
|
412
414
|
end
|
@@ -450,9 +452,6 @@ end
|
|
450
452
|
rspec_resolver_end class_name: singularized_class_name
|
451
453
|
end
|
452
454
|
|
453
|
-
|
454
|
-
|
455
|
-
|
456
455
|
def add_delete class_name: "souls"
|
457
456
|
singularized_class_name = class_name.singularize.underscore
|
458
457
|
pluralized_class_name = class_name.pluralize.underscore
|
@@ -494,32 +493,27 @@ end
|
|
494
493
|
|
495
494
|
def add_mutation class_name: "souls", file_name: "hoi"
|
496
495
|
singularized_class_name = class_name.singularize.underscore
|
497
|
-
|
498
|
-
file_path
|
496
|
+
"./app/graphql/mutations/#{singularized_class_name}/#{file_name}.rb"
|
499
497
|
end
|
500
498
|
|
501
499
|
def add_type class_name: "souls", file_name: "hoi"
|
502
500
|
singularized_class_name = class_name.singularize.underscore
|
503
|
-
|
504
|
-
file_path
|
501
|
+
"./app/graphql/types/#{file_name}.rb"
|
505
502
|
end
|
506
503
|
|
507
504
|
def add_edge class_name: "souls", file_name: "hoi"
|
508
505
|
singularized_class_name = class_name.singularize.underscore
|
509
|
-
|
510
|
-
file_path
|
506
|
+
"./app/graphql/types/#{file_name}.rb"
|
511
507
|
end
|
512
508
|
|
513
509
|
def add_connection class_name: "souls", file_name: "hoi"
|
514
510
|
singularized_class_name = class_name.singularize.underscore
|
515
|
-
|
516
|
-
file_path
|
511
|
+
"./app/graphql/types/#{file_name}.rb"
|
517
512
|
end
|
518
513
|
|
519
514
|
def add_rspec_mutation class_name: "souls", file_name: "hoi"
|
520
515
|
singularized_class_name = class_name.singularize.underscore
|
521
|
-
|
522
|
-
file_path
|
516
|
+
"./app/graphql/types/#{file_name}.rb"
|
523
517
|
end
|
524
518
|
end
|
525
519
|
end
|
data/lib/souls/version.rb
CHANGED
data/souls.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
|
19
19
|
# Specify which files should be added to the gem when it is released.
|
20
20
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
21
|
-
spec.files
|
21
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
22
22
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
23
23
|
end
|
24
24
|
spec.bindir = "exe"
|
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.17.
|
4
|
+
version: 0.17.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-04-
|
13
|
+
date: 2021-04-02 00:00:00.000000000 Z
|
14
14
|
dependencies: []
|
15
15
|
description: SOULS is a Web Application Framework for Microservices on Multi Cloud
|
16
16
|
Platform such as Google Cloud Platform, Amazon Web Services, and Alibaba Cloud.
|