souls 0.11.2 → 0.11.7
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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/souls/init.rb +9 -10
- data/lib/souls/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e60ce17f345ea901f1b3ce59ce36b8533762f329fcf859545b107a7ce7df1ecf
|
|
4
|
+
data.tar.gz: ba3d733e4af9b79bcc64495827b6efaa9b8d69d2d1fe43b7b0081213106ae101
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 621ac245d18736188d24620ebf180e613fe0d5e847b521e81a6bb336c7178296121bdc3d97f9d1b0785a1755a383a9580e6dd6e6e6c1174896692e18a0f27edc
|
|
7
|
+
data.tar.gz: f36031c26c7b2efb98666003a06a59ab5d4473730ff8faca182297eec3405d321bacee0c348d6d1667567665a20117ae27aa66b2814518507cd22e88f9ba6a16
|
data/Gemfile.lock
CHANGED
data/lib/souls/init.rb
CHANGED
|
@@ -625,7 +625,7 @@ module Souls
|
|
|
625
625
|
end
|
|
626
626
|
|
|
627
627
|
def rspec_mutation_head class_name: "souls"
|
|
628
|
-
file_path = "./spec/mutations/#{class_name.
|
|
628
|
+
file_path = "./spec/mutations/#{class_name.singularize}_spec.rb"
|
|
629
629
|
File.open(file_path, "w") do |f|
|
|
630
630
|
f.write <<~EOS
|
|
631
631
|
RSpec.describe \"#{class_name.camelize} Mutation テスト\" do
|
|
@@ -640,7 +640,7 @@ module Souls
|
|
|
640
640
|
end
|
|
641
641
|
|
|
642
642
|
def rspec_mutation_params class_name: "souls"
|
|
643
|
-
file_path = "./spec/mutations/#{class_name.
|
|
643
|
+
file_path = "./spec/mutations/#{class_name.singularize}_spec.rb"
|
|
644
644
|
path = "./db/schema.rb"
|
|
645
645
|
@on = false
|
|
646
646
|
File.open(file_path, "a") do |new_line|
|
|
@@ -675,7 +675,7 @@ module Souls
|
|
|
675
675
|
end
|
|
676
676
|
|
|
677
677
|
def rspec_mutation_params_response class_name: "souls"
|
|
678
|
-
file_path = "./spec/mutations/#{class_name.
|
|
678
|
+
file_path = "./spec/mutations/#{class_name.singularize}_spec.rb"
|
|
679
679
|
path = "./db/schema.rb"
|
|
680
680
|
@on = false
|
|
681
681
|
File.open(file_path, "a") do |new_line|
|
|
@@ -718,7 +718,7 @@ module Souls
|
|
|
718
718
|
end
|
|
719
719
|
|
|
720
720
|
def rspec_mutation_end class_name: "souls"
|
|
721
|
-
file_path = "./spec/mutations/#{class_name.
|
|
721
|
+
file_path = "./spec/mutations/#{class_name.singularize}_spec.rb"
|
|
722
722
|
path = "./db/schema.rb"
|
|
723
723
|
@on = false
|
|
724
724
|
File.open(file_path, "a") do |new_line|
|
|
@@ -772,24 +772,24 @@ end
|
|
|
772
772
|
end
|
|
773
773
|
|
|
774
774
|
def rspec_query_head class_name: "souls"
|
|
775
|
-
file_path = "./spec/queries/#{class_name.
|
|
775
|
+
file_path = "./spec/queries/#{class_name.singularize}_spec.rb"
|
|
776
776
|
File.open(file_path, "w") do |f|
|
|
777
777
|
f.write <<~EOS
|
|
778
778
|
RSpec.describe \"#{class_name.camelize} Query テスト\" do
|
|
779
779
|
describe "#{class_name.camelize} データを取得する" do
|
|
780
780
|
let!(:#{class_name.singularize.underscore}) { FactoryBot.create(:#{class_name.singularize.underscore}) }
|
|
781
|
-
let!(:#{class_name.singularize.underscore}_id) { Base64.encode64 "User:\#{user.id}" }
|
|
782
781
|
|
|
783
782
|
let(:query) do
|
|
783
|
+
data_id = Base64.encode64("User:\#{user.id}")
|
|
784
784
|
%(query {
|
|
785
|
-
#{class_name.singularize.underscore}(id: \#{
|
|
785
|
+
#{class_name.singularize.underscore}(id: \\"\#{data_id}\\") {
|
|
786
786
|
id
|
|
787
787
|
EOS
|
|
788
788
|
end
|
|
789
789
|
end
|
|
790
790
|
|
|
791
791
|
def rspec_query_params class_name: "souls"
|
|
792
|
-
file_path = "./spec/queries/#{class_name.
|
|
792
|
+
file_path = "./spec/queries/#{class_name.singularize}_spec.rb"
|
|
793
793
|
path = "./db/schema.rb"
|
|
794
794
|
@on = false
|
|
795
795
|
File.open(file_path, "a") do |new_line|
|
|
@@ -831,7 +831,7 @@ end
|
|
|
831
831
|
end
|
|
832
832
|
|
|
833
833
|
def rspec_query_end class_name: "souls"
|
|
834
|
-
file_path = "./spec/queries/#{class_name.
|
|
834
|
+
file_path = "./spec/queries/#{class_name.singularize}_spec.rb"
|
|
835
835
|
path = "./db/schema.rb"
|
|
836
836
|
@on = false
|
|
837
837
|
File.open(file_path, "a") do |new_line|
|
|
@@ -944,7 +944,6 @@ end
|
|
|
944
944
|
|
|
945
945
|
def migrate_all
|
|
946
946
|
puts "◆◆◆ Let's Auto Generate CRUD API ◆◆◆\n"
|
|
947
|
-
`rake db:migrate`
|
|
948
947
|
paths = get_tables.map do |class_name|
|
|
949
948
|
migrate class_name: class_name.singularize
|
|
950
949
|
end
|
data/lib/souls/version.rb
CHANGED