tapioca 0.16.1 → 0.16.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 02620ac27a54a716743952e003b0c4b3d8cfd8a1fe9ee580068007e570c0814a
4
- data.tar.gz: 6901ae216ea51a7a92facf5c64e4de42262f7f86e79ebfa816c7a8b1ca9a5af1
3
+ metadata.gz: cc2c2c6ae059634316e511dce8839f7e4930b0263093e6250612aa7d6aae582d
4
+ data.tar.gz: 7ee41089cca733c46e3d3c9dca9384c1e8a516fd7ebb0fb347eb31935da8d3ee
5
5
  SHA512:
6
- metadata.gz: 443333835093464931be7bcbf54e9dfad0e2241f099cc06fbca54c54dca284ab84c246343110dca2e5a64eaeee5d0d006bf22b3d955be9f64160d63ae807aeeb
7
- data.tar.gz: 375a7ee0697b44f807161819bbbe6907eb8ee6f5ae76e791c73da4f748bd26bf3a86bfa3b28a6589503020890621c73f27506928c26e6c2078981dfb556cc7a5
6
+ metadata.gz: 00ecd9606853f9bf27821df7c20b74af4898d84d5b3a32472a5156c2d0ba353b4ab53e7ddc4d21474a2b1599409aecad05693ac6713100798a4cf77dc2d50b83
7
+ data.tar.gz: 4b8d2455cf3cd89c0744d4e266331ee61c3ca585380db1da348bafaa014fbeaa7483401100f1148f8c89fe21119c9a555e9af86be3699ba2733f48cab1929901
@@ -155,6 +155,8 @@ module Tapioca
155
155
  "::ActiveSupport::TimeWithZone"
156
156
  when ActiveRecord::Enum::EnumType
157
157
  "::String"
158
+ when ActiveRecord::Type::Binary
159
+ "::String"
158
160
  when ActiveRecord::Type::Serialized
159
161
  serialized_column_type(column_type)
160
162
  when ->(type) {
@@ -14,11 +14,14 @@ module Tapioca
14
14
  constant = event.constant
15
15
  return unless T::Enum > event.constant # rubocop:disable Style/InvertibleUnlessCondition
16
16
 
17
- enums = T.unsafe(constant).values.map do |enum_type|
18
- enum_type.instance_variable_get(:@const_name).to_s
17
+ enum_block = RBI::TEnumBlock.new
18
+
19
+ T.unsafe(constant).values.each do |enum_type|
20
+ enum_name = enum_type.instance_variable_get(:@const_name).to_s
21
+ enum_block << RBI::Const.new(enum_name, "new")
19
22
  end
20
23
 
21
- event.node << RBI::TEnumBlock.new(enums)
24
+ event.node << enum_block
22
25
  end
23
26
 
24
27
  sig { override.params(event: NodeAdded).returns(T::Boolean) }
@@ -34,7 +34,7 @@ module Tapioca
34
34
  group_nodes: true,
35
35
  max_line_length: nil,
36
36
  nest_singleton_methods: true,
37
- nest_non_public_methods: true,
37
+ nest_non_public_members: true,
38
38
  sort_nodes: true,
39
39
  ),
40
40
  RBIFormatter,
@@ -143,7 +143,7 @@ module Tapioca
143
143
 
144
144
  sig { params(type: T::Types::Base).returns(String) }
145
145
  def name_of_type(type)
146
- type.to_s.gsub(/\bAttachedClass\b/, "T.attached_class")
146
+ type.to_s
147
147
  end
148
148
 
149
149
  sig { params(constant: Module, method: Symbol).returns(Method) }
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Tapioca
5
- VERSION = "0.16.1"
5
+ VERSION = "0.16.2"
6
6
  end
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.16.1
4
+ version: 0.16.2
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-08-15 00:00:00.000000000 Z
14
+ date: 2024-08-29 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bundler
@@ -59,20 +59,14 @@ dependencies:
59
59
  name: rbi
60
60
  requirement: !ruby/object:Gem::Requirement
61
61
  requirements:
62
- - - ">="
63
- - !ruby/object:Gem::Version
64
- version: 0.1.14
65
- - - "<"
62
+ - - "~>"
66
63
  - !ruby/object:Gem::Version
67
64
  version: '0.2'
68
65
  type: :runtime
69
66
  prerelease: false
70
67
  version_requirements: !ruby/object:Gem::Requirement
71
68
  requirements:
72
- - - ">="
73
- - !ruby/object:Gem::Version
74
- version: 0.1.14
75
- - - "<"
69
+ - - "~>"
76
70
  - !ruby/object:Gem::Version
77
71
  version: '0.2'
78
72
  - !ruby/object:Gem::Dependency