antbird 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7f6be201e13340d8e4f7cf122049f745af8c9af0d4d6390601a3264bef077992
4
- data.tar.gz: 7f1540e56bdc23db02b1300971550bdce93bb0ac426a0010d2fa4a9fc245e8f4
3
+ metadata.gz: c8c2ff0b9a3dd9122be37ee481a7ddb606466b9d39eafd293a52d6586cde63af
4
+ data.tar.gz: dbb2577b6a4a89735da0e5612d222ab579b98542472459ded0ee01a5e5270732
5
5
  SHA512:
6
- metadata.gz: 9d135caf322ed4ad9056883283062ffbf5f43073087b29befa60033273f95ac87dae3b0f2b21fac79eb15d1bf21fe23d3cf136acd89e5ac46c4f2add0bee7678
7
- data.tar.gz: c8df3422cf55ffad4f18e4016e0ec972570c525f53250a48962d482d9ac7d45585cf0f2ad8357eb74e1b73dbf2309f2949bcc4ec8e3b016e7f71f07588295848
6
+ metadata.gz: 55b3cff8582335c0cb6dd6b1fb60004398858c805845ad88ee9fe64280a5fa26c7dc31ee7b6fdcc798c016b9365a096071c76a2e141ea911f6cae7eff5b86a0b
7
+ data.tar.gz: 1a2ab8f3115fd612c727466eb5438b6897a323b77f5dcdad70647a31758ac9f959f05446e8312fd3f8a9b7a46f00001656d265c74f82aa77eb02dc1becd5a845
@@ -25,8 +25,6 @@ module Antbird
25
25
  if version
26
26
  @version = version
27
27
  @distribution = distribution
28
- else
29
- fetch_version_and_distribution
30
28
  end
31
29
 
32
30
  @api_specs = {}
@@ -203,6 +201,8 @@ module Antbird
203
201
  end
204
202
 
205
203
  def opensearch?
204
+ ensure_version_and_distribution
205
+
206
206
  distribution == 'opensearch'
207
207
  end
208
208
 
@@ -249,7 +249,9 @@ module Antbird
249
249
  end
250
250
  end
251
251
 
252
- def fetch_version_and_distribution
252
+ def ensure_version_and_distribution
253
+ return if version
254
+
253
255
  version_hash = connection.get('/').body.dig('version')
254
256
  @version = version_hash['number']
255
257
  @distribution = version_hash['distribution']
@@ -262,6 +264,8 @@ module Antbird
262
264
  def ensure_api_spec_loaded
263
265
  return if api_specs_loaded?
264
266
 
267
+ ensure_version_and_distribution
268
+
265
269
  if opensearch?
266
270
  require "antbird/rest_api/rest_api_opensearch_v#{class_version}"
267
271
  extend Antbird::RestApi.const_get "RestApiOpensearchV#{class_version}"
@@ -1,3 +1,3 @@
1
1
  module Antbird
2
- VERSION = "0.5.1"
2
+ VERSION = "0.5.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: antbird
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - fukayatsu