capper 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/capper.gemspec +1 -1
  2. data/lib/capper/monit.rb +5 -2
  3. metadata +2 -2
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "capper"
5
- s.version = "0.7.0"
5
+ s.version = "0.7.1"
6
6
  s.platform = Gem::Platform::RUBY
7
7
  s.licenses = ["MIT"]
8
8
  s.authors = ["Benedikt Böhm"]
@@ -7,11 +7,14 @@ Capper.load do
7
7
  desc "Setup monit configuration files"
8
8
  task :setup do
9
9
  configs = fetch(:monit_configs, {})
10
+ servers = find_servers
10
11
 
11
12
  upload_template(monitrc, :mode => "0644") do |server|
12
13
  configs.keys.select do |name|
13
- options = configs[name][:options]
14
- find_servers(options).include?(server)
14
+ roles = [configs[name][:options][:roles]].flatten
15
+ roles.select do |r|
16
+ self.roles[r.to_sym].include?(server)
17
+ end.any?
15
18
  end.map do |name|
16
19
  "# #{name}\n#{configs[name][:body]}"
17
20
  end.join("\n\n")
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: capper
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.7.0
5
+ version: 0.7.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - "Benedikt B\xC3\xB6hm"
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-10-05 00:00:00 +02:00
13
+ date: 2011-10-13 00:00:00 +02:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency