souls 1.13.2 → 1.13.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/lib/souls/cli/db/create_migration.rb +1 -1
- data/lib/souls/cli/db/index.rb +15 -1
- data/lib/souls/cli/delete/rspec_job.rb +1 -1
- data/lib/souls/cli/generate/job.rb +1 -1
- data/lib/souls/cli/generate/job_rbs.rb +1 -2
- data/lib/souls/cli/generate/manager.rb +1 -0
- data/lib/souls/cli/generate/query.rb +0 -24
- data/lib/souls/cli/generate/query_rbs.rb +0 -25
- data/lib/souls/cli/generate/rspec_job.rb +1 -3
- data/lib/souls/cli/generate/rspec_manager.rb +1 -1
- 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 +7 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a118ef08a3774a66d30e0dc99084579a1806d60abd43503f131f57705e6fe08
|
4
|
+
data.tar.gz: cc2bcff6cd1aa810da5adf7576484e00cf1d7439539a6500da95575182a31ce3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f3c4227abd7e591219a0547b53af58091c9287c8ea9accb58e7a621d19c0f6b9c5b8e8029d564567cd163e478619fa65227551ddc853e5ae69dd4e05e3cdc79
|
7
|
+
data.tar.gz: 4d26b93f0548b80c245adc9ee531299d65b26748da5389927d0724a1043cb4c9d6d5903ab687dbfd79a89b8c8d364f4a09cd85f8bd5698c40eb4b770afbae0d9
|
@@ -7,7 +7,7 @@ module Souls
|
|
7
7
|
Souls::DB.new.invoke(:model, [singularized_class_name], {})
|
8
8
|
Souls::DB.new.invoke(:rspec_model, [singularized_class_name], {})
|
9
9
|
Souls::DB.new.invoke(:model_rbs, [singularized_class_name], {})
|
10
|
-
|
10
|
+
Souls::Painter.create_file("")
|
11
11
|
system("rake db:create_migration NAME=create_#{pluralized_class_name}")
|
12
12
|
file_path = Dir["db/migrate/*create_#{pluralized_class_name}.rb"].first
|
13
13
|
File.open(file_path, "w") do |f|
|
data/lib/souls/cli/db/index.rb
CHANGED
@@ -55,6 +55,20 @@ module Souls
|
|
55
55
|
end
|
56
56
|
end
|
57
57
|
|
58
|
+
desc "reset", "Reset Database and Seed"
|
59
|
+
method_option :env, aliases: "--e", default: "development", desc: "Difine APP Enviroment - development | production"
|
60
|
+
def reset
|
61
|
+
case options[:env]
|
62
|
+
when "production"
|
63
|
+
db_system("rake db:migrate:reset RACK_ENV=production DISABLE_DATABASE_ENVIRONMENT_CHECK=1")
|
64
|
+
db_system("rake db seed RACK_ENV=production")
|
65
|
+
else
|
66
|
+
db_system("rake db:migrate:reset")
|
67
|
+
db_system("rake db:migrate RACK_ENV=test")
|
68
|
+
db_system("rake db seed")
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
58
72
|
desc "add_column [CLASS_NAME]", "Create ActiveRecord Migration File"
|
59
73
|
def add_column(class_name)
|
60
74
|
pluralized_class_name = class_name.underscore.pluralize
|
@@ -88,7 +102,7 @@ module Souls
|
|
88
102
|
private
|
89
103
|
|
90
104
|
def db_system(cmd)
|
91
|
-
system(cmd) or
|
105
|
+
system(cmd) or Souls::Painter.error("DB is not running. Please run `souls docker psql`")
|
92
106
|
end
|
93
107
|
end
|
94
108
|
end
|
@@ -2,7 +2,7 @@ module Souls
|
|
2
2
|
class Delete < Thor
|
3
3
|
desc "rspec_job [CLASS_NAME]", "Delete Rspec Job Test Template"
|
4
4
|
def rspec_job(class_name)
|
5
|
-
file_dir = "./spec/jobs"
|
5
|
+
file_dir = "./spec/queries/jobs"
|
6
6
|
singularized_class_name = class_name.underscore.singularize
|
7
7
|
file_path = "#{file_dir}/#{singularized_class_name}_spec.rb"
|
8
8
|
FileUtils.rm_f(file_path)
|
@@ -108,7 +108,7 @@ module Souls
|
|
108
108
|
File.open(file_path, "w") do |f|
|
109
109
|
f.write(<<~TEXT)
|
110
110
|
module Types
|
111
|
-
class #{class_name.camelize}Type < BaseObject
|
111
|
+
class #{class_name.camelize}Type < Souls::Types::BaseObject
|
112
112
|
field :response, String, null: true
|
113
113
|
end
|
114
114
|
end
|
@@ -26,14 +26,13 @@ module Souls
|
|
26
26
|
File.open(type_file_path, "w") do |f|
|
27
27
|
f.write(<<~TEXT)
|
28
28
|
module Types
|
29
|
-
class #{singularized_class_name.camelize}Type < BaseObject
|
29
|
+
class #{singularized_class_name.camelize}Type < Souls::Types::BaseObject
|
30
30
|
def self.field: (:response, String, null: true) -> untyped
|
31
31
|
end
|
32
32
|
end
|
33
33
|
TEXT
|
34
34
|
end
|
35
35
|
Souls::Painter.create_file(file_path.to_s)
|
36
|
-
puts(Paint % ["Created file! : %{white_text}", :green, { white_text: [type_file_path.to_s, :white] }])
|
37
36
|
end
|
38
37
|
file_path
|
39
38
|
end
|
@@ -6,34 +6,10 @@ module Souls
|
|
6
6
|
FileUtils.mkdir_p(file_dir) unless Dir.exist?(file_dir)
|
7
7
|
singularized_class_name = class_name.singularize
|
8
8
|
create_individual_query(class_name: singularized_class_name)
|
9
|
-
create_index_query(class_name: singularized_class_name)
|
10
9
|
end
|
11
10
|
|
12
11
|
private
|
13
12
|
|
14
|
-
def create_index_query(class_name: "user")
|
15
|
-
file_path = "./app/graphql/queries/#{class_name.pluralize}.rb"
|
16
|
-
return "Query already exist! #{file_path}" if File.exist?(file_path)
|
17
|
-
|
18
|
-
File.open(file_path, "w") do |f|
|
19
|
-
f.write(<<~TEXT)
|
20
|
-
module Queries
|
21
|
-
class #{class_name.camelize.pluralize} < Queries::BaseQuery
|
22
|
-
type [Types::#{class_name.camelize}Type], null: false
|
23
|
-
|
24
|
-
def resolve
|
25
|
-
::#{class_name.camelize}.all
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
TEXT
|
30
|
-
end
|
31
|
-
Souls::Painter.create_file(file_path.to_s)
|
32
|
-
file_path
|
33
|
-
rescue StandardError => e
|
34
|
-
raise(StandardError, e)
|
35
|
-
end
|
36
|
-
|
37
13
|
def create_individual_query(class_name: "user")
|
38
14
|
file_path = "./app/graphql/queries/#{class_name}.rb"
|
39
15
|
return "Query already exist! #{file_path}" if File.exist?(file_path)
|
@@ -3,7 +3,6 @@ module Souls
|
|
3
3
|
desc "query_rbs [CLASS_NAME]", "Generate GraphQL Query RBS"
|
4
4
|
def query_rbs(class_name)
|
5
5
|
single_query_rbs(class_name)
|
6
|
-
queries_rbs(class_name)
|
7
6
|
end
|
8
7
|
|
9
8
|
private
|
@@ -35,29 +34,5 @@ module Souls
|
|
35
34
|
end
|
36
35
|
file_path
|
37
36
|
end
|
38
|
-
|
39
|
-
def queries_rbs(class_name)
|
40
|
-
file_path = ""
|
41
|
-
Dir.chdir(Souls.get_mother_path.to_s) do
|
42
|
-
file_dir = "./sig/api/app/graphql/queries/"
|
43
|
-
FileUtils.mkdir_p(file_dir) unless Dir.exist?(file_dir)
|
44
|
-
pluralized_class_name = class_name.underscore.pluralize
|
45
|
-
file_path = "#{file_dir}#{pluralized_class_name}.rbs"
|
46
|
-
File.open(file_path, "w") do |f|
|
47
|
-
f.write(<<~TEXT)
|
48
|
-
module Queries
|
49
|
-
class BaseQuery
|
50
|
-
end
|
51
|
-
class #{pluralized_class_name.camelize} < Queries::BaseQuery
|
52
|
-
def resolve: () -> ( Hash[Symbol, ( String | Integer | bool )] | ::GraphQL::ExecutionError)
|
53
|
-
def self.type: (*untyped) -> String
|
54
|
-
end
|
55
|
-
end
|
56
|
-
TEXT
|
57
|
-
end
|
58
|
-
Souls::Painter.create_file(file_path.to_s)
|
59
|
-
end
|
60
|
-
file_path
|
61
|
-
end
|
62
37
|
end
|
63
38
|
end
|
@@ -29,9 +29,7 @@ module Souls
|
|
29
29
|
end
|
30
30
|
|
31
31
|
it "return #{singularized_class_name.camelize} response" do
|
32
|
-
|
33
|
-
.to_return(status: 200, body: "", headers: {})
|
34
|
-
#{' '}
|
32
|
+
allow_any_instance_of(::Mailgun::Client).to(receive(:send_message).and_return(true))
|
35
33
|
a1 = result.dig("data", "#{singularized_class_name.camelize(:lower)}")
|
36
34
|
expect(a1).not_to be_empty
|
37
35
|
expect(a1).to(include("response" => be_a(String)))
|
data/lib/souls/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.13.
|
1
|
+
1.13.6
|
@@ -1 +1 @@
|
|
1
|
-
1.13.
|
1
|
+
1.13.6
|
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: 1.13.
|
4
|
+
version: 1.13.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-12-
|
13
|
+
date: 2021-12-21 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|
@@ -138,10 +138,9 @@ dependencies:
|
|
138
138
|
- - ">="
|
139
139
|
- !ruby/object:Gem::Version
|
140
140
|
version: 1.1.0
|
141
|
-
description:
|
142
|
-
|
143
|
-
|
144
|
-
Record, RSpec, RuboCop, and Google Cloud. "
|
141
|
+
description: |-
|
142
|
+
Ruby Serverless Framework 'SOULs' | Ruby サーバーレスフレームワーク SOULs.
|
143
|
+
Powered by Ruby GraphQL, RBS/Steep, Active Record, RSpec, RuboCop, and Google Cloud.
|
145
144
|
email:
|
146
145
|
- f.kawasaki@elsoul.nl
|
147
146
|
- s.kishi@elsoul.nl
|
@@ -292,8 +291,6 @@ requirements: []
|
|
292
291
|
rubygems_version: 3.2.32
|
293
292
|
signing_key:
|
294
293
|
specification_version: 4
|
295
|
-
summary: Ruby Serverless Framework 'SOULs'
|
296
|
-
|
297
|
-
Apps faster like Rails. Powered by Ruby GraphQL, RBS/Steep, Active Record, RSpec,
|
298
|
-
RuboCop, and Google Cloud.
|
294
|
+
summary: Ruby Serverless Framework 'SOULs' | Ruby サーバーレスフレームワーク SOULs. Powered by
|
295
|
+
Ruby GraphQL, RBS/Steep, Active Record, RSpec, RuboCop, and Google Cloud.
|
299
296
|
test_files: []
|