octofacts 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.version +1 -1
- data/lib/octofacts/backends/base.rb +1 -0
- data/lib/octofacts/backends/index.rb +5 -4
- data/lib/octofacts/backends/yaml_file.rb +2 -0
- data/lib/octofacts/constructors/from_file.rb +1 -0
- data/lib/octofacts/constructors/from_index.rb +1 -0
- data/lib/octofacts/errors.rb +1 -0
- data/lib/octofacts/facts.rb +2 -0
- data/lib/octofacts/manipulators/base.rb +1 -0
- data/lib/octofacts/manipulators/replace.rb +1 -0
- data/lib/octofacts/manipulators.rb +1 -0
- data/lib/octofacts/util/config.rb +1 -0
- data/lib/octofacts/util/keys.rb +1 -0
- data/lib/octofacts/version.rb +1 -0
- data/lib/octofacts.rb +1 -0
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: f0b8fc30fafad10604fd311c01a40ef6ea05d68a97d6342a42d2bb2232d72dd8
|
4
|
+
data.tar.gz: 04e8868b91adad87c9fe2619bcc7159db518cf69fe3b96e194c9909fb6b9aa51
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e64d9d5ad104119ec098ad882929d9e0906baf1a66a236f03f570b4340c3081498197eeaadc19be65562103f083b7bfaebeac1a02d49b638294106250fd3300b
|
7
|
+
data.tar.gz: f9fde2bda3bec8cf9e8f7db0df8f08cdb26a9e63e05465308d0918fe7e8b676ea827872b085be046396c8e3d1e54931d9f24bdb94a363e83b03379ef5e9fb8ca
|
data/.version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.6.0
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require "yaml"
|
2
4
|
require "set"
|
3
5
|
|
@@ -6,7 +8,6 @@ module Octofacts
|
|
6
8
|
class Index < Base
|
7
9
|
attr_reader :index_path, :fixture_path, :options
|
8
10
|
attr_writer :facts
|
9
|
-
attr_accessor :nodes
|
10
11
|
|
11
12
|
def initialize(args = {})
|
12
13
|
index_path = Octofacts::Util::Config.fetch(:octofacts_index_path, args)
|
@@ -44,7 +45,7 @@ module Octofacts
|
|
44
45
|
add_fact_to_index(key) unless indexed_fact?(key)
|
45
46
|
matching_nodes = index[key][value.to_s]
|
46
47
|
raise Octofacts::Errors::NoFactsError if matching_nodes.nil?
|
47
|
-
|
48
|
+
@nodes = nodes & matching_nodes
|
48
49
|
end
|
49
50
|
|
50
51
|
self
|
@@ -61,7 +62,7 @@ module Octofacts
|
|
61
62
|
end
|
62
63
|
end
|
63
64
|
|
64
|
-
|
65
|
+
@nodes = matching_nodes
|
65
66
|
self
|
66
67
|
end
|
67
68
|
|
@@ -71,7 +72,7 @@ module Octofacts
|
|
71
72
|
add_fact_to_index(key) unless indexed_fact?(key)
|
72
73
|
matching_nodes = index[key][value.to_s]
|
73
74
|
unless matching_nodes.nil?
|
74
|
-
|
75
|
+
@nodes = (matching_nodes.to_set + nodes.to_set).to_a
|
75
76
|
end
|
76
77
|
end
|
77
78
|
|
data/lib/octofacts/errors.rb
CHANGED
data/lib/octofacts/facts.rb
CHANGED
data/lib/octofacts/util/keys.rb
CHANGED
data/lib/octofacts/version.rb
CHANGED
data/lib/octofacts.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: octofacts
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GitHub, Inc.
|
@@ -10,10 +10,12 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2024-08-14 00:00:00.000000000 Z
|
14
14
|
dependencies: []
|
15
|
-
description:
|
16
|
-
|
15
|
+
description: 'Octofacts provides fact fixtures built from recently-updated Puppet
|
16
|
+
facts to rspec-puppet tests.
|
17
|
+
|
18
|
+
'
|
17
19
|
email: opensource+octofacts@github.com
|
18
20
|
executables: []
|
19
21
|
extensions: []
|
@@ -46,15 +48,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
46
48
|
requirements:
|
47
49
|
- - ">="
|
48
50
|
- !ruby/object:Gem::Version
|
49
|
-
version: 2.
|
51
|
+
version: 2.7.0
|
50
52
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
51
53
|
requirements:
|
52
54
|
- - ">="
|
53
55
|
- !ruby/object:Gem::Version
|
54
56
|
version: '0'
|
55
57
|
requirements: []
|
56
|
-
|
57
|
-
rubygems_version: 2.2.5
|
58
|
+
rubygems_version: 3.4.19
|
58
59
|
signing_key:
|
59
60
|
specification_version: 4
|
60
61
|
summary: Run your rspec-puppet tests against fake hosts that present almost real facts
|