souls 1.7.25 → 1.7.29
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/souls/cli/create/index.rb +0 -1
- data/lib/souls/cli/db/create_migration.rb +28 -0
- data/lib/souls/cli/db/index.rb +1 -45
- data/lib/souls/cli/generate/job_rbs.rb +3 -1
- data/lib/souls/cli/release/release.rb +1 -1
- data/lib/souls/version.rb +1 -1
- data/lib/souls/versions/.souls_api_version +1 -1
- data/lib/souls/versions/.souls_worker_version +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 543a49c66529eb4d7a25953cc87352c79ac8e5687b19102e9ce5101cee31f426
|
4
|
+
data.tar.gz: 45047547362ee7b524ebfc7a60956e7685385ebdb5d675bfd6ef9a56d8cc03da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6997c1ec1dd34d4a79f4ceccbdde5936646222fdf9374eeaf66eefcf3cf6b13bcb14ddb697bbb111c8ad9cdadbec9044f81757f7589cf95d9839b9af1a4b18fe
|
7
|
+
data.tar.gz: d634d87fb05dbb05defe161ad25c31fb82e56a9c3eae292cf6457fe9a29e33afb6d25a240d2dc7b0694e600764ea4368501c766c5133929496ac52e9a4ac410d
|
data/README.md
CHANGED
@@ -16,7 +16,7 @@
|
|
16
16
|
<img alt="" src="https://badgen.net/rubygems/dt/souls">
|
17
17
|
</a>
|
18
18
|
<a aria-label="Test" href="https://rubygems.org/gems/souls">
|
19
|
-
<img alt="" src="https://github.com/elsoul/souls/actions/workflows/
|
19
|
+
<img alt="" src="https://github.com/elsoul/souls/actions/workflows/test.yml/badge.svg">
|
20
20
|
</a>
|
21
21
|
<a aria-label="License" href="https://github.com/elsoul/souls/blob/master/LICENSE.txt">
|
22
22
|
<img alt="" src="https://badgen.net/badge/license/Apache/blue">
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Souls
|
2
|
+
class DB < Thor
|
3
|
+
desc "create_migration [CLASS_NAME]", "Create ActiveRecord Migration File"
|
4
|
+
def create_migration(class_name)
|
5
|
+
pluralized_class_name = class_name.underscore.pluralize
|
6
|
+
singularized_class_name = class_name.underscore.singularize
|
7
|
+
Souls::DB.new.invoke(:model, [singularized_class_name], {})
|
8
|
+
Souls::DB.new.invoke(:rspec_model, [singularized_class_name], {})
|
9
|
+
Souls::DB.new.invoke(:model_rbs, [singularized_class_name], {})
|
10
|
+
puts(Paint["Created file! : ", :green])
|
11
|
+
system("rake db:create_migration NAME=create_#{pluralized_class_name}")
|
12
|
+
file_path = Dir["db/migrate/*create_#{pluralized_class_name}.rb"].first
|
13
|
+
File.open(file_path, "w") do |f|
|
14
|
+
f.write(<<~TEXT)
|
15
|
+
class Create#{pluralized_class_name.camelize} < ActiveRecord::Migration[6.1]
|
16
|
+
def change
|
17
|
+
create_table :#{pluralized_class_name} do |t|
|
18
|
+
|
19
|
+
t.boolean :is_deleted, null: false, default: false
|
20
|
+
t.timestamps
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
TEXT
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
data/lib/souls/cli/db/index.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
require_relative "./create_migration"
|
1
2
|
require_relative "./create_migration_rbs"
|
2
3
|
require_relative "./model"
|
3
4
|
require_relative "./rspec_model"
|
@@ -17,8 +18,6 @@ module Souls
|
|
17
18
|
db_system("rake db:migrate RACK_ENV=test")
|
18
19
|
end
|
19
20
|
true
|
20
|
-
rescue Thor::Error => e
|
21
|
-
raise(Thor::Error, e)
|
22
21
|
end
|
23
22
|
|
24
23
|
desc "create", "Create Database"
|
@@ -30,8 +29,6 @@ module Souls
|
|
30
29
|
else
|
31
30
|
db_system("rake db:create")
|
32
31
|
end
|
33
|
-
rescue Thor::Error => e
|
34
|
-
raise(Thor::Error, e)
|
35
32
|
end
|
36
33
|
|
37
34
|
desc "seed", "Insert Seed Data"
|
@@ -44,8 +41,6 @@ module Souls
|
|
44
41
|
db_system("rake db:seed")
|
45
42
|
db_system("rake db:seed RACK_ENV=test")
|
46
43
|
end
|
47
|
-
rescue Thor::Error => e
|
48
|
-
raise(Thor::Error, e)
|
49
44
|
end
|
50
45
|
|
51
46
|
desc "migrate_reset", "Reset Database"
|
@@ -57,75 +52,36 @@ module Souls
|
|
57
52
|
else
|
58
53
|
db_system("rake db:migrate:reset")
|
59
54
|
end
|
60
|
-
rescue Thor::Error => e
|
61
|
-
raise(Thor::Error, e)
|
62
|
-
end
|
63
|
-
|
64
|
-
desc "create_migration [CLASS_NAME]", "Create ActiveRecord Migration File"
|
65
|
-
def create_migration(class_name)
|
66
|
-
pluralized_class_name = class_name.underscore.pluralize
|
67
|
-
singularized_class_name = class_name.underscore.singularize
|
68
|
-
Souls::DB.new.invoke(:model, [singularized_class_name], {})
|
69
|
-
Souls::DB.new.invoke(:rspec_model, [singularized_class_name], {})
|
70
|
-
Souls::DB.new.invoke(:model_rbs, [singularized_class_name], {})
|
71
|
-
puts(Paint["Created file! : ", :green])
|
72
|
-
system("rake db:create_migration NAME=create_#{pluralized_class_name}")
|
73
|
-
file_path = Dir["db/migrate/*create_#{pluralized_class_name}.rb"].first
|
74
|
-
File.open(file_path, "w") do |f|
|
75
|
-
f.write(<<~TEXT)
|
76
|
-
class Create#{pluralized_class_name.camelize} < ActiveRecord::Migration[6.1]
|
77
|
-
def change
|
78
|
-
create_table :#{pluralized_class_name} do |t|
|
79
|
-
|
80
|
-
t.boolean :is_deleted, null: false, default: false
|
81
|
-
t.timestamps
|
82
|
-
end
|
83
|
-
end
|
84
|
-
end
|
85
|
-
TEXT
|
86
|
-
end
|
87
|
-
rescue Thor::Error => e
|
88
|
-
raise(Thor::Error, e)
|
89
55
|
end
|
90
56
|
|
91
57
|
desc "add_column [CLASS_NAME]", "Create ActiveRecord Migration File"
|
92
58
|
def add_column(class_name)
|
93
59
|
pluralized_class_name = class_name.underscore.pluralize
|
94
60
|
system("rake db:create_migration NAME=add_column_to_#{pluralized_class_name}")
|
95
|
-
rescue Thor::Error => e
|
96
|
-
raise(Thor::Error, e)
|
97
61
|
end
|
98
62
|
|
99
63
|
desc "rename_column [CLASS_NAME]", "Create ActiveRecord Migration File"
|
100
64
|
def rename_column(class_name)
|
101
65
|
pluralized_class_name = class_name.underscore.pluralize
|
102
66
|
system("rake db:create_migration NAME=rename_column_to_#{pluralized_class_name}")
|
103
|
-
rescue Thor::Error => e
|
104
|
-
raise(Thor::Error, e)
|
105
67
|
end
|
106
68
|
|
107
69
|
desc "change_column [CLASS_NAME]", "Create ActiveRecord Migration File"
|
108
70
|
def change_column(class_name)
|
109
71
|
pluralized_class_name = class_name.underscore.pluralize
|
110
72
|
system("rake db:create_migration NAME=change_column_to_#{pluralized_class_name}")
|
111
|
-
rescue Thor::Error => e
|
112
|
-
raise(Thor::Error, e)
|
113
73
|
end
|
114
74
|
|
115
75
|
desc "remove_column [CLASS_NAME]", "Create ActiveRecord Migration File"
|
116
76
|
def remove_column(class_name)
|
117
77
|
pluralized_class_name = class_name.underscore.pluralize
|
118
78
|
system("rake db:create_migration NAME=remove_column_to_#{pluralized_class_name}")
|
119
|
-
rescue Thor::Error => e
|
120
|
-
raise(Thor::Error, e)
|
121
79
|
end
|
122
80
|
|
123
81
|
desc "drop_table [CLASS_NAME]", "Create ActiveRecord Migration File"
|
124
82
|
def drop_table(class_name)
|
125
83
|
pluralized_class_name = class_name.underscore.pluralize
|
126
84
|
system("rake db:create_migration NAME=drop_table_to_#{pluralized_class_name}")
|
127
|
-
rescue Thor::Error => e
|
128
|
-
raise(Thor::Error, e)
|
129
85
|
end
|
130
86
|
|
131
87
|
private
|
@@ -9,7 +9,9 @@ module Souls
|
|
9
9
|
file_dir = "./sig/#{worker_name}/app/graphql/queries/"
|
10
10
|
FileUtils.mkdir_p(file_dir) unless Dir.exist?(file_dir)
|
11
11
|
file_path = "#{file_dir}#{singularized_class_name}.rbs"
|
12
|
-
|
12
|
+
sig_type_path = "./sig/#{worker_name}/app/graphql/types"
|
13
|
+
FileUtils.mkdir_p(sig_type_path) unless Dir.exist?(sig_type_path)
|
14
|
+
type_file_path = "#{sig_type_path}/#{singularized_class_name}_type.rbs"
|
13
15
|
File.open(file_path, "w") do |f|
|
14
16
|
f.write(<<~TEXT)
|
15
17
|
module Queries
|
@@ -37,7 +37,7 @@ module Souls
|
|
37
37
|
system("rake release")
|
38
38
|
write_changelog(current_souls_ver: current_souls_ver)
|
39
39
|
system("gh release create v#{souls_new_ver} -t v#{souls_new_ver} -F ./CHANGELOG.md")
|
40
|
-
system("gsutil -m -q cp -r coverage gs://souls-bucket/souls-coverage")
|
40
|
+
system("gsutil -m -q -o 'GSUtil:parallel_process_count=1' cp -r coverage gs://souls-bucket/souls-coverage")
|
41
41
|
system("bundle exec rake upload:init_files")
|
42
42
|
Whirly.status = Paint["soul-v#{souls_new_ver} successfully updated!"]
|
43
43
|
end
|
data/lib/souls/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.7.
|
1
|
+
1.7.29
|
@@ -1 +1 @@
|
|
1
|
-
1.7.
|
1
|
+
1.7.29
|
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: 1.7.
|
4
|
+
version: 1.7.29
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- POPPIN-FUMI
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2021-11-
|
13
|
+
date: 2021-11-17 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|
@@ -130,6 +130,7 @@ files:
|
|
130
130
|
- lib/souls/cli/cli_exception.rb
|
131
131
|
- lib/souls/cli/console/index.rb
|
132
132
|
- lib/souls/cli/create/index.rb
|
133
|
+
- lib/souls/cli/db/create_migration.rb
|
133
134
|
- lib/souls/cli/db/create_migration_rbs.rb
|
134
135
|
- lib/souls/cli/db/index.rb
|
135
136
|
- lib/souls/cli/db/model.rb
|