boba 0.0.4 → 0.0.6
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8819547e35a1566b8b772069f87ae189a4d1faa0bc7b3426e69c01b286fb372b
|
4
|
+
data.tar.gz: 23e40a45b04a32ee32322d2123eabb3dc9e06829df556af916b1a2885cb04168
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a71b576ebd62ccfb4cde1a8383ad3dfccabb7a1f6812f35ad54ca8f3def3d1c014c493d86d7a973939c6f425a3a2eeebd62ec77df5c94b91840c1ada25b283d1
|
7
|
+
data.tar.gz: '0417790d2c32e3faa556a22b6a9deab60581f3b6534f04451c87b89e74b4aa67ef0e3608eaf782a2343d83b1319e7461e3ca841a842dd557dda7ba83c78db4d2'
|
data/lib/boba/version.rb
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
# typed: ignore
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
-
|
4
|
+
require "tapioca/dsl/compilers/active_record_associations"
|
5
|
+
|
6
|
+
return unless defined?(Tapioca::Dsl::Compilers::ActiveRecordAssociations)
|
5
7
|
|
6
8
|
module Tapioca
|
7
9
|
module Dsl
|
@@ -1,7 +1,9 @@
|
|
1
1
|
# typed: ignore
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
-
|
4
|
+
require "tapioca/dsl/compilers/active_record_columns"
|
5
|
+
|
6
|
+
return unless defined?(Tapioca::Dsl::Compilers::ActiveRecordColumns)
|
5
7
|
|
6
8
|
require "tapioca/dsl/helpers/active_record_column_type_helper"
|
7
9
|
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# typed: ignore
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require "tapioca/dsl/compilers/state_machines"
|
5
|
+
|
6
|
+
return unless defined?(Tapioca::Dsl::Compilers::StateMachines)
|
7
|
+
|
8
|
+
module Tapioca
|
9
|
+
module Dsl
|
10
|
+
module Compilers
|
11
|
+
# `Tapioca::Dsl::Compilers::StateMachinesExtended` extends the default state machines compiler provided by Tapioca
|
12
|
+
# to allow for calling `with_state` and `without_state` on all Active Record relations. This is a temporary fix
|
13
|
+
# until a more durable solution can be found for this type of issue.
|
14
|
+
# See https://github.com/Shopify/tapioca/pull/1994#issuecomment-2302624697.
|
15
|
+
class StateMachinesExtended < ::Tapioca::Dsl::Compilers::StateMachines
|
16
|
+
ACTIVE_RECORD_RELATION_MODULE_NAMES = [
|
17
|
+
"GeneratedRelationMethods",
|
18
|
+
"GeneratedAssociationRelationMethods",
|
19
|
+
].freeze
|
20
|
+
|
21
|
+
def decorate
|
22
|
+
return if constant.state_machines.empty?
|
23
|
+
|
24
|
+
super()
|
25
|
+
|
26
|
+
root.create_path(T.unsafe(constant)) do |klass|
|
27
|
+
class_module_name = "StateMachineClassHelperModule"
|
28
|
+
|
29
|
+
ACTIVE_RECORD_RELATION_MODULE_NAMES.each do |module_name|
|
30
|
+
klass.create_module(module_name).create_include(class_module_name)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: boba
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Angellist
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sorbet-static-and-runtime
|
@@ -53,14 +53,15 @@ files:
|
|
53
53
|
- lib/tapioca/dsl/compilers/active_record_associations_persisted.rb
|
54
54
|
- lib/tapioca/dsl/compilers/active_record_columns_persisted.rb
|
55
55
|
- lib/tapioca/dsl/compilers/money_rails.rb
|
56
|
+
- lib/tapioca/dsl/compilers/state_machines_extended.rb
|
56
57
|
homepage: https://github.com/angellist/boba
|
57
58
|
licenses:
|
58
59
|
- MIT
|
59
60
|
metadata:
|
60
61
|
bug_tracker_uri: https://github.com/angellist/boba/issues
|
61
|
-
changelog_uri: https://github.com/angellist/boba/blob/0.0.
|
62
|
+
changelog_uri: https://github.com/angellist/boba/blob/0.0.6/History.md
|
62
63
|
homepage_uri: https://github.com/angellist/boba
|
63
|
-
source_code_uri: https://github.com/angellist/boba/tree/0.0.
|
64
|
+
source_code_uri: https://github.com/angellist/boba/tree/0.0.6
|
64
65
|
rubygems_mfa_required: 'true'
|
65
66
|
post_install_message:
|
66
67
|
rdoc_options: []
|