puppet-resource_api 1.8.14 → 1.8.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +31 -3
- data/README.md +6 -6
- data/lib/puppet/resource_api/base_context.rb +1 -1
- data/lib/puppet/resource_api/data_type_handling.rb +9 -2
- data/lib/puppet/resource_api/simple_provider.rb +4 -4
- data/lib/puppet/resource_api/transport.rb +13 -0
- data/lib/puppet/resource_api/version.rb +1 -1
- data/lib/puppet/resource_api.rb +4 -1
- data/puppet-resource_api.gemspec +7 -8
- metadata +3 -20
- data/.dependency_decisions.yml +0 -98
- data/.fixtures.yml +0 -8
- data/.github/dependabot.yml +0 -12
- data/.gitignore +0 -15
- data/.rspec +0 -3
- data/.rubocop.yml +0 -159
- data/.travis.yml +0 -43
- data/CODEOWNERS +0 -2
- data/Gemfile +0 -81
- data/HISTORY.md +0 -408
- data/Rakefile +0 -66
- data/appveyor.yml +0 -41
- data/bin/console +0 -14
- data/bin/setup +0 -8
- data/codecov.yml +0 -3
- data/contrib/README.md +0 -7
- data/contrib/pre-commit +0 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c0c670133fdc323f0924bf231fd59eb1d07f27ef17919b853275d0fb7cf0104
|
4
|
+
data.tar.gz: f99601ad94f6d186d981efbc7b5b4ca77bc3b599ad8b8093aa669bf7454112b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ca81ef748e1ec292255f775922c68664360d59590c677da0cdc19fb001ea703ff89d924018e26a24234c2aebe2e3cdee2cd54250e6646daae1785f14c53df5f
|
7
|
+
data.tar.gz: 143368873f583691dd5afe77e96a64008b8565eb5e1d5820b5a3c549c00954b647afa5ca67e8245c2cca7facd76288f35df91e4def3690d1e06bef5058af5c21
|
data/CHANGELOG.md
CHANGED
@@ -3,9 +3,37 @@
|
|
3
3
|
All significant changes to this repo will be summarized in this file.
|
4
4
|
|
5
5
|
|
6
|
-
## [
|
6
|
+
## [1.8.18](https://github.com/puppetlabs/puppet-resource_api/tree/1.8.18) (2023-07-17)
|
7
7
|
|
8
|
-
[Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/1.8.
|
8
|
+
[Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/1.8.16...1.8.18)
|
9
|
+
|
10
|
+
**Merged pull requests:**
|
11
|
+
|
12
|
+
- \(PA-5641\) Add release job via PR [\#321](https://github.com/puppetlabs/puppet-resource_api/pull/321) [\#322](https://github.com/puppetlabs/puppet-resource_api/pull/322) [\#323](https://github.com/puppetlabs/puppet-resource_api/pull/323) ([tvpartytonight](https://github.com/tvpartytonight))
|
13
|
+
- Remove old Ruby logic from Gemfile [\#320](https://github.com/puppetlabs/puppet-resource_api/pull/320) ([mhashizume](https://github.com/mhashizume))
|
14
|
+
- \(PA-4639\) Migrate away from AppVeyor [\#319](https://github.com/puppetlabs/puppet-resource_api/pull/319) ([mhashizume](https://github.com/mhashizume))
|
15
|
+
- Don't require git [\#318](https://github.com/puppetlabs/puppet-resource_api/pull/318) ([joshcooper](https://github.com/joshcooper))
|
16
|
+
- \(PA-5641\) Update rspec tests with modern Ruby [\#317](https://github.com/puppetlabs/puppet-resource_api/pull/317) ([mhashizume](https://github.com/mhashizume))
|
17
|
+
- Update to Mend [\#311](https://github.com/puppetlabs/puppet-resource_api/pull/311) ([cthorn42](https://github.com/cthorn42))
|
18
|
+
|
19
|
+
## [1.8.16](https://github.com/puppetlabs/puppet-resource_api/tree/1.8.16) (2022-10-03)
|
20
|
+
|
21
|
+
[Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/1.8.14...1.8.16)
|
22
|
+
|
23
|
+
**Merged pull requests:**
|
24
|
+
|
25
|
+
- \(PA-4558\) Replaces Travis CI with GitHub Actions [\#298](https://github.com/puppetlabs/puppet-resource_api/pull/298) ([mhashizume](https://github.com/mhashizume))
|
26
|
+
- Add snyk monitoring [\#297](https://github.com/puppetlabs/puppet-resource_api/pull/297) ([joshcooper](https://github.com/joshcooper))
|
27
|
+
- \(packaging\) Sets version to 1.8.15 for release [\#296](https://github.com/puppetlabs/puppet-resource_api/pull/296) ([mhashizume](https://github.com/mhashizume))
|
28
|
+
- Update CODEOWNERS [\#295](https://github.com/puppetlabs/puppet-resource_api/pull/295) ([binford2k](https://github.com/binford2k))
|
29
|
+
- Add array support to autorequire variable expansion [\#294](https://github.com/puppetlabs/puppet-resource_api/pull/294) ([seanmil](https://github.com/seanmil))
|
30
|
+
- \(GH-231\) Add default to transport attributes [\#293](https://github.com/puppetlabs/puppet-resource_api/pull/293) ([seanmil](https://github.com/seanmil))
|
31
|
+
- Support ensure parameter with Optional data type [\#292](https://github.com/puppetlabs/puppet-resource_api/pull/292) ([seanmil](https://github.com/seanmil))
|
32
|
+
- Only ship needed files [\#289](https://github.com/puppetlabs/puppet-resource_api/pull/289) ([ekohl](https://github.com/ekohl))
|
33
|
+
|
34
|
+
## [1.8.14](https://github.com/puppetlabs/puppet-resource_api/tree/1.8.14) (2021-06-09)
|
35
|
+
|
36
|
+
[Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/1.8.13...1.8.14)
|
9
37
|
|
10
38
|
**Implemented enhancements:**
|
11
39
|
|
@@ -32,7 +60,7 @@ All significant changes to this repo will be summarized in this file.
|
|
32
60
|
- Language correction [\#270](https://github.com/puppetlabs/puppet-resource_api/pull/270) ([epackorigan](https://github.com/epackorigan))
|
33
61
|
- \(maint\) Update CHANGELOG [\#268](https://github.com/puppetlabs/puppet-resource_api/pull/268) ([DavidS](https://github.com/DavidS))
|
34
62
|
- \(maint\) update test matrix for current supported versions; remove older versions to cut down on resource usage [\#265](https://github.com/puppetlabs/puppet-resource_api/pull/265) ([DavidS](https://github.com/DavidS))
|
35
|
-
- \(maint\) Mock Hocon.load\(...\) [\#263](https://github.com/puppetlabs/puppet-resource_api/pull/263) ([
|
63
|
+
- \(maint\) Mock Hocon.load\(...\) [\#263](https://github.com/puppetlabs/puppet-resource_api/pull/263) ([BogdanIrimie](https://github.com/BogdanIrimie))
|
36
64
|
- Update rake requirement from ~\> 10.0 to ~\> 13.0 [\#262](https://github.com/puppetlabs/puppet-resource_api/pull/262) ([dependabot-preview[bot]](https://github.com/apps/dependabot-preview))
|
37
65
|
- \(maint\) update Gemfile to allow use of non-vulnerable rake version 12.3.3 [\#260](https://github.com/puppetlabs/puppet-resource_api/pull/260) ([DavidS](https://github.com/DavidS))
|
38
66
|
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
# Puppet::ResourceApi [![
|
1
|
+
# Puppet::ResourceApi [![codecov](https://codecov.io/gh/puppetlabs/puppet-resource_api/branch/main/graph/badge.svg)](https://codecov.io/gh/puppetlabs/puppet-resource_api)
|
2
2
|
|
3
|
-
This is an implementation of the [Resource API specification](https://github.com/puppetlabs/puppet-specifications/blob/
|
3
|
+
This is an implementation of the [Resource API specification](https://github.com/puppetlabs/puppet-specifications/blob/master/language/resource-api/README.md).
|
4
4
|
|
5
5
|
Find a working example of a new-style providers in the [Palo Alto Firewall module](https://github.com/puppetlabs/puppetlabs-panos/):
|
6
6
|
* [Type](https://github.com/puppetlabs/puppetlabs-panos/blob/main/lib/puppet/type/panos_address.rb)
|
@@ -15,18 +15,18 @@ Find a working example of a new-style providers in the [Palo Alto Firewall modul
|
|
15
15
|
* The [Resource API specs](https://github.com/puppetlabs/puppet-specifications/blob/master/language/resource-api/README.md) describes details of all the capabilities of this gem.
|
16
16
|
* The [puppetlabs-hue module](https://github.com/puppetlabs/puppetlabs-hue) is a very simple example for using the Resource API for remote resources.
|
17
17
|
* The [meraki module](https://github.com/meraki/puppet-module) is a full example for using the Resource API for remote resources.
|
18
|
-
* This [Introduction to Testing Puppet Modules](https://www.
|
19
|
-
* The [RSpec docs](https://
|
18
|
+
* This [Introduction to Testing Puppet Modules](https://www.youtube.com/watch?v=GgNrxLfoDF8) talk describes rspec usage in more detail.
|
19
|
+
* The [RSpec docs](https://rspec.info/documentation/) provide an overview of the capabilities of rspec.
|
20
20
|
* Read [betterspecs](http://www.betterspecs.org/) for general guidelines on what is considered good specs.
|
21
21
|
|
22
22
|
|
23
23
|
## Deployment
|
24
24
|
|
25
|
-
The `puppet-resource_api` gem is part of
|
25
|
+
The `puppet-resource_api` gem is part of Puppet from version 6 onward.
|
26
26
|
|
27
27
|
|
28
28
|
## Contributing
|
29
|
-
We
|
29
|
+
We welcome bug reports and pull requests on the Resource API so that we can continue to improve it to the best of our ability. If you would like to contribute, [have a look at our GitHub](https://github.com/puppetlabs/puppet-resource_api) and the [Resource API Backlog](https://github.com/puppetlabs/puppet-resource_api/projects/1).
|
30
30
|
|
31
31
|
|
32
32
|
## Known Issues
|
@@ -90,7 +90,7 @@ class Puppet::ResourceApi::BaseContext
|
|
90
90
|
end
|
91
91
|
end
|
92
92
|
|
93
|
-
def processing(title, is, should, message
|
93
|
+
def processing(title, is, should, message = 'Processing')
|
94
94
|
raise "#{__method__} only accepts a single resource title" if title.respond_to?(:each)
|
95
95
|
start_time = Time.now
|
96
96
|
setup_context(title, message)
|
@@ -86,7 +86,7 @@ module Puppet::ResourceApi::DataTypeHandling
|
|
86
86
|
when Puppet::Pops::Types::PIntegerType,
|
87
87
|
Puppet::Pops::Types::PFloatType,
|
88
88
|
Puppet::Pops::Types::PNumericType
|
89
|
-
if value
|
89
|
+
if value.is_a?(String) && (value.match?(%r{^-?\d+$}) || value.match?(Puppet::Pops::Patterns::NUMERIC))
|
90
90
|
value = Puppet::Pops::Utils.to_n(value)
|
91
91
|
end
|
92
92
|
when Puppet::Pops::Types::PEnumType,
|
@@ -184,8 +184,15 @@ module Puppet::ResourceApi::DataTypeHandling
|
|
184
184
|
options = definition[:attributes][:ensure]
|
185
185
|
type = parse_puppet_type(:ensure, options[:type])
|
186
186
|
|
187
|
+
# If the type is wrapped in optional, then check it unwrapped:
|
188
|
+
type = type.type if type.is_a?(Puppet::Pops::Types::POptionalType)
|
187
189
|
return if type.is_a?(Puppet::Pops::Types::PEnumType) && type.values.sort == %w[absent present].sort
|
188
|
-
|
190
|
+
|
191
|
+
# If Variant was used instead, then construct one and use the built-in type comparison:
|
192
|
+
variant_type = Puppet::Pops::Types::TypeParser.singleton.parse('Variant[Undef, Enum[present, absent]]')
|
193
|
+
return if variant_type == type
|
194
|
+
|
195
|
+
raise Puppet::DevError, '`:ensure` attribute must have a type of: `Enum[present, absent]` or `Optional[Enum[present, absent]]`'
|
189
196
|
end
|
190
197
|
|
191
198
|
def self.parse_puppet_type(attr_name, type)
|
@@ -40,14 +40,14 @@ module Puppet::ResourceApi
|
|
40
40
|
context.creating(name) do
|
41
41
|
create(context, name_hash, should)
|
42
42
|
end
|
43
|
-
elsif is[:ensure].to_s == 'present' && should[:ensure].to_s == 'present'
|
44
|
-
context.updating(name) do
|
45
|
-
update(context, name_hash, should)
|
46
|
-
end
|
47
43
|
elsif is[:ensure].to_s == 'present' && should[:ensure].to_s == 'absent'
|
48
44
|
context.deleting(name) do
|
49
45
|
delete(context, name_hash)
|
50
46
|
end
|
47
|
+
elsif is[:ensure].to_s == 'present'
|
48
|
+
context.updating(name) do
|
49
|
+
update(context, name_hash, should)
|
50
|
+
end
|
51
51
|
end
|
52
52
|
end
|
53
53
|
end
|
@@ -103,6 +103,7 @@ module Puppet::ResourceApi::Transport
|
|
103
103
|
clean_bolt_attributes(transport_schema, connection_info)
|
104
104
|
end
|
105
105
|
|
106
|
+
apply_defaults(transport_schema, connection_info)
|
106
107
|
message_prefix = 'The connection info provided does not match the Transport Schema'
|
107
108
|
transport_schema.check_schema(connection_info, message_prefix)
|
108
109
|
transport_schema.validate(connection_info)
|
@@ -128,6 +129,18 @@ module Puppet::ResourceApi::Transport
|
|
128
129
|
end
|
129
130
|
private_class_method :wrap_sensitive
|
130
131
|
|
132
|
+
def self.apply_defaults(transport_schema, connection_info)
|
133
|
+
context = get_context(transport_schema.name)
|
134
|
+
transport_schema.attributes.each do |attr_name, options|
|
135
|
+
if options.key?(:default) && connection_info.key?(attr_name) == false
|
136
|
+
context.debug('Using default value for attribute: %{attribute_name}, value: %{default_value}' % { attribute_name: attr_name, default_value: options[:default].inspect })
|
137
|
+
connection_info[attr_name] = options[:default]
|
138
|
+
end
|
139
|
+
end
|
140
|
+
connection_info
|
141
|
+
end
|
142
|
+
private_class_method :apply_defaults
|
143
|
+
|
131
144
|
def self.transports
|
132
145
|
@transports ||= {}
|
133
146
|
end
|
data/lib/puppet/resource_api.rb
CHANGED
@@ -456,7 +456,7 @@ MESSAGE
|
|
456
456
|
definition[auto].each do |type, values|
|
457
457
|
Puppet.debug("Registering #{auto} for #{type}: #{values.inspect}")
|
458
458
|
send(auto, type.downcase.to_sym) do
|
459
|
-
[values].flatten.map do |v|
|
459
|
+
resolved = [values].flatten.map do |v|
|
460
460
|
match = %r{\A\$(.*)\Z}.match(v) if v.is_a? String
|
461
461
|
if match.nil?
|
462
462
|
v
|
@@ -464,6 +464,9 @@ MESSAGE
|
|
464
464
|
self[match[1].to_sym]
|
465
465
|
end
|
466
466
|
end
|
467
|
+
# Flatten to handle any resolved array properties and filter any nil
|
468
|
+
# values resulting from unspecified optional parameters:
|
469
|
+
resolved.flatten.reject { |v| v.nil? }
|
467
470
|
end
|
468
471
|
end
|
469
472
|
end
|
data/puppet-resource_api.gemspec
CHANGED
@@ -12,14 +12,13 @@ Gem::Specification.new do |spec|
|
|
12
12
|
spec.summary = 'This library provides a simple way to write new native resources for puppet.'
|
13
13
|
spec.homepage = 'https://github.com/puppetlabs/puppet-resource_api'
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
end
|
15
|
+
base = "#{__dir__}#{File::SEPARATOR}"
|
16
|
+
dirs =
|
17
|
+
Dir[File.join(__dir__, 'lib/**/*')] +
|
18
|
+
Dir[File.join(__dir__, 'docs/**/*')]
|
19
|
+
spec.files =
|
20
|
+
dirs.select { |path| File.file?(path) }.map { |path| path.sub(base, '') } +
|
21
|
+
%w[CHANGELOG.md CONTRIBUTING.md README.md LICENSE NOTICE puppet-resource_api.gemspec]
|
23
22
|
|
24
23
|
spec.bindir = 'exe'
|
25
24
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puppet-resource_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Schmitt
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-07-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hocon
|
@@ -31,28 +31,11 @@ executables: []
|
|
31
31
|
extensions: []
|
32
32
|
extra_rdoc_files: []
|
33
33
|
files:
|
34
|
-
- ".dependency_decisions.yml"
|
35
|
-
- ".fixtures.yml"
|
36
|
-
- ".github/dependabot.yml"
|
37
|
-
- ".gitignore"
|
38
|
-
- ".rspec"
|
39
|
-
- ".rubocop.yml"
|
40
|
-
- ".travis.yml"
|
41
34
|
- CHANGELOG.md
|
42
|
-
- CODEOWNERS
|
43
35
|
- CONTRIBUTING.md
|
44
|
-
- Gemfile
|
45
|
-
- HISTORY.md
|
46
36
|
- LICENSE
|
47
37
|
- NOTICE
|
48
38
|
- README.md
|
49
|
-
- Rakefile
|
50
|
-
- appveyor.yml
|
51
|
-
- bin/console
|
52
|
-
- bin/setup
|
53
|
-
- codecov.yml
|
54
|
-
- contrib/README.md
|
55
|
-
- contrib/pre-commit
|
56
39
|
- docs/README.md
|
57
40
|
- docs/hands-on-lab/01-installing-prereqs.md
|
58
41
|
- docs/hands-on-lab/02-connecting-to-the-lightbulbs-emulator.png
|
@@ -100,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
83
|
- !ruby/object:Gem::Version
|
101
84
|
version: '0'
|
102
85
|
requirements: []
|
103
|
-
rubygems_version: 3.
|
86
|
+
rubygems_version: 3.0.3
|
104
87
|
signing_key:
|
105
88
|
specification_version: 4
|
106
89
|
summary: This library provides a simple way to write new native resources for puppet.
|
data/.dependency_decisions.yml
DELETED
@@ -1,98 +0,0 @@
|
|
1
|
-
---
|
2
|
-
- - :permit
|
3
|
-
- MIT
|
4
|
-
- :who: DavidS
|
5
|
-
:why: standard license
|
6
|
-
:versions: []
|
7
|
-
:when: 2017-07-28 11:11:09.971500380 Z
|
8
|
-
- - :permit
|
9
|
-
- Apache 2.0
|
10
|
-
- :who: DavidS
|
11
|
-
:why: standard license
|
12
|
-
:versions: []
|
13
|
-
:when: 2017-07-28 11:12:21.086779416 Z
|
14
|
-
- - :permit
|
15
|
-
- ruby
|
16
|
-
- :who: DavidS
|
17
|
-
:why: standard license
|
18
|
-
:versions: []
|
19
|
-
:when: 2017-07-28 11:12:28.578927478 Z
|
20
|
-
- - :permit
|
21
|
-
- Simplified BSD
|
22
|
-
- :who: DavidS
|
23
|
-
:why: standard license
|
24
|
-
:versions: []
|
25
|
-
:when: 2017-07-28 11:12:36.924605442 Z
|
26
|
-
- - :permit
|
27
|
-
- New BSD
|
28
|
-
- :who: DavidS
|
29
|
-
:why: standard license
|
30
|
-
:versions: []
|
31
|
-
:when: 2017-07-28 11:14:00.252514982 Z
|
32
|
-
- - :permit
|
33
|
-
- Apache License, v2
|
34
|
-
- :who: DavidS
|
35
|
-
:why: standard license
|
36
|
-
:versions: []
|
37
|
-
:when: 2017-07-28 11:14:07.999759997 Z
|
38
|
-
- - :permit
|
39
|
-
- Ruby or LGPLv3+
|
40
|
-
- :who: DavidS
|
41
|
-
:why: standard license
|
42
|
-
:versions: []
|
43
|
-
:when: 2017-07-28 11:18:47.915684798 Z
|
44
|
-
- - :license
|
45
|
-
- bundler
|
46
|
-
- MIT
|
47
|
-
- :who: DavidS
|
48
|
-
:why: See https://rubygems.org/gems/bundler
|
49
|
-
:versions: []
|
50
|
-
:when: 2017-07-28 11:22:12.975947786 Z
|
51
|
-
- - :license
|
52
|
-
- minitar
|
53
|
-
- ruby
|
54
|
-
- :who: DavidS
|
55
|
-
:why: https://rubygems.org/gems/minitar
|
56
|
-
:versions: []
|
57
|
-
:when: 2017-07-28 11:22:50.609762862 Z
|
58
|
-
- - :license
|
59
|
-
- colored
|
60
|
-
- MIT
|
61
|
-
- :who: DavidS
|
62
|
-
:why: https://github.com/defunkt/colored/blob/829bde0f8832406be1cacc5c99c49d976e05ccfc/LICENSE
|
63
|
-
:versions: []
|
64
|
-
:when: 2017-07-28 11:23:25.554994001 Z
|
65
|
-
- - :permit
|
66
|
-
- ISC
|
67
|
-
- :who: scotje
|
68
|
-
:why: MIT equivalent
|
69
|
-
:versions: []
|
70
|
-
:when: 2017-08-11 01:30:32.594531000 Z
|
71
|
-
- - :license
|
72
|
-
- facter
|
73
|
-
- Apache 2.0
|
74
|
-
- :who: DavidS
|
75
|
-
:why: https://github.com/puppetlabs/facter/blob/d6e1d4bcb087683239ff5ee6bd72978d262b9c39/LICENSE
|
76
|
-
:versions: []
|
77
|
-
:when: 2017-08-31 13:26:57.197893553 Z
|
78
|
-
- - :license
|
79
|
-
- codecov
|
80
|
-
- MIT
|
81
|
-
- :who: DavidS
|
82
|
-
:why: https://github.com/codecov/codecov-ruby/blob/d5f85a0ece83845a577e26f8ce735ae10de767c0/LICENSE.txt
|
83
|
-
:versions: []
|
84
|
-
:when: 2017-10-11 12:15:00.000000000 Z
|
85
|
-
- - :license
|
86
|
-
- blankslate
|
87
|
-
- MIT
|
88
|
-
- :who: DavidS
|
89
|
-
:why: https://github.com/masover/blankslate/blob/f0a73b80c34bc3ad94dc3195d12a227a8fe30019/MIT-LICENSE
|
90
|
-
:versions: []
|
91
|
-
:when: 2017-11-17 14:05:09.534340925 Z
|
92
|
-
- - :license
|
93
|
-
- puppetlabs_spec_helper
|
94
|
-
- Apache 2.0
|
95
|
-
- :who: DavidS
|
96
|
-
:why:
|
97
|
-
:versions: []
|
98
|
-
:when: 2018-03-09 18:04:29.175843919 Z
|
data/.fixtures.yml
DELETED
@@ -1,8 +0,0 @@
|
|
1
|
-
# This file can be used to install module depdencies for unit testing
|
2
|
-
# See https://github.com/puppetlabs/puppetlabs_spec_helper#using-fixtures for details
|
3
|
-
---
|
4
|
-
fixtures:
|
5
|
-
forge_modules:
|
6
|
-
# stdlib: "puppetlabs/stdlib"
|
7
|
-
symlinks:
|
8
|
-
test_module: "#{source_dir}/spec/fixtures/test_module"
|
data/.github/dependabot.yml
DELETED
data/.gitignore
DELETED
data/.rspec
DELETED
data/.rubocop.yml
DELETED
@@ -1,159 +0,0 @@
|
|
1
|
-
---
|
2
|
-
require: rubocop-rspec
|
3
|
-
AllCops:
|
4
|
-
TargetRubyVersion: '2.5'
|
5
|
-
Include:
|
6
|
-
- "**/*.rb"
|
7
|
-
Exclude:
|
8
|
-
- bin/*
|
9
|
-
- ".vendor/**/*"
|
10
|
-
- Gemfile
|
11
|
-
- Rakefile
|
12
|
-
- pkg/**/*
|
13
|
-
- spec/fixtures/**/*
|
14
|
-
- vendor/**/*
|
15
|
-
Metrics/LineLength:
|
16
|
-
Description: People have wide screens, use them.
|
17
|
-
Max: 200
|
18
|
-
RSpec/BeforeAfterAll:
|
19
|
-
Description: Beware of using after(:all) as it may cause state to leak between tests.
|
20
|
-
A necessary evil in acceptance testing.
|
21
|
-
Exclude:
|
22
|
-
- spec/acceptance/**/*.rb
|
23
|
-
RSpec/HookArgument:
|
24
|
-
Description: Prefer explicit :each argument, matching existing module's style
|
25
|
-
EnforcedStyle: each
|
26
|
-
RSpec/SubjectStub:
|
27
|
-
Exclude:
|
28
|
-
- 'spec/puppet/resource_api/base_context_spec.rb'
|
29
|
-
Style/BlockDelimiters:
|
30
|
-
Description: Prefer braces for chaining. Mostly an aesthetical choice. Better to
|
31
|
-
be consistent then.
|
32
|
-
EnforcedStyle: braces_for_chaining
|
33
|
-
Style/ClassAndModuleChildren:
|
34
|
-
Description: Compact style reduces the required amount of indentation.
|
35
|
-
EnforcedStyle: compact
|
36
|
-
# this needs to be easily usable in the gemspec
|
37
|
-
Exclude:
|
38
|
-
- 'lib/puppet/resource_api/version.rb'
|
39
|
-
Style/EmptyElse:
|
40
|
-
Description: Enforce against empty else clauses, but allow `nil` for clarity.
|
41
|
-
EnforcedStyle: empty
|
42
|
-
Style/FormatString:
|
43
|
-
Description: Following the main puppet project's style, prefer the % format format.
|
44
|
-
EnforcedStyle: percent
|
45
|
-
Style/FormatStringToken:
|
46
|
-
Description: Following the main puppet project's style, prefer the simpler template
|
47
|
-
tokens over annotated ones.
|
48
|
-
EnforcedStyle: template
|
49
|
-
Style/Lambda:
|
50
|
-
Description: Prefer the keyword for easier discoverability.
|
51
|
-
EnforcedStyle: literal
|
52
|
-
Style/RegexpLiteral:
|
53
|
-
Description: Community preference. See https://github.com/voxpupuli/modulesync_config/issues/168
|
54
|
-
EnforcedStyle: percent_r
|
55
|
-
Style/TernaryParentheses:
|
56
|
-
Description: Checks for use of parentheses around ternary conditions. Enforce parentheses
|
57
|
-
on complex expressions for better readability, but seriously consider breaking
|
58
|
-
it up.
|
59
|
-
EnforcedStyle: require_parentheses_when_complex
|
60
|
-
Style/TrailingCommaInArguments:
|
61
|
-
Description: Prefer always trailing comma on multiline argument lists. This makes
|
62
|
-
diffs, and re-ordering nicer.
|
63
|
-
EnforcedStyleForMultiline: comma
|
64
|
-
Style/SymbolArray:
|
65
|
-
Description: Using percent style obscures symbolic intent of array's contents.
|
66
|
-
EnforcedStyle: brackets
|
67
|
-
Layout/EndOfLine:
|
68
|
-
Enabled: false
|
69
|
-
Style/CollectionMethods:
|
70
|
-
Enabled: true
|
71
|
-
Style/MethodCalledOnDoEndBlock:
|
72
|
-
Enabled: true
|
73
|
-
Style/StringMethods:
|
74
|
-
Enabled: true
|
75
|
-
Metrics/AbcSize:
|
76
|
-
Enabled: false
|
77
|
-
Metrics/BlockLength:
|
78
|
-
Enabled: false
|
79
|
-
Metrics/ClassLength:
|
80
|
-
Enabled: false
|
81
|
-
Metrics/CyclomaticComplexity:
|
82
|
-
Enabled: false
|
83
|
-
Metrics/MethodLength:
|
84
|
-
Enabled: false
|
85
|
-
Metrics/ModuleLength:
|
86
|
-
Enabled: false
|
87
|
-
Metrics/ParameterLists:
|
88
|
-
Enabled: false
|
89
|
-
Metrics/PerceivedComplexity:
|
90
|
-
Enabled: false
|
91
|
-
RSpec/DescribeClass:
|
92
|
-
Enabled: false
|
93
|
-
RSpec/ExampleLength:
|
94
|
-
Enabled: false
|
95
|
-
RSpec/MessageExpectation:
|
96
|
-
Enabled: false
|
97
|
-
RSpec/MultipleExpectations:
|
98
|
-
Enabled: false
|
99
|
-
RSpec/NestedGroups:
|
100
|
-
Enabled: false
|
101
|
-
Style/AsciiComments:
|
102
|
-
Enabled: false
|
103
|
-
Style/IfUnlessModifier:
|
104
|
-
Enabled: false
|
105
|
-
Style/SymbolProc:
|
106
|
-
Enabled: false
|
107
|
-
|
108
|
-
# local overrides
|
109
|
-
|
110
|
-
# overridden for local conventions
|
111
|
-
Naming/FileName:
|
112
|
-
Exclude:
|
113
|
-
- 'puppet-resource_api.gemspec'
|
114
|
-
|
115
|
-
# metaprogramming makes everything "fun"
|
116
|
-
Lint/NestedMethodDefinition:
|
117
|
-
Exclude:
|
118
|
-
- 'lib/puppet/resource_api.rb'
|
119
|
-
|
120
|
-
# Interacting with external API makes message spies pretty useless
|
121
|
-
RSpec/MessageSpies:
|
122
|
-
Enabled: false
|
123
|
-
|
124
|
-
# If neighbouring parameters are both hashes, it helps to have braces round both.
|
125
|
-
Style/BracesAroundHashParameters:
|
126
|
-
Exclude:
|
127
|
-
- 'spec/puppet/resource_api/base_context_spec.rb'
|
128
|
-
|
129
|
-
# requires 2.3's squiggly HEREDOC support, which we can't use, yet
|
130
|
-
# see http://www.virtuouscode.com/2016/01/06/about-the-ruby-squiggly-heredoc-syntax/
|
131
|
-
Layout/IndentHeredoc:
|
132
|
-
Enabled: false
|
133
|
-
|
134
|
-
# Updated in 0.53 (or thereabouts)
|
135
|
-
Style/TrailingCommaInArrayLiteral:
|
136
|
-
Description: Prefer always trailing comma on multiline literals. This makes diffs,
|
137
|
-
and re-ordering nicer.
|
138
|
-
EnforcedStyleForMultiline: comma
|
139
|
-
Style/TrailingCommaInHashLiteral:
|
140
|
-
Description: Prefer always trailing comma on multiline literals. This makes diffs,
|
141
|
-
and re-ordering nicer.
|
142
|
-
EnforcedStyleForMultiline: comma
|
143
|
-
|
144
|
-
# Add allowing "is", as it is a technical term in puppet
|
145
|
-
Naming/UncommunicativeMethodParamName:
|
146
|
-
Description: Checks for method parameter names that contain capital letters, end in
|
147
|
-
numbers, or do not meet a minimal length.
|
148
|
-
Enabled: true
|
149
|
-
MinNameLength: 3
|
150
|
-
AllowNamesEndingInNumbers: true
|
151
|
-
AllowedNames:
|
152
|
-
- io
|
153
|
-
- id
|
154
|
-
- is
|
155
|
-
ForbiddenNames: []
|
156
|
-
|
157
|
-
# This cop breaks syntax highlighting in VSCode
|
158
|
-
Layout/ClosingHeredocIndentation:
|
159
|
-
Enabled: false
|
data/.travis.yml
DELETED
@@ -1,43 +0,0 @@
|
|
1
|
-
os: linux
|
2
|
-
language: ruby
|
3
|
-
bundler_args: "--without development"
|
4
|
-
script:
|
5
|
-
- echo travis_fold:start:DEBUG
|
6
|
-
- cat Gemfile.lock
|
7
|
-
- bundle list
|
8
|
-
- echo travis_fold:end:DEBUG
|
9
|
-
- bundle exec rake $CHECK
|
10
|
-
cache: bundler
|
11
|
-
branches:
|
12
|
-
except:
|
13
|
-
- release-prep
|
14
|
-
jobs:
|
15
|
-
include:
|
16
|
-
- rvm: 2.4.3
|
17
|
-
env: PUPPET_GEM_VERSION='~> 5' SIMPLECOV=yes # 5.5
|
18
|
-
# disable coverage on jruby9k as this confuses codecov
|
19
|
-
- env: RVM="jruby-9.1.9.0" PUPPET_GEM_VERSION='~> 5' JRUBY_OPTS="--debug"
|
20
|
-
dist: trusty
|
21
|
-
before_cache: pushd ~/.rvm && rm -rf archives rubies/ruby-2.2.7 rubies/ruby-2.3.4 && popd
|
22
|
-
cache:
|
23
|
-
bundler: false
|
24
|
-
directories: [~/.rvm]
|
25
|
-
before_install: rvm use jruby-9.1.9.0 --install --binary --fuzzy
|
26
|
-
- rvm: 2.5.1
|
27
|
-
env: CHECK=rubocop
|
28
|
-
- rvm: 2.5.1
|
29
|
-
env: CHECK=license_finder
|
30
|
-
bundler_args: ""
|
31
|
-
- rvm: 2.5.7
|
32
|
-
env: PUPPET_GEM_VERSION='~> 6' SIMPLECOV=yes # latest 6 release
|
33
|
-
- rvm: 2.5.7
|
34
|
-
env: PUPPET_GEM_VERSION='~> 6.14.0'
|
35
|
-
- rvm: 2.5.7
|
36
|
-
env: PUPPET_GEM_VERSION='https://github.com/puppetlabs/puppet.git#main'
|
37
|
-
- rvm: 2.7
|
38
|
-
env: PUPPET_GEM_VERSION='https://github.com/puppetlabs/puppet.git#main'
|
39
|
-
- rvm: 2.4.3
|
40
|
-
env: PUPPET_GEM_VERSION='https://github.com/puppetlabs/puppet.git#5.5.x'
|
41
|
-
notifications:
|
42
|
-
slack:
|
43
|
-
secure: aPXZYNow8LsmmlS8PQU3FjL0bc7FqUUA95d++wZfIu7YAjGboIUiekxYouQ0XnY+Aig8InvbTOIgBHgGNheyr/YFbFS90/jtulbF8oW7BitW+imgjeAHDCwlQZTCc4FFYde/2pI7QTT8H5NpLR9mKxlTU77Sqr8gFAIybuPdHcKMYQZdEZS07ma2pUp7+GyKS6PDQpzW2+mDCz/wfi3/JdsUvc0mclCZ8vxySc66j5P1E6nFDMzuakBOjwJHpgeDpreapbmSUQLAX0a3ZsFP+N+SNduLotlV2BWnJK2gcO6rGFP4Fz1D0bGXuBnYYdIiB+9OgI3wtXg9y1SifNHUG3IrOBAA8CGNyrebTGKtH0TS2O+HZLbaNX2g6udD5e3156vys9wScmJuQ/rSkVtQfXf1qUm5eijvlXI+DIbssbZHqm6QQGyM4p3NoULmNmF1C85bQoZ4GF7b1P/8mstsVE/HUfnzRPNbwD0r6j1aE/ck3PKMi7ZAhIi0Ja9RnAgP3wi0t62uERYcJGGYEycWohMWnrf2w6GFwGeuoiwAkASdHOLX0/AOMPc4mBOjlc621o8uYMrrZqfF5CrOAvJ151USSsWn2AhXaibIvnHo6X91paNvvNpU/GYu3CUAl6q8OhYovvjtRVPVnhs2DrpgoRB+6NWHnzjRG/wr6Z9U+vA=
|
data/CODEOWNERS
DELETED