souls 0.14.2 → 0.14.7
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 +1 -1
- data/exe/souls +1 -1
- data/lib/souls/init.rb +7 -7
- data/lib/souls/version.rb +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: 82a93c134d59e41d907e30a4784bc6d0713d20ec016e606b49f957aa699e1e82
|
4
|
+
data.tar.gz: 663dd3215bf74f74fa17e6178a4afface0c4a173334519c4e27af210261716f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 182ee54e370af1f746a45613aeb1c78604701a2ac075e7de9e58e211ed8028a0a75dcc4ab0fddce1f870a17392c14a7fc0e1aede1bdc6d8c37bdf4e107457d23
|
7
|
+
data.tar.gz: d91eab772bd9ec65a0844df7fb363171a2a02c76d9300c60087c37fcc75a26d188e067ae36526d9401c09793aacbe16c46bb6968dc126884ef0ad7ea5649b93a
|
data/Gemfile.lock
CHANGED
data/exe/souls
CHANGED
@@ -62,7 +62,7 @@ begin
|
|
62
62
|
when "migrate_all"
|
63
63
|
Souls::Init.migrate_all
|
64
64
|
when "migration"
|
65
|
-
`rake db:create_migration NAME=#{ARGV[
|
65
|
+
`rake db:create_migration NAME=#{ARGV[2]}`
|
66
66
|
when "rspec_factory"
|
67
67
|
Souls::Init.rspec_factory class_name: ARGV[2]
|
68
68
|
when "rspec_model"
|
data/lib/souls/init.rb
CHANGED
@@ -244,6 +244,7 @@ module Souls
|
|
244
244
|
|
245
245
|
def model class_name: "souls"
|
246
246
|
file_path = "./app/models/#{class_name.singularize}.rb"
|
247
|
+
return p("Model already exist! #{file_path}") if File.exist? file_path
|
247
248
|
File.open(file_path, "w") do |f|
|
248
249
|
f.write <<~EOS
|
249
250
|
class #{class_name.camelize} < ActiveRecord::Base
|
@@ -257,6 +258,7 @@ module Souls
|
|
257
258
|
FileUtils.mkdir_p "./app/graphql/mutations"
|
258
259
|
FileUtils.mkdir_p "./app/graphql/queries"
|
259
260
|
FileUtils.mkdir_p "./app/graphql/types"
|
261
|
+
FileUtils.mkdir_p "./app/models"
|
260
262
|
FileUtils.mkdir_p "./spec/factories"
|
261
263
|
FileUtils.mkdir_p "./spec/queries"
|
262
264
|
FileUtils.mkdir_p "./spec/mutations"
|
@@ -300,6 +302,8 @@ module Souls
|
|
300
302
|
end
|
301
303
|
|
302
304
|
def create_mutation_head class_name: "souls"
|
305
|
+
dir_name = "./app/graphql/mutations/#{class_name}"
|
306
|
+
FileUtils.mkdir_p dir_name unless Dir.exist? dir_name
|
303
307
|
file_path = "./app/graphql/mutations/#{class_name}/create_#{class_name}.rb"
|
304
308
|
File.open(file_path, "w") do |new_line|
|
305
309
|
new_line.write <<~EOS
|
@@ -526,11 +530,7 @@ module Souls
|
|
526
530
|
|
527
531
|
def mutation class_name: "souls"
|
528
532
|
singularized_class_name = class_name.singularize
|
529
|
-
|
530
|
-
create_confirm dir_path: "./app/graphql/mutations/#{singularized_class_name}"
|
531
|
-
else
|
532
|
-
Dir.mkdir "./app/graphql/mutations/#{singularized_class_name}"
|
533
|
-
end
|
533
|
+
|
534
534
|
create_mutation_head class_name: singularized_class_name
|
535
535
|
relation_params = create_mutation_params class_name: singularized_class_name
|
536
536
|
create_mutation_after_params class_name: singularized_class_name, relation_params: relation_params
|
@@ -748,9 +748,9 @@ module Souls
|
|
748
748
|
EOS
|
749
749
|
else
|
750
750
|
new_line.write <<-EOS
|
751
|
-
|
751
|
+
|
752
752
|
def get_global_key class_name, id
|
753
|
-
Base64.encode64("
|
753
|
+
Base64.encode64(\"\#{class_name}:\#{id}\")
|
754
754
|
end
|
755
755
|
let(:#{class_name}) { FactoryBot.attributes_for(:#{class_name}, #{@relation_params.join(", ")}) }
|
756
756
|
|
data/lib/souls/version.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.14.
|
4
|
+
version: 0.14.7
|
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-02-
|
13
|
+
date: 2021-02-04 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.
|