souls 0.21.0 → 0.21.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/Gemfile +5 -5
- data/Gemfile.lock +34 -33
- data/exe/souls +9 -4
- data/lib/souls/generate/application.rb +3 -1
- data/lib/souls/generate/policy.rb +5 -4
- data/lib/souls/generate/query.rb +1 -0
- data/lib/souls/generate/resolver.rb +1 -0
- data/lib/souls/generate/rspec_factory.rb +1 -1
- data/lib/souls/generate/rspec_model.rb +1 -1
- data/lib/souls/generate/rspec_mutation.rb +1 -0
- data/lib/souls/generate/rspec_policy.rb +1 -0
- data/lib/souls/generate/rspec_query.rb +1 -0
- data/lib/souls/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 78b49dde67014e3798a6f1f9404a6700be255abc69d604427cc490eee0c2974a
|
4
|
+
data.tar.gz: 5a1ea6a86a8be16f340c28c8bebb046ee758a436c8bd9cd6f4461c9af80e1dd3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1bb85405181d2280c1a13547b5f2f9e171e48dc053eb596810076f6c79860b19e792cda9bb52e9d5a3ce2c21def0e3bdd7b1b762e50b2387e59fbe3cd1a033bf
|
7
|
+
data.tar.gz: 1a3857edb0b9d8ef914b8012bb51688d1fcdd7740929255c04eb5c92852d37ab426a08074eebb3baeff5f3a656a5621d1a0bd795f0ba833f689344d161a8fef0
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.0.
|
1
|
+
3.0.1
|
data/Gemfile
CHANGED
@@ -3,9 +3,9 @@ source "https://rubygems.org"
|
|
3
3
|
# Specify your gem's dependencies in souls.gemspec
|
4
4
|
gemspec
|
5
5
|
|
6
|
-
gem "activesupport", "6.1.
|
7
|
-
gem "parser", "3.0.
|
6
|
+
gem "activesupport", "6.1.3.2"
|
7
|
+
gem "parser", "3.0.1.1"
|
8
8
|
gem "rake", "13.0.3"
|
9
|
-
gem "rspec", "3.
|
10
|
-
gem "rubocop", "1.
|
11
|
-
gem "steep", "0.
|
9
|
+
gem "rspec", "3.10.0"
|
10
|
+
gem "rubocop", "1.15.0"
|
11
|
+
gem "steep", "0.44.1"
|
data/Gemfile.lock
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
souls (0.21.
|
4
|
+
souls (0.21.1)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
|
-
activesupport (6.1.
|
9
|
+
activesupport (6.1.3.2)
|
10
10
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
11
11
|
i18n (>= 1.6, < 2)
|
12
12
|
minitest (>= 5.1)
|
@@ -15,63 +15,64 @@ GEM
|
|
15
15
|
ast (2.4.2)
|
16
16
|
concurrent-ruby (1.1.8)
|
17
17
|
diff-lcs (1.4.4)
|
18
|
-
ffi (1.15.
|
18
|
+
ffi (1.15.1)
|
19
19
|
i18n (1.8.10)
|
20
20
|
concurrent-ruby (~> 1.0)
|
21
|
-
language_server-protocol (3.16.0.
|
21
|
+
language_server-protocol (3.16.0.1)
|
22
22
|
listen (3.5.1)
|
23
23
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
24
24
|
rb-inotify (~> 0.9, >= 0.9.10)
|
25
25
|
minitest (5.14.4)
|
26
26
|
parallel (1.20.1)
|
27
|
-
parser (3.0.
|
27
|
+
parser (3.0.1.1)
|
28
28
|
ast (~> 2.4.1)
|
29
29
|
rainbow (3.0.0)
|
30
30
|
rake (13.0.3)
|
31
|
-
rb-fsevent (0.
|
31
|
+
rb-fsevent (0.11.0)
|
32
32
|
rb-inotify (0.10.1)
|
33
33
|
ffi (~> 1.0)
|
34
|
-
rbs (1.
|
34
|
+
rbs (1.2.1)
|
35
35
|
regexp_parser (2.1.1)
|
36
36
|
rexml (3.2.5)
|
37
|
-
rspec (3.
|
38
|
-
rspec-core (~> 3.
|
39
|
-
rspec-expectations (~> 3.
|
40
|
-
rspec-mocks (~> 3.
|
41
|
-
rspec-core (3.1
|
42
|
-
rspec-support (~> 3.
|
43
|
-
rspec-expectations (3.1
|
37
|
+
rspec (3.10.0)
|
38
|
+
rspec-core (~> 3.10.0)
|
39
|
+
rspec-expectations (~> 3.10.0)
|
40
|
+
rspec-mocks (~> 3.10.0)
|
41
|
+
rspec-core (3.10.1)
|
42
|
+
rspec-support (~> 3.10.0)
|
43
|
+
rspec-expectations (3.10.1)
|
44
44
|
diff-lcs (>= 1.2.0, < 2.0)
|
45
|
-
rspec-support (~> 3.
|
46
|
-
rspec-mocks (3.
|
47
|
-
|
48
|
-
|
49
|
-
|
45
|
+
rspec-support (~> 3.10.0)
|
46
|
+
rspec-mocks (3.10.2)
|
47
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
48
|
+
rspec-support (~> 3.10.0)
|
49
|
+
rspec-support (3.10.2)
|
50
|
+
rubocop (1.15.0)
|
50
51
|
parallel (~> 1.10)
|
51
52
|
parser (>= 3.0.0.0)
|
52
53
|
rainbow (>= 2.2.2, < 4.0)
|
53
54
|
regexp_parser (>= 1.8, < 3.0)
|
54
55
|
rexml
|
55
|
-
rubocop-ast (>= 1.
|
56
|
+
rubocop-ast (>= 1.5.0, < 2.0)
|
56
57
|
ruby-progressbar (~> 1.7)
|
57
58
|
unicode-display_width (>= 1.4.0, < 3.0)
|
58
|
-
rubocop-ast (1.
|
59
|
-
parser (>=
|
59
|
+
rubocop-ast (1.6.0)
|
60
|
+
parser (>= 3.0.1.1)
|
60
61
|
ruby-progressbar (1.11.0)
|
61
|
-
steep (0.
|
62
|
+
steep (0.44.1)
|
62
63
|
activesupport (>= 5.1)
|
63
64
|
language_server-protocol (>= 3.15, < 4.0)
|
64
65
|
listen (~> 3.0)
|
65
66
|
parallel (>= 1.0.0)
|
66
67
|
parser (>= 2.7)
|
67
68
|
rainbow (>= 2.2.2, < 4.0)
|
68
|
-
rbs (
|
69
|
+
rbs (>= 1.2.0)
|
69
70
|
terminal-table (>= 2, < 4)
|
70
|
-
terminal-table (3.0.
|
71
|
-
unicode-display_width (
|
71
|
+
terminal-table (3.0.1)
|
72
|
+
unicode-display_width (>= 1.1.1, < 3)
|
72
73
|
tzinfo (2.0.4)
|
73
74
|
concurrent-ruby (~> 1.0)
|
74
|
-
unicode-display_width (
|
75
|
+
unicode-display_width (2.0.0)
|
75
76
|
zeitwerk (2.4.2)
|
76
77
|
|
77
78
|
PLATFORMS
|
@@ -79,13 +80,13 @@ PLATFORMS
|
|
79
80
|
x86_64-linux
|
80
81
|
|
81
82
|
DEPENDENCIES
|
82
|
-
activesupport (= 6.1.
|
83
|
-
parser (= 3.0.
|
83
|
+
activesupport (= 6.1.3.2)
|
84
|
+
parser (= 3.0.1.1)
|
84
85
|
rake (= 13.0.3)
|
85
|
-
rspec (= 3.
|
86
|
-
rubocop (= 1.
|
86
|
+
rspec (= 3.10.0)
|
87
|
+
rubocop (= 1.15.0)
|
87
88
|
souls!
|
88
|
-
steep (= 0.
|
89
|
+
steep (= 0.44.1)
|
89
90
|
|
90
91
|
BUNDLED WITH
|
91
|
-
2.2.
|
92
|
+
2.2.18
|
data/exe/souls
CHANGED
@@ -98,16 +98,21 @@ begin
|
|
98
98
|
Souls::Generate.migrate_all
|
99
99
|
when "migration"
|
100
100
|
system "rake db:create_migration NAME=create_#{ARGV[2]}"
|
101
|
+
when "update"
|
102
|
+
Souls::Generate.delete_all class_name: ARGV[2]
|
103
|
+
Souls::Generate.single_migrate class_name: ARGV[2]
|
101
104
|
else
|
102
105
|
"SOULs!"
|
103
106
|
end
|
104
107
|
when "d"
|
105
108
|
Souls::Generate.delete_all class_name: ARGV[1]
|
106
|
-
when "update"
|
107
|
-
Souls::Generate.add_delete class_name: ARGV[1]
|
108
|
-
Souls::Generate.single_migrate class_name: ARGV[1]
|
109
109
|
when "db:create"
|
110
|
-
|
110
|
+
case ARGV[1]
|
111
|
+
when "RACK_ENV=production"
|
112
|
+
system "rake db:create RACK_ENV=production"
|
113
|
+
else
|
114
|
+
system "rake db:create && rake db:create RACK_ENV=test"
|
115
|
+
end
|
111
116
|
when "db:migrate"
|
112
117
|
case ARGV[1]
|
113
118
|
when "RACK_ENV=production"
|
@@ -106,7 +106,9 @@ module Souls
|
|
106
106
|
rspec_query: rspec_query(class_name: singularized_class_name),
|
107
107
|
rspec_resolver: rspec_resolver(class_name: singularized_class_name),
|
108
108
|
queries: query(class_name: singularized_class_name),
|
109
|
-
mutations: mutation(class_name: singularized_class_name)
|
109
|
+
mutations: mutation(class_name: singularized_class_name),
|
110
|
+
policies: policy(class_name: singularized_class_name),
|
111
|
+
rspec_policies: rspec_policy(class_name: singularized_class_name)
|
110
112
|
]
|
111
113
|
end
|
112
114
|
|
@@ -6,23 +6,24 @@ module Souls
|
|
6
6
|
dir_name = "./app/policies"
|
7
7
|
FileUtils.mkdir_p dir_name unless Dir.exist? dir_name
|
8
8
|
file_path = "#{dir_name}/#{class_name.singularize}_policy.rb"
|
9
|
+
return "Policy already exist! #{file_path}" if File.exist? file_path
|
9
10
|
File.open(file_path, "w") do |f|
|
10
11
|
f.write <<~EOS
|
11
12
|
class #{class_name.camelize}Policy < ApplicationPolicy
|
12
13
|
def show?
|
13
|
-
|
14
|
+
true
|
14
15
|
end
|
15
16
|
|
16
17
|
def index?
|
17
|
-
|
18
|
+
true
|
18
19
|
end
|
19
20
|
|
20
21
|
def create?
|
21
|
-
|
22
|
+
staff_permissions?
|
22
23
|
end
|
23
24
|
|
24
25
|
def update?
|
25
|
-
|
26
|
+
staff_permissions?
|
26
27
|
end
|
27
28
|
|
28
29
|
def delete?
|
data/lib/souls/generate/query.rb
CHANGED
@@ -4,6 +4,7 @@ module Souls
|
|
4
4
|
## Generate Query / Queries
|
5
5
|
def create_queries class_name: "souls"
|
6
6
|
file_path = "./app/graphql/queries/#{class_name.pluralize}.rb"
|
7
|
+
return "Query already exist! #{file_path}" if File.exist? file_path
|
7
8
|
File.open(file_path, "w") do |f|
|
8
9
|
f.write <<~EOS
|
9
10
|
module Queries
|
@@ -5,6 +5,7 @@ module Souls
|
|
5
5
|
def resolver_head class_name: "souls"
|
6
6
|
FileUtils.mkdir_p "./app/graphql/resolvers" unless Dir.exist? "./app/graphql/resolvers"
|
7
7
|
file_path = "./app/graphql/resolvers/#{class_name.singularize}_search.rb"
|
8
|
+
return "Resolver already exist! #{file_path}" if File.exist? file_path
|
8
9
|
@relation_params = []
|
9
10
|
return ["Resolver already exist! #{file_path}"] if File.exist? file_path
|
10
11
|
File.open(file_path, "w") do |f|
|
@@ -4,6 +4,7 @@ module Souls
|
|
4
4
|
## Generate Rspec Factory
|
5
5
|
def rspec_factory_head class_name: "souls"
|
6
6
|
file_path = "./spec/factories/#{class_name.pluralize}.rb"
|
7
|
+
return "RspecFactory already exist! #{file_path}" if File.exist? file_path
|
7
8
|
File.open(file_path, "w") do |f|
|
8
9
|
f.write <<~EOS
|
9
10
|
FactoryBot.define do
|
@@ -52,7 +53,6 @@ module Souls
|
|
52
53
|
|
53
54
|
def rspec_factory class_name: "souls"
|
54
55
|
file_path = "./spec/factories/#{class_name.pluralize}.rb"
|
55
|
-
return ["Factory aleady exist! #{file_path}"] if File.exist? file_path
|
56
56
|
singularized_class_name = class_name.singularize
|
57
57
|
rspec_factory_head class_name: singularized_class_name
|
58
58
|
rspec_factory_params class_name: singularized_class_name
|
@@ -4,7 +4,7 @@ module Souls
|
|
4
4
|
## Generate Rspec Model
|
5
5
|
def rspec_model class_name: "souls"
|
6
6
|
file_path = "./spec/models/#{class_name}_spec.rb"
|
7
|
-
return
|
7
|
+
return "RspecModel already exist! #{file_path}" if File.exist? file_path
|
8
8
|
File.open(file_path, "w") do |f|
|
9
9
|
f.write <<~EOS
|
10
10
|
RSpec.describe "#{class_name.camelize} Model テスト", type: :model do
|
@@ -4,6 +4,7 @@ module Souls
|
|
4
4
|
## Generate Rspec Mutation
|
5
5
|
def rspec_mutation_head class_name: "souls"
|
6
6
|
file_path = "./spec/mutations/#{class_name.singularize}_spec.rb"
|
7
|
+
return "RspecMutation already exist! #{file_path}" if File.exist? file_path
|
7
8
|
File.open(file_path, "w") do |f|
|
8
9
|
f.write <<~EOS
|
9
10
|
RSpec.describe \"#{class_name.camelize} Mutation テスト\" do
|
@@ -6,6 +6,7 @@ module Souls
|
|
6
6
|
dir_name = "./spec/policies"
|
7
7
|
FileUtils.mkdir_p dir_name unless Dir.exist? dir_name
|
8
8
|
file_path = "./spec/policies/#{class_name}_policy_spec.rb"
|
9
|
+
return "RspecPolicy already exist! #{file_path}" if File.exist? file_path
|
9
10
|
File.open(file_path, "w") do |new_line|
|
10
11
|
new_line.write <<~EOS
|
11
12
|
describe #{class_name.camelize}Policy do
|
@@ -4,6 +4,7 @@ module Souls
|
|
4
4
|
## Generate Rspec Query
|
5
5
|
def rspec_query_head class_name: "souls"
|
6
6
|
file_path = "./spec/queries/#{class_name.singularize}_spec.rb"
|
7
|
+
return "RspecQuery already exist! #{file_path}" if File.exist? file_path
|
7
8
|
File.open(file_path, "w") do |f|
|
8
9
|
f.write <<~EOS
|
9
10
|
RSpec.describe \"#{class_name.camelize} Query テスト\" do
|
data/lib/souls/version.rb
CHANGED
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.21.
|
4
|
+
version: 0.21.1
|
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-05-
|
13
|
+
date: 2021-05-27 00:00:00.000000000 Z
|
14
14
|
dependencies: []
|
15
15
|
description: SOULS is a GraphQL Based Web Application Framework for Microservices
|
16
16
|
on Multi Cloud Platform such as Google Cloud Platform, Amazon Web Services, and
|
@@ -84,7 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
84
84
|
- !ruby/object:Gem::Version
|
85
85
|
version: '0'
|
86
86
|
requirements: []
|
87
|
-
rubygems_version: 3.2.
|
87
|
+
rubygems_version: 3.2.15
|
88
88
|
signing_key:
|
89
89
|
specification_version: 4
|
90
90
|
summary: SOULS is a GraphQL Based Web Application Framework for Microservices on Multi
|