quixoten-puppetdb-terminus 4.0.2 → 4.1.0

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
  SHA1:
3
- metadata.gz: 00fb6f78668b7f73f0e254e62924a846b630a134
4
- data.tar.gz: ea4e4550832d86a52ed8c3903dcd9394ad60bd21
3
+ metadata.gz: d2beeafd2b943f5158710e52f7259993967907f2
4
+ data.tar.gz: 36d572bb13b7fae7a36c7e63909caca5dff33a4b
5
5
  SHA512:
6
- metadata.gz: a9d937c09eda4dea9d6df80931b2954773bcb316943acc9c84baa975c62242ee3df2926765913cea0d53503eaeb1fea0a52917690add37d0da45a4fd993e6520
7
- data.tar.gz: face22edbf2ad70b979afcc23715d6ab9131538ddc106be8d9b300aaa65b6aef3648b80d9c98efeaed771952e2508b39af8a08269ecde3f0da2424c32a2d3765
6
+ metadata.gz: 2cef8319dc50e514dcbd3d8e2e30ce8315e455166c4fec1ae953ca81d2433f8510cb27ce4638d78820c458ef7ebff0468d36b5a92c23656b8e5a51d76187893d
7
+ data.tar.gz: 172206b91329c1f365af100a877ab2f10204af225840e88b837aa68604ba321f107423519c972fbc61bd9aeb10e5ae0c27644b2793687b2f7a7a896966a3d386
@@ -1,5 +1,9 @@
1
1
  require 'puppet/util/puppetdb'
2
2
  Puppet::Functions.create_function(:puppetdb_query) do
3
+ dispatch :puppetdb_query do
4
+ required_param 'Variant[String[1], Array[Data, 1]]', :query
5
+ end
6
+
3
7
  def puppetdb_query(query)
4
8
  Puppet::Util::Puppetdb.query_puppetdb(query)
5
9
  end
@@ -38,7 +38,7 @@ Puppet::Reports.register_report(:puppetdb) do
38
38
  end
39
39
 
40
40
  resources = build_resources_list
41
- is_noop = resources.any? { |rs| has_noop_event?(rs) } and resources.none? { |rs| has_failed_event?(rs) }
41
+ is_noop = resources.any? { |rs| has_noop_event?(rs) } && resources.none? { |rs| has_enforcement_event?(rs) }
42
42
 
43
43
 
44
44
  defaulted_catalog_uuid = defined?(catalog_uuid) ? catalog_uuid : transaction_uuid
@@ -74,8 +74,8 @@ Puppet::Reports.register_report(:puppetdb) do
74
74
 
75
75
  # @return TrueClass
76
76
  # @api private
77
- def has_failed_event?(resource)
78
- resource["events"].any? { |event| event["status"] == 'failed' }
77
+ def has_enforcement_event?(resource)
78
+ resource["events"].any? { |event| event["status"] != 'noop' }
79
79
  end
80
80
 
81
81
  # @return Array[Hash]
@@ -1,6 +1,6 @@
1
1
  module PuppetDB
2
2
  module Terminus
3
- VERSION = "4.0.2"
3
+ VERSION = "4.1.0"
4
4
  UPSTREAM_VERSION = VERSION.split(".")[0..2].join(".")
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quixoten-puppetdb-terminus
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.2
4
+ version: 4.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Devin Christensen