Skip to content
This repository has been archived by the owner on Jul 5, 2023. It is now read-only.

Releases: chanzuckerberg/sorbet-rails

0.7.3

15 Jan 17:32
Compare
Choose a tag to compare

Changelog for version 0.7.3:

  • Add support for serialized attribute. Thanks to @alexdunae
  • Add codegen for reload_<assoc> method. Thanks to @DanielGilchrist
  • Improve pluck_to_tstruct to use prop default value when applicable. Thanks to @DanielGilchrist
  • Add debug mode via SBR_DEBUG_MODE. In debug mode, plugin errors will be raised
  • Some small bug fixes

0.7.2

15 Jan 17:31
Compare
Choose a tag to compare

Changelog for version 0.7.2

  • Fix ActiveJob.perform_now and .perform_later return an instance of the job class. Thanks to @xcskier56
  • Generate a model T::Enum as a nested class. Thanks to @ghiculescu
  • Small bug fixes

0.7.1

13 Jul 18:53
6b87d45
Compare
Choose a tag to compare
  • Allow user to customize the RBI Generator for Job and Mailer
  • Handle UUIDs and have the _ids method return the correct type (T::Array[String]). Thanks to Connor Shea @connorshea
  • Add plucking association suport to pluck_to_struct. Thanks to Daniel Gilchrist @DanielGilchrist
  • Add another method to Kaminary gem plugin. Thanks to Alex Ghiculescu @ghiculescu
  • Generates build_* and create_* methods for model associations. Thanks to Alex Ghiculescu @ghiculescu

0.7.0

26 May 16:55
a7d759b
Compare
Choose a tag to compare
  • Drop fetch_typed and require_typed in favor of TypedParams
  • Drop IntegerString and BooleanString due to unnecessary performance cost.
  • Fix GeneratedUrlHelpers work with _path method out of the box
  • Add an RBI file for typed_enum.

Note: There are some incompatible changes in this release. It's recommended to remove all references of the removed APIs in your code and in generated RBI before upgrading. For generated RBI (ie hidden-definitions.rbi), you can also regenerate the RBI to remove reference to removed constants.

Note: typed_enum signature will conflict with a generated signature in hidden-definitions/hidden.rbi. You can either remove the one in hidden.rbi manually or regenerate it running srb rbi hidden-definitions (slow).

0.6.5.1

20 May 04:46
1f5b3be
Compare
Choose a tag to compare
  • Fix the return type of in_batches #332

0.6.5

18 May 18:32
2e60f5a
Compare
Choose a tag to compare
  • Add signature generation for Relation's in_batches method. Thanks to Jeff Carbonella @jeffcarbs
  • Fix a few issues with Ruby 2.7's keyword parameters. Thanks to Connor Shea @connorshea
  • Fix the codegen for named scope in Rails 6.0

0.6.4

01 May 00:59
cb20a39
Compare
Choose a tag to compare
  • Cut the time running rails_rbi:models significantly. (In my repo from 6m30 to 1m). BOOM! Thanks to Jeff Carbonella @jeffcarbs
  • Reduce generated RBI size by moving query methods into modules. Thanks to Jeff Carbonella @jeffcarbs
  • Better handle types of polymorphic assoc when class_name/source type is available. Thanks to Jeff Carbonella @jeffcarbs
  • Stop inferring "validates :on" as unconditional. Thanks to Paul Ramon Revilla @masylum

0.6.3

28 Apr 20:46
df6c525
Compare
Choose a tag to compare
  • Generate ActiveRecord::Relation type methods dynamically and and many methods to AssociationRelation & AssociationCollectionProxy. Massive thanks to Jeff Carbonella @jeffcarbs
  • Improve the handling of HABTM associations. Thanks to Jonathan Schatz @modosc
  • Generate collection ids retrieval method. Thanks to Alex Ghiculescu @ghiculescu
  • Use percent-string in TypedEnum to avoid issue with strings containing quotes. Thanks to Kevin Miller @Gasparila
  • Improve typing of attributes with Array type (Postgres). Thanks to Kevin Miller @Gasparila
  • Add deprecation warning for fetch_typed, require_typed, BooleanString and IntegerString in favor of TypedParams. They are slated to removal in v0.7. For alternatives, see the warning or see #318

0.6.2

31 Mar 05:07
1821b50
Compare
Choose a tag to compare
  • Add rails_rbi:jobs task to generate perform_now and perform_later for ActiveJob subclasses.
  • Generate empty? method for AssociationRelation and Associations_CollectionProxy classes. Thanks Brittney Johnson @bjohns2

0.6.1

17 Mar 01:44
f7d8d12
Compare
Choose a tag to compare
  • Change model attribute setter signature accepts more Numeric value. Thanks to Kevin Miller @Gasparila
  • Add XXX::RelationType alias. Thanks to Paul Ramona Revilla @masylum
  • Fixed mailer rbi generation to work even when the mailing method has parameters with a default value
  • Upgrade sorbet-coerce & fix the issue with srb --lsp