puppet_litmus 1.0.1 → 1.0.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5adb23039c782b8fe80abdc061ad6f81348c0a769d2f855058c9078676487537
4
- data.tar.gz: 52cdfe73afa29a0ada5a3665e950944630603a4e86fce4ac76bc4e42b05a67ef
3
+ metadata.gz: f42320bf296d7e6efb9370a3e39b775a868417f9dc337aa7c5dee5052b055c6f
4
+ data.tar.gz: 607ab4fe445eb6f8b29d758212e84065b3e15b0273af85debec7676ea70c9115
5
5
  SHA512:
6
- metadata.gz: b0c7e7ad2c95bb4d08d8fd1cbc849ab13abf274184f67ccab6269b84ded7949b5f548e8ba949879fbd22bcb79dcce6e37ec4cf113aeb3dcc3e971e6453088eb8
7
- data.tar.gz: b85ee528122c39ac9ee6c3c3c1e0d8c37aa1d6a6e658bdb6dabfd20a3c218833f7763b720890efcc642670c09d1f89e9e84f54b692a828f8cf36dc8ed4ed54f8
6
+ metadata.gz: 6abadc5c20561dd3f0db0b0bfcd96b55ba0df2e2fdfa97576fb48caabe538287ccb86750264fe10c0831b23e20f89d34946d4df2dd3cdf2e1e0adccb7d3f6538
7
+ data.tar.gz: f500ac82345c2c05abddf4e50d8c3492e37ef711b5c20a14fcda8d16ad6d5cecb13b64b43d343bd9e11eba242d80ef9584fa73f60fb36329c1b078d3c72f86bd
@@ -142,11 +142,13 @@ if metadata.key?('requirements') && metadata['requirements'].length.positive?
142
142
  next unless Gem::Requirement.create(reqs).satisfied_by?(Gem::Version.new("#{collection[:puppet_maj_version]}.9999"))
143
143
 
144
144
  matrix[:collection] << "puppet#{collection[:puppet_maj_version]}-nightly"
145
- spec_matrix[:include] << if collection[:puppet_maj_version] == 8
146
- { puppet_version: 'https://github.com/puppetlabs/puppet', ruby_version: collection[:ruby_version] }
147
- else
148
- { puppet_version: "~> #{collection[:puppet_maj_version]}.0", ruby_version: collection[:ruby_version] }
149
- end
145
+
146
+ include_version = {
147
+ 8 => "~> #{collection[:puppet_maj_version]}.0",
148
+ 7 => "~> #{collection[:puppet_maj_version]}.24",
149
+ 6 => "~> #{collection[:puppet_maj_version]}.0"
150
+ }
151
+ spec_matrix[:include] << { puppet_version: include_version[collection[:puppet_maj_version]], ruby_version: collection[:ruby_version] }
150
152
  end
151
153
  end
152
154
  end
@@ -323,35 +323,9 @@ module PuppetLitmus::InventoryManipulation
323
323
  # @param inventory_hash [Hash] hash of the inventory.yaml file
324
324
  # @param node_name [String] node of nodes to limit the search for the node_name in
325
325
  def add_platform_field(inventory_hash, node_name)
326
- facts = begin
327
- facts_from_node(inventory_hash, node_name)
328
- rescue StandardError => e
329
- warn e
330
- {}
331
- end
332
- Honeycomb.current_span.add_field('litmus.platform', facts&.dig('platform'))
333
- end
334
-
335
- # Add platform custom information field to the current span for each node being targeted.
336
- # If more than one node is being targeted, each node will be given a separate custom field.
337
- #
338
- # @param span [Honeycomb::Span] The current span
339
- # @param target_node_names [Array[String]] Nodes being targeted
340
- # @param inventory_hash [Hash] Hash of the inventory.yaml file
341
- def add_node_fields_to_span(span, target_node_names, inventory_hash)
342
- node_counter = 1
343
- Array(target_node_names).each do |target_name|
344
- name_field = 'litmus.node_name'
345
- platform_field = 'litmus.platform'
346
-
347
- name_field = "#{name_field}_#{node_counter}"
348
- platform_field = "#{platform_field}_#{node_counter}"
349
- span.add_field(name_field, target_name)
350
- if target_in_inventory?(inventory_hash, target_name)
351
- facts = facts_from_node(inventory_hash, target_name)
352
- span.add_field(platform_field, facts&.dig('platform')) unless facts.nil?
353
- end
354
- node_counter += 1
355
- end
326
+ facts_from_node(inventory_hash, node_name)
327
+ rescue StandardError => e
328
+ warn e
329
+ {}
356
330
  end
357
331
  end