okcomputer 1.17.4 → 1.18.4
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 964bccbd2510184da0f52827f5558f8745076a8c8725745a9c7659b04779c6db
|
4
|
+
data.tar.gz: 4525ecd9968072a9f2be2da58dbbe63d238e55800168e3e3b3b26006335f79a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76d6c635b55919898267bcbdb48e4a2da3342c52316038427d6771d2f277890ddd88f9389a9016a41ee2c2c0e7cb28f7a1a1b2cf5a3535ba9122724fac8eb961
|
7
|
+
data.tar.gz: 4be31489a2a1bf21d5e91aff93f675cbbe75e30c2cfbeea3687faed27ab204965e1e75765fb7c02e0b57eb6620b8ae07824e596eff3520c607009608a9405443
|
data/README.markdown
CHANGED
@@ -5,6 +5,21 @@ module OkComputer
|
|
5
5
|
# * Otherwise, checks for Capistrano's REVISION file in the app root.
|
6
6
|
# * Failing these, the check fails
|
7
7
|
class AppVersionCheck < Check
|
8
|
+
attr_accessor :file
|
9
|
+
attr_accessor :env
|
10
|
+
attr_accessor :transform
|
11
|
+
|
12
|
+
# Public: Initialize a check for a backed-up Sidekiq queue
|
13
|
+
#
|
14
|
+
# file - The path of the version file to check
|
15
|
+
# env - The key in ENV to check for a revision SHA
|
16
|
+
# transform - The block to optionally transform the version string
|
17
|
+
def initialize(file: "REVISION", env: "SHA", &transform)
|
18
|
+
self.file = file
|
19
|
+
self.env = env
|
20
|
+
self.transform = transform || proc { |v| v }
|
21
|
+
end
|
22
|
+
|
8
23
|
# Public: Return the application version
|
9
24
|
def check
|
10
25
|
mark_message "Version: #{version}"
|
@@ -17,21 +32,20 @@ module OkComputer
|
|
17
32
|
#
|
18
33
|
# Returns a String
|
19
34
|
def version
|
20
|
-
version_from_env || version_from_file || raise(UnknownRevision)
|
35
|
+
transform.call(version_from_env || version_from_file || raise(UnknownRevision))
|
21
36
|
end
|
22
37
|
|
23
38
|
private
|
24
39
|
|
25
40
|
# Private: Version stored in environment variable
|
26
41
|
def version_from_env
|
27
|
-
ENV[
|
42
|
+
ENV[env]
|
28
43
|
end
|
29
44
|
|
30
45
|
# Private: Version stored in Capistrano revision file
|
31
46
|
def version_from_file
|
32
|
-
|
33
|
-
|
34
|
-
end
|
47
|
+
path = Rails.root.join(file)
|
48
|
+
File.read(path).chomp if File.exist?(path)
|
35
49
|
end
|
36
50
|
|
37
51
|
UnknownRevision = Class.new(StandardError)
|
@@ -6,7 +6,7 @@ module OkComputer
|
|
6
6
|
connected = Neo4j::Session.current.connection.head.success?
|
7
7
|
url = Neo4j::Session.current.connection.url_prefix.to_s
|
8
8
|
mark_message "Connected to neo4j on #{url}" if connected
|
9
|
-
rescue Faraday::
|
9
|
+
rescue Faraday::ConnectionFailed => e
|
10
10
|
mark_failure
|
11
11
|
mark_message "Error: #{e.message}"
|
12
12
|
end
|
data/lib/ok_computer/version.rb
CHANGED
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: okcomputer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.18.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Patrick Byrne
|
8
8
|
- Andy Fleener
|
9
9
|
- Chris Arcand
|
10
|
-
autorequire:
|
10
|
+
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2021-02-04 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: sqlite3
|
@@ -32,14 +32,14 @@ dependencies:
|
|
32
32
|
requirements:
|
33
33
|
- - "~>"
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: '
|
35
|
+
version: '4.0'
|
36
36
|
type: :development
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
40
|
- - "~>"
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: '
|
42
|
+
version: '4.0'
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: coveralls
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
@@ -125,7 +125,7 @@ homepage: https://github.com/sportngin/okcomputer
|
|
125
125
|
licenses:
|
126
126
|
- MIT
|
127
127
|
metadata: {}
|
128
|
-
post_install_message:
|
128
|
+
post_install_message:
|
129
129
|
rdoc_options: []
|
130
130
|
require_paths:
|
131
131
|
- lib
|
@@ -140,9 +140,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
140
|
- !ruby/object:Gem::Version
|
141
141
|
version: '0'
|
142
142
|
requirements: []
|
143
|
-
|
144
|
-
|
145
|
-
signing_key:
|
143
|
+
rubygems_version: 3.1.4
|
144
|
+
signing_key:
|
146
145
|
specification_version: 4
|
147
146
|
summary: A simple, extensible health-check monitor
|
148
147
|
test_files: []
|