riemann-babbler 0.3.6 → 0.3.7

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.
@@ -18,6 +18,7 @@ module Riemann
18
18
  require 'rest_client'
19
19
 
20
20
  attr_reader :logger
21
+ attr_reader :hostname
21
22
 
22
23
  def initialize( configatron, logger )
23
24
  @configatron = configatron
@@ -50,6 +51,10 @@ module Riemann
50
51
  end
51
52
 
52
53
  def host
54
+ @hostname ||= get_hostname
55
+ end
56
+
57
+ def get_hostname
53
58
  hostname = File.read('/proc/sys/kernel/hostname').strip.downcase
54
59
  hostname += options.riemann.suffix unless options.riemann.suffix.nil?
55
60
  hostname = options.riemann.prefix + hostname unless options.riemann.prefix.nil?
@@ -1,5 +1,5 @@
1
1
  module Riemann
2
2
  class Babbler
3
- VERSION = '0.3.6'
3
+ VERSION = '0.3.7'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: riemann-babbler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 0.3.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -147,7 +147,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
147
147
  version: '0'
148
148
  segments:
149
149
  - 0
150
- hash: 1936496433232382944
150
+ hash: -3929441790422783602
151
151
  required_rubygems_version: !ruby/object:Gem::Requirement
152
152
  none: false
153
153
  requirements: