tourmaline v0.17.0 Release Notes
Release Date: 2020-04-20 // almost 4 years ago-
⚡️ This update includes a lot of good stuff. First and foremost are the improvements to building inline and reply keyboards. The old method was based heavily off of TelegrafJS and it worked, but the new way is much more "Crystally". Here's an example of it in action:
keyboard = Tourmaline::ReplyKeyboardMarkup.build do button "Info" button "Visit Us"end
⚡️ also included in this update are changes to how persistence works. I wasn't a fan of how I was handling things before, but now I think things are much better. Prior to this update,
Persistence
was a module which was included in each persistence type which would then be included in the final client. Nothing wrong with this approach, but it did make it so that information could not be easily passed to thePersistence
object.0️⃣ Now
Persistence
is a class andClient
will always have one. The default persistence isNilPersistence
which does nothing. This can be easily swapped out for one of the other persistence types by passing the desired persistence object to theClient
initializer.👍 I've also added
DBPersistence
which allows you to persist Users and Chats using a database rather than just a Hash or a JSON file. It uses the db shard on the backend and can be used with any of the supported adapters.