Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ GEM
ast (2.4.2)
backport (1.2.0)
benchmark (0.2.1)
bigdecimal (3.2.3)
booleans (0.1.1)
byebug (11.1.3)
diff-lcs (1.5.0)
Expand Down Expand Up @@ -58,7 +59,8 @@ GEM
rubocop-espago (1.0.2)
rubocop
ruby-progressbar (1.11.0)
shale (0.9.0)
shale (1.2.2)
bigdecimal
shoulda-context (2.0.0)
solargraph (0.48.0)
backport (~> 1.2)
Expand Down
11 changes: 9 additions & 2 deletions lib/tapioca/dsl/compilers/shale.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

require 'shale'
require 'booleans'
require 'bigdecimal'
begin
require 'shale/builder'
rescue LoadError
Expand Down Expand Up @@ -148,7 +149,9 @@ def shale_builder_defined? = Boolean(defined?(::Shale::Builder))
::Shale::Type::Time => Time,
::Shale::Type::Date => Date,
::Shale::Type::Boolean => T::Boolean,
}.freeze,
}.tap do |h|
h[::Shale::Type::Decimal] = BigDecimal if defined?(::Shale::Type::Decimal)
end.freeze,
T::Hash[Class, Object],
)

Expand All @@ -162,7 +165,11 @@ def shale_builder_defined? = Boolean(defined?(::Shale::Builder))
::Shale::Type::Time => Time,
::Shale::Type::Date => Date,
::Shale::Type::Boolean => Object,
}.freeze,
}.tap do |h|
if defined?(::Shale::Type::Decimal)
h[::Shale::Type::Decimal] = T.any(BigDecimal, String, Float, Integer, NilClass)
end
end.freeze,
T::Hash[Class, Object],
)

Expand Down
70 changes: 70 additions & 0 deletions sorbet/rbi/gems/bigdecimal@3.2.3.rbi

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading