souls 0.15.7 → 0.16.2

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: abe6a8a19db79936b013516a4d13714d8b5f40dbd1936b3348c84954b3464f46
4
- data.tar.gz: 79b82ca41a79fdfcd56794b3bb329a905abfdac0fcecc5075973a53700b5a9c9
3
+ metadata.gz: 379d74f36f45442d0a3140ecef6d0138e502fcb00ca4d83be79a68cbf204dbbb
4
+ data.tar.gz: e71e854b0e31bdf14421c8d15769731d8c1db1d7f5e0aa02e55d7ca57fc3fa14
5
5
  SHA512:
6
- metadata.gz: 53e0e8479c8e0d935f55a5119ebc1af3f61b0ac40476dd36e291196c69bc025822eaa37213ef6ecdfcba182c163ecb3d1e2b76e1c6af497b3823c0f3e77b8115
7
- data.tar.gz: b6216fca804c81d140712a9ee7c01c926d034a10c5d84d3990e83491bb0fbea2d8ab7896465b4267bfa4edf4f2330b109376d6a6125e6a749ef660c419ebb3a6
6
+ metadata.gz: eb489b527ea9ff1237f32ee0a7c7316122790730f2d92e7b5e95b6002d4077822d6d29b396fc1e5d45b73987368cf456b5d41026ff5f8b3aa7359c17aee5894d
7
+ data.tar.gz: 9bd62c23a3d81bff36057e91b38260172493ff714254af06fabfa44f98f2c30c4dfb044c280b8eeb747da78531ed2e520ea0e1f75766732ea40e3851a9c91712
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- souls (0.15.6)
4
+ souls (0.16.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -79,6 +79,19 @@ And Create Your APP
79
79
  ## Usage - 1. GraphQL API
80
80
 
81
81
  ```bash
82
+ # Ruby version (using rbenv)
83
+ $ ruby -v
84
+ ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin20]
85
+
86
+ # Install xcode
87
+ $ xcode-select --install
88
+
89
+ # Install PostgreSQL (Mac env)
90
+ $ brew install postgresql
91
+
92
+ # Install redis
93
+ $ brew install redis
94
+
82
95
  # Version Check
83
96
  $ souls -v
84
97
 
data/exe/souls CHANGED
@@ -25,7 +25,7 @@ begin
25
25
  when "service"
26
26
  system "bundle exec rake run_server"
27
27
  else
28
- `bundle exec puma -p 3000 -e development`
28
+ system "foreman start -f Procfile.dev"
29
29
  end
30
30
  when "c", "console"
31
31
  strain = Souls.configuration.strain
@@ -33,7 +33,7 @@ begin
33
33
  when "media", "admin"
34
34
  system "yarn dev"
35
35
  else
36
- `bundle exec irb`
36
+ system "bundle exec irb"
37
37
  end
38
38
  when "i", "infra"
39
39
  Souls.send ARGV[1]
@@ -66,7 +66,7 @@ begin
66
66
  when "migrate_all"
67
67
  Souls::Init.migrate_all
68
68
  when "migration"
69
- STDOUT.write `rake db:create_migration NAME=#{ARGV[2]}`
69
+ system "rake db:create_migration NAME=create_#{ARGV[2]}"
70
70
  when "rspec_factory"
71
71
  Souls::Init.rspec_factory class_name: ARGV[2]
72
72
  when "rspec_model"
@@ -83,22 +83,22 @@ begin
83
83
  "SOULs!"
84
84
  end
85
85
  when "db:create"
86
- STDOUT.write `rake db:create && rake db:create RACK_ENV=test`
86
+ system "rake db:create && rake db:create RACK_ENV=test"
87
87
  when "db:migrate"
88
- STDOUT.write `rake db:migrate && rake db:migrate RACK_ENV=test`
88
+ system "rake db:migrate && rake db:migrate RACK_ENV=test"
89
89
  when "db:seed"
90
- STDOUT.write `rake db:seed`
90
+ system "rake db:seed"
91
91
  when "db:migrate:reset"
92
- STDOUT.write `rake db:migrate:reset && rake db:migrate:reset RACK_ENV=test`
92
+ system "rake db:migrate:reset && rake db:migrate:reset RACK_ENV=test"
93
93
  when "t", "test"
94
- STDOUT.write `rubocop`
95
- STDOUT.write `bundle exec rspec`
94
+ system "rubocop"
95
+ system "bundle exec rspec"
96
96
  when "run"
97
- STDOUT.write `docker build . -t souls:latest`
98
- STDOUT.write `docker run --rm -p 3000:3000 souls:latest`
97
+ system "docker build . -t souls:latest"
98
+ system "docker run --rm -p 3000:3000 souls:latest"
99
99
  when "deploy"
100
100
  project_id = Souls.configuration.project_id
101
- STDOUT.write `gcloud builds submit --config=cloudbuild.yml --project #{project_id}`
101
+ system "gcloud builds submit --config=cloudbuild.yml --project #{project_id}"
102
102
  else
103
103
  puts "Welcome to SOULs!"
104
104
  end
@@ -99,6 +99,7 @@ module Souls
99
99
 
100
100
  def rspec_resolver_head class_name: "souls"
101
101
  file_path = "./spec/resolvers/#{class_name.singularize}_search_spec.rb"
102
+ puts file_path
102
103
  File.open(file_path, "w") do |f|
103
104
  f.write <<~EOS
104
105
  RSpec.describe \"#{class_name.camelize}Search Resolver テスト\" do
@@ -134,7 +135,7 @@ module Souls
134
135
  EOS
135
136
  else
136
137
  new_line.write <<-EOS
137
- let(:#{class_name}) { FactoryBot.create(:#{class_name}, #{@relation_params.join(", ")}) }
138
+ let!(:#{class_name}) { FactoryBot.create(:#{class_name}, #{@relation_params.join(", ")}) }
138
139
 
139
140
  let(:query) do
140
141
  %(query {
data/lib/souls/init.rb CHANGED
@@ -1219,6 +1219,9 @@ module Souls
1219
1219
  " field :update_#{singularized_class_name}, mutation: Mutations::#{singularized_class_name.camelize}::Update#{singularized_class_name.camelize}",
1220
1220
  " field :delete_#{singularized_class_name}, mutation: Mutations::#{singularized_class_name.camelize}::Delete#{singularized_class_name.camelize}",
1221
1221
  " field :destroy_delete_#{singularized_class_name}, mutation: Mutations::#{singularized_class_name.camelize}::DestroyDelete#{singularized_class_name.camelize}"
1222
+ ],
1223
+ add_resolver: [
1224
+ " field :#{singularized_class_name}_search, resolver: Resolvers::#{singularized_class_name.camelize}Search"
1222
1225
  ]
1223
1226
  ]
1224
1227
  end
@@ -1248,6 +1251,10 @@ module Souls
1248
1251
  result[0][:add_query_type].each do |path|
1249
1252
  puts path
1250
1253
  end
1254
+ puts "\n ## Resolvers\n\n"
1255
+ result[0][:add_resolver].each do |path|
1256
+ puts path
1257
+ end
1251
1258
  puts "\n ## Connection Type\n\n"
1252
1259
  puts " def #{class_name.pluralize}"
1253
1260
  puts " #{class_name.singularize.camelize}.all.order(id: :desc)"
@@ -1283,7 +1290,7 @@ module Souls
1283
1290
  puts "\n============== Resolver =======================\n\n"
1284
1291
  paths.each do |class_name|
1285
1292
  class_name.each do |path|
1286
- path[:resovler].each { |line| puts line }
1293
+ path[:resolver].each { |line| puts line }
1287
1294
  end
1288
1295
  end
1289
1296
  puts "\n============== NodeType =======================\n\n"
@@ -1346,6 +1353,12 @@ module Souls
1346
1353
  path[:add_query_type].each { |line| puts line }
1347
1354
  end
1348
1355
  end
1356
+ puts "\n ## Resolvers\n\n"
1357
+ paths.each do |class_name|
1358
+ class_name.each do |path|
1359
+ path[:add_resolver].each { |line| puts line }
1360
+ end
1361
+ end
1349
1362
  puts "\n ## Connection Type\n\n"
1350
1363
  get_tables.each do |class_name|
1351
1364
  puts " def #{class_name.pluralize}"
data/lib/souls/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Souls
2
- VERSION = "0.15.7"
2
+ VERSION = "0.16.2"
3
3
  end
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.15.7
4
+ version: 0.16.2
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-02-15 00:00:00.000000000 Z
13
+ date: 2021-02-18 00:00:00.000000000 Z
14
14
  dependencies: []
15
15
  description: SOULS is a Web Application Framework for Microservices on Multi Cloud
16
16
  Platform such as Google Cloud Platform, Amazon Web Services, and Alibaba Cloud.