Skip to content

Commit

Permalink
Cleanup. Add missing deps to package.json.
Browse files Browse the repository at this point in the history
  • Loading branch information
brandon-fryslie committed Apr 1, 2016
1 parent 4e83cf5 commit 128cea2
Show file tree
Hide file tree
Showing 25 changed files with 290 additions and 488 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.idea
node_modules
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ module.exports = (state) ->
alias: 't'
shell_env:
KAFKA_QUEUE_TYPE: 'NIGHTMARE'
command: ['tail', '-f', "#{process.env.HOME}/projects/rally-stack/bin/stacker"]
command: ['echo', 'Hi there!']
args:
'task-argument':
describe: 'one hell of an argument'
default: 'such a good default'
start_message: 'Testing a basic task...'
wait_for: /(stacker)/
wait_for: /(There!)/
callback: (state, data) ->
state.test_data = 'just some passed thru test data'
here: 'is some new state for ya'
Expand Down Expand Up @@ -126,6 +126,6 @@ Yu must have Mocha: `npm install -g mocha`
Then, run these commands:

```
cd ~/projects/rally-stack/stacker
cd stacker/test
npm test
```
1 change: 0 additions & 1 deletion bin/stacker
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ require('es6-promise').polyfill()
require 'colors'
_ = require 'lodash'
stacker = require '../lib/stacker_lib'
require('climet-client')()

process.on 'uncaughtException', (error) ->
console.log 'unhandled exception!'.red
Expand Down
51 changes: 0 additions & 51 deletions config/config.coffee

This file was deleted.

44 changes: 0 additions & 44 deletions config/tasks/alm.coffee

This file was deleted.

10 changes: 0 additions & 10 deletions config/tasks/burro.coffee

This file was deleted.

44 changes: 0 additions & 44 deletions config/tasks/docker-oracle.coffee

This file was deleted.

14 changes: 0 additions & 14 deletions config/tasks/hydra.coffee

This file was deleted.

19 changes: 0 additions & 19 deletions config/tasks/marshmallow.coffee

This file was deleted.

12 changes: 0 additions & 12 deletions config/tasks/mock-pigeon.coffee

This file was deleted.

24 changes: 0 additions & 24 deletions config/tasks/pigeon.coffee

This file was deleted.

19 changes: 0 additions & 19 deletions config/tasks/realtime-nginx.coffee

This file was deleted.

17 changes: 0 additions & 17 deletions config/tasks/zuul.coffee

This file was deleted.

File renamed without changes.
32 changes: 20 additions & 12 deletions lib/repl_commands.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,12 @@ repl_lib.add_command
name: 'set'
alias: 's'
help: 'set environment variable'
usage: 'set [KEY] [VALUE]'
usage: 'set KEY VALUE'
fn: (k, v) ->
unless k? and v?
return invalid_command_invocation @

util.print 'setting'.cyan.bold, "#{k}".blue.bold, 'to'.cyan.bold, "#{v}".magenta


state_lib.get_stacker_state()[k] = v
state_lib.set_stacker_state "#{k}": v

################################################################################
# REPL TELL
Expand Down Expand Up @@ -139,7 +136,7 @@ repl_lib.add_command
tab_complete: (args) ->
['ronald', 'mc', 'donald']
help: 'tell someone to do something (e.g. tell alm grunt clean build)'
usage: 'tell [TASK] [COMMAND]'
usage: 'tell TASK COMMAND'
fn: (target, cmd...) ->
unless target? and cmd.length
return invalid_command_invocation @
Expand Down Expand Up @@ -170,7 +167,7 @@ repl_lib.add_command
name: 'cleanup'
alias: 'cu'
help: 'run cleanup for a task'
usage: 'cleanup [TASK]'
usage: 'cleanup TASK'
fn: cleanup_task

# (string, [string]) -> null
Expand Down Expand Up @@ -201,7 +198,7 @@ repl_lib.add_command
name: 'running'
alias: 'r?'
help: 'is daemon runnning?'
usage: 'running [TASK]'
usage: 'running TASK'
fn: is_daemon_running

repl_lib.add_command
Expand All @@ -214,7 +211,7 @@ repl_lib.add_command
name: 'kill'
alias: 'k'
help: 'kill a task'
usage: 'kill [TASK]'
usage: 'kill TASK'
fn: (target) ->
unless target?
return invalid_command_invocation @
Expand All @@ -231,7 +228,7 @@ repl_lib.add_command
name: 'restart'
alias: 'rs'
help: 'restart a task'
usage: 'restart [TASK]'
usage: 'restart TASK'
fn: (target) ->
unless target?
return invalid_command_invocation @
Expand All @@ -244,7 +241,7 @@ repl_lib.add_command
name: 'run'
alias: 'r'
help: 'start multiple tasks'
usage: 'run [TASKS]'
usage: 'run TASKS'
fn: (tasks...) ->
unless tasks.length
return invalid_command_invocation @
Expand All @@ -254,7 +251,7 @@ repl_lib.add_command
repl_lib.add_command
name: 'setenv'
help: 'set a shell environment variable'
usage: 'setenv [KEY] [VALUE]'
usage: 'setenv KEY VALUE'
fn: (k, v) ->
unless k? and v?
return invalid_command_invocation @
Expand All @@ -266,6 +263,17 @@ repl_lib.add_command
state.shell_env[k] = v
state_lib.set_stacker_state state


repl_lib.add_command
name: 'history'
help: 'Show n lines of command history'
usage: 'history [n]'

fn: (n = 10) ->
util.print "Stacker History".cyan.bold
util.print "#{(repl_lib.get_repl().rli.history[0...n].join '\n')}\n"


################################################################################
# exit stacker
################################################################################
Expand Down
Loading

0 comments on commit 128cea2

Please sign in to comment.