fezzik 0.3.0 → 0.4.0

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 (5) hide show
  1. data/README.md +45 -2
  2. data/bin/fez +1 -1
  3. data/fezzik.gemspec +1 -1
  4. data/lib/fezzik.rb +9 -1
  5. metadata +4 -4
data/README.md CHANGED
@@ -35,7 +35,7 @@ and gets out of your way.
35
35
 
36
36
  Ready to deploy!
37
37
 
38
- $ fez to_prod deploy
38
+ $ fez prod deploy
39
39
  ...
40
40
  fezzik deployed!
41
41
 
@@ -43,7 +43,26 @@ Ready to deploy!
43
43
 
44
44
  Fezzik exposes some utilities that can be useful when running remote tasks.
45
45
 
46
- **capture\_output(&block)**
46
+ ### Host override
47
+
48
+ Sometimes you'll want to run a fezzik task on a subset of hosts, rather than the full destination fleet.
49
+ You can override what hosts a fezzik task executes on from the command line.
50
+
51
+ # deploy to a single host
52
+ $ fez prod:domain1.com deploy
53
+
54
+ # deploy to a single host as root
55
+ $ fez prod:root@domain1.com deploy
56
+
57
+ # deploy to multiple hosts
58
+ $ fez prod:domain1.com,domain2.com deploy
59
+
60
+ The overriding hosts don't need to be a subset of the specified destination's domains.
61
+ They can be any hosts you want to use with a destination's configuration.
62
+
63
+ ### Capture or redirect output
64
+
65
+ capture_output(&block)
47
66
 
48
67
  Use this function if you would like to hide or capture the normal output that the "run" command prints.
49
68
 
@@ -64,3 +83,27 @@ found in the fezzik project recipes directory. You can download them with fezzik
64
83
  fez get <recipes>
65
84
 
66
85
  If you write a recipe that would be useful to other developers, please submit a pull request!
86
+
87
+ ### Command
88
+
89
+ fez get command
90
+
91
+ Sometimes you just need to get your hands dirty and run a shell on your servers.
92
+ The command.rb recipe gives you a prompt that lets you execute shell code on each of your hosts.
93
+
94
+ ### Rollback
95
+
96
+ fez get rollback
97
+
98
+ Emergency! Rollback! Every deployment you make is saved on the server by default.
99
+ You can move between these deployments (to roll back, for example), with the rollback.rb recipe.
100
+
101
+ $ fez prod rollback
102
+ configuring for root@domain.com
103
+ === Releases ===
104
+ 0: Abort
105
+ 1: 201107051328 (current)
106
+ 2: 201106231408
107
+ 3: 201106231352
108
+ Rollback to release (0):
109
+
data/bin/fez CHANGED
@@ -25,7 +25,7 @@ def display_tasks_and_exit
25
25
  exit 0
26
26
  end
27
27
 
28
- RECIPE_URL = "https://github.com/dmacdougall/fezzik/raw/master/recipes"
28
+ RECIPE_URL = "https://raw.github.com/dmacdougall/fezzik/master/recipes"
29
29
  def download_recipes_and_exit
30
30
  system("mkdir -p config/recipes")
31
31
  ARGV[1..-1].each do |recipe|
data/fezzik.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "fezzik"
3
- s.version = "0.3.0"
3
+ s.version = "0.4.0"
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
@@ -2,6 +2,8 @@ namespace :fezzik do
2
2
  task :run do
3
3
  destination = ARGV[0]
4
4
  destination = $1 if destination.match(/to_(.+)/)
5
+ destination, @domain_override = destination.split(":", 2)
6
+ @domain_override = @domain_override.split(",") if @domain_override
5
7
  tasks = ARGV[1..-1]
6
8
  Rake::Task["fezzik:load_config"].invoke destination
7
9
  begin
@@ -30,7 +32,13 @@ namespace :fezzik do
30
32
  end
31
33
 
32
34
  def destination(target, &block)
33
- block.call if target == @destination
35
+ if target == @destination
36
+ block.call
37
+ if @domain_override
38
+ @domain_override.map! { |domain| domain.include?("@") ? domain : "#{user}@#{domain}" }
39
+ set :domain, @domain_override
40
+ end
41
+ end
34
42
  end
35
43
 
36
44
  def env(key, value)
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: 19
4
+ hash: 15
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 3
8
+ - 4
9
9
  - 0
10
- version: 0.3.0
10
+ version: 0.4.0
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-06-01 00:00:00 -07:00
18
+ date: 2011-07-14 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency