Introducing hanami-cli

Introducing hanami-cli: a general purpose Command Line Interface (CLI) for Ruby. Learn why Hanami replaced thor in favor of hanami-cli and how to use it to build a CLI application in 5 minutes. Why not thor? For long time we used thor 🔨 to build the Command Line Interface (CLI) of Hanami. But as the time passed, we needed more control on the internals of our implementation. The Hanami 🌸 command line needs two crucial features: subcommands and extendibility. »

How To Test Ruby CLI: Console

One of the most interesting challenges I met during Hanami development is to write isolated integration tests. The framework ships with an extensive Command Line Interface (CLI) to generate (or destroy) code, start the server, open a Ruby (or a database) console, create/drop the database, run the migrations, precompile assets, and print informations. Console Hanami console is an interactive REPL based on IRB, which is useful to interact with the objects defined in a project. »

How To Test Ruby CLI: Code Generators

One of the most interesting challenges I met during Hanami development is to write isolated integration tests. The framework ships with an extensive Command Line Interface (CLI) to generate (or destroy) code, start the server, open a Ruby (or a database) console, create/drop the database, run the migrations, precompile assets, and print informations. Code Generators Code generators is a helpful feature that allows to generate code files. The main purpose is to speedup the development process. »

How To Test Ruby CLI: The Setup

One of the most interesting challenges I met during Hanami development is to write isolated integration tests. The framework ships with an extensive Command Line Interface (CLI) to generate (or destroy) code, start the server, open a Ruby (or a database) console, create/drop the database, run the migrations, precompile assets, and print informations. Full Isolation As I want to have integration tests to use CLI commands for real, the test suite is free of mocks/stubs. »