souls 0.15.0 → 0.15.1
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/lib/souls/init.rb +3 -0
- 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: 53de40efd144cd448a857b6137f1769b3666b561682395892440cc469cea45a2
|
|
4
|
+
data.tar.gz: 9a25d0ee2b989d0b43305462c05991e829ace194f34b7ce4b0b52b0271ba425b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 578a24022e14528fdfd8809269f69f6b4c02f6c27660ecb9e1d3752861518ffa7150f31a28fa4661cb380ead5cb157b3855b0434efcc471b529946891498c623
|
|
7
|
+
data.tar.gz: 3774afb512a034298bca690f6ffb2d41ae71fd8407d97095409c55488f6d8b86eb2946f587c1e9dc0bdec69f8fe41c8f49882e9d70e7f87d121f182e97616519
|
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