souls 0.61.0 → 0.61.4

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: 630be09191b9f58ffab7b304d247f4c5b8bc07e6f75c224badce92e946d4e35a
4
- data.tar.gz: aec39e44cc2a9bf871290b5abd310d7b287b0dabb2c774a7ad4bf19fe5eb837a
3
+ metadata.gz: 254ddf89546f7b674ad3941fdaad4be7b54405bd3b7db3e71113d2be8fa7e79e
4
+ data.tar.gz: 71e8ca13c1ab708b542e10e88c10b60863d2b478055e1d0002211929631b2ef8
5
5
  SHA512:
6
- metadata.gz: e7f386e93badfffc73c33a66079765644592357a18314f801299e7a3f63293b7379738fe874601263734e1cd658337862e378375221a897c7188dc79ee4c35f9
7
- data.tar.gz: df0659b22c6a7d76b15c3413535c80fb014bfd497ced5ebbd01184bafacdca24a6c460097b39698f4e5bf56ceeb102c863b860ba12ac81130e844b41382fb33e
6
+ metadata.gz: 84bab6964d5c54d2aa7bb3f3ce6391c33cb1a3584016e17b971e9d1d4cb0e479ca25d658d854f31bc4f9be66bd9ba7bd64ee10c9d3eaa15a54975632ae58eb53
7
+ data.tar.gz: 4335c34dc142db883351458eed730cc11963ec139ad2e3085d4efed086ee48c9db3b2370f4f47da5513ef02325576857533f5c7d3fca8077253695300e8fd403
@@ -121,7 +121,7 @@ end
121
121
  on:
122
122
  push:
123
123
  branches:
124
- - master
124
+ - main
125
125
  paths:
126
126
  - "apps/#{worker_name}/**"
127
127
  - ".github/workflows/#{worker_name}.yml"
@@ -0,0 +1,27 @@
1
+ module Souls
2
+ class DB < Thor
3
+ desc "create_migration_rbs [CLASS_NAME]", "Generate ActiveRecord Migration's RBS Template"
4
+ def create_migration_rbs(class_name)
5
+ file_path = ""
6
+ Dir.chdir(Souls.get_mother_path.to_s) do
7
+ file_dir = "./sig/api/db/migrate"
8
+ FileUtils.mkdir_p(file_dir) unless Dir.exist?(file_dir)
9
+ pluralized_class_name = class_name.underscore.pluralize
10
+ file_path = "#{file_dir}/create_#{pluralized_class_name}.rbs"
11
+ File.open(file_path, "w") do |f|
12
+ f.write(<<~TEXT)
13
+ class Create#{pluralized_class_name.camelize}
14
+ def change: () -> untyped
15
+ def create_table: (:#{pluralized_class_name}) { (untyped) -> untyped } -> untyped
16
+ def add_index: (:#{pluralized_class_name}, *untyped) -> untyped
17
+ end
18
+ TEXT
19
+ end
20
+ puts(Paint % ["Created file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }])
21
+ end
22
+ file_path
23
+ rescue Thor::Error => e
24
+ raise(Thor::Error, e)
25
+ end
26
+ end
27
+ end
@@ -75,6 +75,7 @@ module Souls
75
75
  end
76
76
  TEXT
77
77
  end
78
+ Souls::DB.new.invoke(:create_migration, [pluralized_class_name], {})
78
79
  rescue Thor::Error => e
79
80
  raise(Thor::Error, e)
80
81
  end
@@ -13,21 +13,15 @@ module Souls
13
13
  mother_config_init(app_name: app_name)
14
14
  download_github_actions(app_name: app_name)
15
15
  initial_config_init(app_name: app_name, service_name: service_name)
16
- system("cd #{app_name} && souls add_submodule")
17
- system("cd #{app_name} && git init")
16
+ system(
17
+ "
18
+ cd #{app_name} && git submodule add https://github.com/ruby/gem_rbs_collection.git vendor/rbs/gem_rbs_collection
19
+ "
20
+ )
21
+ system("cd #{app_name} && git init --initial-branch=main")
18
22
  souls_api_credit(app_name: app_name, service_name: service_name)
19
23
  end
20
24
 
21
- desc "add_submodule", "Run git submodule add RBS collection"
22
- def add_submodule
23
- system("git submodule add https://github.com/ruby/gem_rbs_collection.git vendor/rbs/gem_rbs_collection")
24
- end
25
-
26
- desc "update_submodule", "Run git submodule update --init RBS collection"
27
- def update_submodule
28
- system("git submodule update --init https://github.com/ruby/gem_rbs_collection.git vendor/rbs/gem_rbs_collection")
29
- end
30
-
31
25
  private
32
26
 
33
27
  def get_version(repository_name: "souls_api")
@@ -1 +1,2 @@
1
1
  require_relative "./gemfile"
2
+ require_relative "./submodule"
@@ -0,0 +1,8 @@
1
+ module Souls
2
+ class Upgrade < Thor
3
+ desc "submodule", "Run git submodule update --init RBS collection"
4
+ def submodule
5
+ system("git submodule update --init https://github.com/ruby/gem_rbs_collection.git vendor/rbs/gem_rbs_collection")
6
+ end
7
+ end
8
+ end
data/lib/souls/cli.rb CHANGED
@@ -22,7 +22,7 @@ module Souls
22
22
  desc "sync", " SOULs Sync Commands"
23
23
  subcommand "sync", Sync
24
24
 
25
- desc "upgrade gemfile", "SOULs Upgrade Gemfile & Gemfile.lock"
25
+ desc "upgrade [COMMAND]", "SOULs Upgrade Commands"
26
26
  subcommand "upgrade", Upgrade
27
27
 
28
28
  # rubocop:disable Style/StringHashKeys
data/lib/souls/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Souls
2
- VERSION = "0.61.0".freeze
2
+ VERSION = "0.61.4".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 0.40.0
1
+ 0.40.4
@@ -1 +1 @@
1
- 0.40.0
1
+ 0.40.4
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.61.0
4
+ version: 0.61.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - POPPIN-FUMI
@@ -130,6 +130,7 @@ files:
130
130
  - lib/souls/cli.rb
131
131
  - lib/souls/cli/console/index.rb
132
132
  - lib/souls/cli/create/index.rb
133
+ - lib/souls/cli/db/create_migration_rbs.rb
133
134
  - lib/souls/cli/db/index.rb
134
135
  - lib/souls/cli/docker/index.rb
135
136
  - lib/souls/cli/gcloud/compute/index.rb
@@ -188,6 +189,7 @@ files:
188
189
  - lib/souls/cli/update/type.rb
189
190
  - lib/souls/cli/upgrade/gemfile.rb
190
191
  - lib/souls/cli/upgrade/index.rb
192
+ - lib/souls/cli/upgrade/submodule.rb
191
193
  - lib/souls/index.rb
192
194
  - lib/souls/utils/index.rb
193
195
  - lib/souls/version.rb