diff options
author | Marc Cornellà <marc.cornella@live.com> | 2018-04-15 20:26:18 +0200 |
---|---|---|
committer | Marc Cornellà <marc.cornella@live.com> | 2018-04-15 20:26:18 +0200 |
commit | 702b8b547ff0defbed36816a9e393bc514552c4e (patch) | |
tree | d55e595001f70f81552b5c8a58534cf23419a8e2 /plugins/hanami | |
parent | a8f3b374d89bd8a4b9e61001b0edd8b96a084abf (diff) | |
parent | ef9044c7225d62e8e56c494f7aafa7306b7015ad (diff) | |
download | zsh-702b8b547ff0defbed36816a9e393bc514552c4e.tar.gz zsh-702b8b547ff0defbed36816a9e393bc514552c4e.tar.bz2 zsh-702b8b547ff0defbed36816a9e393bc514552c4e.zip |
Merge branch 'iBublik-feature/hanami-plugin'
Close #5268.
Diffstat (limited to 'plugins/hanami')
-rw-r--r-- | plugins/hanami/README.md | 32 | ||||
-rw-r--r-- | plugins/hanami/hanami.plugin.zsh | 19 |
2 files changed, 51 insertions, 0 deletions
diff --git a/plugins/hanami/README.md b/plugins/hanami/README.md new file mode 100644 index 000000000..ef3451faf --- /dev/null +++ b/plugins/hanami/README.md @@ -0,0 +1,32 @@ +# Hanami Plugin # +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 +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 | 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 | diff --git a/plugins/hanami/hanami.plugin.zsh b/plugins/hanami/hanami.plugin.zsh new file mode 100644 index 000000000..349c42cae --- /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' |