souls 0.20.1 → 0.20.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/.gitignore +0 -1
- data/Gemfile.lock +2 -1
- data/README.md +1 -1
- data/Rakefile +8 -0
- data/db/schema.rb +67 -0
- data/lib/souls.rb +3 -3
- data/lib/souls/generate/generate.rb +5 -0
- data/lib/souls/generate/model.rb +3 -1
- data/lib/souls/generate/mutation.rb +8 -6
- data/lib/souls/generate/policy.rb +3 -2
- data/lib/souls/version.rb +1 -1
- metadata +7 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8db722879f093fb8fce94490375915b314b12da82904863d1c163ca46a996413
|
4
|
+
data.tar.gz: 69422af9c6ab9b2fa4a0eda7b77885113c361374878da46753edbd3de1523e90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4ff3c701302677a1265d7bfb3f97e1636c16cd4eba90b5b51ecf4c2c63fb04fc62305a9b5431b132b34d6aff6cf15ab715fb3f6d9f6865a87c23e64794657ca
|
7
|
+
data.tar.gz: 002341c52599829070aa4b25cb09e6f7cdd58bdc238bb61b316b935b67c75f6c311bbd5cdcefd8e618de6d8a79a60ce52d53dbdcea696bb2ea767055410880b1
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -26,7 +26,7 @@ This is Cloud Based APP Framework. Easy Deployment.
|
|
26
26
|
Microservices on Multi Cloud Platform such as Google Cloud Platform, Amazon Web Services, and Alibaba Cloud. Auto deploy with scalable condition.
|
27
27
|
You can focus on business logic. No more infra problems.
|
28
28
|
|
29
|
-
SOULs creates
|
29
|
+
SOULs creates 4 types of framework.
|
30
30
|
|
31
31
|
1. API - GraphQL (Ruby) - Simple API - Cloud Run
|
32
32
|
2. Worker - Google Pub/Sub Worker API (Ruby) - Cloud Run
|
data/Rakefile
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require "bundler/gem_tasks"
|
2
2
|
require "rspec/core/rake_task"
|
3
|
+
require "./lib/souls"
|
3
4
|
|
4
5
|
RSpec::Core::RakeTask.new(:spec)
|
5
6
|
|
@@ -12,4 +13,11 @@ namespace :task do
|
|
12
13
|
FileUtils.touch "#{file_path}#{f}.rb"
|
13
14
|
end
|
14
15
|
end
|
16
|
+
|
17
|
+
task :a do
|
18
|
+
file_path = "./spec/generate/"
|
19
|
+
Souls::SOULS_METHODS.each do |f|
|
20
|
+
FileUtils.touch "#{file_path}#{f}_spec.rb"
|
21
|
+
end
|
22
|
+
end
|
15
23
|
end
|
data/db/schema.rb
ADDED
@@ -0,0 +1,67 @@
|
|
1
|
+
# This is Test Schema
|
2
|
+
# All the files created by this schema.rb
|
3
|
+
|
4
|
+
ActiveRecord::Schema.define(version: 20_210_308_070_947) do
|
5
|
+
enable_extension "plpgsql"
|
6
|
+
|
7
|
+
create_table "article_categories", force: :cascade do |t|
|
8
|
+
t.string "name", null: false
|
9
|
+
t.text "tags", default: [], array: true
|
10
|
+
t.boolean "is_deleted", default: false, null: false
|
11
|
+
t.datetime "created_at", precision: 6, null: false
|
12
|
+
t.datetime "updated_at", precision: 6, null: false
|
13
|
+
t.index ["is_deleted"], name: "index_article_categories_on_is_deleted"
|
14
|
+
t.index ["name"], name: "index_article_categories_on_name"
|
15
|
+
end
|
16
|
+
|
17
|
+
create_table "articles", force: :cascade do |t|
|
18
|
+
t.bigint "user_id"
|
19
|
+
t.string "title", null: false
|
20
|
+
t.text "body", default: "", null: false
|
21
|
+
t.string "thumnail_url", default: "", null: false
|
22
|
+
t.datetime "public_date", default: "2021-05-07 11:45:23", null: false
|
23
|
+
t.bigint "article_category_id", null: false
|
24
|
+
t.boolean "is_public", default: false, null: false
|
25
|
+
t.boolean "just_created", default: true, null: false
|
26
|
+
t.string "slag", null: false
|
27
|
+
t.text "tags", default: [], array: true
|
28
|
+
t.boolean "is_deleted", default: false, null: false
|
29
|
+
t.datetime "created_at", precision: 6, null: false
|
30
|
+
t.datetime "updated_at", precision: 6, null: false
|
31
|
+
t.index ["article_category_id"], name: "index_articles_on_article_category_id"
|
32
|
+
t.index ["is_deleted"], name: "index_articles_on_is_deleted"
|
33
|
+
t.index ["is_public"], name: "index_articles_on_is_public"
|
34
|
+
t.index ["slag"], name: "index_articles_on_slag", unique: true
|
35
|
+
t.index ["title"], name: "index_articles_on_title", unique: true
|
36
|
+
t.index ["user_id"], name: "index_articles_on_user_id"
|
37
|
+
end
|
38
|
+
|
39
|
+
create_table "users", force: :cascade do |t|
|
40
|
+
t.integer "retailer_uid"
|
41
|
+
t.string "uid", null: false
|
42
|
+
t.string "username", default: "", null: false
|
43
|
+
t.string "screen_name", default: "", null: false
|
44
|
+
t.string "last_name", default: "", null: false
|
45
|
+
t.string "first_name", default: "", null: false
|
46
|
+
t.string "last_name_kanji", default: "", null: false
|
47
|
+
t.string "first_name_kanji", default: "", null: false
|
48
|
+
t.string "last_name_kana", default: "", null: false
|
49
|
+
t.string "first_name_kana", default: "", null: false
|
50
|
+
t.string "email", null: false
|
51
|
+
t.string "tel", default: "", null: false
|
52
|
+
t.string "icon_url", default: "", null: false
|
53
|
+
t.string "birthday", default: "", null: false
|
54
|
+
t.string "gender", default: "", null: false
|
55
|
+
t.string "lang", default: "ja", null: false
|
56
|
+
t.string "category", default: "user", null: false
|
57
|
+
t.integer "user_role", default: 0, null: false
|
58
|
+
t.boolean "is_deleted", default: false, null: false
|
59
|
+
t.datetime "created_at", precision: 6, null: false
|
60
|
+
t.datetime "updated_at", precision: 6, null: false
|
61
|
+
t.index ["email"], name: "index_users_on_email", unique: true
|
62
|
+
t.index ["is_deleted"], name: "index_users_on_is_deleted"
|
63
|
+
t.index ["screen_name"], name: "index_users_on_screen_name"
|
64
|
+
t.index ["uid"], name: "index_users_on_uid"
|
65
|
+
t.index ["username"], name: "index_users_on_username"
|
66
|
+
end
|
67
|
+
end
|
data/lib/souls.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
|
1
|
+
require_relative "souls/version"
|
2
2
|
require "active_support/core_ext/string/inflections"
|
3
|
-
|
3
|
+
require_relative "souls/init"
|
4
|
+
require_relative "souls/generate/generate"
|
4
5
|
require "json"
|
5
6
|
require "fileutils"
|
6
|
-
Dir["./lib/souls/generate/*.rb"].each { |f| require f }
|
7
7
|
|
8
8
|
module Souls
|
9
9
|
SOULS_METHODS = [
|
data/lib/souls/generate/model.rb
CHANGED
@@ -3,7 +3,9 @@ module Souls
|
|
3
3
|
class << self
|
4
4
|
## Generate Model
|
5
5
|
def model class_name: "souls"
|
6
|
-
|
6
|
+
file_dir = "./app/models/"
|
7
|
+
FileUtils.mkdir_p file_dir unless Dir.exist? file_dir
|
8
|
+
file_path = "#{file_dir}#{class_name.singularize}.rb"
|
7
9
|
return "Model already exist! #{file_path}" if File.exist? file_path
|
8
10
|
File.open(file_path, "w") do |f|
|
9
11
|
f.write <<~EOS
|
@@ -3,20 +3,22 @@ module Souls
|
|
3
3
|
class << self
|
4
4
|
## Generate 4 Mutations - ["create", "update", "delete", "destroy_delete"]
|
5
5
|
## 1.Mutation - Create
|
6
|
-
def create_mutation_head class_name: "
|
7
|
-
|
6
|
+
def create_mutation_head class_name: "user"
|
7
|
+
singularized_class_name = class_name.singularize.underscore
|
8
|
+
dir_name = "./app/graphql/mutations/#{singularized_class_name}"
|
8
9
|
FileUtils.mkdir_p dir_name unless Dir.exist? dir_name
|
9
|
-
file_path = "./app/graphql/mutations/#{
|
10
|
+
file_path = "./app/graphql/mutations/#{singularized_class_name}/create_#{singularized_class_name}.rb"
|
10
11
|
File.open(file_path, "w") do |new_line|
|
11
12
|
new_line.write <<~EOS
|
12
13
|
module Mutations
|
13
|
-
module #{
|
14
|
-
class Create#{
|
15
|
-
field :#{
|
14
|
+
module #{singularized_class_name.camelize}
|
15
|
+
class Create#{singularized_class_name.camelize} < BaseMutation
|
16
|
+
field :#{singularized_class_name}_edge, Types::#{singularized_class_name.camelize}NodeType, null: false
|
16
17
|
field :error, String, null: true
|
17
18
|
|
18
19
|
EOS
|
19
20
|
end
|
21
|
+
file_path
|
20
22
|
end
|
21
23
|
|
22
24
|
def create_mutation_params class_name: "souls"
|
@@ -5,7 +5,7 @@ module Souls
|
|
5
5
|
def policy class_name: "souls"
|
6
6
|
dir_name = "./app/policies"
|
7
7
|
FileUtils.mkdir_p dir_name unless Dir.exist? dir_name
|
8
|
-
file_path = "
|
8
|
+
file_path = "#{dir_name}/#{class_name.singularize}_policy.rb"
|
9
9
|
File.open(file_path, "w") do |f|
|
10
10
|
f.write <<~EOS
|
11
11
|
class #{class_name.camelize}Policy < ApplicationPolicy
|
@@ -43,7 +43,8 @@ module Souls
|
|
43
43
|
end
|
44
44
|
file_path
|
45
45
|
rescue StandardError => error
|
46
|
-
puts error
|
46
|
+
puts "method error"
|
47
|
+
puts error.backtrace
|
47
48
|
end
|
48
49
|
end
|
49
50
|
end
|
data/lib/souls/version.rb
CHANGED
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: souls
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.20.
|
4
|
+
version: 0.20.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- POPPIN-FUMI
|
8
8
|
- KishiTheMechanic
|
9
9
|
- James Neve
|
10
|
-
autorequire:
|
10
|
+
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2021-
|
13
|
+
date: 2021-05-20 00:00:00.000000000 Z
|
14
14
|
dependencies: []
|
15
15
|
description: SOULS is a GraphQL Based Web Application Framework for Microservices
|
16
16
|
on Multi Cloud Platform such as Google Cloud Platform, Amazon Web Services, and
|
@@ -41,9 +41,11 @@ files:
|
|
41
41
|
- bin/console
|
42
42
|
- bin/setup
|
43
43
|
- config/souls.rb
|
44
|
+
- db/schema.rb
|
44
45
|
- exe/souls
|
45
46
|
- lib/souls.rb
|
46
47
|
- lib/souls/generate/application.rb
|
48
|
+
- lib/souls/generate/generate.rb
|
47
49
|
- lib/souls/generate/model.rb
|
48
50
|
- lib/souls/generate/mutation.rb
|
49
51
|
- lib/souls/generate/policy.rb
|
@@ -67,7 +69,7 @@ metadata:
|
|
67
69
|
homepage_uri: https://github.com/elsoul/souls
|
68
70
|
source_code_uri: https://github.com/elsoul/souls
|
69
71
|
changelog_uri: https://github.com/elsoul/souls
|
70
|
-
post_install_message:
|
72
|
+
post_install_message:
|
71
73
|
rdoc_options: []
|
72
74
|
require_paths:
|
73
75
|
- lib
|
@@ -83,7 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
83
85
|
version: '0'
|
84
86
|
requirements: []
|
85
87
|
rubygems_version: 3.2.3
|
86
|
-
signing_key:
|
88
|
+
signing_key:
|
87
89
|
specification_version: 4
|
88
90
|
summary: SOULS is a GraphQL Based Web Application Framework for Microservices on Multi
|
89
91
|
Cloud Platform such as Google Cloud Platform, Amazon Web Services, and Alibaba Cloud.
|