itamae-plugin-recipe-god 0.2.7 → 0.2.9

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
  SHA256:
3
- metadata.gz: d3717e3390f8fa3cbebc799f7318e49ad67de9bfc6a15d53e69502094e47bbd7
4
- data.tar.gz: 602b08db0c58311b7d569d6d9b73119890509f85d914aa104458287f3da958ae
3
+ metadata.gz: 00a09599e403184ea0a1c8a9a769a74de78efe4abf2dd92ddceae0a3a37e40ae
4
+ data.tar.gz: c4234291197ca3c9fd643324f49932eca6434c6cb7a9cd1658280a7d1d4c9c30
5
5
  SHA512:
6
- metadata.gz: b8ce853b2c232e3ae1bc87a9182e57523dc231b93403da0877311335c8ed1c0276b3076babdeb7b8f29238a99819a48878f90aff8255b4ad80457414dbdb5f64
7
- data.tar.gz: 1542ba9ba957d35dc38237b2f8283b085bfb304948ac8ba6eadbc09b469676870c6b47c569b6e5b8669ad1af46107e4e00d2e0246ba83a043e30b04cd08e6652
6
+ metadata.gz: 116b489e4297fd2788ec26713a08e38b2f0eb5962c957bbf28d5906448873ff40f2b7cbda8c6c3f41ba1b02e05dafa4dd59c426e077f8f00614194d29253aff5
7
+ data.tar.gz: c2573b47ce8eb1dab84a13e61bd4caa217ec9a3e831d597b2e54a6a9e460dd7845a7ac1a79faf0cc0ef443f7d54a53f6270a52a9518660de2392fc3b02cfc4d7
@@ -40,9 +40,24 @@ template '/etc/god/master.conf' do
40
40
  mode '644'
41
41
  end
42
42
 
43
- ruby_bin_dir = node.languages.ruby.bin_dir rescue nil
43
+ # Non-frozen string
44
+ god_bin = +"#{ENV['GOD_BIN'] || ''}"
45
+ if god_bin.empty?
46
+ # Tentatively, god command is located in ruby binary directory.
47
+ ruby_bin_dir = node.languages.ruby.bin_dir rescue nil
48
+ god_bin.replace(ruby_bin_dir ? "#{ruby_bin_dir}/god" : 'god')
49
+
50
+ # Locate god command on host.
51
+ local_ruby_block 'which god' do
52
+ block do
53
+ bin_path = run_command('sudo which god').stdout.chomp
54
+ god_bin.replace(bin_path) unless bin_path.empty?
55
+ end
56
+ end
57
+ end
58
+
44
59
  service_variables = {
45
- god_bin: (ruby_bin_dir ? "#{ruby_bin_dir}/god" : 'god'),
60
+ god_bin: god_bin,
46
61
  pid: '/var/run/god.pid',
47
62
  config: '/etc/god/master.conf',
48
63
  log: '/var/log/god.log',
@@ -2,7 +2,7 @@ module Itamae
2
2
  module Plugin
3
3
  module Recipe
4
4
  module God
5
- VERSION = '0.2.7'
5
+ VERSION = '0.2.9'
6
6
  end
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itamae-plugin-recipe-god
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - y-matsuda
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-06-26 00:00:00.000000000 Z
11
+ date: 2024-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: itamae
@@ -116,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0'
118
118
  requirements: []
119
- rubygems_version: 3.3.16
119
+ rubygems_version: 3.3.26
120
120
  signing_key:
121
121
  specification_version: 4
122
122
  summary: itamae recipe for god process monitoring framework