tapioca 0.4.6 → 0.4.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +5 -1
- data/README.md +9 -7
- data/lib/tapioca/cli.rb +8 -1
- data/lib/tapioca/compilers/dsl/action_controller_helpers.rb +38 -39
- data/lib/tapioca/compilers/dsl/action_mailer.rb +4 -4
- data/lib/tapioca/compilers/dsl/active_record_associations.rb +52 -51
- data/lib/tapioca/compilers/dsl/active_record_columns.rb +60 -65
- data/lib/tapioca/compilers/dsl/active_record_enum.rb +27 -23
- data/lib/tapioca/compilers/dsl/active_record_scope.rb +18 -17
- data/lib/tapioca/compilers/dsl/active_record_typed_store.rb +8 -7
- data/lib/tapioca/compilers/dsl/active_resource.rb +5 -4
- data/lib/tapioca/compilers/dsl/active_support_current_attributes.rb +6 -7
- data/lib/tapioca/compilers/dsl/base.rb +14 -10
- data/lib/tapioca/compilers/dsl/frozen_record.rb +25 -25
- data/lib/tapioca/compilers/dsl/{active_record_identity_cache.rb → identity_cache.rb} +11 -10
- data/lib/tapioca/compilers/dsl/protobuf.rb +1 -1
- data/lib/tapioca/compilers/dsl/sidekiq_worker.rb +83 -0
- data/lib/tapioca/compilers/dsl/smart_properties.rb +1 -1
- data/lib/tapioca/compilers/dsl/state_machines.rb +75 -73
- data/lib/tapioca/compilers/dsl/url_helpers.rb +9 -5
- data/lib/tapioca/compilers/dsl_compiler.rb +5 -5
- data/lib/tapioca/compilers/requires_compiler.rb +34 -6
- data/lib/tapioca/compilers/sorbet.rb +1 -1
- data/lib/tapioca/compilers/symbol_table/symbol_generator.rb +69 -33
- data/lib/tapioca/compilers/symbol_table/symbol_loader.rb +1 -1
- data/lib/tapioca/compilers/symbol_table_compiler.rb +1 -1
- data/lib/tapioca/compilers/todos_compiler.rb +1 -1
- data/lib/tapioca/core_ext/class.rb +8 -3
- data/lib/tapioca/gemfile.rb +1 -1
- data/lib/tapioca/generator.rb +1 -1
- data/lib/tapioca/loader.rb +1 -1
- data/lib/tapioca/version.rb +1 -1
- metadata +4 -3
@@ -1,7 +1,9 @@
|
|
1
|
-
# typed:
|
1
|
+
# typed: strict
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
4
|
class Class
|
5
|
+
extend T::Sig
|
6
|
+
|
5
7
|
# Returns an array with all classes that are < than its receiver.
|
6
8
|
#
|
7
9
|
# class C; end
|
@@ -15,9 +17,12 @@ class Class
|
|
15
17
|
#
|
16
18
|
# class D < C; end
|
17
19
|
# C.descendants # => [B, A, D]
|
20
|
+
sig { returns(T::Array[Class]) }
|
18
21
|
def descendants
|
19
|
-
ObjectSpace.each_object(singleton_class).reject do |k|
|
20
|
-
k.singleton_class? || k == self
|
22
|
+
result = ObjectSpace.each_object(singleton_class).reject do |k|
|
23
|
+
T.cast(k, Module).singleton_class? || k == self
|
21
24
|
end
|
25
|
+
|
26
|
+
T.cast(result, T::Array[Class])
|
22
27
|
end
|
23
28
|
end
|
data/lib/tapioca/gemfile.rb
CHANGED
data/lib/tapioca/generator.rb
CHANGED
data/lib/tapioca/loader.rb
CHANGED
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.4.
|
4
|
+
version: 0.4.11
|
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:
|
14
|
+
date: 2021-01-12 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: pry
|
@@ -116,14 +116,15 @@ files:
|
|
116
116
|
- lib/tapioca/compilers/dsl/active_record_associations.rb
|
117
117
|
- lib/tapioca/compilers/dsl/active_record_columns.rb
|
118
118
|
- lib/tapioca/compilers/dsl/active_record_enum.rb
|
119
|
-
- lib/tapioca/compilers/dsl/active_record_identity_cache.rb
|
120
119
|
- lib/tapioca/compilers/dsl/active_record_scope.rb
|
121
120
|
- lib/tapioca/compilers/dsl/active_record_typed_store.rb
|
122
121
|
- lib/tapioca/compilers/dsl/active_resource.rb
|
123
122
|
- lib/tapioca/compilers/dsl/active_support_current_attributes.rb
|
124
123
|
- lib/tapioca/compilers/dsl/base.rb
|
125
124
|
- lib/tapioca/compilers/dsl/frozen_record.rb
|
125
|
+
- lib/tapioca/compilers/dsl/identity_cache.rb
|
126
126
|
- lib/tapioca/compilers/dsl/protobuf.rb
|
127
|
+
- lib/tapioca/compilers/dsl/sidekiq_worker.rb
|
127
128
|
- lib/tapioca/compilers/dsl/smart_properties.rb
|
128
129
|
- lib/tapioca/compilers/dsl/state_machines.rb
|
129
130
|
- lib/tapioca/compilers/dsl/url_helpers.rb
|