okcomputer 1.14.0 → 1.14.1
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 +4 -4
- data/MIT-LICENSE +1 -1
- data/lib/ok_computer/built_in_checks/active_record_migrations_check.rb +24 -0
- data/lib/ok_computer/version.rb +1 -1
- data/lib/okcomputer.rb +1 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37c392a9945492ae470f2cb7e1a2011cc2e007a8
|
4
|
+
data.tar.gz: ed81079acba62977a0b5645be14b49e56f5521c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3b64ebe3c91de150e68af1af1c990e59209091f56deec8043394807a9f91de32e3a29d802e101ee400ae084bd80a99a814f0e9118652669af3232d70da9f6e3
|
7
|
+
data.tar.gz: 6969ede56327b7a275e28b033b1a268659dbfd79d9e7c0abdb11c282c4fb77687f4bdd3b75d6496a7ea3b98c95eaaaa4d3516f90630629d31e1299ef4ba875b9
|
data/MIT-LICENSE
CHANGED
@@ -0,0 +1,24 @@
|
|
1
|
+
module OkComputer
|
2
|
+
class ActiveRecordMigrationsCheck < Check
|
3
|
+
|
4
|
+
# Public: Check if migrations are pending or not
|
5
|
+
def check
|
6
|
+
return unsupported unless ActiveRecord::Migrator.respond_to?(:needs_migration?)
|
7
|
+
|
8
|
+
if ActiveRecord::Migrator.needs_migration?
|
9
|
+
mark_failure
|
10
|
+
mark_message "Pending migrations"
|
11
|
+
else
|
12
|
+
mark_message "NO pending migrations"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
# Private: Fail the check if ActiveRecord cannot check migration status
|
19
|
+
def unsupported
|
20
|
+
mark_failure
|
21
|
+
mark_message "This version of ActiveRecord does not support checking whether migrations are pending"
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
data/lib/ok_computer/version.rb
CHANGED
data/lib/okcomputer.rb
CHANGED
@@ -12,6 +12,7 @@ require "ok_computer/built_in_checks/ping_check"
|
|
12
12
|
|
13
13
|
require "ok_computer/built_in_checks/action_mailer_check"
|
14
14
|
require "ok_computer/built_in_checks/active_record_check"
|
15
|
+
require "ok_computer/built_in_checks/active_record_migrations_check"
|
15
16
|
require "ok_computer/built_in_checks/app_version_check"
|
16
17
|
require "ok_computer/built_in_checks/cache_check"
|
17
18
|
require "ok_computer/built_in_checks/default_check"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: okcomputer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.14.
|
4
|
+
version: 1.14.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Patrick Byrne
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2017-
|
13
|
+
date: 2017-02-14 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: sqlite3
|
@@ -74,6 +74,7 @@ files:
|
|
74
74
|
- config/routes.rb
|
75
75
|
- lib/ok_computer/built_in_checks/action_mailer_check.rb
|
76
76
|
- lib/ok_computer/built_in_checks/active_record_check.rb
|
77
|
+
- lib/ok_computer/built_in_checks/active_record_migrations_check.rb
|
77
78
|
- lib/ok_computer/built_in_checks/app_version_check.rb
|
78
79
|
- lib/ok_computer/built_in_checks/cache_check.rb
|
79
80
|
- lib/ok_computer/built_in_checks/default_check.rb
|
@@ -124,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
124
125
|
version: '0'
|
125
126
|
requirements: []
|
126
127
|
rubyforge_project:
|
127
|
-
rubygems_version: 2.
|
128
|
+
rubygems_version: 2.5.2
|
128
129
|
signing_key:
|
129
130
|
specification_version: 4
|
130
131
|
summary: A simple, extensible health-check monitor
|