Module: Elastic
- Defined in:
- lib/elasticsearch.rb
Overview
Helper for the meta-header value for Cloud
Constant Summary collapse
- ELASTICSEARCH_SERVICE_VERSION =
Constant for elastic-transport meta-header
[:es, ].freeze
Class Method Summary collapse
-
.client_meta_version ⇒ Object
If the version is X.X.X.pre/alpha/beta, use X.X.Xp for the meta-header:.
Class Method Details
.client_meta_version ⇒ Object
If the version is X.X.X.pre/alpha/beta, use X.X.Xp for the meta-header:
193 194 195 196 197 198 199 |
# File 'lib/elasticsearch.rb', line 193 def self. regexp = /^([0-9]+\.[0-9]+\.[0-9]+)\.?([a-z0-9.-]+)?$/ match = Elasticsearch::VERSION.match(regexp) return "#{match[1]}p" if match[2] Elasticsearch::VERSION end |