From 0bd9e5d85975f7f712f13b6178fba04a8c18d5d6 Mon Sep 17 00:00:00 2001 From: Artem Pyankov Date: Sun, 31 Jul 2016 18:58:50 +0500 Subject: [PATCH 1/4] Add hanami plugin inspired by rails --- plugins/hanami/hanami.plugin.zsh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 plugins/hanami/hanami.plugin.zsh diff --git a/plugins/hanami/hanami.plugin.zsh b/plugins/hanami/hanami.plugin.zsh new file mode 100644 index 00000000..349c42ca --- /dev/null +++ b/plugins/hanami/hanami.plugin.zsh @@ -0,0 +1,19 @@ +alias -g HED='HANAMI_ENV=development' +alias -g HEP='HANAMI_ENV=production' +alias -g HET='HANAMI_ENV=test' + +alias hc='hanami console' +alias hd='hanami destroy' +alias hg='hanami generate' +alias hgm='hanami generate migration' +alias hs='hanami server' +alias hsp='hanami server -p' +alias hr='hanami routes' +alias hdc='hanami db create' +alias hdd='hanami db drop' +alias hdp='hanami db prepare' +alias hda='hanami db apply' +alias hdv='hanami db version' +alias hdrs='hdd && hdp' +alias hdtp='HET hdp' +alias hrg='hr | grep' From e64cdc9ec40c4b98b612905cbdc6c86b14dc1fb6 Mon Sep 17 00:00:00 2001 From: Artem Pyankov Date: Fri, 19 Aug 2016 01:18:14 +0500 Subject: [PATCH 2/4] Add README for hanami plugin --- plugins/hanami/README.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 plugins/hanami/README.md diff --git a/plugins/hanami/README.md b/plugins/hanami/README.md new file mode 100644 index 00000000..20e9dd5c --- /dev/null +++ b/plugins/hanami/README.md @@ -0,0 +1,6 @@ +# Hanami Plugin # +This plugin adds convinient ways to work with [Hanami](http://hanamirb.org/) via console. It's inspired by Rails plugin, so if you've used it, you'll be like home. + +## Usage ## +For example, type `hc` into your console when you're within Hanami project directory to run application console. +You can read about available commands [here](http://hanamirb.org/guides/command-line/applications/), almost all of them have shortcut aliases with this plugin. From 7c62c57b9f23b32685a3ce668b54edd3032456fb Mon Sep 17 00:00:00 2001 From: Artem Pyankov Date: Sat, 27 Aug 2016 17:18:12 +0500 Subject: [PATCH 3/4] Add table of aliases for hanami plugin --- plugins/hanami/README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/plugins/hanami/README.md b/plugins/hanami/README.md index 20e9dd5c..81f2431a 100644 --- a/plugins/hanami/README.md +++ b/plugins/hanami/README.md @@ -4,3 +4,26 @@ This plugin adds convinient ways to work with [Hanami](http://hanamirb.org/) via ## Usage ## For example, type `hc` into your console when you're within Hanami project directory to run application console. You can read about available commands [here](http://hanamirb.org/guides/command-line/applications/), almost all of them have shortcut aliases with this plugin. + +## Aliases ## + +| Alias | Description | Command | +|-------|------------------------------------------|------------------------------------------------| +| HED | Set environment variable HANAMI_ENV to development | HANAMI_ENV=development | +| HEP | Set environment variable HANAMI_ENV to production | HANAMI_ENV=production | +| HET | Set environment variable HANAMI_ENV to test | HANAMI_ENV=test | +| hc | Run application console | hanami console | +| hd | Remove specified hanami resource (model, action, migration, etc.) | hanami destroy | +| hg | Create specified hanami resource (model, action, migration, etc.) | hanami generate | hanami generate | +| hgm | Create migration file | hanami generate migration | +| hs | Launch server with hanami application | hanami server | +| hsp | Launch server with specified port | hanami server -p | +| hr | List application routes | hanami routes | +| hdc | Create application database | hanami db create | +| hdd | Delete application database | hanami db drop | +| hdp | Create application database, load schema (if any), run pending migrations | hanami db prepare | +| hda | Run pending migrations, dump schema, delete all migration files | hanami db apply | +| hdv | Print current database version (timestamp of last applied migration) | hanami db version | +| hdrs | Drop and recreate application database | hdd && hdp | +| hdtp | Actualize test environment database | HET hdp | +| hrg | Grep hanami routes with specified pattern | hr | grep | From ef9044c7225d62e8e56c494f7aafa7306b7015ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Sun, 15 Apr 2018 20:25:50 +0200 Subject: [PATCH 4/4] Fix styling and format of hanami README --- plugins/hanami/README.md | 49 +++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/plugins/hanami/README.md b/plugins/hanami/README.md index 81f2431a..ef3451fa 100644 --- a/plugins/hanami/README.md +++ b/plugins/hanami/README.md @@ -1,29 +1,32 @@ # Hanami Plugin # -This plugin adds convinient ways to work with [Hanami](http://hanamirb.org/) via console. It's inspired by Rails plugin, so if you've used it, you'll be like home. +This plugin adds convenient ways to work with [Hanami](http://hanamirb.org/) via console. +It's inspired by Rails plugin, so if you've used it, you'll feel like home. ## Usage ## -For example, type `hc` into your console when you're within Hanami project directory to run application console. -You can read about available commands [here](http://hanamirb.org/guides/command-line/applications/), almost all of them have shortcut aliases with this plugin. + +For example, type `hc` into your console when you're within Hanami project directory to run +the application console. Have a look at available shortcuts below. You can read more about +these commands [on the official website](http://hanamirb.org/guides/command-line/applications/). ## Aliases ## -| Alias | Description | Command | -|-------|------------------------------------------|------------------------------------------------| -| HED | Set environment variable HANAMI_ENV to development | HANAMI_ENV=development | -| HEP | Set environment variable HANAMI_ENV to production | HANAMI_ENV=production | -| HET | Set environment variable HANAMI_ENV to test | HANAMI_ENV=test | -| hc | Run application console | hanami console | -| hd | Remove specified hanami resource (model, action, migration, etc.) | hanami destroy | -| hg | Create specified hanami resource (model, action, migration, etc.) | hanami generate | hanami generate | -| hgm | Create migration file | hanami generate migration | -| hs | Launch server with hanami application | hanami server | -| hsp | Launch server with specified port | hanami server -p | -| hr | List application routes | hanami routes | -| hdc | Create application database | hanami db create | -| hdd | Delete application database | hanami db drop | -| hdp | Create application database, load schema (if any), run pending migrations | hanami db prepare | -| hda | Run pending migrations, dump schema, delete all migration files | hanami db apply | -| hdv | Print current database version (timestamp of last applied migration) | hanami db version | -| hdrs | Drop and recreate application database | hdd && hdp | -| hdtp | Actualize test environment database | HET hdp | -| hrg | Grep hanami routes with specified pattern | hr | grep | +| Alias | Command | Description | +|-------|---------------------------|---------------------------------------------------------| +| HED | HANAMI_ENV=development | Set environment variable HANAMI_ENV to development | +| HEP | HANAMI_ENV=production | Set environment variable HANAMI_ENV to production | +| HET | HANAMI_ENV=test | Set environment variable HANAMI_ENV to test | +| hc | hanami console | Run application console | +| hd | hanami destroy | Remove specified hanami resource | +| hg | hanami generate | Create specified hanami resource | +| hgm | hanami generate migration | Create migration file | +| hs | hanami server | Launch server with hanami application | +| hsp | hanami server -p | Launch server with specified port | +| hr | hanami routes | List application routes | +| hdc | hanami db create | Create application database | +| hdd | hanami db drop | Delete application database | +| hdp | hanami db prepare | Prepare database for the current environment | +| hda | hanami db apply | Recreates a fresh schema after migrations (destructive) | +| hdv | hanami db version | Print current database version | +| hdrs | hdd && hdp | Drop and recreate application database | +| hdtp | HET hdp | Actualize test environment database | +| hrg | hr | grep | Grep hanami routes with specified pattern |