Minisky Changelog
[0.5.1] - 2026-02-15
The "really niche bugfix" edition:
- don't stop fetching in
fetch_allif an empty page is returned but the cursor is not nil; it's technically allowed for the server to return an empty page but still have more data to send, e.g. if the service does some filtering at the last step and all records happen to be filtered out- unfortunately, this on the other hand causes problems with some specific endpoints which incorrectly return a cursor when reaching the end of data, so you can also restore the previous behavior if needed, by setting the
stop_fetch_on_empty_pageoption
- unfortunately, this on the other hand causes problems with some specific endpoints which incorrectly return a cursor when reaching the end of data, so you can also restore the previous behavior if needed, by setting the
- in
post_request, don't set Content-Type to "application/json" if the data sent is a string or nil (it might cause an error in some cases, like when uploading some binary content) - handle the (somewhat theoretical but possible) case where an access token is not a JWT but just some opaque blob – in that case, Minisky will now not throw an error trying to parse it, but just treat it as "unknown" and will not try to refresh it
- note: at the moment Minisky will not catch the "token expired" error and refresh the token automatically in such scenario
- allow connecting to non-HTTPS servers (e.g.
http://localhost:3000) - allow making unauthenticated clients with custom classes by returning
nilfrom#config; custom clients with a config that's missing anidorpassare treated as an error - deprecate logging in using an email address in the
idfield –createSessionaccepts such identifier, but unlike with handle or DID, there's no way to use it to look up the DID document and PDS location if we wanted to - fixed URL query params in POST requests on Ruby 2.x
- marked
Minisky#active_repl?method as private
Also added YARD API documentation for most of the code.
[0.5.0] - 2024-12-27 🎄
hostparam in the initializer can be passed with ahttps://prefix (useful if you're passing it directly from a DID document, e.g. using DIDKit)- added validation of the
methodparameter in request calls: it needs to be either a proper NSID, or a full URL as a string or a URI object - added new optional
paramskeyword argument inpost_request, which lets you append query parameters to the URL if a POST endpoint requires passing them this way (e.g.uploadVideo) default_progressis set by default to show progress using dots (.) if Minisky is loaded inside an IRB or Pry context- when experimenting with Minisky in the console, you can now skip the
field:parameter tofetch_allif you don't remember the expected key name in the response, and the method will make a request and return an error which tells you the list of available keys - added
access_token_expired?helper method - moved
token_expiration_dateto public methods check_accessnow returns a result symbol::logged_in,:refreshedor:ok- fixed
method_missingsetter onUser
[0.4.0] - 2024-03-31 🐣
- allow passing non-JSON body to requests (e.g. when uploading blobs)
- allow passing custom headers to requests, including overriding
Content-Type - fixed error when the response is success but not JSON (e.g. an empty body like in deleteRecord)
- allow passing options to the client in the initializer
- aliased
default_progresssetting asprogress - added
base64dependency explicitly to the gemspec – fixes a warning in Ruby 3.3, since it will be extracted as an optional gem in 3.4
[0.3.1] - 2023-10-10
- fixed Minisky not working on Ruby 2.x
[0.3.0] - 2023-10-05
- authentication improvements & changes:
- Minisky now automatically manages access tokens, calling
check_accessmanually is not necessary (setauto_manage_tokenstofalseto disable this) check_accessnow just checks token's expiry time instead of making a request togetSession- added
send_auth_headersoption – set tofalseto not set auth header automatically, which is the default - removed default config file name – explicit file name is now required
- Minisky can now be used in unauthenticated mode – pass
nilas the config file name - added
reset_tokenshelper method
- Minisky now automatically manages access tokens, calling
- refactored response handling – typed errors are now raised on non-success response status
userwrapper can also be used for writing fields to the config- improved error handling
[0.2.0] - 2023-09-02
- more consistent handling of parameters in the main methods:
authis now a named parameter- access token is used by default, pass
nilor an explicit token asauthto override paramsis always optional
- progress dots in
#fetch_all:- default is now to not print anything
- pass
'.'or any other character/string to show progress - set
default_progresson the client object to use for all#fetch_allcalls
- added
max_pagesoption to#fetch_all #loginand#perform_token_refreshmethods use the JSON response as return value- renamed
identfield in the config hash toid - config is now accessed in
Requestsfrom the client object as aconfigproperty instead of@configivar - config fields are exposed as a
userwrapper object, e.g.user.diddelegates to@config['did']
[0.1.0] - 2023-09-01
- extracted most code to a
Requestsmodule that can be included into a different client class with custom config handling - added
#check_accessmethod - hostname is now passed as a parameter
- config file name can be passed as a parameter
- added tests
[0.0.1] - 2023-08-30
Initial release – extracted from original gist:
- logging in and refreshing the token
- making GET & POST requests
- fetching paginated responses
