zabbix_vhost 0.2.0 → 0.3.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ece66c26302ab26a7c6807a1ef1f81c06111afb2
4
- data.tar.gz: 53f3c7d3f70c97073d2dfa1fbbd039badcb235ab
3
+ metadata.gz: e3a82ecd7e8909e471a8cd85279169faf77c5656
4
+ data.tar.gz: d26080f7cf935db4d9cb1e3793a158018d92fd2c
5
5
  SHA512:
6
- metadata.gz: 99f8c92bfccad3757141e0aef9f68aa300e7f6c07cbf8562ac50637ea39b3f660832b38c76357f5625b0c124089e1f88cb8bbd38ef7e07810559e9aefb86a1a4
7
- data.tar.gz: 82f44f3fd56f67f59c984cc8bf017823707a94b3cb2dbc9aa08873d3fa92d49539985a38b3611f8e05398126fe5345b685757bc60bd6759eb3c3b2e6fd1417dc
6
+ metadata.gz: 070024c271854b1dc3e4d1573a0a1dfc8bb8a158b554c9d4c94761ab4491eeb7a3e6bc79be823716bfbcc82d3b808c5e0583c06ac4b812e21ddd0c3b975f54ea
7
+ data.tar.gz: 9c329774ae85a63bb3f6d09f915a54927f2e5acc118c3473dc3adf4eb6c43c9deb33ecf3d60eca74b348557938cc25bdbcd62192e039fc152fcb200ed8d5f024
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- zabbix_vhost (0.1.0)
4
+ zabbix_vhost (0.2.0)
5
5
  thor
6
6
 
7
7
  GEM
@@ -6,6 +6,7 @@ module ZabbixVhost
6
6
 
7
7
 
8
8
  desc "autodiscover PATH", "Autodiscover Vhost in absolute path"
9
+
9
10
  def autodiscover(path)
10
11
 
11
12
 
@@ -14,7 +15,8 @@ module ZabbixVhost
14
15
 
15
16
  data = configurations.collect do |c|
16
17
  {
17
- "{#DOMAIN}" => c.server_name
18
+ "{#DOMAIN}" => c.server_name,
19
+ "{#CONFIG_FILE}" => c.file_path
18
20
  }
19
21
  end
20
22
 
@@ -24,11 +26,11 @@ module ZabbixVhost
24
26
  end
25
27
 
26
28
 
27
- desc "get_domain_data PATH DOMAIN FUNCTION", "Get a information from the Vhost configuration find in the PATH"
29
+ desc "get_domain_data CONFIG_FILE FUNCTION", "Get a information from the Vhost configuration of CONFIG_FILE"
28
30
 
29
- def get_domain_data(path,domain,function)
31
+ def get_domain_data(config_file, function)
30
32
 
31
- c = ZabbixVhost::Config.find_in_dir(path, domain)
33
+ c = ZabbixVhost::Config.new(config_file)
32
34
 
33
35
  print c.send(function)
34
36
  end
@@ -58,11 +58,7 @@ module ZabbixVhost
58
58
  end
59
59
 
60
60
 
61
- def if_apache
62
- if @config_content.match(/ServerName/)
63
- yield
64
- end
65
- end
61
+
66
62
 
67
63
  def ssl_active
68
64
  @ssl_active ? 1 : 0
@@ -73,9 +69,20 @@ module ZabbixVhost
73
69
  @ssl_data[:days_until]
74
70
  end
75
71
 
72
+ def ssl_issuer
73
+ return nil unless @ssl_data
74
+ @ssl_data[:issuer]
75
+ end
76
+
76
77
 
77
78
  private
78
79
 
80
+ def if_apache
81
+ if @config_content.match(/ServerName/)
82
+ yield
83
+ end
84
+ end
85
+
79
86
  def read_ssl_data
80
87
 
81
88
  if @ssl_active
@@ -1,3 +1,3 @@
1
1
  module ZabbixVhost
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zabbix_vhost
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marino Bonetti
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-05-30 00:00:00.000000000 Z
11
+ date: 2018-05-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor