souls 0.25.15 → 0.25.19

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9260166372806697964d695eb8e5715701951aca0fbc488077e1e17e7f15d4c1
4
- data.tar.gz: d773cf796195391e392520041225a3614aed1b863ccd759ad03e26b303782589
3
+ metadata.gz: b95e788773391bebd59bf7faf921e9d647bb39f564430b45e239e79c2b0ccfed
4
+ data.tar.gz: 22d8445babf829feb19c61209033f5e9b32196f827468f0ad2f9c40aa75305d9
5
5
  SHA512:
6
- metadata.gz: 976b7cc1173658166fd691a694f915e43beaa85e997f1d6ac71d5dcd7a9636067b2fbe41aa7e2ffc160ef35a4e710f98604d7af9b746bfed9ad00d409f65bcaa
7
- data.tar.gz: 9d0d22d2ae8cc90cbf33ef6f66ac3699043b8db37749969a2c226a343a75cd14cc7bd8570a4056f76ba2119eaae86cfc5ef08436bb506c9d1b1a66c43b160555
6
+ metadata.gz: 19d6e7e610f56fe92c41c12f2b2175fd92877d2d398a2f246e3a26c18f8cb4d53abb462e4644bf21527c92e9b89e26f16e88e66e68cb682a65c11eecc49b2bc8
7
+ data.tar.gz: eca89781a54e42932c3835f56b9c70c3ea1cc3f282b9c4c32c0effeb8ce354e313ce1cafb64ceb90e9191f78c9e92ffe18a5ce6bc9b9503cee257d87bf06bc0b
data/README.md CHANGED
@@ -22,19 +22,16 @@
22
22
  Welcome to SOULs Serverless Application Framework!
23
23
 
24
24
  SOULs is a Serverless Application Framework with Ruby GraphQL.
25
- SOULs has six strains, API, Worker, Console, Admin, Media, Doc, and can be used in combination according to the purpose. SOULs Backend GraphQL Ruby & Frontend Relay are Scalable and Easy to deploy to Google Cloud. No more routing for Backends!
26
- You can focus on your business logic. No more infra problems.
25
+ SOULs has 3 strains, API, Worker, and Frontend. It can be used in combination according to the purpose. SOULs Backend GraphQL Ruby & Frontend Relay are Scalable and Easy to deploy to Google Cloud. No more routing for Backends!
26
+ You can focus on your business logic.
27
27
 
28
28
  ![画像](https://storage.googleapis.com/souls-bucket/imgs/souls-structure.jpg)
29
29
 
30
- SOULs creates 6 types of framework.
30
+ SOULs creates 3 types of framework.
31
31
 
32
32
  1. API - GraphQL (Ruby) - Simple API - Cloud Run
33
33
  2. Worker - Google Pub/Sub Worker API (Ruby) - Cloud Run
34
- 3. Console Web Client - User Console and CMS (TypeScript)
35
- 4. Admin Web Client - Admin Console and CMS (TypeScript)
36
- 5. Media Web Client - Media web client with SSG (TypeScript)
37
- 6. Doc Web Client - Doc web client with SSG (TypeScript)
34
+ 3. Frontend - React Application (TypeScript) - Firebase
38
35
 
39
36
  ## Dependency
40
37
 
@@ -81,10 +78,7 @@ And Create Your APP
81
78
  Select Strain:
82
79
  1. SOULs GraphQL API
83
80
  2. SOULs Worker
84
- 3. SOULs Console Web
85
- 4. SOULs Admin Web
86
- 5. SOULs Media Web
87
- 6. SOULs Doc Web
81
+ 3. SOULs Frontend Web
88
82
 
89
83
 
90
84
  ## Gemfile 自動更新アップデート
data/exe/souls CHANGED
@@ -18,14 +18,7 @@ begin
18
18
  end
19
19
 
20
20
  prompt = TTY::Prompt.new
21
- choices = [
22
- "1. SOULs GraphQL API",
23
- "2. SOULs Pub/Sub Worker",
24
- "3. SOULs Console Web",
25
- "4. SOULs Admin Web",
26
- "5. SOULs Media Web",
27
- "6. SOULs Doc Web"
28
- ]
21
+ choices = ["1. SOULs GraphQL API", "2. SOULs Pub/Sub Worker", "3. SOULs Frontend Web"]
29
22
  choice_num = prompt.select(Paint["Select Strain: ", :cyan], choices)[0].to_i
30
23
  case choice_num
31
24
  when 1, 2
@@ -184,7 +177,7 @@ begin
184
177
  system("rm -rf ../#{other_app}/db/*")
185
178
  system("cp -r ./db/* ../#{other_app}/db/*")
186
179
  when "t", "test"
187
- system("rubocop -a")
180
+ system("rubocop -A")
188
181
  system("bundle exec rspec")
189
182
  when "run"
190
183
  system("docker build . -t souls -f Dockerfile.dev")
@@ -10,9 +10,9 @@ module Souls
10
10
  File.open(file_path, "w") do |new_line|
11
11
  new_line.write(<<~TEXT)
12
12
  module Mutations
13
- module #{singularized_class_name.camelize}
13
+ module Base::#{singularized_class_name.camelize}
14
14
  class Create#{singularized_class_name.camelize} < BaseMutation
15
- field :#{singularized_class_name}_edge, Types::#{singularized_class_name.camelize}.edge_type, null: false
15
+ field :#{singularized_class_name}_edge, Types::#{singularized_class_name.camelize}Type.edge_type, null: false
16
16
  field :error, String, null: true
17
17
 
18
18
  TEXT
@@ -104,9 +104,9 @@ module Souls
104
104
  File.open(file_path, "w") do |new_line|
105
105
  new_line.write(<<~TEXT)
106
106
  module Mutations
107
- module #{class_name.camelize}
107
+ module Base::#{class_name.camelize}
108
108
  class Update#{class_name.camelize} < BaseMutation
109
- field :#{class_name}_edge, Types::#{class_name.camelize}.edge_type, null: false
109
+ field :#{class_name}_edge, Types::#{class_name.camelize}Type.edge_type, null: false
110
110
 
111
111
  argument :id, String, required: true
112
112
  TEXT
@@ -211,7 +211,7 @@ module Souls
211
211
  File.open(file_path, "w") do |f|
212
212
  f.write(<<~TEXT)
213
213
  module Mutations
214
- module #{class_name.camelize}
214
+ module Base::#{class_name.camelize}
215
215
  class Delete#{class_name.camelize} < BaseMutation
216
216
  field :#{class_name}, Types::#{class_name.camelize}Type, null: false
217
217
  argument :id, String, required: true
@@ -240,7 +240,7 @@ module Souls
240
240
  File.open(file_path, "w") do |f|
241
241
  f.write(<<~TEXT)
242
242
  module Mutations
243
- module #{class_name.camelize}
243
+ module Base::#{class_name.camelize}
244
244
  class DestroyDelete#{class_name.camelize} < BaseMutation
245
245
  field :#{class_name}, Types::#{class_name.camelize}Type, null: false
246
246
  argument :id, String, required: true
@@ -15,7 +15,7 @@ module Souls
15
15
  let(:#{class_name.underscore}) { FactoryBot.create(:#{class_name.underscore}) }
16
16
 
17
17
  context "being a visitor" do
18
- let(:user) { FactoryBot.create(:user, user_role: :normal) }
18
+ let(:user) { FactoryBot.create(:user, roles: :normal) }
19
19
 
20
20
  it { is_expected.to permit_action(:index) }
21
21
  it { is_expected.to permit_action(:show) }
@@ -23,13 +23,13 @@ module Souls
23
23
  end
24
24
 
25
25
  context "being a user" do
26
- let(:user) { FactoryBot.create(:user, user_role: :user) }
26
+ let(:user) { FactoryBot.create(:user, roles: :user) }
27
27
 
28
28
  it { is_expected.to permit_actions([:create, :update]) }
29
29
  end
30
30
 
31
31
  context "being an admin" do
32
- let(:user) { FactoryBot.create(:user, user_role: :admin) }
32
+ let(:user) { FactoryBot.create(:user, roles: :admin) }
33
33
 
34
34
  it { is_expected.to permit_actions([:create, :update, :delete]) }
35
35
  end
@@ -26,23 +26,23 @@ module Souls
26
26
  if line.include?("end") || line.include?("t.index")
27
27
  if @relation_params.empty?
28
28
  new_line.write(<<-TEXT)
29
- let!(:#{class_name}) { FactoryBot.create(:#{class_name}) }
29
+ let!(:#{class_name}) { FactoryBot.create(:#{class_name}) }
30
30
 
31
- let(:query) do
32
- data_id = Base64.encode64("#{class_name.camelize}:\#{#{class_name.singularize.underscore}.id}")
33
- %(query {
34
- #{class_name.singularize.camelize(:lower)}(id: \\"\#{data_id}\\") {
35
- id
31
+ let(:query) do
32
+ data_id = Base64.encode64("#{class_name.camelize}:\#{#{class_name.singularize.underscore}.id}")
33
+ %(query {
34
+ #{class_name.singularize.camelize(:lower)}(id: \\"\#{data_id}\\") {
35
+ id
36
36
  TEXT
37
37
  else
38
38
  new_line.write(<<-TEXT)
39
- let(:#{class_name}) { FactoryBot.create(:#{class_name}, #{@relation_params.join(', ')}) }
39
+ let(:#{class_name}) { FactoryBot.create(:#{class_name}, #{@relation_params.join(', ')}) }
40
40
 
41
- let(:query) do
42
- data_id = Base64.encode64("#{class_name.camelize}:\#{#{class_name.singularize.underscore}.id}")
43
- %(query {
44
- #{class_name.singularize.camelize(:lower)}(id: \\"\#{data_id}\\") {
45
- id
41
+ let(:query) do
42
+ data_id = Base64.encode64("#{class_name.camelize}:\#{#{class_name.singularize.underscore}.id}")
43
+ %(query {
44
+ #{class_name.singularize.camelize(:lower)}(id: \\"\#{data_id}\\") {
45
+ id
46
46
  TEXT
47
47
  end
48
48
  break
@@ -70,25 +70,25 @@ module Souls
70
70
  f.each_line.with_index do |line, _i|
71
71
  if @on
72
72
  if line.include?("end") || line.include?("t.index")
73
- new_line.write(<<~TEXT)
74
- }
75
- }
76
- )
77
- end
78
- #{' '}
79
- subject(:result) do
80
- SoulsApiSchema.execute(query).as_json
81
- end
82
- #{' '}
83
- it "return #{class_name.camelize} Data" do
84
- begin
85
- a1 = result.dig("data", "#{class_name.singularize.camelize(:lower)}")
86
- raise unless a1.present?
87
- rescue
88
- raise StandardError, result
89
- end
90
- expect(a1).to include(
91
- "id" => be_a(String),
73
+ new_line.write(<<-TEXT)
74
+ }
75
+ }
76
+ )
77
+ end
78
+
79
+ subject(:result) do
80
+ SoulsApiSchema.execute(query).as_json
81
+ end
82
+
83
+ it "return #{class_name.camelize} Data" do
84
+ begin
85
+ a1 = result.dig("data", "#{class_name.singularize.camelize(:lower)}")
86
+ raise unless a1.present?
87
+ rescue
88
+ raise StandardError, result
89
+ end
90
+ expect(a1).to include(
91
+ "id" => be_a(String),
92
92
  TEXT
93
93
  break
94
94
  end
@@ -133,14 +133,14 @@ module Souls
133
133
  case type
134
134
  when "text", "date", "datetime"
135
135
  if array_true
136
- new_line.write(" \"#{name.camelize(:lower)}\" => be_all(String),\n")
136
+ new_line.write(" \"#{name.camelize(:lower)}\" => be_all(String),\n")
137
137
  else
138
- new_line.write(" \"#{name.camelize(:lower)}\" => be_a(String),\n")
138
+ new_line.write(" \"#{name.camelize(:lower)}\" => be_a(String),\n")
139
139
  end
140
140
  when "boolean"
141
- new_line.write(" \"#{name.singularize.camelize(:lower)}\" => be_in([true, false]),\n")
141
+ new_line.write(" \"#{name.singularize.camelize(:lower)}\" => be_in([true, false]),\n")
142
142
  when "string", "bigint", "integer", "float"
143
- new_line.write(" \"#{name.singularize.camelize(:lower)}\" => be_a(#{field}),\n")
143
+ new_line.write(" \"#{name.singularize.camelize(:lower)}\" => be_a(#{field}),\n")
144
144
  end
145
145
  end
146
146
  end
@@ -26,31 +26,31 @@ module Souls
26
26
  if line.include?("end") || line.include?("t.index")
27
27
  if @relation_params.empty?
28
28
  new_line.write(<<-TEXT)
29
- let!(:#{class_name}) { FactoryBot.create(:#{class_name}) }
29
+ let!(:#{class_name}) { FactoryBot.create(:#{class_name}) }
30
30
 
31
- let(:query) do
32
- %(query {
33
- #{class_name.singularize.camelize(:lower)}Search(filter: {
34
- isDeleted: false
35
- }) {
36
- edges {
37
- cursor
38
- node {
39
- id
31
+ let(:query) do
32
+ %(query {
33
+ #{class_name.singularize.camelize(:lower)}Search(filter: {
34
+ isDeleted: false
35
+ }) {
36
+ edges {
37
+ cursor
38
+ node {
39
+ id
40
40
  TEXT
41
41
  else
42
42
  new_line.write(<<-TEXT)
43
- let!(:#{class_name}) { FactoryBot.create(:#{class_name}, #{@relation_params.join(', ')}) }
43
+ let!(:#{class_name}) { FactoryBot.create(:#{class_name}, #{@relation_params.join(', ')}) }
44
44
 
45
- let(:query) do
46
- %(query {
47
- #{class_name.singularize.camelize(:lower)}Search(filter: {
48
- isDeleted: false
49
- }) {
50
- edges {
51
- cursor
52
- node {
53
- id
45
+ let(:query) do
46
+ %(query {
47
+ #{class_name.singularize.camelize(:lower)}Search(filter: {
48
+ isDeleted: false
49
+ }) {
50
+ edges {
51
+ cursor
52
+ node {
53
+ id
54
54
  TEXT
55
55
  end
56
56
  break
@@ -79,35 +79,35 @@ module Souls
79
79
  if @on
80
80
  if line.include?("end") || line.include?("t.index")
81
81
  new_line.write(<<-TEXT)
82
+ }
83
+ }
84
+ nodes {
85
+ id
86
+ }
87
+ pageInfo {
88
+ endCursor
89
+ hasNextPage
90
+ startCursor
91
+ hasPreviousPage
82
92
  }
83
- }
84
- nodes {
85
- id
86
- }
87
- pageInfo {
88
- endCursor
89
- hasNextPage
90
- startCursor
91
- hasPreviousPage
92
93
  }
93
94
  }
94
- }
95
- )
96
- end
97
-
98
- subject(:result) do
99
- SoulsApiSchema.execute(query).as_json
100
- end
95
+ )
96
+ end
101
97
 
102
- it "return #{class_name.camelize} Data" do
103
- begin
104
- a1 = result.dig("data", "#{class_name.singularize.camelize(:lower)}Search", "edges")[0]["node"]
105
- raise unless a1.present?
106
- rescue
107
- raise StandardError, result
98
+ subject(:result) do
99
+ SoulsApiSchema.execute(query).as_json
108
100
  end
109
- expect(a1).to include(
110
- "id" => be_a(String),
101
+
102
+ it "return #{class_name.camelize} Data" do
103
+ begin
104
+ a1 = result.dig("data", "#{class_name.singularize.camelize(:lower)}Search", "edges")[0]["node"]
105
+ raise unless a1.present?
106
+ rescue
107
+ raise StandardError, result
108
+ end
109
+ expect(a1).to include(
110
+ "id" => be_a(String),
111
111
  TEXT
112
112
  break
113
113
  end
data/lib/souls/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Souls
2
- VERSION = "0.25.15".freeze
2
+ VERSION = "0.25.19".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 0.4.18
1
+ 0.4.22
@@ -1 +1 @@
1
- 0.4.18
1
+ 0.4.22
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.25.15
4
+ version: 0.25.19
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-07-28 00:00:00.000000000 Z
13
+ date: 2021-08-02 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: paint
@@ -55,9 +55,10 @@ dependencies:
55
55
  - !ruby/object:Gem::Version
56
56
  version: 0.3.0
57
57
  description: |-
58
- SOULs is a Serverless Application Framework.
59
- SOULs has four strains, API, Worker, Console, Media, and can be used in combination according to the purpose.
60
- SOULs Backend GraphQL Ruby & Frontend Relay are Scalable and Easy to deploy to Google Cloud and Amazon Web Services
58
+ SOULs is a Serverless Application Framework with Ruby GraphQL.
59
+ SOULs has 3 strains, API, Worker, and Frontend. It can be used in combination according to the purpose.
60
+ SOULs Ruby GraphQL API / Worker and Easy to deploy to Google Cloud. No more routing for Backends!
61
+ You can focus on your business logic.
61
62
  email:
62
63
  - f.kawasaki@elsoul.nl
63
64
  - s.kishi@elsoul.nl
@@ -123,8 +124,8 @@ requirements: []
123
124
  rubygems_version: 3.2.22
124
125
  signing_key:
125
126
  specification_version: 4
126
- summary: SOULs is a Serverless Application Framework. SOULs has four strains, API,
127
- Worker, Console, Media, and can be used in combination according to the purpose.
128
- SOULs Backend GraphQL Ruby & Frontend Relay are Scalable and Easy to deploy to Google
129
- Cloud and Amazon Web Services
127
+ summary: SOULs is a Serverless Application Framework with Ruby GraphQL. SOULs has
128
+ 3 strains, API, Worker, and Frontend. It can be used in combination according to
129
+ the purpose. SOULs Ruby GraphQL API / Worker and Easy to deploy to Google Cloud.
130
+ No more routing for Backends! You can focus on your business logic.
130
131
  test_files: []