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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e4ee7091ee3b3710a439d778f389997e2c97d9bce2a8a26bf67cd5024d365666
4
- data.tar.gz: 0fe0a2633ffdd26a56d5b41a090917d792e4e4af742dda24106fc9e0e51c89ab
3
+ metadata.gz: e60ce17f345ea901f1b3ce59ce36b8533762f329fcf859545b107a7ce7df1ecf
4
+ data.tar.gz: ba3d733e4af9b79bcc64495827b6efaa9b8d69d2d1fe43b7b0081213106ae101
5
5
  SHA512:
6
- metadata.gz: 442fb56b727b1e13a25b437302b81b8913c0d3498a52b8196e849a57b40149194e10159569d46dff6686df6569cc3168f8cc57f3269ba384c0b08e871f5955bc
7
- data.tar.gz: f7d5f4fafff936beb6da5de3d083a67d377b92a841f7d74765dabfda58dd4016cf4f4bdd213d9e101aa6953add2dd43793f59c6ee80f99366a6fa3b9106ab5da
6
+ metadata.gz: 621ac245d18736188d24620ebf180e613fe0d5e847b521e81a6bb336c7178296121bdc3d97f9d1b0785a1755a383a9580e6dd6e6e6c1174896692e18a0f27edc
7
+ data.tar.gz: f36031c26c7b2efb98666003a06a59ab5d4473730ff8faca182297eec3405d321bacee0c348d6d1667567665a20117ae27aa66b2814518507cd22e88f9ba6a16
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- souls (0.11.1)
4
+ souls (0.11.6)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -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.pluralize}.rb"
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.pluralize}.rb"
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.pluralize}.rb"
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.pluralize}.rb"
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.pluralize}.rb"
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: \#{#{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.pluralize}.rb"
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.pluralize}.rb"
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
@@ -1,3 +1,3 @@
1
1
  module Souls
2
- VERSION = "0.11.2"
2
+ VERSION = "0.11.7"
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.11.2
4
+ version: 0.11.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - POPPIN-FUMI