fezzik 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. data/README.md +5 -0
  2. data/fezzik.gemspec +1 -1
  3. data/lib/fezzik.rb +14 -1
  4. metadata +4 -4
data/README.md CHANGED
@@ -91,6 +91,11 @@ If you write a recipe that would be useful to other developers, please submit a
91
91
  Sometimes you just need to get your hands dirty and run a shell on your servers.
92
92
  The command.rb recipe gives you a prompt that lets you execute shell code on each of your hosts.
93
93
 
94
+ $ fez prod command
95
+ configuring for root@domain.com
96
+ run command (or "quit"): tail www/myapp/log.txt -n 1
97
+ [2011-07-01 00:01:23] GET / 200
98
+
94
99
  ### Rollback
95
100
 
96
101
  fez get rollback
data/fezzik.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "fezzik"
3
- s.version = "0.4.0"
3
+ s.version = "0.4.1"
4
4
 
5
5
  s.required_rubygems_version = Gem::Requirement.new(">=0") if s.respond_to? :required_rubygems_version=
6
6
  s.specification_version = 2 if s.respond_to? :specification_version=
data/lib/fezzik.rb CHANGED
@@ -8,7 +8,8 @@ namespace :fezzik do
8
8
  Rake::Task["fezzik:load_config"].invoke destination
9
9
  begin
10
10
  tasks.each do |task|
11
- Rake::Task["fezzik:#{task}"].invoke
11
+ task, params = split_task_and_params(task)
12
+ Rake::Task["fezzik:#{task}"].invoke(*params)
12
13
  end
13
14
  puts "[success]".green
14
15
  rescue SystemExit, Rake::CommandFailedError => e
@@ -53,4 +54,16 @@ namespace :fezzik do
53
54
  ensure
54
55
  $stdout = STDOUT
55
56
  end
57
+
58
+ def split_task_and_params(task_with_params)
59
+ params_match = /(.+)\[(.+)\]/.match(task_with_params)
60
+ if params_match
61
+ task = params_match[1]
62
+ params = params_match[2].split(",")
63
+ else
64
+ task = task_with_params
65
+ params = nil
66
+ end
67
+ [task, params]
68
+ end
56
69
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fezzik
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 0
10
- version: 0.4.0
9
+ - 1
10
+ version: 0.4.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Daniel MacDougall
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-07-14 00:00:00 -07:00
18
+ date: 2011-08-03 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency