souls 0.33.6 → 0.33.10

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: f1eebcee0a559eb11c3775010017d7853437c68ac819c87ce88accb8f0c18563
4
- data.tar.gz: b877e4de3f3e81fa695440af2c659fc4486470c51e893dd599f1311e64d14881
3
+ metadata.gz: 42572882f70bf5036203626a78bf4986287646ebbdf34dd0b6533fe988881c57
4
+ data.tar.gz: 9aef13191973be32018f86ac5d7c159d0b74b346a6c5671905fd5bc9fadc2bd8
5
5
  SHA512:
6
- metadata.gz: f25ad16b4c983855e67806b17c8adc7d4d876a0f5f609b88fb0323189ff9f897d02bd708be75d81895ae166cdffc448bc983277941ae0361417884dc00799877
7
- data.tar.gz: cb3511df46829fb1c73d9198cadb06b988c1f28268ea00864eafa3bddc3b90e92a3beff6850a8af54f3accd7d0fa411704b2ebb90129f9dfd5c99c6f93b98a99
6
+ metadata.gz: bd901d189f0e2c273d7e97f613659ea9b1a39d19db33799d350211bb46c38a4281951e54ae5fb623c0cae9be6cbdcfe6a2d31af3e08dc78a193be3aff180f2f4
7
+ data.tar.gz: 511cd4dbc1b2c8341b641c1f80aa38c82e97661728138e9ce90c7f36a104661196f1068f502ca0659992643dd5f5257daaf722d59bfa339dab238bf0f4d91b20
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"
@@ -1,19 +1,30 @@
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
4
  singularized_class_name = class_name.underscore.singularize
5
5
  file_dir = "./app/graphql/mutations/managers/#{singularized_class_name}_manager"
6
6
  FileUtils.mkdir_p(file_dir) unless Dir.exist?(file_dir)
7
- file_path = "#{file_dir}/#{singularized_class_name}.rb"
7
+ file_path = "#{file_dir}/#{mutation}.rb"
8
+ raise(StandardError, "Already Exist!") if File.exist?(file_path)
9
+
8
10
  File.open(file_path, "w") do |f|
9
11
  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 を送信します。"
12
+ module Mutations
13
+ module Managers::#{singularized_class_name.camelize}Manager
14
+ class #{mutation.underscore.camelize} < BaseMutation
15
+ description "#{mutation} description"
16
+ ## Edit `argument` and `field`
17
+ argument :argment, String, required: true
18
+
14
19
  field :response, String, null: false
15
20
 
16
- node_type(Types::#{singularized_class_name.camelize}Type)
21
+ def resolve(**args)
22
+ # Define Here
23
+ rescue StandardError => e
24
+ GraphQL::ExecutionError.new(e.to_s)
25
+ end
26
+ end
27
+ end
17
28
  end
18
29
  TEXT
19
30
  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/init.rb CHANGED
@@ -41,9 +41,8 @@ module Souls
41
41
  f.write(<<~TEXT)
42
42
  Souls.configure do |config|
43
43
  config.app = "#{app_name}"
44
- config.project_id = "souls-app"
45
- config.strain = "#{app_name}"
46
- config.github_repo = "elsoul/souls"
44
+ config.project_id = "#{app_name}-project"
45
+ config.strain = "api"
47
46
  config.fixed_gems = ["excluded_gem"]
48
47
  end
49
48
  TEXT
@@ -70,7 +69,7 @@ module Souls
70
69
  f.write(<<~TEXT)
71
70
  Souls.configure do |config|
72
71
  config.app = "#{app_name}"
73
- config.project_id = "#{app_name}"
72
+ config.project_id = "#{app_name}-project"
74
73
  config.strain = "mother"
75
74
  config.fixed_gems = ["excluded_gem"]
76
75
  end
data/lib/souls/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Souls
2
- VERSION = "0.33.6".freeze
2
+ VERSION = "0.33.10".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 0.12.6
1
+ 0.12.10
@@ -1 +1 @@
1
- 0.12.6
1
+ 0.12.10
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.6
4
+ version: 0.33.10
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-28 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 ワークフローを標準装備。開発者がビジネスロジックに集中し、楽しくコードが書けるような環境を目指しています。