tapioca 0.14.0 → 0.14.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tapioca/dsl/compilers/active_record_fixtures.rb +9 -2
- data/lib/tapioca/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9b033940feb12f528b3995f645ed709aa18a3e5397ec188f795df4cdbfb4c57
|
4
|
+
data.tar.gz: 0f38fe25358b09d6ebeb40c582014948bbf06787c947bd17f2bdb7cc0ed9dfd8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8feb5a4f612517906add3ef224f13ac73296955c097352349d4bcf52f19951a1b97bc79ecdc184355123c22285eaffb98f8037bcf58be1bb56f60e1607b332b5
|
7
|
+
data.tar.gz: 41caacbc97da0c7dc1c0ee8260ac8d860908138fb709cc7bbe1a0bd8170953daeb6d88a82cad9f8979c28471d5a4d1b84b87c39ff6c7756ef6f152e703c26dc4
|
@@ -26,10 +26,11 @@ module Tapioca
|
|
26
26
|
# # test_case.rbi
|
27
27
|
# # typed: true
|
28
28
|
# class ActiveSupport::TestCase
|
29
|
+
# sig { params(fixture_name: NilClass, other_fixtures: NilClass).returns(T::Array[Post]) }
|
29
30
|
# sig { params(fixture_name: T.any(String, Symbol), other_fixtures: NilClass).returns(Post) }
|
30
31
|
# sig { params(fixture_name: T.any(String, Symbol), other_fixtures: T.any(String, Symbol))
|
31
32
|
# .returns(T::Array[Post]) }
|
32
|
-
# def posts(fixture_name, *other_fixtures); end
|
33
|
+
# def posts(fixture_name = nil, *other_fixtures); end
|
33
34
|
# end
|
34
35
|
# ~~~
|
35
36
|
class ActiveRecordFixtures < Compiler
|
@@ -110,9 +111,15 @@ module Tapioca
|
|
110
111
|
def create_fixture_method(mod, name)
|
111
112
|
return_type = return_type_for_fixture(name)
|
112
113
|
mod << RBI::Method.new(name) do |node|
|
113
|
-
node.
|
114
|
+
node.add_opt_param("fixture_name", "nil")
|
114
115
|
node.add_rest_param("other_fixtures")
|
115
116
|
|
117
|
+
node.add_sig do |sig|
|
118
|
+
sig.add_param("fixture_name", "NilClass")
|
119
|
+
sig.add_param("other_fixtures", "NilClass")
|
120
|
+
sig.return_type = "T::Array[#{return_type}]"
|
121
|
+
end
|
122
|
+
|
116
123
|
node.add_sig do |sig|
|
117
124
|
sig.add_param("fixture_name", "T.any(String, Symbol)")
|
118
125
|
sig.add_param("other_fixtures", "NilClass")
|
data/lib/tapioca/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tapioca
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.14.
|
4
|
+
version: 0.14.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ufuk Kayserilioglu
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: exe
|
13
13
|
cert_chain: []
|
14
|
-
date: 2024-05-
|
14
|
+
date: 2024-05-08 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: bundler
|