From afac2c6a23a7d7422941fb20cc86a68c9dcd272e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phanie=20Jaumotte?= Date: Sat, 4 May 2024 19:25:40 +0200 Subject: [PATCH] update ruby array [6..] --- lib/puppet/type/elasticsearch_component_template.rb | 2 +- lib/puppet/type/elasticsearch_index_template.rb | 2 +- lib/puppet/type/elasticsearch_template.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/puppet/type/elasticsearch_component_template.rb b/lib/puppet/type/elasticsearch_component_template.rb index ac963fef..27382fbb 100644 --- a/lib/puppet/type/elasticsearch_component_template.rb +++ b/lib/puppet/type/elasticsearch_component_template.rb @@ -48,7 +48,7 @@ def insync?(value) val['template']['settings']['index'] = {} unless val['template']['settings'].key? 'index' (val['template']['settings'].keys - ['index']).each do |setting| new_key = if setting.start_with? 'index.' - setting[6..] + setting[6..setting.length - 1] else setting end diff --git a/lib/puppet/type/elasticsearch_index_template.rb b/lib/puppet/type/elasticsearch_index_template.rb index c8b90e40..dbe2da64 100644 --- a/lib/puppet/type/elasticsearch_index_template.rb +++ b/lib/puppet/type/elasticsearch_index_template.rb @@ -54,7 +54,7 @@ def insync?(value) val['template']['settings']['index'] = {} unless val['template']['settings'].key? 'index' (val['template']['settings'].keys - ['index']).each do |setting| new_key = if setting.start_with? 'index.' - setting[6..] + setting[6..setting.length - 1] else setting end diff --git a/lib/puppet/type/elasticsearch_template.rb b/lib/puppet/type/elasticsearch_template.rb index 8e6f7007..3a34af26 100644 --- a/lib/puppet/type/elasticsearch_template.rb +++ b/lib/puppet/type/elasticsearch_template.rb @@ -50,7 +50,7 @@ val['settings']['index'] = {} unless val['settings'].key? 'index' (val['settings'].keys - ['index']).each do |setting| new_key = if setting.start_with? 'index.' - setting[6..] + setting[6..setting.length - 1] else setting end