Skip to content

Commit fb74b5c

Browse files
committed
Update version library
1 parent c4f8b63 commit fb74b5c

File tree

2 files changed

+39
-3
lines changed

2 files changed

+39
-3
lines changed

lib/sensu-plugins-postgres.rb

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1+
2+
require 'sensu-plugins-postgres/version'
3+
4+
# Load the defaults
5+
16
#
2-
# Set gem version
7+
# Default class
38
#
49
module SensuPluginsPostgres
5-
# Gem version
6-
VERSION = '0.0.1.alpha.1'
10+
class << self
11+
end
12+
13+
class << self
14+
end
715
end

lib/sensu-plugins-postgres/version.rb

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
require 'json'
2+
3+
# encoding: utf-8
4+
module SensuPluginsPostgres
5+
# This defines the version of the gem
6+
module Version
7+
MAJOR = 0
8+
MINOR = 0
9+
PATCH = 1
10+
11+
VER_STRING = [MAJOR, MINOR, PATCH].compact.join('.')
12+
13+
NAME = 'sensu-plugins-postgres'
14+
BANNER = "#{NAME} v%s"
15+
16+
module_function
17+
18+
def version
19+
format(BANNER, VER_STRING)
20+
end
21+
22+
def json_version
23+
{
24+
'version' => VER_STRING
25+
}.to_json
26+
end
27+
end
28+
end

0 commit comments

Comments
 (0)