diff options
Diffstat (limited to 'zsh/oh-my-zsh/plugins/zeus')
-rw-r--r-- | zsh/oh-my-zsh/plugins/zeus/README.md | 50 | ||||
-rw-r--r-- | zsh/oh-my-zsh/plugins/zeus/_zeus | 98 | ||||
-rw-r--r-- | zsh/oh-my-zsh/plugins/zeus/zeus.plugin.zsh | 70 |
3 files changed, 0 insertions, 218 deletions
diff --git a/zsh/oh-my-zsh/plugins/zeus/README.md b/zsh/oh-my-zsh/plugins/zeus/README.md deleted file mode 100644 index 0131f70..0000000 --- a/zsh/oh-my-zsh/plugins/zeus/README.md +++ /dev/null @@ -1,50 +0,0 @@ -# zeus plugin - -[Zeus](https://github.com/burke/zeus) preloads your Rails environment and forks that -process whenever needed. This effectively speeds up Rails' boot process to under 1 sec. -This plugin adds autocompletion for zeus and aliases for common usage. - -To use it, add `zeus` to the plugins array in your zshrc file: - -```zsh -plugins=(... zeus) -``` - -You also need to have the `zeus` gem installed. - -| Alias | Command | -|:-------------|:-------------------------------------------------------------------| -| _zi_ | `zeus init` | -| _zinit_ | `zeus init` | -| _zs_ | `zeus start` | -| _ztart_ | `zeus start` | -| _zc_ | `zeus console` | -| _zonsole_ | `zeus console` | -| _zsr_ | `zeus server` | -| _zerver_ | `zeus server` | -| _zr_ | `noglob zeus rake` | -| _zake_ | `noglob zeus rake` | -| _zg_ | `zeus generate` | -| _zenerate_ | `zeus generate` | -| _zrn_ | `zeus runner` | -| _zunner_ | `zeus runner` | -| _zcu_ | `zeus cucumber` | -| _zucumber_ | `zeus cucumber` | -| _zwip_ | `zeus cucumber --profile wip` | -| _zspec_ | `zeus rspec` | -| _zt_ | `zeus test` | -| _zest_ | `zeus test` | -| _zu_ | `zeus test test/unit/*` | -| _zunits_ | `zeus test test/unit/*` | -| _zf_ | `zeus test test/functional/*` | -| _zunctional_ | `zeus test test/functional/*` | -| _za_ | `zeus test test/unit/*; zeus test test/functional/; zeus cucumber` | -| _zall_ | `zeus test test/unit/*; zeus test test/functional/; zeus cucumber` | -| _zsw_ | `rm .zeus.sock` | -| _zweep_ | `rm .zeus.sock` | -| _zdbr_ | `zeus rake db:reset db:test:prepare` | -| _zdbreset_ | `zeus rake db:reset db:test:prepare` | -| _zdbm_ | `zeus rake db:migrate db:test:prepare` | -| _zdbmigrate_ | `zeus rake db:migrate db:test:prepare` | -| _zdbc_ | `zeus rake db:create` | -| _zdbcm_ | `zeus rake db:create db:migrate db:test:prepare` | diff --git a/zsh/oh-my-zsh/plugins/zeus/_zeus b/zsh/oh-my-zsh/plugins/zeus/_zeus deleted file mode 100644 index 78f0c54..0000000 --- a/zsh/oh-my-zsh/plugins/zeus/_zeus +++ /dev/null @@ -1,98 +0,0 @@ -#compdef zeus -#autoload - -# in order to make this work, you will need to have the gem zeus installed -# zeus zsh completion - -local -a _1st_arguments -if [[ -e .zeus.sock ]]; then - _1st_arguments=( - 'console:Lets you interact with your Rails application from the command line. (alias = c)' - 'cucumber:Runs cucumber.' - 'dbconsole:Figures out which database you are using and drops you into whichever command line interface.' - 'destroy:Figures out what generate did, and undoes it. (alias = d)' - 'generate:Uses templates to create a whole lot of things. (alias = g)' - 'rake:Execute rake tasks.' - 'runner:Runs Ruby code in the context of Rails non-interactively. (alias = r)' - 'server:Launches a small web server named WEBrick which comes bundled with Ruby. (alias = s)' - 'test:Runs RSpec tests. (alias = rspec, testrb)' - 'version:Shows the version number.' - ) -else - _1st_arguments=( - 'start:Preloads the zeus environment' - 'init:Generate a zeus.json file' - ) -fi - -_rails_generate_arguments() { - generate_arguments=( - controller - generator - helper - integration_test - mailer - migration - model - observer - performance_test - plugin - resource - scaffold - scaffold_controller - session_migration - stylesheets - ) -} - -_rake_does_task_list_need_generating () { - if [ ! -f .rake_tasks ]; then return 0; - else - accurate=$(stat -f%m .rake_tasks) - changed=$(stat -f%m Rakefile) - return $(expr $accurate '>=' $changed) - fi -} - -_zrake () -{ - local expl - declare -a tasks - - if [ -f Rakefile ]; then - if _rake_does_task_list_need_generating; then - echo "\nGenerating .rake_tasks..." > /dev/stderr - rake --silent --tasks | cut -d " " -f 2 > .rake_tasks - fi - tasks=(`cat .rake_tasks`) - _wanted tasks expl 'rake' compadd $tasks - fi -} - -local expl -local curcontext="$curcontext" state line -typeset -A opt_args - -_arguments -C \ - ':command:->command' \ - '*::options:->options' - - -case $state in - (command) - _describe -t commands "zeus subcommand" _1st_arguments - return - ;; - - (options) - case $line[1] in - (rake) - _zrake - ;; - (generate|g|destroy|d) - _rails_generate_arguments - _wanted generate_arguments expl 'all generate' compadd -a generate_arguments - ;; - esac - ;; -esac diff --git a/zsh/oh-my-zsh/plugins/zeus/zeus.plugin.zsh b/zsh/oh-my-zsh/plugins/zeus/zeus.plugin.zsh deleted file mode 100644 index 5dec1a4..0000000 --- a/zsh/oh-my-zsh/plugins/zeus/zeus.plugin.zsh +++ /dev/null @@ -1,70 +0,0 @@ -# Some aliases for zeus. (See: https://github.com/burke/zeus) -# Zeus preloads your Rails environment and forks that process whenever -# needed. This effectively speeds up Rails' boot process to under 1 sec. - -# Init -alias zi='zeus init' -alias zinit='zeus init' - -# Start -alias zs='zeus start' -alias ztart='zeus start' - -# Console -alias zc='zeus console' -alias zonsole='zeus console' - -# Server -alias zsr='zeus server' -alias zerver='zeus server' - -# Rake -alias zr='noglob zeus rake' -alias zake='noglob zeus rake' - -# Generate -alias zg='zeus generate' -alias zenerate='zeus generate' - -# Runner -alias zrn='zeus runner' -alias zunner='zeus runner' - -# Cucumber -alias zcu='zeus cucumber' -alias zucumber='zeus cucumber' -alias zwip='zeus cucumber --profile wip' - -# Rspec -alias zspec='zeus rspec' - -# Test -alias zt='zeus test' -alias zest='zeus test' - -alias zu='zeus test test/unit/*' -alias zunits='zeus test test/unit/*' - -alias zf='zeus test test/functional/*' -alias zunctional='zeus test test/functional/*' - -alias za='zeus test test/unit/*; zeus test test/functional/; zeus cucumber' -alias zall='zeus test test/unit/*; zeus test test/functional/; zeus cucumber' - -# Clean up crashed zeus instances. -alias zsw='rm .zeus.sock' -alias zweep='rm .zeus.sock' - -# Reset database -alias zdbr='zeus rake db:reset db:test:prepare' -alias zdbreset='zeus rake db:reset db:test:prepare' - -# Migrate and prepare database -alias zdbm='zeus rake db:migrate db:test:prepare' -alias zdbmigrate='zeus rake db:migrate db:test:prepare' - -# Create database -alias zdbc='zeus rake db:create' - -# Create, migrate and prepare database -alias zdbcm='zeus rake db:create db:migrate db:test:prepare'
\ No newline at end of file |