Skip to content

Commit 92d9cd1

Browse files
committed
Fix uninitialized constant Riemann::Tools::VERSION (NameError)
When running the tools via bundler, `riemann/tools/version` is loaded and `Riemann::Tools::VERSION` is defined. But when running as a gem, it is not loaded leading to an error at startup. Explicitly require the version in the files that use it.
1 parent 265b5e3 commit 92d9cd1

File tree

7 files changed

+7
-0
lines changed

7 files changed

+7
-0
lines changed

lib/riemann/tools/apache_status.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# frozen_string_literal: true
22

33
require 'riemann/tools'
4+
require 'riemann/tools/version'
45

56
# Collects Apache metrics and submits them to Riemann
67
# More information can be found at http://httpd.apache.org/docs/2.4/mod/mod_status.html

lib/riemann/tools/cloudant.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# frozen_string_literal: true
22

33
require 'riemann/tools'
4+
require 'riemann/tools/version'
45

56
# Gathers load balancer statistics from Cloudant.com (shared cluster) and submits them to Riemann.
67
module Riemann

lib/riemann/tools/consul_health.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# frozen_string_literal: true
22

33
require 'riemann/tools'
4+
require 'riemann/tools/version'
45
require 'socket'
56
require 'net/http'
67
require 'uri'

lib/riemann/tools/haproxy.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# frozen_string_literal: true
22

33
require 'riemann/tools'
4+
require 'riemann/tools/version'
45

56
# Gathers haproxy CSV statistics and submits them to Riemann.
67
module Riemann

lib/riemann/tools/http_check.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
require 'socket'
66

77
require 'riemann/tools'
8+
require 'riemann/tools/version'
89

910
# Test for HTTP requests
1011
module Riemann

lib/riemann/tools/nginx_status.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# frozen_string_literal: true
22

33
require 'riemann/tools'
4+
require 'riemann/tools/version'
45

56
# Gathers nginx status stub statistics and submits them to Riemann.
67
# See http://wiki.nginx.org/HttpStubStatusModule for configuring Nginx appropriately

tools/riemann-riak/lib/riemann/tools/riak.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
require 'English'
44
require 'riemann/tools'
5+
require 'riemann/tools/version'
56

67
# Forwards information on a Riak node to Riemann.
78
module Riemann

0 commit comments

Comments
 (0)