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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 772de60494a5720e23c186c4fc990e17e4457391
4
- data.tar.gz: 70f52075d802e604aa84580aee2a50b2eb563060
3
+ metadata.gz: 37c392a9945492ae470f2cb7e1a2011cc2e007a8
4
+ data.tar.gz: ed81079acba62977a0b5645be14b49e56f5521c7
5
5
  SHA512:
6
- metadata.gz: 8996e1acb30679e1ec535a82415bbdf05560d3823fc6dfc59d62a6367c481da6e8965d46cc37d8dfb3647d8eb79c6694f13451da65211b98ab7f621e9de60e83
7
- data.tar.gz: 3708ef0ded13c99216a1d00befcba8e3e33011526df7fd3030d4e4bb71544a9511310fbade738bf507ec1ff44a28dc498f45c46c99c493c0614a4d0d7eff7c73
6
+ metadata.gz: a3b64ebe3c91de150e68af1af1c990e59209091f56deec8043394807a9f91de32e3a29d802e101ee400ae084bd80a99a814f0e9118652669af3232d70da9f6e3
7
+ data.tar.gz: 6969ede56327b7a275e28b033b1a268659dbfd79d9e7c0abdb11c282c4fb77687f4bdd3b75d6496a7ea3b98c95eaaaa4d3516f90630629d31e1299ef4ba875b9
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2012 Sport Ngin
1
+ Copyright 2017 SportsEngine
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -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
@@ -1,3 +1,3 @@
1
1
  module OkComputer
2
- VERSION = '1.14.0'
2
+ VERSION = '1.14.1'
3
3
  end
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.0
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-01-06 00:00:00.000000000 Z
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.4.8
128
+ rubygems_version: 2.5.2
128
129
  signing_key:
129
130
  specification_version: 4
130
131
  summary: A simple, extensible health-check monitor