souls 0.33.4 → 0.33.8

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: 0d646bd85b172e8de520a7df064670d8097407fa85a07b5b3149480b15e497a9
4
- data.tar.gz: 75b4ea6db4e92031a9e303c2c7cb0edb8f5c8e3f328db4ebc531d4cd965d2eb9
3
+ metadata.gz: ac3801b7cc5089209a6d5d6b01289f4d35bd4868ca9e911b32a12dd138172aa0
4
+ data.tar.gz: 7c240fc7c4afce0db3189758196293199761dc8f44d1f621aa86951f12270c44
5
5
  SHA512:
6
- metadata.gz: 8d6fc03dba103a44c1d441866dec676c46595a63141c6ae6c241f4e6abd88a0aeadac26cca63ee96823e05add2ff148953cb32c0990df58477ce8d6563929b1d
7
- data.tar.gz: 0e5649148bf8d07ff4636adc8f59745f8496244a99dc1ee65ed83b5e29b2a5aae18178c39283ee40fed5b0f22ff8c785f793640be25d919140d5c98f02211f6c
6
+ metadata.gz: 150e24efafed4e5673125dba72143a17605107e7ff916499580b48eb8fcbb3e42cc81bafb82594931d9880ae93f620a5c37326efda27bc4b037d228e78cc08e4
7
+ data.tar.gz: 112bac58b55863b8fc896bbdebea7fbd047a2627415163b8ab89de7323800b5fca2690dd71aecf48970b559c301702a17bab65e3a96aca04d03d22aabf8ca353
data/README.md CHANGED
@@ -36,7 +36,7 @@ SOULs フレームワークでは [Monorepo](https://en.wikipedia.org/wiki/Monor
36
36
  SOULs creates 3 types of framework.
37
37
 
38
38
  1. API - GraphQL (Ruby) - Simple API - Cloud Run
39
- 2. Worker - Google Pub/Sub Worker API (Ruby) - Cloud Run
39
+ 2. Worker - Google Pub/Sub Messaging Worker API (Ruby) - Cloud Run
40
40
  3. Frontend - React Application (TypeScript) - Firebase
41
41
 
42
42
  ## Dependency
@@ -53,7 +53,6 @@ SOULs creates 3 types of framework.
53
53
  - [Google Cloud Pub/Sub](https://cloud.google.com/pubsub)
54
54
  - [Google Cloud Storage](https://cloud.google.com/run)
55
55
  - [Google Cloud IAM](https://cloud.google.com/iam)
56
- - [Google Cloud DNS](https://cloud.google.com/dns)
57
56
  - [Google Cloud Container Registry](https://cloud.google.com/container-registry)
58
57
  - [Google Firebase](https://firebase.google.com/)
59
58
  - [Google Cloud Scheduler](https://cloud.google.com/scheduler)
@@ -90,7 +89,7 @@ And Create Your APP
90
89
  `Gemfile`, `Gemfile.lock` を最新のバージョンに自動更新します。
91
90
 
92
91
  ```
93
- souls gem:update
92
+ souls upgrade gemfile
94
93
  ```
95
94
 
96
95
 
@@ -103,7 +102,6 @@ Souls.configure do |config|
103
102
  config.app = "souls-api"
104
103
  config.project_id = "souls-api"
105
104
  config.strain = "api"
106
- config.github_repo = "elsoul/souls"
107
105
  config.fixed_gems = ["selenium-webdriver", "pg"]
108
106
  end
109
107
  ```
data/exe/souls CHANGED
@@ -14,10 +14,12 @@ begin
14
14
  when "generate", "g"
15
15
  method_name = ARGV[2]
16
16
  class_name = ARGV[3]
17
+ args = { class_name: class_name }
18
+ args[:mutation] = ARGV[4] if ARGV.size > 4
17
19
  status = Paint["Running SOULs Generate Commands...", :yellow]
18
20
  Whirly.start(spinner: "clock", interval: 420, stop: "🎉") do
19
21
  Whirly.status = status
20
- Souls::Api::Generate.public_send(method_name, class_name: class_name)
22
+ Souls::Api::Generate.public_send(method_name, **args)
21
23
  Whirly.status = "Done!"
22
24
  end
23
25
  when "update"
@@ -60,6 +62,8 @@ begin
60
62
  when "new"
61
63
  args = ARGV
62
64
  Souls::Init.start(args)
65
+ when "bashrc", "zshrc"
66
+ Souls::Init.generate_cd
63
67
  when "s", "server"
64
68
  system("foreman start -f Procfile.dev")
65
69
  when "c", "console"
@@ -1,19 +1,31 @@
1
1
  module Souls
2
2
  module Api::Generate
3
- def self.manager(class_name: "souls")
3
+ def self.manager(class_name: "user", mutation: "user_login")
4
+ p(mutation)
4
5
  singularized_class_name = class_name.underscore.singularize
5
6
  file_dir = "./app/graphql/mutations/managers/#{singularized_class_name}_manager"
6
7
  FileUtils.mkdir_p(file_dir) unless Dir.exist?(file_dir)
7
- file_path = "#{file_dir}/#{singularized_class_name}.rb"
8
+ file_path = "#{file_dir}/#{mutation}.rb"
9
+ raise(StandardError, "Already Exist!") if File.exist?(file_path)
10
+
8
11
  File.open(file_path, "w") do |f|
9
12
  f.write(<<~TEXT)
10
- class Types::#{singularized_class_name.camelize}Edge < module Mutations
11
- module Mailers
12
- class #{singularized_class_name.camelize}Mailer < BaseMutation
13
- description "Mail を送信します。"
13
+ module Mutations
14
+ module Managers::#{singularized_class_name.camelize}Manager
15
+ class #{mutation.underscore.camelize} < BaseMutation
16
+ description "#{mutation} description"
17
+ ## Edit `argument` and `field`
18
+ argument :argment, String, required: true
19
+
14
20
  field :response, String, null: false
15
21
 
16
- node_type(Types::#{singularized_class_name.camelize}Type)
22
+ def resolve(**args)
23
+ # Define Here
24
+ rescue StandardError => e
25
+ GraphQL::ExecutionError.new(e.to_s)
26
+ end
27
+ end
28
+ end
17
29
  end
18
30
  TEXT
19
31
  end
@@ -5,6 +5,20 @@ module Souls
5
5
  def create_migration(class_name: "user")
6
6
  pluralized_class_name = class_name.underscore.pluralize
7
7
  system("rake db:create_migration NAME=create_#{pluralized_class_name}")
8
+ file_path = Dir["db/migrate/*create_#{pluralized_class_name}.rb"].first
9
+ File.open(file_path, "w") do |f|
10
+ f.write(<<~TEXT)
11
+ class Create#{pluralized_class_name.camelize} < ActiveRecord::Migration[6.1]
12
+ def change
13
+ create_table :#{pluralized_class_name} do |t|
14
+
15
+ t.boolean :is_deleted, null: false, default: false
16
+ t.timestamps
17
+ end
18
+ end
19
+ end
20
+ TEXT
21
+ end
8
22
  end
9
23
 
10
24
  def add_column(class_name: "user")
data/lib/souls/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Souls
2
- VERSION = "0.33.4".freeze
2
+ VERSION = "0.33.8".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 0.12.4
1
+ 0.12.8
@@ -1 +1 @@
1
- 0.12.4
1
+ 0.12.8
@@ -18,7 +18,7 @@ module Souls
18
18
  def resolve
19
19
  # Define Job Here
20
20
 
21
- { response: "Job queued!" }
21
+ { response: "Job done!" }
22
22
  rescue StandardError => e
23
23
  GraphQL::ExecutionError.new(e.to_s)
24
24
  end
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.33.4
4
+ version: 0.33.8
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-08-27 00:00:00.000000000 Z
13
+ date: 2021-08-29 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
@@ -157,7 +157,7 @@ metadata:
157
157
  homepage_uri: https://souls.elsoul.nl
158
158
  source_code_uri: https://github.com/elsoul/souls
159
159
  changelog_uri: https://github.com/elsoul/souls
160
- post_install_message:
160
+ post_install_message:
161
161
  rdoc_options: []
162
162
  require_paths:
163
163
  - lib
@@ -173,7 +173,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
173
173
  version: '0'
174
174
  requirements: []
175
175
  rubygems_version: 3.2.22
176
- signing_key:
176
+ signing_key:
177
177
  specification_version: 4
178
178
  summary: SOULs はサーバーレスフルスタックフレームワークです。柔軟な Ruby GraphQL API と Worker はルーティングの必要がありません。
179
179
  クラウド環境への自動デプロイ、CI/CD ワークフローを標準装備。開発者がビジネスロジックに集中し、楽しくコードが書けるような環境を目指しています。