capistrano-hivequeen 7.2.1 → 7.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bd37c82fd4e33aaba50d25a8b862b298705cc800
4
- data.tar.gz: fb7e77c7495e5da2873cc4e72fa2004223023ad8
3
+ metadata.gz: 3a355f7202bb514227995dec097d993eb05c4d38
4
+ data.tar.gz: 2b3aa039a7fe4de40236222cd93e89c9d4a3c24e
5
5
  SHA512:
6
- metadata.gz: 97d6071d63a8531b7c54998e0b93a3241644dd706f1354d34ced60c4f20abaa95620bc48f76d80e0cc44e9a88bfe6a047c7734cd65ff454f5ca9a8d599678e8d
7
- data.tar.gz: 28dae87c11c9afcaaaf95a56db4c119096fe737b37380ae853736991a28e8ae4f3d2560982344d4873c4aa1d0ad7714da229c58cc1f6e2654399a146621b6626
6
+ metadata.gz: caf489625de608b6e7140f08cc9c68755a64ddc143ac5f2cdc9d9a41d5cd3e9f0f40ad84a43ae2e9a6ca3dbd90d137388bc6e7e3179ee8c087fafcb153ff4cfd
7
+ data.tar.gz: d56bdd9f5e72c15dda5a15159ca8021e04ac1f9f980ec3c9fe62314ddf5216f223c434c9819f0eee1905807ad537e80bf1893046824d65acb6171f7e2aa45545
@@ -80,11 +80,12 @@ Capistrano::Configuration.instance(:must_exist).load do
80
80
 
81
81
  # Ensure some server designated as db server
82
82
  unless roles.key?(:db)
83
- # Prefer the bg server
84
- db_server = roles[:bg].servers.first if roles.key?(:bg)
83
+ # Prefer a background worker role
84
+ bg = (roles.keys & [:bg, :resque, :sidekiq]).sample
85
+ db_server = roles[bg].servers.sample if roles.key?(bg)
85
86
 
86
87
  # Otherwise, use any server
87
- db_server ||= roles.values.map{|x| x.servers}.flatten.compact.first
88
+ db_server ||= roles.values.map{|x| x.servers}.flatten.compact.sample
88
89
  logger.trace "Using #{db_server} as primary db server"
89
90
  role :db, db_server.to_s, :primary => true
90
91
  end
@@ -1,6 +1,6 @@
1
1
  class HiveQueen
2
2
  class Version
3
- @@version = '7.2.1'
3
+ @@version = '7.3.0'
4
4
 
5
5
  def self.to_s
6
6
  @@version
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-hivequeen
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.2.1
4
+ version: 7.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Suggs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-18 00:00:00.000000000 Z
11
+ date: 2015-05-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano