puppet-resource_api 1.8.14 → 1.9.0
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 +4 -4
- data/CHANGELOG.md +44 -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/type_definition.rb +1 -1
- data/lib/puppet/resource_api/version.rb +1 -1
- data/lib/puppet/resource_api.rb +21 -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: 1e25dec4ab50e8a0f4bb3bb3979c13df63857a092b5c9a7a1ef9f71f85c7f518
|
4
|
+
data.tar.gz: 01b32be4792de2f82eb78b91066a6f2bb740b49a620a92f50653fe9031e10026
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9845b10a4d1997ebfda6094c3a61012a4b55659b4870e966ca516b03c52e47a20b061bd47581ca0e67bb4976f797d6b271634ff761743c5b842f718fa26f630
|
7
|
+
data.tar.gz: 8387c57e4a46044c6fe301275b41856d1ce87ab0219b62bdfb5c6622593f5bfdc582ebf35cda2dfb0c2f4bb36f1b9b0075604a2baae5d53a33e14aac89c16d7d
|
data/CHANGELOG.md
CHANGED
@@ -3,9 +3,50 @@
|
|
3
3
|
All significant changes to this repo will be summarized in this file.
|
4
4
|
|
5
5
|
|
6
|
-
## [
|
6
|
+
## [1.9.0](https://github.com/puppetlabs/puppet-resource_api/tree/1.9.0) (2023-08-08)
|
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.18...1.9.0)
|
9
|
+
|
10
|
+
**Implemented enhancements:**
|
11
|
+
|
12
|
+
- \(CAT-761\) Add custom\_generate as a feature [\#316](https://github.com/puppetlabs/puppet-resource_api/pull/316) ([david22swan](https://github.com/david22swan))
|
13
|
+
|
14
|
+
## [1.8.18](https://github.com/puppetlabs/puppet-resource_api/tree/1.8.18) (2023-07-21)
|
15
|
+
|
16
|
+
[Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/1.8.16...1.8.18)
|
17
|
+
|
18
|
+
**Merged pull requests:**
|
19
|
+
|
20
|
+
- \(PA-5641\) Release only to rubygems, do not bump and release [\#326](https://github.com/puppetlabs/puppet-resource_api/pull/326) ([tvpartytonight](https://github.com/tvpartytonight))
|
21
|
+
- \(PA-5641\) Prep for 1.8.18 release [\#324](https://github.com/puppetlabs/puppet-resource_api/pull/324) ([tvpartytonight](https://github.com/tvpartytonight))
|
22
|
+
- \(PA-5641\) Use new organizational token for rubygem pushing [\#323](https://github.com/puppetlabs/puppet-resource_api/pull/323) ([tvpartytonight](https://github.com/tvpartytonight))
|
23
|
+
- \(PA-5641\) prefer auto-generated GITHUB\_TOKEN [\#322](https://github.com/puppetlabs/puppet-resource_api/pull/322) ([tvpartytonight](https://github.com/tvpartytonight))
|
24
|
+
- \(PA-5641\) Add release job via PR [\#321](https://github.com/puppetlabs/puppet-resource_api/pull/321) ([tvpartytonight](https://github.com/tvpartytonight))
|
25
|
+
- \(maint\) Remove old Ruby logic from Gemfile [\#320](https://github.com/puppetlabs/puppet-resource_api/pull/320) ([mhashizume](https://github.com/mhashizume))
|
26
|
+
- \(PA-4639\) Migrate away from AppVeyor [\#319](https://github.com/puppetlabs/puppet-resource_api/pull/319) ([mhashizume](https://github.com/mhashizume))
|
27
|
+
- \(maint\) Don't require git [\#318](https://github.com/puppetlabs/puppet-resource_api/pull/318) ([joshcooper](https://github.com/joshcooper))
|
28
|
+
- \(PA-5641\) Update rspec tests with modern Ruby [\#317](https://github.com/puppetlabs/puppet-resource_api/pull/317) ([mhashizume](https://github.com/mhashizume))
|
29
|
+
- \(maint\) Update to Mend [\#311](https://github.com/puppetlabs/puppet-resource_api/pull/311) ([cthorn42](https://github.com/cthorn42))
|
30
|
+
- \(packaging\) Bump to version '1.8.17' \[no-promote\] [\#301](https://github.com/puppetlabs/puppet-resource_api/pull/301) ([tvpartytonight](https://github.com/tvpartytonight))
|
31
|
+
|
32
|
+
## [1.8.16](https://github.com/puppetlabs/puppet-resource_api/tree/1.8.16) (2022-10-03)
|
33
|
+
|
34
|
+
[Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/1.8.14...1.8.16)
|
35
|
+
|
36
|
+
**Merged pull requests:**
|
37
|
+
|
38
|
+
- \(PA-4558\) Replaces Travis CI with GitHub Actions [\#298](https://github.com/puppetlabs/puppet-resource_api/pull/298) ([mhashizume](https://github.com/mhashizume))
|
39
|
+
- Add snyk monitoring [\#297](https://github.com/puppetlabs/puppet-resource_api/pull/297) ([joshcooper](https://github.com/joshcooper))
|
40
|
+
- \(packaging\) Sets version to 1.8.15 for release [\#296](https://github.com/puppetlabs/puppet-resource_api/pull/296) ([mhashizume](https://github.com/mhashizume))
|
41
|
+
- Update CODEOWNERS [\#295](https://github.com/puppetlabs/puppet-resource_api/pull/295) ([binford2k](https://github.com/binford2k))
|
42
|
+
- Add array support to autorequire variable expansion [\#294](https://github.com/puppetlabs/puppet-resource_api/pull/294) ([seanmil](https://github.com/seanmil))
|
43
|
+
- \(GH-231\) Add default to transport attributes [\#293](https://github.com/puppetlabs/puppet-resource_api/pull/293) ([seanmil](https://github.com/seanmil))
|
44
|
+
- Support ensure parameter with Optional data type [\#292](https://github.com/puppetlabs/puppet-resource_api/pull/292) ([seanmil](https://github.com/seanmil))
|
45
|
+
- Only ship needed files [\#289](https://github.com/puppetlabs/puppet-resource_api/pull/289) ([ekohl](https://github.com/ekohl))
|
46
|
+
|
47
|
+
## [1.8.14](https://github.com/puppetlabs/puppet-resource_api/tree/1.8.14) (2021-06-09)
|
48
|
+
|
49
|
+
[Full Changelog](https://github.com/puppetlabs/puppet-resource_api/compare/1.8.13...1.8.14)
|
9
50
|
|
10
51
|
**Implemented enhancements:**
|
11
52
|
|
@@ -32,7 +73,7 @@ All significant changes to this repo will be summarized in this file.
|
|
32
73
|
- Language correction [\#270](https://github.com/puppetlabs/puppet-resource_api/pull/270) ([epackorigan](https://github.com/epackorigan))
|
33
74
|
- \(maint\) Update CHANGELOG [\#268](https://github.com/puppetlabs/puppet-resource_api/pull/268) ([DavidS](https://github.com/DavidS))
|
34
75
|
- \(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) ([
|
76
|
+
- \(maint\) Mock Hocon.load\(...\) [\#263](https://github.com/puppetlabs/puppet-resource_api/pull/263) ([BogdanIrimie](https://github.com/BogdanIrimie))
|
36
77
|
- 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
78
|
- \(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
79
|
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
# Puppet::ResourceApi [](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
|
@@ -36,7 +36,7 @@ module Puppet::ResourceApi
|
|
36
36
|
Puppet::ResourceApi::DataTypeHandling.validate_ensure(definition)
|
37
37
|
|
38
38
|
definition[:features] ||= []
|
39
|
-
supported_features = %w[supports_noop canonicalize custom_insync remote_resource simple_get_filter].freeze
|
39
|
+
supported_features = %w[supports_noop canonicalize custom_insync remote_resource simple_get_filter custom_generate].freeze
|
40
40
|
unknown_features = definition[:features] - supported_features
|
41
41
|
Puppet.warning("Unknown feature detected: #{unknown_features.inspect}") unless unknown_features.empty?
|
42
42
|
end
|
data/lib/puppet/resource_api.rb
CHANGED
@@ -136,6 +136,23 @@ module Puppet::ResourceApi
|
|
136
136
|
@rsapi_canonicalized_target_state
|
137
137
|
end
|
138
138
|
|
139
|
+
# Method is used to custom generate resources which are then applied by Puppet
|
140
|
+
def generate
|
141
|
+
# If feature `custom_generate` has been set then call the generate function within the provider and return the given results
|
142
|
+
return unless type_definition&.feature?('custom_generate')
|
143
|
+
should_hash = rsapi_canonicalized_target_state
|
144
|
+
is_hash = rsapi_current_state
|
145
|
+
title = rsapi_title
|
146
|
+
|
147
|
+
# Ensure that a custom `generate` method has been created within the provider
|
148
|
+
raise(Puppet::DevError, 'No generate method found within the types provider') unless my_provider.respond_to?(:generate)
|
149
|
+
# Call the providers custom `generate` method
|
150
|
+
rules_resources = my_provider.generate(context, title, is_hash, should_hash)
|
151
|
+
|
152
|
+
# Return array of resources
|
153
|
+
rules_resources
|
154
|
+
end
|
155
|
+
|
139
156
|
def rsapi_current_state
|
140
157
|
refresh_current_state unless @rsapi_current_state
|
141
158
|
@rsapi_current_state
|
@@ -456,7 +473,7 @@ MESSAGE
|
|
456
473
|
definition[auto].each do |type, values|
|
457
474
|
Puppet.debug("Registering #{auto} for #{type}: #{values.inspect}")
|
458
475
|
send(auto, type.downcase.to_sym) do
|
459
|
-
[values].flatten.map do |v|
|
476
|
+
resolved = [values].flatten.map do |v|
|
460
477
|
match = %r{\A\$(.*)\Z}.match(v) if v.is_a? String
|
461
478
|
if match.nil?
|
462
479
|
v
|
@@ -464,6 +481,9 @@ MESSAGE
|
|
464
481
|
self[match[1].to_sym]
|
465
482
|
end
|
466
483
|
end
|
484
|
+
# Flatten to handle any resolved array properties and filter any nil
|
485
|
+
# values resulting from unspecified optional parameters:
|
486
|
+
resolved.flatten.reject { |v| v.nil? }
|
467
487
|
end
|
468
488
|
end
|
469
489
|
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.
|
4
|
+
version: 1.9.0
|
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-08-11 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
|