doctor 0.7.0 → 0.8.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6db2305895c47404744bcee5f971b76f0f753d57
|
4
|
+
data.tar.gz: 657c8f77601e05a0b92e0a43313d071401152f43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5368b8ea5ff3afe022e4669a4389de1c2c1a15b88c477da88f9bce11d1d748a81f77f93a8e1651b14da6e334f6cc55bd92f00d023354241b2065ac4a5daa7a0f
|
7
|
+
data.tar.gz: 6329c8cb35248d159bec0b790c4f4141d3847db86d6cc5ce811d9cdbf8dc3c7a603016ee1afdb5d475396c9ffe5ba9abfef8ac3c43730bab8656935bf8cc069e
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Doctor
|
2
|
+
class ReleasePathAnalyser
|
3
|
+
def analyse
|
4
|
+
[check_path]
|
5
|
+
end
|
6
|
+
|
7
|
+
private
|
8
|
+
|
9
|
+
def check_path
|
10
|
+
path = File.basename(Rails.root)
|
11
|
+
last = Dir.entries("#{Rails.root}/..").sort_by { |x| File.basename(x) }.reverse[0]
|
12
|
+
status = last == path ? 'ok' : 'error'
|
13
|
+
OpenStruct.new(
|
14
|
+
status: status,
|
15
|
+
last_release: last,
|
16
|
+
path: path
|
17
|
+
)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -3,6 +3,7 @@ module Doctor
|
|
3
3
|
def perform
|
4
4
|
result = {}
|
5
5
|
|
6
|
+
result[:release_path] = analyze_release_path
|
6
7
|
result[:telnets] = analyze_telnet
|
7
8
|
result[:databases] = analyze_database
|
8
9
|
result[:hds] = analyse_hds
|
@@ -18,6 +19,10 @@ module Doctor
|
|
18
19
|
|
19
20
|
private
|
20
21
|
|
22
|
+
def analyze_release_path
|
23
|
+
process(ReleasePathAnalyser, Dto::ReleasePathResultDto)
|
24
|
+
end
|
25
|
+
|
21
26
|
def analyze_telnet
|
22
27
|
process(TelnetAnalyser, Dto::TelnetResultDto)
|
23
28
|
end
|
@@ -54,7 +59,6 @@ module Doctor
|
|
54
59
|
|
55
60
|
def list_all_error_messages(result)
|
56
61
|
errors = []
|
57
|
-
|
58
62
|
result.values.each do |result_analyze|
|
59
63
|
result_analyze.each do |result|
|
60
64
|
next if result.status.eql?('ok')
|
data/lib/doctor/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: doctor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- uaiHebert
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -168,12 +168,14 @@ files:
|
|
168
168
|
- Rakefile
|
169
169
|
- app/analyser/doctor/database_analyser.rb
|
170
170
|
- app/analyser/doctor/hd_analyser.rb
|
171
|
+
- app/analyser/doctor/release_path_analyser.rb
|
171
172
|
- app/analyser/doctor/telnet_analyser.rb
|
172
173
|
- app/controllers/doctor/health_check_controller.rb
|
173
174
|
- app/use_case/doctor/health_check.rb
|
174
175
|
- app/util/doctor/config_manager.rb
|
175
176
|
- app/view/doctor/dto/database_result_dto.rb
|
176
177
|
- app/view/doctor/dto/hd_result_dto.rb
|
178
|
+
- app/view/doctor/dto/release_path_result_dto.rb
|
177
179
|
- app/view/doctor/dto/telnet_result_dto.rb
|
178
180
|
- config/routes.rb
|
179
181
|
- lib/doctor.rb
|