capistrano-hivequeen 3.0.1 → 3.0.2

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.
data/README.rdoc CHANGED
@@ -14,3 +14,15 @@ And in your config/deploy.rb:
14
14
 
15
15
  set :hivequeen_endpoint, "http://your.hivequeen.com"
16
16
  require 'hivequeen_client'
17
+
18
+ === Options
19
+
20
+ [az]
21
+ Restrict commands to servers in an availability zone:
22
+
23
+ cap staging app:start -s az=us-east-1a
24
+
25
+ [branch]
26
+ Use a specific branch, rather than the default for the Hivequeen environment:
27
+
28
+ cap staging deploy -s branch=some_feature
@@ -36,6 +36,9 @@ Capistrano::Configuration.instance(:must_exist).load do
36
36
  `git log #{current_commit}...#{real_revision} --pretty="%n%h %an: %s (%ar)" --stat --no-color`
37
37
  end
38
38
 
39
+ # Limit of change log size
40
+ set :changelog_maxbytes, 700 * 1024
41
+
39
42
  # Don't mess with timestamps
40
43
  set :normalize_asset_timestamps, false
41
44
  # Don't mess with permissions
@@ -66,7 +69,11 @@ Capistrano::Configuration.instance(:must_exist).load do
66
69
 
67
70
  # Set servers for each role
68
71
  env['roles'].each do |role_name, role_config|
69
- role(role_name.to_sym) { role_config['servers'] }
72
+ servers = role_config['instances']
73
+ if exists?(:az)
74
+ servers = servers.select {|s| s['availability_zone'] == az}
75
+ end
76
+ role(role_name.to_sym) { servers.map {|s| s['public_dns']} }
70
77
  end
71
78
 
72
79
  # Ensure some server designated as db server
@@ -28,7 +28,14 @@ Capistrano::Configuration.instance.load do
28
28
  :commit => real_revision,
29
29
  :override => override
30
30
  }
31
- params[:change_log] = changelog_command if current_commit
31
+
32
+ if current_commit
33
+ params[:change_log] = changelog_command
34
+ if params[:change_log].size > changelog_maxbytes
35
+ params[:change_log] = params[:change_log][0..changelog_maxbytes - 1]
36
+ logger.debug "Change log too large, truncating"
37
+ end
38
+ end
32
39
 
33
40
  begin
34
41
  deployment = HiveQueen.start_deployment(environment_id, params)
@@ -1,6 +1,6 @@
1
1
  class HiveQueen
2
2
  class Version
3
- @@version = '3.0.1'
3
+ @@version = '3.0.2'
4
4
 
5
5
  def self.to_s
6
6
  @@version
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-hivequeen
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-05 00:00:00.000000000 Z
12
+ date: 2013-01-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano