capper 0.7.2 → 0.7.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "capper"
5
- s.version = "0.7.2"
5
+ s.version = "0.7.3"
6
6
  s.platform = Gem::Platform::RUBY
7
7
  s.licenses = ["MIT"]
8
8
  s.authors = ["Benedikt Böhm"]
@@ -11,10 +11,14 @@ Capper.load do
11
11
 
12
12
  upload_template(monitrc, :mode => "0644") do |server|
13
13
  configs.keys.select do |name|
14
- roles = [configs[name][:options][:roles]].flatten
15
- roles.select do |r|
16
- self.roles[r.to_sym].include?(server)
17
- end.any?
14
+ roles = configs[name][:options][:roles]
15
+ if roles.nil?
16
+ true
17
+ else
18
+ [roles].flatten.select do |r|
19
+ self.roles[r.to_sym].include?(server)
20
+ end.any?
21
+ end
18
22
  end.map do |name|
19
23
  "# #{name}\n#{configs[name][:body]}"
20
24
  end.join("\n\n")
@@ -16,7 +16,7 @@ Capper.load do
16
16
  set(:unicorn_config) { File.join(config_path, "unicorn.rb") }
17
17
  set(:unicorn_pidfile) { File.join(pid_path, "unicorn.pid") }
18
18
 
19
- monit_config "unicorn", <<EOF
19
+ monit_config "unicorn", <<EOF, :roles => :app
20
20
  check process unicorn
21
21
  with pidfile "<%= unicorn_pidfile %>"
22
22
  start program = "<%= unicorn_script %> start" with timeout 60 seconds
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: capper
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.7.2
5
+ version: 0.7.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - "Benedikt B\xC3\xB6hm"