Skip to content

Commit

Permalink
More explicit name for method fetching ES version.
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Cozzi committed Apr 23, 2014
1 parent 7c54ff4 commit fbb97b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/elasticsearch/check-es-cluster-status.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ def get_es_resource(resource)
end
end

def version
def get_es_version
info = get_es_resource('/')
info['version']['number']
end

def is_master
if Gem::Version.new(version) >= Gem::Version.new('1.0.0')
if Gem::Version.new(get_es_version) >= Gem::Version.new('1.0.0')
master = get_es_resource('_cluster/state/master_node')['master_node']
local = get_es_resource('/_nodes/_local')
else
Expand Down

0 comments on commit fbb97b4

Please sign in to comment.