souls 0.61.1 → 0.61.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3828f9e5e60da52d2c030db5d8862999526b9c4ad5d939362af9c75651ab611a
4
- data.tar.gz: 6a547ed6a88be3e6bab6f8243c9ae396d1e03e316a68cd354f29d680dd4b3969
3
+ metadata.gz: a395c41a097cf8773d3e19188976b3948e09a9736b157ce351a692ac1c9e5096
4
+ data.tar.gz: 20617090b1454ca2c6974aee63e4837a6ba31a71111304d745b72d08594e9d4a
5
5
  SHA512:
6
- metadata.gz: 10d125cf0158c0a886cbf554d3c455bc9c71933b7d430fd2aa7aee183560a7f38bf0063d4e1c330ffd3e701424359235ffd593740f4e5b514293d2bb06659cb2
7
- data.tar.gz: acd9be198f7479b4d6bbe568aa4d6d8f8542cbb13e08b44a3d36cdd0de7bbaec54e051fd159c7a0d74aeb514ea8a6a822c7b182997721428379bd3019a1bb204
6
+ metadata.gz: 6698f7dca334ddae16066fbd55675478fc5c215598ba5c39185e618ffc02929141043f0f1c3b106798426d13deef1f4324736402b3cac0d48e9c3a2522ec18ca
7
+ data.tar.gz: fc3411de2e75eed68d82897af363e399aeaaf9416e5187e9ff69ba8e754956152410574c2bef3f53e5066112e41d03f9a52c089dee1a18e836859f0ff0e033f6
@@ -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
@@ -18,16 +18,6 @@ module Souls
18
18
  souls_api_credit(app_name: app_name, service_name: service_name)
19
19
  end
20
20
 
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
21
  private
32
22
 
33
23
  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.1".freeze
2
+ VERSION = "0.61.2".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 0.40.1
1
+ 0.40.2
@@ -1 +1 @@
1
- 0.40.1
1
+ 0.40.2
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.1
4
+ version: 0.61.2
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