{"repo":"camertron/gelauto","free":true,"listed":false,"github":"https://github.com/camertron/gelauto","clone":"git clone https://github.com/camertron/gelauto.git","description":"Automatically annotate your code with Sorbet type definitions.","language":"Ruby","stars":57,"topics":["sorbet","ruby","types","automation"],"license":"MIT","category":"workflow-automation","readme_excerpt":"gelauto Automatically annotate your code with Sorbet type definitions. What is This Thing? The wonderful folks at Stripe recently released a static type checker for Ruby called Sorbet. It works by examining type signatures placed at the beginning of each method. For example: Adding these definitions means you get cool stuff like auto-complete and type checking in your editor. Pretty freaking rad. Ok, so what is Gelauto? Gelauto is an auto -matic way (get it?! lol) of adding Sorbet type signatures to your methods. It works by running your code (for example, your test suite). As your code runs, Gelauto keeps track of the actual types of objects that were passed to your methods as well as the types of objects they return. After gathering the info, Gelauto then (optionally) inserts type signatures into your Ruby files. Installation gem install gelauto Usage You can run Gelauto either via the command line or by adding it to your bundle. Command Line Usage First, install the gem by running gem install gelauto . That will make the gelauto executable available on your system. Gelauto's only subcommand is run , which accepts a list of Ruby files to scan for methods and a command to run that will exercise your code. In this example, we're going to be running an RSpec test suite. Like most RSpec test suites, let's assume ours is stored in the spec/ directory (that's the RSpec default too). To run the test suite in spec/ and add type definitions to our ruby files, we might run the follow","default_branch":null,"files":null,"tree":[],"storefront":"/r/camertron","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/camertron/gelauto/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}