souls 0.14.9 → 0.15.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: b2096f11178e97e7f9bfc76a455f995efbaa2d7ee51eac442dd9acfe4435c55e
4
- data.tar.gz: b1b06d406c12ccc0cd0a39896e81f9ed5ae91b0213b334a4823f28f460ea2d30
3
+ metadata.gz: 92bb6af0f4b226fb280b5c821065a5e1a2a42d122421f515f0b69b18f6c9d4e4
4
+ data.tar.gz: 94a3ae84d925f9da525506d5ef8e21a18fb9cad3216b814532a91f656f318459
5
5
  SHA512:
6
- metadata.gz: 3ebe9c429a5bdff7b9afaab2aa7650258419f84dce2aec5af28268a31d6e60d31c510289ea672190eecdc69219b2b9bf74187046312b2a08ff40c383844f406e
7
- data.tar.gz: 8781aa43d25ae4159800876db76885e18beb4a664fe0c0cb9876ee336e2e45f488afb8b59beb478b30405bf3214b246eac4ce7fc0f1ee8427c58093d0da40e74
6
+ metadata.gz: 89c2cd3f9f1053718cfe21866a4c0f496a5b11f940c1199ae244f3285447129b6e5ed9507728b26151104882f4322de1b9fc5859f57da570f57de95f5a82d6fd
7
+ data.tar.gz: 35b6bf6be49bb5a6cc34fc6884023715a8d6ccbcc1f5a76b8486717feadb214cf5fcf528d6b0c1fe37065a23f967fc009ace2ba7df69ba4d462602820dc5bb83
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- souls (0.14.7)
4
+ souls (0.15.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
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
- system "bundle exec puma -p 3000"
28
+ STDOUT.write `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
- system "bundle exec irb"
36
+ STDOUT.write `bundle exec irb`
37
37
  end
38
38
  when "i", "infra"
39
39
  Souls.send ARGV[1]
@@ -47,12 +47,12 @@ begin
47
47
  case ARGV[1]
48
48
  when "test_dir"
49
49
  Souls::Init.test_dir
50
- when "test"
51
- Souls::Init.node_type class_name: "user"
50
+ when "node_type"
51
+ Souls::Init.node_type class_name: ARGV[2]
52
52
  when "resolver"
53
- Souls::Init.resolver class_name: "user"
53
+ Souls::Init.resolver class_name: ARGV[2]
54
54
  when "job"
55
- Souls::Init.job class_name: "user"
55
+ Souls::Init.job class_name: ARGV[2]
56
56
  when "model"
57
57
  Souls::Init.model class_name: ARGV[2]
58
58
  when "mutation"
@@ -66,7 +66,7 @@ begin
66
66
  when "migrate_all"
67
67
  Souls::Init.migrate_all
68
68
  when "migration"
69
- `rake db:create_migration NAME=#{ARGV[2]}`
69
+ STDOUT.write `rake db:create_migration NAME=#{ARGV[2]}`
70
70
  when "rspec_factory"
71
71
  Souls::Init.rspec_factory class_name: ARGV[2]
72
72
  when "rspec_model"
@@ -81,20 +81,20 @@ begin
81
81
  "SOULs!"
82
82
  end
83
83
  when "db:create"
84
- `rake db:create && rake db:create RACK_ENV=test`
84
+ STDOUT.write `rake db:create && rake db:create RACK_ENV=test`
85
85
  when "db:migrate"
86
- `rake db:migrate && rake db:migrate RACK_ENV=test`
86
+ STDOUT.write `rake db:migrate && rake db:migrate RACK_ENV=test`
87
87
  when "db:migrate:reset"
88
- `rake db:migrate:reset && rake db:migrate:reset RACK_ENV=test`
88
+ STDOUT.write `rake db:migrate:reset && rake db:migrate:reset RACK_ENV=test`
89
89
  when "t", "test"
90
- `rubocop`
91
- `bundle exec rspec`
90
+ STDOUT.write `rubocop`
91
+ STDOUT.write `bundle exec rspec`
92
92
  when "run"
93
- `docker build . -t souls:latest`
94
- `docker run --rm -p 3000:3000 souls:latest`
93
+ STDOUT.write `docker build . -t souls:latest`
94
+ STDOUT.write `docker run --rm -p 3000:3000 souls:latest`
95
95
  when "deploy"
96
96
  project_id = Souls.configuration.project_id
97
- `gcloud builds submit --config=cloudbuild.yml --project #{project_id}`
97
+ STDOUT.write `gcloud builds submit --config=cloudbuild.yml --project #{project_id}`
98
98
  else
99
99
  puts "Welcome to SOULs!"
100
100
  end
@@ -7,7 +7,7 @@ module Souls
7
7
  f.write <<~EOS
8
8
  module Types
9
9
  class #{class_name.camelize}NodeType < GraphQL::Schema::Object
10
- field :node, Types::#{class_name.camelize}, null: true
10
+ field :node, Types::#{class_name.camelize}Type, null: true
11
11
  end
12
12
  end
13
13
  EOS
data/lib/souls/init.rb CHANGED
@@ -724,6 +724,7 @@ module Souls
724
724
  end
725
725
 
726
726
  def rspec_factory class_name: "souls"
727
+ return ["Aleady Exist!"] unless File.exist? "./spec/factories/#{class_name.singularize}"
727
728
  singularized_class_name = class_name.singularize
728
729
  rspec_factory_head class_name: singularized_class_name
729
730
  rspec_factory_params class_name: singularized_class_name
@@ -732,6 +733,7 @@ module Souls
732
733
 
733
734
  def rspec_model class_name: "souls"
734
735
  file_path = "./spec/models/#{class_name}_spec.rb"
736
+ return ["Aleady Exist!"] unless File.exist? file_path
735
737
  File.open(file_path, "w") do |f|
736
738
  f.write <<~EOS
737
739
  RSpec.describe "#{class_name.camelize} Model テスト", type: :model do
@@ -885,6 +887,7 @@ module Souls
885
887
  EOS
886
888
  else
887
889
  new_line.write <<-EOS
890
+ }
888
891
  }
889
892
  }
890
893
  }
data/lib/souls/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Souls
2
- VERSION = "0.14.9"
2
+ VERSION = "0.15.4"
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.14.9
4
+ version: 0.15.4
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-12 00:00:00.000000000 Z
13
+ date: 2021-02-13 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.