souls 0.16.8 → 0.17.3
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 +11 -3
- data/lib/souls/generate.rb +19 -2
- data/lib/souls/init.rb +2 -2
- 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: 4e0e45cd92b7c2d7ffd54a5e49350615d0413a99ad49fa6f1312019184186979
|
4
|
+
data.tar.gz: b0677d2efb8da005c391dd97f9cf9d507f27a6020bbede62988630d8718e474b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ef658d2adcb3fa24e176e6598d65a847c220ef4893023d9a61898aadd78b33b1d3155d80d70b87b2e864e0727d01dd19b085065ae453fe87a82e92c6744b675
|
7
|
+
data.tar.gz: 32543be68ca4e7e30e744f05e26f63bec32bfe6f6f5094f708dc88d484ddb3f3b061782bd06c6bbe7893a188cb492ddf3e0117c28a4be2f365eb10a731110a18
|
data/exe/souls
CHANGED
@@ -35,7 +35,7 @@ begin
|
|
35
35
|
else
|
36
36
|
case ARGV[1]
|
37
37
|
when "RACK_ENV=production"
|
38
|
-
system "bundle exec irb
|
38
|
+
system "RACK_ENV=production bundle exec irb"
|
39
39
|
else
|
40
40
|
system "bundle exec irb"
|
41
41
|
end
|
@@ -103,7 +103,10 @@ begin
|
|
103
103
|
"SOULs!"
|
104
104
|
end
|
105
105
|
when "d"
|
106
|
-
Souls::Init.
|
106
|
+
Souls::Init.add_delete class_name: ARGV[1]
|
107
|
+
when "update"
|
108
|
+
Souls::Init.add_delete class_name: ARGV[1]
|
109
|
+
Souls::Init.single_migrate class_name: ARGV[1]
|
107
110
|
when "db:create"
|
108
111
|
system "rake db:create && rake db:create RACK_ENV=test"
|
109
112
|
when "db:migrate"
|
@@ -114,7 +117,12 @@ begin
|
|
114
117
|
system "rake db:migrate && rake db:migrate RACK_ENV=test"
|
115
118
|
end
|
116
119
|
when "db:seed"
|
117
|
-
|
120
|
+
case ARGV[1]
|
121
|
+
when "RACK_ENV=production"
|
122
|
+
system "rake db:seed RACK_ENV=production"
|
123
|
+
else
|
124
|
+
system "rake db:seed"
|
125
|
+
end
|
118
126
|
when "db:migrate:reset"
|
119
127
|
case ARGV[1]
|
120
128
|
when "RACK_ENV=production"
|
data/lib/souls/generate.rb
CHANGED
@@ -77,7 +77,6 @@ module Souls
|
|
77
77
|
file_path = "./app/graphql/resolvers/#{class_name.singularize}_search.rb"
|
78
78
|
File.open(file_path, "a") do |f|
|
79
79
|
f.write <<-EOS
|
80
|
-
argument :is_deleted, Boolean, required: false
|
81
80
|
argument :start_date, String, required: false
|
82
81
|
argument :end_date, String, required: false
|
83
82
|
end
|
@@ -142,7 +141,6 @@ module Souls
|
|
142
141
|
file_path = "./app/graphql/resolvers/#{class_name.singularize}_search.rb"
|
143
142
|
File.open(file_path, "a") do |f|
|
144
143
|
f.write <<-EOS
|
145
|
-
scope = scope.where(is_deleted: value[:is_deleted]) unless value[:is_deleted].nil?
|
146
144
|
scope = scope.where("created_at >= ?", value[:start_date]) if value[:start_date]
|
147
145
|
scope = scope.where("created_at <= ?", value[:end_date]) if value[:end_date]
|
148
146
|
|
@@ -368,6 +366,25 @@ end
|
|
368
366
|
rspec_resolver_end class_name: singularized_class_name
|
369
367
|
end
|
370
368
|
|
369
|
+
def add_delete class_name: "souls"
|
370
|
+
singularized_class_name = class_name.singularize.underscore
|
371
|
+
pluralized_class_name = class_name.pluralize.underscore
|
372
|
+
FileUtils.rm_rf "./app/graphql/mutations/#{singularized_class_name}"
|
373
|
+
FileUtils.rm "./app/graphql/queries/#{singularized_class_name}.rb"
|
374
|
+
FileUtils.rm "./app/graphql/queries/#{pluralized_class_name}.rb"
|
375
|
+
FileUtils.rm "./app/graphql/resolvers/#{singularized_class_name}_search.rb"
|
376
|
+
FileUtils.rm "./app/graphql/types/#{singularized_class_name}_type.rb"
|
377
|
+
FileUtils.rm "./app/graphql/types/#{singularized_class_name}_node_type.rb"
|
378
|
+
FileUtils.rm "./spec/factories/#{pluralized_class_name}.rb"
|
379
|
+
FileUtils.rm "./spec/mutations/#{singularized_class_name}_spec.rb"
|
380
|
+
FileUtils.rm "./spec/models/#{singularized_class_name}_spec.rb"
|
381
|
+
FileUtils.rm "./spec/queries/#{singularized_class_name}_spec.rb"
|
382
|
+
FileUtils.rm "./spec/resolvers/#{singularized_class_name}_search_spec.rb"
|
383
|
+
puts "deleted #{class_name.camelize} CRUD!"
|
384
|
+
rescue StandardError => error
|
385
|
+
puts error
|
386
|
+
end
|
387
|
+
|
371
388
|
def delete_all class_name: "souls"
|
372
389
|
singularized_class_name = class_name.singularize.underscore
|
373
390
|
pluralized_class_name = class_name.pluralize.underscore
|
data/lib/souls/init.rb
CHANGED
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.
|
4
|
+
version: 0.17.3
|
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-03-
|
13
|
+
date: 2021-03-29 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.
|