Skip to content

Commit

Permalink
v0.1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
Verseth committed May 15, 2024
1 parent 738d79c commit 089cb23
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [0.1.8] - 2024-05-15

- Sort attribute names in the tapioca compiler

## [0.1.7] - 2024-05-13

- Drop support for Ruby 3.0
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
shale-builder (0.1.7)
shale-builder (0.1.8)
booleans (>= 0.1)
shale (< 2.0)
sorbet-runtime (> 0.5)
Expand Down
2 changes: 1 addition & 1 deletion lib/shale/builder/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

module Shale
module Builder
VERSION = '0.1.7'
VERSION = '0.1.8'
end
end
5 changes: 3 additions & 2 deletions lib/tapioca/dsl/compilers/shale.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ def decorate
mod = klass.create_module(SHALE_ATTRIBUTE_MODULE)
klass.create_include(SHALE_ATTRIBUTE_MODULE)
# For each attribute defined in the class
constant.attributes.each_value do |attribute|
attribute = T.let(attribute, ::Shale::Attribute)
attribute_names = constant.attributes.keys.sort
attribute_names.each do |attribute_name|
attribute = T.let(constant.attributes[attribute_name], ::Shale::Attribute)
non_nilable_type, nilable_type = shale_type_to_sorbet_type(attribute)
type = nilable_type
if attribute.collection?
Expand Down

0 comments on commit 089cb23

Please sign in to comment.