souls 0.13.2 → 0.13.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 +4 -4
- data/lib/souls/init.rb +6 -8
- 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: 6f8b1300fc4644e24954fa9d46aa50ecc86731f9fb982ea3f198c9b57e017838
|
|
4
|
+
data.tar.gz: c3144d0eb3dfd8521f9ea2f76da354809dd791a571052ec9b45fb586cebc5985
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b7c6e656cbb4aeec299eda315fda2f68ce08beb2010d160e20966eb1371e5ebc1deb2d143ecfc5b9c0210baf83ed10a807a5e04464ade080235dd13ccc857c7b
|
|
7
|
+
data.tar.gz: 248b0e01f35edcf49bc4d887d3cf7468c9967012c011adf092d898d6538554deaecd46c14cbae4ca0364e6c7cacaf68a29836f2900b9bc5db9b63fcbd715abd5
|
data/lib/souls/init.rb
CHANGED
|
@@ -272,8 +272,8 @@ module Souls
|
|
|
272
272
|
float: 4.2,
|
|
273
273
|
string: '"MyString"',
|
|
274
274
|
text: '"MyString"',
|
|
275
|
-
datetime: "
|
|
276
|
-
date: "
|
|
275
|
+
datetime: "DateTime.now",
|
|
276
|
+
date: "DateTime.now",
|
|
277
277
|
boolean: false,
|
|
278
278
|
integer: 1
|
|
279
279
|
}[type.to_sym]
|
|
@@ -637,7 +637,7 @@ module Souls
|
|
|
637
637
|
f.write <<~EOS
|
|
638
638
|
RSpec.describe \"#{class_name.camelize} Mutation テスト\" do
|
|
639
639
|
describe "#{class_name.camelize} データを登録する" do
|
|
640
|
-
let
|
|
640
|
+
let(:#{class_name.singularize.underscore}) { FactoryBot.attributes_for(:#{class_name.singularize.underscore}) }
|
|
641
641
|
|
|
642
642
|
let(:mutation) do
|
|
643
643
|
%(mutation {
|
|
@@ -665,16 +665,14 @@ module Souls
|
|
|
665
665
|
next
|
|
666
666
|
else
|
|
667
667
|
case type
|
|
668
|
-
when "string", "text"
|
|
669
|
-
if array_true
|
|
670
|
-
new_line.write " #{name.pluralize.camelize(:lower)}: \#{#{class_name.
|
|
668
|
+
when "string", "text", "date", "datetime"
|
|
669
|
+
if array_true && name != "tag"
|
|
670
|
+
new_line.write " #{name.pluralize.camelize(:lower)}: \#{#{class_name.singularize}[:#{name.pluralize.underscore}]}\n"
|
|
671
671
|
else
|
|
672
672
|
new_line.write " #{name.singularize.camelize(:lower)}: \"\#{#{class_name.singularize}[:#{name.singularize.underscore}]}\"\n"
|
|
673
673
|
end
|
|
674
674
|
when "bigint", "integer", "float", "boolean"
|
|
675
675
|
new_line.write " #{name.singularize.camelize(:lower)}: \#{#{class_name.singularize}[:#{name.singularize.underscore}]}\n"
|
|
676
|
-
when "date", "datetime"
|
|
677
|
-
new_line.write " #{name.singularize.camelize(:lower)}: \#{Time.now}\n"
|
|
678
676
|
end
|
|
679
677
|
end
|
|
680
678
|
end
|
data/lib/souls/version.rb
CHANGED