souls 0.17.5 → 0.17.6

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: 48f5dacba8fb3bd0da68f45b83208de7007abb6392b7d0c8eb9176755b97c185
4
- data.tar.gz: 64283afa2ca8decda20078855d116d8c9dd7e3979dd8ce50560e9591dfcc5135
3
+ metadata.gz: bbb549404b0a81f37dff81fc568f7d93b69f4ef23ac321fd6f7ed4602e1a1195
4
+ data.tar.gz: 18b4d58e4969cb122387bb893d476fa3bf246a47a9ea31338adb95b80fea3b13
5
5
  SHA512:
6
- metadata.gz: 507ef37fd28f186e6f7a4cc6c5e8528a5b48443afb989f247e60dab26fe4a1005733283caedb1391cc1bc0f3288ba099774ff25c3d573c2a5530ea331bfadb76
7
- data.tar.gz: 8ae0b00d12c3acab94babcf5cb6cf19fa4a8923b26c82c5b1790de317d16fd421bf4f97e572615561d1ac7f90c6a918122625cf1420d371ef980d76870015651
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.16.7)
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.11
91
+ 2.2.14
data/Steepfile CHANGED
@@ -5,5 +5,4 @@ target :app do
5
5
 
6
6
  # check 'app'
7
7
  check "rbs"
8
-
9
8
  end
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("gcloud compute network-endpoint-groups create #{app} \
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("gcloud container clusters create #{app} \
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
@@ -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 <<-EOS
228
- scope = scope.where("created_at >= ?", value[:start_date]) if value[:start_date]
229
- scope = scope.where("created_at <= ?", value[:end_date]) if value[:end_date]
230
-
231
- branches << scope
232
-
233
- value[:OR].inject(branches) { |s, v| normalize_filters(v, s) } if value[:OR].present?
234
-
235
- branches
236
- end
237
- end
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 <<-EOS
406
- )
407
- end
408
- end
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
- file_path = "./app/graphql/mutations/#{singularized_class_name}/#{file_name}.rb"
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
- file_path = "./app/graphql/types/#{file_name}.rb"
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
- file_path = "./app/graphql/types/#{file_name}.rb"
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
- file_path = "./app/graphql/types/#{file_name}.rb"
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
- file_path = "./app/graphql/types/#{file_name}.rb"
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
@@ -1,3 +1,3 @@
1
1
  module Souls
2
- VERSION = "0.17.5"
2
+ VERSION = "0.17.6"
3
3
  end
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 = Dir.chdir(File.expand_path('..', __FILE__)) do
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.5
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-01 00:00:00.000000000 Z
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.