doctor 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +19 -1
- data/app/analyser/doctor/hd_analyser.rb +42 -0
- data/app/use_case/doctor/health_check.rb +5 -0
- data/app/util/doctor/config_manager.rb +5 -0
- data/app/view/doctor/dto/hd_result_dto.rb +16 -0
- data/config/routes.rb +1 -1
- data/lib/doctor/version.rb +1 -1
- data/spec/app/analyser/doctor/database_analyser_spec.rb +57 -0
- data/spec/app/analyser/doctor/hd_analyser_spec.rb +71 -0
- data/spec/app/analyser/doctor/telnet_analyser_spec.rb +96 -0
- data/spec/app/util/doctor/config_manager_spec.rb +26 -0
- data/spec/app/view/doctor/dto/database_result_dto_spec.rb +28 -0
- data/spec/app/view/doctor/dto/hd_result_dto_spec.rb +28 -0
- data/spec/app/view/doctor/dto/telnet_result_dto_spec.rb +52 -0
- data/spec/config/routes_spec.rb +9 -0
- data/spec/dummy/README.rdoc +28 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/bin/bundle +3 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/bin/setup +29 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +26 -0
- data/spec/dummy/config/boot.rb +5 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +41 -0
- data/spec/dummy/config/environments/production.rb +79 -0
- data/spec/dummy/config/environments/test.rb +42 -0
- data/spec/dummy/config/initializers/assets.rb +11 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/inflections.rb +16 -0
- data/spec/dummy/config/initializers/mime_types.rb +4 -0
- data/spec/dummy/config/initializers/session_store.rb +3 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +23 -0
- data/spec/dummy/config/routes.rb +56 -0
- data/spec/dummy/config/secrets.yml +22 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +0 -0
- data/spec/dummy/log/test.log +0 -0
- data/spec/spec_helper.rb +9 -0
- metadata +153 -8
- data/app/view/doctor/dto/url_result_dto.rb +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa53bbc4b3dc84ef40c049489b041061b4f4fff4
|
4
|
+
data.tar.gz: 00a901ad5b44d8aa0ef4354a1060816047bfb3a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b3a3154fe6994b82b303732faac28a6b1a64d4a84f216ab702b14576006f922afe5603d3cb0d53cf82ae9181f130cccb69d20e22ebc71645e617152030d8cb2
|
7
|
+
data.tar.gz: 288a8c58b2499e78e138f14bfa0896fb54b7875675b81f5a7c89a7b011a3630d078d862df2a9146aaeb7a836d5e2b987d0f13d570b93c242b4a14ac8c43d0890
|
data/Rakefile
CHANGED
@@ -1,2 +1,20 @@
|
|
1
|
-
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
begin
|
3
|
+
require 'bundler/setup'
|
4
|
+
rescue LoadError
|
5
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
6
|
+
end
|
7
|
+
|
8
|
+
APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
|
9
|
+
load 'rails/tasks/engine.rake'
|
10
|
+
Bundler::GemHelper.install_tasks
|
11
|
+
|
12
|
+
Dir[File.join(File.dirname(__FILE__), 'tasks/**/*.rake')].each {|f| load f }
|
13
|
+
|
14
|
+
require 'rspec/core'
|
15
|
+
require 'rspec/core/rake_task'
|
16
|
+
|
17
|
+
desc "Run all specs in spec directory (excluding plugin specs)"
|
18
|
+
|
19
|
+
RSpec::Core::RakeTask.new(:spec => 'app:db:test:prepare')
|
2
20
|
task :default => :spec
|
@@ -0,0 +1,42 @@
|
|
1
|
+
require 'sys/filesystem'
|
2
|
+
|
3
|
+
module Doctor
|
4
|
+
class HdAnalyser
|
5
|
+
def analyse
|
6
|
+
result = []
|
7
|
+
|
8
|
+
Doctor::ConfigManager.directory_list.each { |directory|
|
9
|
+
result << validate_free_space(directory)
|
10
|
+
}
|
11
|
+
|
12
|
+
result
|
13
|
+
end
|
14
|
+
|
15
|
+
def validate_free_space(directory)
|
16
|
+
result = {name: directory[:name], alarm_if_less_than: directory[:alarm_if_less_than], path: directory[:path]}
|
17
|
+
|
18
|
+
begin
|
19
|
+
used_space = get_used_space(directory[:path])
|
20
|
+
|
21
|
+
if (used_space > directory[:alarm_if_less_than])
|
22
|
+
result[:error_message] = "The used space configured [#{directory[:alarm_if_less_than]}] for the directory #{directory[:path]} is at [#{used_space}]"
|
23
|
+
result[:status] = 'error'
|
24
|
+
else
|
25
|
+
result[:status] = 'ok'
|
26
|
+
end
|
27
|
+
rescue Exception => ex
|
28
|
+
result[:error_message] = ex.message
|
29
|
+
result[:status] = 'error'
|
30
|
+
end
|
31
|
+
|
32
|
+
OpenStruct.new(result)
|
33
|
+
end
|
34
|
+
|
35
|
+
def get_used_space(path)
|
36
|
+
stat = Sys::Filesystem.stat(path)
|
37
|
+
free_space = (stat.block_size * stat.blocks_available) / 1024 / 1024 / 1024
|
38
|
+
total_space = (stat.block_size * stat.blocks) / 1024 / 1024 / 1024
|
39
|
+
(total_space - free_space) * 100 / total_space
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -5,6 +5,7 @@ module Doctor
|
|
5
5
|
|
6
6
|
result[:telnets] = analyze_telnet
|
7
7
|
result[:databases] = analyze_database
|
8
|
+
result[:hds] = analyse_hds
|
8
9
|
|
9
10
|
OpenStruct.new(result: result, has_error?: has_error?(result))
|
10
11
|
end
|
@@ -18,6 +19,10 @@ module Doctor
|
|
18
19
|
process(DatabaseAnalyser, Dto::DatabaseResultDto)
|
19
20
|
end
|
20
21
|
|
22
|
+
def analyse_hds
|
23
|
+
process(HdAnalyser, Dto::HdResultDto)
|
24
|
+
end
|
25
|
+
|
21
26
|
def process(analyzer_class, dto_class)
|
22
27
|
analyze_result = analyzer_class.new.analyse
|
23
28
|
|
@@ -2,6 +2,7 @@ module Doctor
|
|
2
2
|
class ConfigManager
|
3
3
|
@@active_record_list = []
|
4
4
|
@@url_to_telnet_list = []
|
5
|
+
@@directory_list = []
|
5
6
|
|
6
7
|
def self.active_record_list
|
7
8
|
@@active_record_list
|
@@ -10,5 +11,9 @@ module Doctor
|
|
10
11
|
def self.url_to_telnet_list
|
11
12
|
@@url_to_telnet_list
|
12
13
|
end
|
14
|
+
|
15
|
+
def self.directory_list
|
16
|
+
@@directory_list
|
17
|
+
end
|
13
18
|
end
|
14
19
|
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Doctor
|
2
|
+
module Dto
|
3
|
+
class HdResultDto
|
4
|
+
attr_reader :status
|
5
|
+
|
6
|
+
def initialize(data)
|
7
|
+
@name = data[:name]
|
8
|
+
@path = data[:path]
|
9
|
+
@alarm_if_less_than = data[:alarm_if_less_than]
|
10
|
+
|
11
|
+
@status = data[:status]
|
12
|
+
@error_message = data[:error_message] unless data[:error_message].nil?
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/config/routes.rb
CHANGED
data/lib/doctor/version.rb
CHANGED
@@ -0,0 +1,57 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
class Dog
|
4
|
+
end
|
5
|
+
|
6
|
+
RSpec.describe Doctor::DatabaseAnalyser do
|
7
|
+
|
8
|
+
subject do
|
9
|
+
described_class.new.analyse
|
10
|
+
end
|
11
|
+
|
12
|
+
describe "#analyse" do
|
13
|
+
|
14
|
+
before do
|
15
|
+
expect(Dog).to receive(:model_name).and_return(Dog.name.to_s)
|
16
|
+
Doctor::ConfigManager.active_record_list.concat [Dog]
|
17
|
+
end
|
18
|
+
|
19
|
+
after do
|
20
|
+
Doctor::ConfigManager.active_record_list.clear
|
21
|
+
end
|
22
|
+
|
23
|
+
context "When process with success" do
|
24
|
+
|
25
|
+
before do
|
26
|
+
expect(Dog).to receive(:first).and_return(Dog.new)
|
27
|
+
end
|
28
|
+
|
29
|
+
it "Does return a object with status attribute value 'ok'" do
|
30
|
+
expect(subject.first.status).to eq("ok")
|
31
|
+
end
|
32
|
+
|
33
|
+
it "Does return a object with active_record attribute" do
|
34
|
+
expect(subject.first.active_record).to eq(Dog.name.to_s)
|
35
|
+
end
|
36
|
+
|
37
|
+
it "Does return a object with error_message attribute value nil" do
|
38
|
+
expect(subject.first.error_message).to be_nil
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
context "When process with failed" do
|
43
|
+
|
44
|
+
before do
|
45
|
+
expect(Dog).to receive(:first).and_raise("i_have_failed")
|
46
|
+
end
|
47
|
+
|
48
|
+
it "Does return a object with status attribute value 'error'" do
|
49
|
+
expect(subject.first.status).to eq("error")
|
50
|
+
end
|
51
|
+
|
52
|
+
it "Does return a object with error_message attribute value 'cause_by_message'" do
|
53
|
+
expect(subject.first.status).to eq("error")
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,71 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
require 'sys/filesystem'
|
3
|
+
|
4
|
+
RSpec.describe Doctor::HdAnalyser do
|
5
|
+
|
6
|
+
subject do
|
7
|
+
described_class.new.analyse
|
8
|
+
end
|
9
|
+
|
10
|
+
describe "#analyse" do
|
11
|
+
context "When process with sucess" do
|
12
|
+
before do
|
13
|
+
fake_hd = OpenStruct.new(block_size: 4096, blocks_available: 21997122, blocks: 28694674)
|
14
|
+
expect(Sys::Filesystem).to receive(:stat).with('/uaiHd').and_return(fake_hd)
|
15
|
+
expect(Sys::Filesystem).to receive(:stat).with('/evHd').and_return(fake_hd)
|
16
|
+
|
17
|
+
Doctor::ConfigManager.directory_list.concat [
|
18
|
+
{name: 'uaiHd', path: '/uaiHd', alarm_if_less_than: 80},
|
19
|
+
{name: 'evHd', path: '/evHd', alarm_if_less_than: 80}
|
20
|
+
]
|
21
|
+
end
|
22
|
+
|
23
|
+
after do
|
24
|
+
Doctor::ConfigManager.directory_list.clear
|
25
|
+
end
|
26
|
+
|
27
|
+
it "Does return a object with status attribte value 'ok'" do
|
28
|
+
expect(subject.first.status).to eq("ok")
|
29
|
+
end
|
30
|
+
|
31
|
+
it "Does return a object with name attribte" do
|
32
|
+
expect(subject.first.name).to eq("uaiHd")
|
33
|
+
end
|
34
|
+
|
35
|
+
it "Does return a object with path attribte" do
|
36
|
+
expect(subject.first.path).to eq('/uaiHd')
|
37
|
+
end
|
38
|
+
|
39
|
+
it "Does return a object with alarm_if_less_than attribte" do
|
40
|
+
expect(subject.first.alarm_if_less_than).to eq(80)
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
44
|
+
|
45
|
+
context "When process with failed" do
|
46
|
+
|
47
|
+
before do
|
48
|
+
expect(Sys::Filesystem).to receive(:stat).and_raise("i_have_failed")
|
49
|
+
Doctor::ConfigManager.directory_list.concat [
|
50
|
+
{name: 'uaiHd', path: '/uaiHd', alarm_if_less_than: 80}
|
51
|
+
]
|
52
|
+
end
|
53
|
+
|
54
|
+
after do
|
55
|
+
Doctor::ConfigManager.directory_list.clear
|
56
|
+
end
|
57
|
+
|
58
|
+
it "Does return a object with name attribte" do
|
59
|
+
expect(subject.first.name).to eq("uaiHd")
|
60
|
+
end
|
61
|
+
|
62
|
+
it "Does return a object with path attribte" do
|
63
|
+
expect(subject.first.path).to eq('/uaiHd')
|
64
|
+
end
|
65
|
+
|
66
|
+
it "Does return a object with alarm_if_less_than attribte" do
|
67
|
+
expect(subject.first.alarm_if_less_than).to eq(80)
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
@@ -0,0 +1,96 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
RSpec.describe Doctor::TelnetAnalyser do
|
4
|
+
|
5
|
+
subject do
|
6
|
+
described_class.new.analyse
|
7
|
+
end
|
8
|
+
|
9
|
+
describe "#analyse" do
|
10
|
+
|
11
|
+
context "When process with sucess" do
|
12
|
+
|
13
|
+
before do
|
14
|
+
expect(Net::Telnet).to receive(:new).with(
|
15
|
+
"Host" => "uaihebert.com",
|
16
|
+
"Port" => 80,
|
17
|
+
"Timeout" => 1,
|
18
|
+
"Waittime" => 1
|
19
|
+
)
|
20
|
+
|
21
|
+
expect(Net::Telnet).to receive(:new).with(
|
22
|
+
"Host" => "api.paypal.com",
|
23
|
+
"Port" => 443,
|
24
|
+
"Timeout" => 10,
|
25
|
+
"Waittime" => 20
|
26
|
+
)
|
27
|
+
Doctor::ConfigManager.url_to_telnet_list.concat [
|
28
|
+
{name: 'uaiHebert', host: 'uaihebert.com'},
|
29
|
+
{name: 'Paypal', host: 'api.paypal.com', port: 443, timeout: 10, wait_time: 20}
|
30
|
+
]
|
31
|
+
end
|
32
|
+
|
33
|
+
after do
|
34
|
+
Doctor::ConfigManager.url_to_telnet_list.clear
|
35
|
+
end
|
36
|
+
|
37
|
+
it "Does return a object with status attribte value 'ok'" do
|
38
|
+
expect(subject.first.status).to eq("ok")
|
39
|
+
end
|
40
|
+
|
41
|
+
it "Does return a object with host attribte" do
|
42
|
+
expect(subject.first.host).to eq("uaihebert.com")
|
43
|
+
end
|
44
|
+
|
45
|
+
it "Does return a object with port attribte" do
|
46
|
+
expect(subject.first.port).to eq(80)
|
47
|
+
end
|
48
|
+
|
49
|
+
it "Does return a object with timeout attribte" do
|
50
|
+
expect(subject.first.timeout).to eq(1)
|
51
|
+
end
|
52
|
+
|
53
|
+
it "Does return a object with wait_time attribte" do
|
54
|
+
expect(subject.first.wait_time).to eq(1)
|
55
|
+
end
|
56
|
+
|
57
|
+
end
|
58
|
+
|
59
|
+
context "When process with failed" do
|
60
|
+
|
61
|
+
before do
|
62
|
+
expect(Net::Telnet).to receive(:new).and_raise("i_have_failed")
|
63
|
+
Doctor::ConfigManager.url_to_telnet_list.concat [
|
64
|
+
{name: 'Paypal',host: 'api.paypal.com', port: 443, timeout: 10, wait_time: 20}]
|
65
|
+
end
|
66
|
+
|
67
|
+
after do
|
68
|
+
Doctor::ConfigManager.url_to_telnet_list.clear
|
69
|
+
end
|
70
|
+
|
71
|
+
it "Does return a object with status attribute value 'error'" do
|
72
|
+
expect(subject.first.status).to eq("error")
|
73
|
+
end
|
74
|
+
|
75
|
+
it "Does return a object with error_message attribute value 'caused_by'" do
|
76
|
+
expect(subject.first.error_message).to eq("i_have_failed")
|
77
|
+
end
|
78
|
+
|
79
|
+
it "Does return a object with host attribte" do
|
80
|
+
expect(subject.first.host).to eq("api.paypal.com")
|
81
|
+
end
|
82
|
+
|
83
|
+
it "Does return a object with port attribte" do
|
84
|
+
expect(subject.first.port).to eq(443)
|
85
|
+
end
|
86
|
+
|
87
|
+
it "Does return a object with timeout attribte" do
|
88
|
+
expect(subject.first.timeout).to eq(10)
|
89
|
+
end
|
90
|
+
|
91
|
+
it "Does return a object with wait_time attribte" do
|
92
|
+
expect(subject.first.wait_time).to eq(20)
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
RSpec.describe Doctor::ConfigManager do
|
4
|
+
|
5
|
+
subject do
|
6
|
+
described_class
|
7
|
+
end
|
8
|
+
|
9
|
+
describe ".active_record_list" do
|
10
|
+
|
11
|
+
it "Does return new value on attribute 'active_record_list'" do
|
12
|
+
subject.active_record_list << "hello"
|
13
|
+
subject.active_record_list << "say"
|
14
|
+
expect(subject.active_record_list).to match_array(["hello", "say"])
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
describe ".url_to_telnet_list" do
|
19
|
+
|
20
|
+
it "Does return new value on attribute 'url_to_telnet_list'" do
|
21
|
+
subject.url_to_telnet_list << "telnet"
|
22
|
+
subject.url_to_telnet_list << "list"
|
23
|
+
expect(subject.url_to_telnet_list).to match_array(["list", "telnet"])
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
RSpec.describe Doctor::Dto::DatabaseResultDto do
|
4
|
+
|
5
|
+
subject do
|
6
|
+
described_class.new(params)
|
7
|
+
end
|
8
|
+
|
9
|
+
context "Check visibility of attributes" do
|
10
|
+
|
11
|
+
let(:params) do
|
12
|
+
{status: "ok", error_message: "nil_object", active_record: "uai_test"}
|
13
|
+
end
|
14
|
+
|
15
|
+
it "Does status is public" do
|
16
|
+
expect(subject).to respond_to(:status)
|
17
|
+
end
|
18
|
+
|
19
|
+
it "Does error_message is private" do
|
20
|
+
expect(subject).to_not respond_to(:error_message)
|
21
|
+
end
|
22
|
+
|
23
|
+
it "Does active_record is private" do
|
24
|
+
expect(subject).to_not respond_to(:active_record)
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
RSpec.describe Doctor::Dto::HdResultDto do
|
4
|
+
|
5
|
+
subject do
|
6
|
+
described_class.new(params)
|
7
|
+
end
|
8
|
+
|
9
|
+
context "Check visibility of attributes" do
|
10
|
+
|
11
|
+
let(:params) do
|
12
|
+
{status: "ok", error_message: "nil_object", name: "uai_test"}
|
13
|
+
end
|
14
|
+
|
15
|
+
it "Does status is public" do
|
16
|
+
expect(subject).to respond_to(:status)
|
17
|
+
end
|
18
|
+
|
19
|
+
it "Does error_message is private" do
|
20
|
+
expect(subject).to_not respond_to(:error_message)
|
21
|
+
end
|
22
|
+
|
23
|
+
it "Does name is private" do
|
24
|
+
expect(subject).to_not respond_to(:name)
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
RSpec.describe Doctor::Dto::TelnetResultDto do
|
4
|
+
|
5
|
+
subject do
|
6
|
+
described_class.new(params)
|
7
|
+
end
|
8
|
+
|
9
|
+
context "Check visibility of attributes" do
|
10
|
+
|
11
|
+
let(:params) do
|
12
|
+
{
|
13
|
+
name: "uai",
|
14
|
+
host: "uaigebert.com",
|
15
|
+
port: 80,
|
16
|
+
timeout: 10,
|
17
|
+
wait_time: 5,
|
18
|
+
status: "ok",
|
19
|
+
error_message: "failed"
|
20
|
+
}
|
21
|
+
end
|
22
|
+
|
23
|
+
it "Does status is public" do
|
24
|
+
expect(subject).to respond_to(:status)
|
25
|
+
end
|
26
|
+
|
27
|
+
it "Does name is private" do
|
28
|
+
expect(subject).to_not respond_to(:name)
|
29
|
+
end
|
30
|
+
|
31
|
+
it "Does host is private" do
|
32
|
+
expect(subject).to_not respond_to(:host)
|
33
|
+
end
|
34
|
+
|
35
|
+
it "Does port is private" do
|
36
|
+
expect(subject).to_not respond_to(:port)
|
37
|
+
end
|
38
|
+
|
39
|
+
it "Does timeout is private" do
|
40
|
+
expect(subject).to_not respond_to(:timeout)
|
41
|
+
end
|
42
|
+
|
43
|
+
it "Does wait_time is private" do
|
44
|
+
expect(subject).to_not respond_to(:wait_time)
|
45
|
+
end
|
46
|
+
|
47
|
+
it "Does error_message is private" do
|
48
|
+
expect(subject).to_not respond_to(:error_message)
|
49
|
+
end
|
50
|
+
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
== README
|
2
|
+
|
3
|
+
This README would normally document whatever steps are necessary to get the
|
4
|
+
application up and running.
|
5
|
+
|
6
|
+
Things you may want to cover:
|
7
|
+
|
8
|
+
* Ruby version
|
9
|
+
|
10
|
+
* System dependencies
|
11
|
+
|
12
|
+
* Configuration
|
13
|
+
|
14
|
+
* Database creation
|
15
|
+
|
16
|
+
* Database initialization
|
17
|
+
|
18
|
+
* How to run the test suite
|
19
|
+
|
20
|
+
* Services (job queues, cache servers, search engines, etc.)
|
21
|
+
|
22
|
+
* Deployment instructions
|
23
|
+
|
24
|
+
* ...
|
25
|
+
|
26
|
+
|
27
|
+
Please feel free to use a different markup language if you do not plan to run
|
28
|
+
<tt>rake doc:app</tt>.
|
data/spec/dummy/Rakefile
ADDED
data/spec/dummy/bin/rake
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'pathname'
|
3
|
+
|
4
|
+
# path to your application root.
|
5
|
+
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
|
6
|
+
|
7
|
+
Dir.chdir APP_ROOT do
|
8
|
+
# This script is a starting point to setup your application.
|
9
|
+
# Add necessary setup steps to this file:
|
10
|
+
|
11
|
+
puts "== Installing dependencies =="
|
12
|
+
system "gem install bundler --conservative"
|
13
|
+
system "bundle check || bundle install"
|
14
|
+
|
15
|
+
# puts "\n== Copying sample files =="
|
16
|
+
# unless File.exist?("config/database.yml")
|
17
|
+
# system "cp config/database.yml.sample config/database.yml"
|
18
|
+
# end
|
19
|
+
|
20
|
+
puts "\n== Preparing database =="
|
21
|
+
system "bin/rake db:setup"
|
22
|
+
|
23
|
+
puts "\n== Removing old logs and tempfiles =="
|
24
|
+
system "rm -f log/*"
|
25
|
+
system "rm -rf tmp/cache"
|
26
|
+
|
27
|
+
puts "\n== Restarting application server =="
|
28
|
+
system "touch tmp/restart.txt"
|
29
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require 'rails/all'
|
4
|
+
|
5
|
+
Bundler.require(*Rails.groups)
|
6
|
+
require "doctor"
|
7
|
+
|
8
|
+
module Dummy
|
9
|
+
class Application < Rails::Application
|
10
|
+
# Settings in config/environments/* take precedence over those specified here.
|
11
|
+
# Application configuration should go into files in config/initializers
|
12
|
+
# -- all .rb files in that directory are automatically loaded.
|
13
|
+
|
14
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
15
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
16
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
17
|
+
|
18
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
19
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
20
|
+
# config.i18n.default_locale = :de
|
21
|
+
|
22
|
+
# Do not swallow errors in after_commit/after_rollback callbacks.
|
23
|
+
config.active_record.raise_in_transactional_callbacks = true
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# SQLite version 3.x
|
2
|
+
# gem install sqlite3
|
3
|
+
#
|
4
|
+
# Ensure the SQLite 3 gem is defined in your Gemfile
|
5
|
+
# gem 'sqlite3'
|
6
|
+
#
|
7
|
+
default: &default
|
8
|
+
adapter: sqlite3
|
9
|
+
pool: 5
|
10
|
+
timeout: 5000
|
11
|
+
|
12
|
+
development:
|
13
|
+
<<: *default
|
14
|
+
database: db/development.sqlite3
|
15
|
+
|
16
|
+
# Warning: The database defined as "test" will be erased and
|
17
|
+
# re-generated from your development database when you run "rake".
|
18
|
+
# Do not set this db to the same as development or production.
|
19
|
+
test:
|
20
|
+
<<: *default
|
21
|
+
database: db/test.sqlite3
|
22
|
+
|
23
|
+
production:
|
24
|
+
<<: *default
|
25
|
+
database: db/production.sqlite3
|
@@ -0,0 +1,41 @@
|
|
1
|
+
Rails.application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
+
|
4
|
+
# In the development environment your application's code is reloaded on
|
5
|
+
# every request. This slows down response time but is perfect for development
|
6
|
+
# since you don't have to restart the web server when you make code changes.
|
7
|
+
config.cache_classes = false
|
8
|
+
|
9
|
+
# Do not eager load code on boot.
|
10
|
+
config.eager_load = false
|
11
|
+
|
12
|
+
# Show full error reports and disable caching.
|
13
|
+
config.consider_all_requests_local = true
|
14
|
+
config.action_controller.perform_caching = false
|
15
|
+
|
16
|
+
# Don't care if the mailer can't send.
|
17
|
+
config.action_mailer.raise_delivery_errors = false
|
18
|
+
|
19
|
+
# Print deprecation notices to the Rails logger.
|
20
|
+
config.active_support.deprecation = :log
|
21
|
+
|
22
|
+
# Raise an error on page load if there are pending migrations.
|
23
|
+
config.active_record.migration_error = :page_load
|
24
|
+
|
25
|
+
# Debug mode disables concatenation and preprocessing of assets.
|
26
|
+
# This option may cause significant delays in view rendering with a large
|
27
|
+
# number of complex assets.
|
28
|
+
config.assets.debug = true
|
29
|
+
|
30
|
+
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
|
31
|
+
# yet still be able to expire them through the digest params.
|
32
|
+
config.assets.digest = true
|
33
|
+
|
34
|
+
# Adds additional error checking when serving assets at runtime.
|
35
|
+
# Checks for improperly declared sprockets dependencies.
|
36
|
+
# Raises helpful error messages.
|
37
|
+
config.assets.raise_runtime_errors = true
|
38
|
+
|
39
|
+
# Raises error for missing translations
|
40
|
+
# config.action_view.raise_on_missing_translations = true
|
41
|
+
end
|
@@ -0,0 +1,79 @@
|
|
1
|
+
Rails.application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
+
|
4
|
+
# Code is not reloaded between requests.
|
5
|
+
config.cache_classes = true
|
6
|
+
|
7
|
+
# Eager load code on boot. This eager loads most of Rails and
|
8
|
+
# your application in memory, allowing both threaded web servers
|
9
|
+
# and those relying on copy on write to perform better.
|
10
|
+
# Rake tasks automatically ignore this option for performance.
|
11
|
+
config.eager_load = true
|
12
|
+
|
13
|
+
# Full error reports are disabled and caching is turned on.
|
14
|
+
config.consider_all_requests_local = false
|
15
|
+
config.action_controller.perform_caching = true
|
16
|
+
|
17
|
+
# Enable Rack::Cache to put a simple HTTP cache in front of your application
|
18
|
+
# Add `rack-cache` to your Gemfile before enabling this.
|
19
|
+
# For large-scale production use, consider using a caching reverse proxy like
|
20
|
+
# NGINX, varnish or squid.
|
21
|
+
# config.action_dispatch.rack_cache = true
|
22
|
+
|
23
|
+
# Disable serving static files from the `/public` folder by default since
|
24
|
+
# Apache or NGINX already handles this.
|
25
|
+
config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
|
26
|
+
|
27
|
+
# Compress JavaScripts and CSS.
|
28
|
+
config.assets.js_compressor = :uglifier
|
29
|
+
# config.assets.css_compressor = :sass
|
30
|
+
|
31
|
+
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
32
|
+
config.assets.compile = false
|
33
|
+
|
34
|
+
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
|
35
|
+
# yet still be able to expire them through the digest params.
|
36
|
+
config.assets.digest = true
|
37
|
+
|
38
|
+
# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
|
39
|
+
|
40
|
+
# Specifies the header that your server uses for sending files.
|
41
|
+
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
|
42
|
+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
|
43
|
+
|
44
|
+
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
45
|
+
# config.force_ssl = true
|
46
|
+
|
47
|
+
# Use the lowest log level to ensure availability of diagnostic information
|
48
|
+
# when problems arise.
|
49
|
+
config.log_level = :debug
|
50
|
+
|
51
|
+
# Prepend all log lines with the following tags.
|
52
|
+
# config.log_tags = [ :subdomain, :uuid ]
|
53
|
+
|
54
|
+
# Use a different logger for distributed setups.
|
55
|
+
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
56
|
+
|
57
|
+
# Use a different cache store in production.
|
58
|
+
# config.cache_store = :mem_cache_store
|
59
|
+
|
60
|
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
61
|
+
# config.action_controller.asset_host = 'http://assets.example.com'
|
62
|
+
|
63
|
+
# Ignore bad email addresses and do not raise email delivery errors.
|
64
|
+
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
65
|
+
# config.action_mailer.raise_delivery_errors = false
|
66
|
+
|
67
|
+
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
68
|
+
# the I18n.default_locale when a translation cannot be found).
|
69
|
+
config.i18n.fallbacks = true
|
70
|
+
|
71
|
+
# Send deprecation notices to registered listeners.
|
72
|
+
config.active_support.deprecation = :notify
|
73
|
+
|
74
|
+
# Use default logging formatter so that PID and timestamp are not suppressed.
|
75
|
+
config.log_formatter = ::Logger::Formatter.new
|
76
|
+
|
77
|
+
# Do not dump schema after migrations.
|
78
|
+
config.active_record.dump_schema_after_migration = false
|
79
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
Rails.application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
3
|
+
|
4
|
+
# The test environment is used exclusively to run your application's
|
5
|
+
# test suite. You never need to work with it otherwise. Remember that
|
6
|
+
# your test database is "scratch space" for the test suite and is wiped
|
7
|
+
# and recreated between test runs. Don't rely on the data there!
|
8
|
+
config.cache_classes = true
|
9
|
+
|
10
|
+
# Do not eager load code on boot. This avoids loading your whole application
|
11
|
+
# just for the purpose of running a single test. If you are using a tool that
|
12
|
+
# preloads Rails for running tests, you may have to set it to true.
|
13
|
+
config.eager_load = false
|
14
|
+
|
15
|
+
# Configure static file server for tests with Cache-Control for performance.
|
16
|
+
config.serve_static_files = true
|
17
|
+
config.static_cache_control = 'public, max-age=3600'
|
18
|
+
|
19
|
+
# Show full error reports and disable caching.
|
20
|
+
config.consider_all_requests_local = true
|
21
|
+
config.action_controller.perform_caching = false
|
22
|
+
|
23
|
+
# Raise exceptions instead of rendering exception templates.
|
24
|
+
config.action_dispatch.show_exceptions = false
|
25
|
+
|
26
|
+
# Disable request forgery protection in test environment.
|
27
|
+
config.action_controller.allow_forgery_protection = false
|
28
|
+
|
29
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
30
|
+
# The :test delivery method accumulates sent emails in the
|
31
|
+
# ActionMailer::Base.deliveries array.
|
32
|
+
config.action_mailer.delivery_method = :test
|
33
|
+
|
34
|
+
# Randomize the order test cases are executed.
|
35
|
+
config.active_support.test_order = :random
|
36
|
+
|
37
|
+
# Print deprecation notices to the stderr.
|
38
|
+
config.active_support.deprecation = :stderr
|
39
|
+
|
40
|
+
# Raises error for missing translations
|
41
|
+
# config.action_view.raise_on_missing_translations = true
|
42
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Version of your assets, change this if you want to expire all your assets.
|
4
|
+
Rails.application.config.assets.version = '1.0'
|
5
|
+
|
6
|
+
# Add additional assets to the asset load path
|
7
|
+
# Rails.application.config.assets.paths << Emoji.images_path
|
8
|
+
|
9
|
+
# Precompile additional assets.
|
10
|
+
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
11
|
+
# Rails.application.config.assets.precompile += %w( search.js )
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
+
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
+
|
6
|
+
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
+
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Add new inflection rules using the following format. Inflections
|
4
|
+
# are locale specific, and you may define rules for as many different
|
5
|
+
# locales as you wish. All of these examples are active by default:
|
6
|
+
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
7
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
8
|
+
# inflect.singular /^(ox)en/i, '\1'
|
9
|
+
# inflect.irregular 'person', 'people'
|
10
|
+
# inflect.uncountable %w( fish sheep )
|
11
|
+
# end
|
12
|
+
|
13
|
+
# These inflection rules are supported but not enabled by default:
|
14
|
+
# ActiveSupport::Inflector.inflections(:en) do |inflect|
|
15
|
+
# inflect.acronym 'RESTful'
|
16
|
+
# end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# This file contains settings for ActionController::ParamsWrapper which
|
4
|
+
# is enabled by default.
|
5
|
+
|
6
|
+
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
|
+
ActiveSupport.on_load(:action_controller) do
|
8
|
+
wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
|
9
|
+
end
|
10
|
+
|
11
|
+
# To enable root element in JSON for ActiveRecord objects.
|
12
|
+
# ActiveSupport.on_load(:active_record) do
|
13
|
+
# self.include_root_in_json = true
|
14
|
+
# end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# Files in the config/locales directory are used for internationalization
|
2
|
+
# and are automatically loaded by Rails. If you want to use locales other
|
3
|
+
# than English, add the necessary files in this directory.
|
4
|
+
#
|
5
|
+
# To use the locales, use `I18n.t`:
|
6
|
+
#
|
7
|
+
# I18n.t 'hello'
|
8
|
+
#
|
9
|
+
# In views, this is aliased to just `t`:
|
10
|
+
#
|
11
|
+
# <%= t('hello') %>
|
12
|
+
#
|
13
|
+
# To use a different locale, set it with `I18n.locale`:
|
14
|
+
#
|
15
|
+
# I18n.locale = :es
|
16
|
+
#
|
17
|
+
# This would use the information in config/locales/es.yml.
|
18
|
+
#
|
19
|
+
# To learn more, please read the Rails Internationalization guide
|
20
|
+
# available at http://guides.rubyonrails.org/i18n.html.
|
21
|
+
|
22
|
+
en:
|
23
|
+
hello: "Hello world"
|
@@ -0,0 +1,56 @@
|
|
1
|
+
Rails.application.routes.draw do
|
2
|
+
# The priority is based upon order of creation: first created -> highest priority.
|
3
|
+
# See how all your routes lay out with "rake routes".
|
4
|
+
|
5
|
+
# You can have the root of your site routed with "root"
|
6
|
+
# root 'welcome#index'
|
7
|
+
|
8
|
+
# Example of regular route:
|
9
|
+
# get 'products/:id' => 'catalog#view'
|
10
|
+
|
11
|
+
# Example of named route that can be invoked with purchase_url(id: product.id)
|
12
|
+
# get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
|
13
|
+
|
14
|
+
# Example resource route (maps HTTP verbs to controller actions automatically):
|
15
|
+
# resources :products
|
16
|
+
|
17
|
+
# Example resource route with options:
|
18
|
+
# resources :products do
|
19
|
+
# member do
|
20
|
+
# get 'short'
|
21
|
+
# post 'toggle'
|
22
|
+
# end
|
23
|
+
#
|
24
|
+
# collection do
|
25
|
+
# get 'sold'
|
26
|
+
# end
|
27
|
+
# end
|
28
|
+
|
29
|
+
# Example resource route with sub-resources:
|
30
|
+
# resources :products do
|
31
|
+
# resources :comments, :sales
|
32
|
+
# resource :seller
|
33
|
+
# end
|
34
|
+
|
35
|
+
# Example resource route with more complex sub-resources:
|
36
|
+
# resources :products do
|
37
|
+
# resources :comments
|
38
|
+
# resources :sales do
|
39
|
+
# get 'recent', on: :collection
|
40
|
+
# end
|
41
|
+
# end
|
42
|
+
|
43
|
+
# Example resource route with concerns:
|
44
|
+
# concern :toggleable do
|
45
|
+
# post 'toggle'
|
46
|
+
# end
|
47
|
+
# resources :posts, concerns: :toggleable
|
48
|
+
# resources :photos, concerns: :toggleable
|
49
|
+
|
50
|
+
# Example resource route within a namespace:
|
51
|
+
# namespace :admin do
|
52
|
+
# # Directs /admin/products/* to Admin::ProductsController
|
53
|
+
# # (app/controllers/admin/products_controller.rb)
|
54
|
+
# resources :products
|
55
|
+
# end
|
56
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Your secret key is used for verifying the integrity of signed cookies.
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
5
|
+
|
6
|
+
# Make sure the secret is at least 30 characters and all random,
|
7
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
8
|
+
# You can use `rake secret` to generate a secure secret key.
|
9
|
+
|
10
|
+
# Make sure the secrets in this file are kept private
|
11
|
+
# if you're sharing your code publicly.
|
12
|
+
|
13
|
+
development:
|
14
|
+
secret_key_base: c17f03cda7dacac21975490ebb247ae786ca1874abb6306b1f7a3033f53f496fcfeb28e67d0708dff124db827ff8dcaccbfb4b54176de550abb3be6a7af0aa66
|
15
|
+
|
16
|
+
test:
|
17
|
+
secret_key_base: 7f7eec6aa4dbdfcd1b73307bfc9814d7b0f2e2d5f4074ec6fdc21a7749c0034bc4892616d7bab165a922f0b3b40b8d34176b5398ea2880061f3b72af3366c702
|
18
|
+
|
19
|
+
# Do not keep production secrets in the repository,
|
20
|
+
# instead read values from the environment.
|
21
|
+
production:
|
22
|
+
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
|
File without changes
|
File without changes
|
File without changes
|
data/spec/spec_helper.rb
ADDED
metadata
CHANGED
@@ -1,15 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: doctor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.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-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: sys-filesystem
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.1.5
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 1.1.5
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: codeclimate-test-reporter
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.4.8
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.4.8
|
13
41
|
- !ruby/object:Gem::Dependency
|
14
42
|
name: rake
|
15
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -39,19 +67,61 @@ dependencies:
|
|
39
67
|
- !ruby/object:Gem::Version
|
40
68
|
version: 4.2.5
|
41
69
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
70
|
+
name: console
|
43
71
|
requirement: !ruby/object:Gem::Requirement
|
44
72
|
requirements:
|
45
73
|
- - '='
|
46
74
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
75
|
+
version: '0.5'
|
48
76
|
type: :development
|
49
77
|
prerelease: false
|
50
78
|
version_requirements: !ruby/object:Gem::Requirement
|
51
79
|
requirements:
|
52
80
|
- - '='
|
53
81
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
82
|
+
version: '0.5'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: bundler
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rspec-rails
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: sqlite3
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
55
125
|
description: With this project you will able to analyse your external resources status.
|
56
126
|
You will be able to configure wich database connection to check or all the http
|
57
127
|
urls
|
@@ -63,17 +133,55 @@ extra_rdoc_files: []
|
|
63
133
|
files:
|
64
134
|
- Rakefile
|
65
135
|
- app/analyser/doctor/database_analyser.rb
|
136
|
+
- app/analyser/doctor/hd_analyser.rb
|
66
137
|
- app/analyser/doctor/telnet_analyser.rb
|
67
138
|
- app/controllers/doctor/health_check_controller.rb
|
68
139
|
- app/use_case/doctor/health_check.rb
|
69
140
|
- app/util/doctor/config_manager.rb
|
70
141
|
- app/view/doctor/dto/database_result_dto.rb
|
142
|
+
- app/view/doctor/dto/hd_result_dto.rb
|
71
143
|
- app/view/doctor/dto/telnet_result_dto.rb
|
72
|
-
- app/view/doctor/dto/url_result_dto.rb
|
73
144
|
- config/routes.rb
|
74
145
|
- lib/doctor.rb
|
75
146
|
- lib/doctor/engine.rb
|
76
147
|
- lib/doctor/version.rb
|
148
|
+
- spec/app/analyser/doctor/database_analyser_spec.rb
|
149
|
+
- spec/app/analyser/doctor/hd_analyser_spec.rb
|
150
|
+
- spec/app/analyser/doctor/telnet_analyser_spec.rb
|
151
|
+
- spec/app/util/doctor/config_manager_spec.rb
|
152
|
+
- spec/app/view/doctor/dto/database_result_dto_spec.rb
|
153
|
+
- spec/app/view/doctor/dto/hd_result_dto_spec.rb
|
154
|
+
- spec/app/view/doctor/dto/telnet_result_dto_spec.rb
|
155
|
+
- spec/config/routes_spec.rb
|
156
|
+
- spec/dummy/README.rdoc
|
157
|
+
- spec/dummy/Rakefile
|
158
|
+
- spec/dummy/bin/bundle
|
159
|
+
- spec/dummy/bin/rails
|
160
|
+
- spec/dummy/bin/rake
|
161
|
+
- spec/dummy/bin/setup
|
162
|
+
- spec/dummy/config.ru
|
163
|
+
- spec/dummy/config/application.rb
|
164
|
+
- spec/dummy/config/boot.rb
|
165
|
+
- spec/dummy/config/database.yml
|
166
|
+
- spec/dummy/config/environment.rb
|
167
|
+
- spec/dummy/config/environments/development.rb
|
168
|
+
- spec/dummy/config/environments/production.rb
|
169
|
+
- spec/dummy/config/environments/test.rb
|
170
|
+
- spec/dummy/config/initializers/assets.rb
|
171
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
172
|
+
- spec/dummy/config/initializers/cookies_serializer.rb
|
173
|
+
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
174
|
+
- spec/dummy/config/initializers/inflections.rb
|
175
|
+
- spec/dummy/config/initializers/mime_types.rb
|
176
|
+
- spec/dummy/config/initializers/session_store.rb
|
177
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
178
|
+
- spec/dummy/config/locales/en.yml
|
179
|
+
- spec/dummy/config/routes.rb
|
180
|
+
- spec/dummy/config/secrets.yml
|
181
|
+
- spec/dummy/db/test.sqlite3
|
182
|
+
- spec/dummy/log/development.log
|
183
|
+
- spec/dummy/log/test.log
|
184
|
+
- spec/spec_helper.rb
|
77
185
|
homepage:
|
78
186
|
licenses:
|
79
187
|
- MIT
|
@@ -96,8 +204,45 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
96
204
|
version: '0'
|
97
205
|
requirements: []
|
98
206
|
rubyforge_project:
|
99
|
-
rubygems_version: 2.4.
|
207
|
+
rubygems_version: 2.4.8
|
100
208
|
signing_key:
|
101
209
|
specification_version: 4
|
102
210
|
summary: This project will analyse the databases, urls, etc statuses
|
103
|
-
test_files:
|
211
|
+
test_files:
|
212
|
+
- spec/app/view/doctor/dto/database_result_dto_spec.rb
|
213
|
+
- spec/app/view/doctor/dto/telnet_result_dto_spec.rb
|
214
|
+
- spec/app/view/doctor/dto/hd_result_dto_spec.rb
|
215
|
+
- spec/app/util/doctor/config_manager_spec.rb
|
216
|
+
- spec/app/analyser/doctor/telnet_analyser_spec.rb
|
217
|
+
- spec/app/analyser/doctor/hd_analyser_spec.rb
|
218
|
+
- spec/app/analyser/doctor/database_analyser_spec.rb
|
219
|
+
- spec/spec_helper.rb
|
220
|
+
- spec/dummy/db/test.sqlite3
|
221
|
+
- spec/dummy/bin/rake
|
222
|
+
- spec/dummy/bin/setup
|
223
|
+
- spec/dummy/bin/bundle
|
224
|
+
- spec/dummy/bin/rails
|
225
|
+
- spec/dummy/Rakefile
|
226
|
+
- spec/dummy/log/test.log
|
227
|
+
- spec/dummy/log/development.log
|
228
|
+
- spec/dummy/config/routes.rb
|
229
|
+
- spec/dummy/config/locales/en.yml
|
230
|
+
- spec/dummy/config/secrets.yml
|
231
|
+
- spec/dummy/config/boot.rb
|
232
|
+
- spec/dummy/config/environments/production.rb
|
233
|
+
- spec/dummy/config/environments/test.rb
|
234
|
+
- spec/dummy/config/environments/development.rb
|
235
|
+
- spec/dummy/config/database.yml
|
236
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
237
|
+
- spec/dummy/config/initializers/cookies_serializer.rb
|
238
|
+
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
239
|
+
- spec/dummy/config/initializers/inflections.rb
|
240
|
+
- spec/dummy/config/initializers/assets.rb
|
241
|
+
- spec/dummy/config/initializers/session_store.rb
|
242
|
+
- spec/dummy/config/initializers/mime_types.rb
|
243
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
244
|
+
- spec/dummy/config/application.rb
|
245
|
+
- spec/dummy/config/environment.rb
|
246
|
+
- spec/dummy/README.rdoc
|
247
|
+
- spec/dummy/config.ru
|
248
|
+
- spec/config/routes_spec.rb
|