Hanamismith is a Command Line Interface (CLI) for smithing Hanami projects. Perfect when you need a professional and robust tool for building new project skeletons. To quote from the Dry RB and Hanami teams:
If you’re looking for new ways to build maintainable, secure, faster and testable Ruby applications, you’re in for a treat. Hanami is built for people like you.
Welcome to the modern age of web development. This gem will help you get up and running as quickly as possible. 🚀
Built atop Rubysmith for building project skeleton.
Uses Dry RB for functional programming.
Uses Hanami for web application development.
Uses Puma as the default web server and fully configured for local and production environments.
Uses Dotenv for managing your environment configurations.
/uphealth check endpoint via the
Disables IRB console autocomplete when used in production-like environments. You can re-enable IRB autocomplete by setting
IRB_USE_AUTOCOMPLETE=truebefore launching your console in non development or test environments.
The above is a screenshot of a Demo project that was generated and run locally. For a fully working demonstration application — as built by this gem — check out the Hemo project. Here’s a quick screencast overview of this demonstration application in action:
To install with security, run:
# 💡 Skip this line if you already have the public certificate installed. gem cert --add <(curl --compressed --location https://alchemists.io/gems.pem) gem install hanamismith --trust-policy HighSecurity
To install without security, run:
gem install hanamismith
Command Line Interface (CLI)
From the command line, type:
The core functionality of this gem centers around the
build command and associated flags. The build options allow you to further customize the kind of gem you want to build. Most build options are enabled by default. For detailed documentation on all supported flags, see the Rubysmith documentation.
This gem can be configured via a global configuration:
It can also be configured via XDG environment variables.
The default configuration is everything provided in the Rubysmith. It is recommended that you provide common URLs for your project which would be all keys found in this section:
:project: :url: # Add key/value pairs here.
When these values exist, you’ll benefit from having this information added to your generated project documentation. Otherwise — if these values are empty — they are removed from new project generation entirely.
When implementing and testing your project locally, a typical workflow might be:
# Build new project hanamismith build --name demo # Run code quality and test coverage checks cd demo bin/setup bin/rake # Develop (red, green, refactor) bin/guard git commit # (repeat until finished with implementation) # Run: With Overmind (recommended) overmind start --procfile Procfile.dev # Run: Without Overmind bin/hanami server # Deploy git push # Help bin/hanami --help
Once the server is running you can visit (or ping) the following endpoints:
/: The home page.
/up: The health status of the application. This will be green (200 OK) when the server is up or red (503 Service Unavailable) when the server is down.
To contribute, run:
git clone https://github.com/bkuhlmann/hanamismith cd hanamismith bin/setup
You can also use the IRB console for direct access to all objects:
To test, run: