puppet 7.8.0-x64-mingw32 → 7.9.0-x64-mingw32
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of puppet might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CONTRIBUTING.md +5 -5
- data/Gemfile.lock +9 -9
- data/README.md +4 -4
- data/ext/project_data.yaml +1 -0
- data/install.rb +0 -4
- data/lib/puppet.rb +3 -3
- data/lib/puppet/application/filebucket.rb +1 -0
- data/lib/puppet/application/resource.rb +15 -2
- data/lib/puppet/application/ssl.rb +1 -0
- data/lib/puppet/defaults.rb +7 -0
- data/lib/puppet/environments.rb +10 -0
- data/lib/puppet/face/help/action.erb +1 -0
- data/lib/puppet/face/help/face.erb +1 -0
- data/lib/puppet/face/node/clean.rb +1 -1
- data/lib/puppet/file_system/file_impl.rb +1 -1
- data/lib/puppet/file_system/windows.rb +2 -2
- data/lib/puppet/forge.rb +3 -3
- data/lib/puppet/forge/cache.rb +1 -1
- data/lib/puppet/functions/empty.rb +8 -0
- data/lib/puppet/functions/strftime.rb +1 -0
- data/lib/puppet/functions/unwrap.rb +17 -2
- data/lib/puppet/indirector/resource/ral.rb +6 -1
- data/lib/puppet/interface/documentation.rb +1 -0
- data/lib/puppet/module_tool/applications/installer.rb +4 -0
- data/lib/puppet/module_tool/errors/shared.rb +17 -0
- data/lib/puppet/module_tool/tar/mini.rb +1 -1
- data/lib/puppet/pops/types/type_mismatch_describer.rb +1 -1
- data/lib/puppet/provider/exec/posix.rb +16 -4
- data/lib/puppet/provider/package/pip.rb +15 -3
- data/lib/puppet/provider/package/windows.rb +14 -1
- data/lib/puppet/provider/package/windows/exe_package.rb +30 -1
- data/lib/puppet/provider/package/windows/package.rb +2 -1
- data/lib/puppet/provider/parsedfile.rb +3 -0
- data/lib/puppet/resource/type_collection.rb +2 -0
- data/lib/puppet/settings.rb +30 -7
- data/lib/puppet/settings/config_file.rb +1 -8
- data/lib/puppet/settings/value_translator.rb +0 -1
- data/lib/puppet/type/exec.rb +16 -3
- data/lib/puppet/type/file/mode.rb +6 -0
- data/lib/puppet/type/tidy.rb +1 -1
- data/lib/puppet/type/user.rb +1 -1
- data/lib/puppet/util/monkey_patches.rb +2 -17
- data/lib/puppet/util/symbolic_file_mode.rb +29 -17
- data/lib/puppet/util/windows/sid.rb +3 -1
- data/lib/puppet/version.rb +1 -1
- data/lib/puppet/x509/cert_provider.rb +3 -21
- data/locales/puppet.pot +207 -171
- data/man/man5/puppet.conf.5 +2 -2
- data/man/man8/puppet-agent.8 +1 -1
- data/man/man8/puppet-apply.8 +1 -1
- data/man/man8/puppet-catalog.8 +9 -9
- data/man/man8/puppet-config.8 +1 -1
- data/man/man8/puppet-describe.8 +1 -1
- data/man/man8/puppet-device.8 +1 -1
- data/man/man8/puppet-doc.8 +1 -1
- data/man/man8/puppet-epp.8 +1 -1
- data/man/man8/puppet-facts.8 +7 -7
- data/man/man8/puppet-filebucket.8 +1 -1
- data/man/man8/puppet-generate.8 +1 -1
- data/man/man8/puppet-help.8 +1 -1
- data/man/man8/puppet-lookup.8 +1 -1
- data/man/man8/puppet-module.8 +1 -1
- data/man/man8/puppet-node.8 +5 -5
- data/man/man8/puppet-parser.8 +1 -1
- data/man/man8/puppet-plugin.8 +1 -1
- data/man/man8/puppet-report.8 +5 -5
- data/man/man8/puppet-resource.8 +1 -1
- data/man/man8/puppet-script.8 +1 -1
- data/man/man8/puppet-ssl.8 +1 -1
- data/man/man8/puppet.8 +2 -2
- data/spec/fixtures/ssl/127.0.0.1-key.pem +106 -106
- data/spec/fixtures/ssl/127.0.0.1.pem +48 -48
- data/spec/fixtures/ssl/bad-basic-constraints.pem +54 -54
- data/spec/fixtures/ssl/bad-int-basic-constraints.pem +51 -51
- data/spec/fixtures/ssl/ca.pem +52 -52
- data/spec/fixtures/ssl/crl.pem +25 -25
- data/spec/fixtures/ssl/ec-key-openssl.pem +8 -0
- data/spec/fixtures/ssl/ec-key-pk8.pem +5 -0
- data/spec/fixtures/ssl/ec-key.pem +11 -11
- data/spec/fixtures/ssl/ec.pem +32 -32
- data/spec/fixtures/ssl/encrypted-ec-key.pem +12 -12
- data/spec/fixtures/ssl/encrypted-key.pem +107 -107
- data/spec/fixtures/ssl/intermediate-agent-crl.pem +25 -25
- data/spec/fixtures/ssl/intermediate-agent.pem +54 -54
- data/spec/fixtures/ssl/intermediate-crl.pem +28 -28
- data/spec/fixtures/ssl/intermediate.pem +51 -51
- data/spec/fixtures/ssl/oid-key.pem +117 -0
- data/spec/fixtures/ssl/oid.pem +69 -0
- data/spec/fixtures/ssl/pluto-key.pem +106 -106
- data/spec/fixtures/ssl/pluto.pem +50 -50
- data/spec/fixtures/ssl/request-key.pem +106 -106
- data/spec/fixtures/ssl/request.pem +45 -45
- data/spec/fixtures/ssl/revoked-key.pem +106 -106
- data/spec/fixtures/ssl/revoked.pem +49 -49
- data/spec/fixtures/ssl/signed-key.pem +106 -106
- data/spec/fixtures/ssl/signed.pem +47 -47
- data/spec/fixtures/ssl/tampered-cert.pem +49 -49
- data/spec/fixtures/ssl/tampered-csr.pem +45 -45
- data/spec/fixtures/ssl/trusted_oid_mapping.yaml +5 -0
- data/spec/fixtures/ssl/unknown-127.0.0.1-key.pem +106 -106
- data/spec/fixtures/ssl/unknown-127.0.0.1.pem +48 -48
- data/spec/fixtures/ssl/unknown-ca-key.pem +106 -106
- data/spec/fixtures/ssl/unknown-ca.pem +52 -52
- data/spec/integration/application/filebucket_spec.rb +11 -0
- data/spec/integration/application/module_spec.rb +21 -0
- data/spec/integration/application/resource_spec.rb +35 -1
- data/spec/integration/application/ssl_spec.rb +20 -0
- data/spec/integration/defaults_spec.rb +5 -0
- data/spec/integration/environments/settings_interpolation_spec.rb +0 -4
- data/spec/integration/indirector/facts/facter_spec.rb +90 -36
- data/spec/integration/type/exec_spec.rb +70 -45
- data/spec/lib/puppet/test_ca.rb +5 -0
- data/spec/lib/puppet_spec/settings.rb +1 -0
- data/spec/unit/environments_spec.rb +35 -0
- data/spec/unit/file_system_spec.rb +6 -0
- data/spec/unit/functions/assert_type_spec.rb +1 -1
- data/spec/unit/functions/empty_spec.rb +10 -0
- data/spec/unit/functions/lookup_spec.rb +23 -0
- data/spec/unit/functions/unwrap_spec.rb +8 -0
- data/spec/unit/functions4_spec.rb +2 -2
- data/spec/unit/indirector/resource/ral_spec.rb +40 -75
- data/spec/unit/module_tool/applications/installer_spec.rb +13 -2
- data/spec/unit/parser/compiler_spec.rb +29 -0
- data/spec/unit/parser/templatewrapper_spec.rb +12 -2
- data/spec/unit/pops/loaders/dependency_loader_spec.rb +0 -9
- data/spec/unit/pops/parser/lexer2_spec.rb +0 -4
- data/spec/unit/provider/package/pip_spec.rb +37 -0
- data/spec/unit/provider/package/windows/exe_package_spec.rb +17 -0
- data/spec/unit/provider/parsedfile_spec.rb +10 -0
- data/spec/unit/resource/type_collection_spec.rb +16 -0
- data/spec/unit/resource/type_spec.rb +2 -2
- data/spec/unit/settings/config_file_spec.rb +1 -11
- data/spec/unit/settings/value_translator_spec.rb +4 -5
- data/spec/unit/settings_spec.rb +120 -79
- data/spec/unit/ssl/ssl_provider_spec.rb +18 -16
- data/spec/unit/type/exec_spec.rb +76 -29
- data/spec/unit/type/file/source_spec.rb +4 -4
- data/spec/unit/type/tidy_spec.rb +7 -0
- data/spec/unit/util/ldap/connection_spec.rb +10 -10
- data/spec/unit/util/ldap/manager_spec.rb +2 -2
- data/spec/unit/util/windows/sid_spec.rb +39 -4
- data/spec/unit/util_spec.rb +1 -3
- data/spec/unit/x509/cert_provider_spec.rb +9 -1
- data/tasks/generate_cert_fixtures.rake +10 -1
- metadata +16 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2cf59bc4029c396d48ca1bf738b1b9b7a13ed7e346ad8a5f359489fb655abf9b
|
4
|
+
data.tar.gz: 7de5c086f04ec28ac6eeca953e6ea90b2e7f932c948bda4e1ef407d1645b8539
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed70587fdf097e6d55e7eaf056e2b76f720acf3bc1093ab8a1c3b5b64874a6c39a0ec26de72efbe4579996180fc32f17468075cfd53ad86aba43f54b24088168
|
7
|
+
data.tar.gz: c92def9f85331047bcabffdfe57fa07fa8be458c35eb3ed0b382a0d950d87adc440e846fb4f4185c4e9e401076c1d0268de448906a42f8cc8fc84d555b9e39ef
|
data/CONTRIBUTING.md
CHANGED
@@ -38,12 +38,12 @@ the [puppet-dev mailing list](https://groups.google.com/forum/#!forum/puppet-dev
|
|
38
38
|
## Making Changes
|
39
39
|
|
40
40
|
* Create a topic branch from where you want to base your work.
|
41
|
-
* This is usually the
|
41
|
+
* This is usually the main branch.
|
42
42
|
* Only target release branches if you are certain your fix must be on that
|
43
43
|
branch.
|
44
|
-
* To quickly create a topic branch based on
|
45
|
-
fix/
|
46
|
-
`
|
44
|
+
* To quickly create a topic branch based on main, run `git checkout -b
|
45
|
+
fix/main/my_contribution main`. Please avoid working directly on the
|
46
|
+
`main` branch.
|
47
47
|
* Make commits of logical and atomic units.
|
48
48
|
* Check for unnecessary whitespace with `git diff --check` before committing.
|
49
49
|
* Make sure your commit messages are in the proper format. If the commit
|
@@ -65,7 +65,7 @@ the [puppet-dev mailing list](https://groups.google.com/forum/#!forum/puppet-dev
|
|
65
65
|
why this is a problem, and how the patch fixes the problem when applied.
|
66
66
|
```
|
67
67
|
* Make sure you have added the necessary tests for your changes.
|
68
|
-
* For details on how to run tests, please see [the quickstart guide](https://github.com/puppetlabs/puppet/blob/
|
68
|
+
* For details on how to run tests, please see [the quickstart guide](https://github.com/puppetlabs/puppet/blob/main/docs/quickstart.md)
|
69
69
|
|
70
70
|
## Writing Translatable Code
|
71
71
|
|
data/Gemfile.lock
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
GIT
|
2
2
|
remote: git://github.com/puppetlabs/packaging
|
3
|
-
revision:
|
3
|
+
revision: 4d6d51947f44bfa2fc282658836c15f69672e757
|
4
4
|
branch: 1.0.x
|
5
5
|
specs:
|
6
|
-
packaging (0.99.
|
6
|
+
packaging (0.99.78.4.g4d6d519)
|
7
7
|
artifactory (~> 2)
|
8
8
|
csv (= 3.1.5)
|
9
9
|
rake (>= 12.3)
|
@@ -12,7 +12,7 @@ GIT
|
|
12
12
|
PATH
|
13
13
|
remote: .
|
14
14
|
specs:
|
15
|
-
puppet (7.
|
15
|
+
puppet (7.9.0)
|
16
16
|
CFPropertyList (~> 2.2)
|
17
17
|
concurrent-ruby (~> 1.0)
|
18
18
|
deep_merge (~> 1.0)
|
@@ -28,7 +28,7 @@ GEM
|
|
28
28
|
remote: https://artifactory.delivery.puppetlabs.net/artifactory/api/gems/rubygems/
|
29
29
|
specs:
|
30
30
|
CFPropertyList (2.3.6)
|
31
|
-
addressable (2.
|
31
|
+
addressable (2.8.0)
|
32
32
|
public_suffix (>= 2.0.2, < 5.0)
|
33
33
|
artifactory (2.8.2)
|
34
34
|
ast (2.4.2)
|
@@ -40,11 +40,11 @@ GEM
|
|
40
40
|
deep_merge (1.2.1)
|
41
41
|
diff-lcs (1.4.4)
|
42
42
|
docopt (0.6.1)
|
43
|
-
facter (4.2.
|
43
|
+
facter (4.2.2)
|
44
44
|
hocon (~> 1.3)
|
45
45
|
thor (>= 1.0.1, < 2.0)
|
46
46
|
fast_gettext (1.1.2)
|
47
|
-
ffi (1.15.
|
47
|
+
ffi (1.15.3)
|
48
48
|
gettext (3.2.9)
|
49
49
|
locale (>= 2.0.5)
|
50
50
|
text (>= 1.3.0)
|
@@ -80,14 +80,14 @@ GEM
|
|
80
80
|
public_suffix (4.0.6)
|
81
81
|
puppet-resource_api (1.8.14)
|
82
82
|
hocon (>= 1.0)
|
83
|
-
puppetserver-ca (2.
|
83
|
+
puppetserver-ca (2.2.0)
|
84
84
|
facter (>= 2.0.1, < 5)
|
85
85
|
racc (1.4.9)
|
86
86
|
rainbow (2.2.2)
|
87
87
|
rake
|
88
|
-
rake (13.0.
|
88
|
+
rake (13.0.6)
|
89
89
|
rdiscount (2.2.0.2)
|
90
|
-
rdoc (6.3.
|
90
|
+
rdoc (6.3.2)
|
91
91
|
release-metrics (1.1.0)
|
92
92
|
csv
|
93
93
|
docopt
|
data/README.md
CHANGED
@@ -33,16 +33,16 @@ see the [Quick Start to Developing on Puppet](docs/quickstart.md) guide.
|
|
33
33
|
|
34
34
|
We'd love to get contributions from you! For a quick guide to getting your
|
35
35
|
system setup for developing, take a look at our [Quickstart
|
36
|
-
Guide](https://github.com/puppetlabs/puppet/blob/
|
37
|
-
[Contribution Documents](https://github.com/puppetlabs/puppet/blob/
|
36
|
+
Guide](https://github.com/puppetlabs/puppet/blob/main/docs/quickstart.md). Once you are up and running, take a look at the
|
37
|
+
[Contribution Documents](https://github.com/puppetlabs/puppet/blob/main/CONTRIBUTING.md) to see how to get your changes merged
|
38
38
|
in.
|
39
39
|
|
40
40
|
For more complete docs on developing with Puppet, take a look at the
|
41
|
-
rest of the [developer documents](https://github.com/puppetlabs/puppet/blob/
|
41
|
+
rest of the [developer documents](https://github.com/puppetlabs/puppet/blob/main/docs/index.md).
|
42
42
|
|
43
43
|
## Licensing
|
44
44
|
|
45
|
-
See [LICENSE](https://github.com/puppetlabs/puppet/blob/
|
45
|
+
See [LICENSE](https://github.com/puppetlabs/puppet/blob/main/LICENSE) file. Puppet is licensed by Puppet, Inc. under the Apache license. Puppet, Inc. can be contacted at: info@puppet.com
|
46
46
|
|
47
47
|
## Support
|
48
48
|
|
data/ext/project_data.yaml
CHANGED
@@ -13,6 +13,7 @@ gem_files: '[A-Z]* install.rb bin lib conf man examples ext tasks spec locales'
|
|
13
13
|
gem_test_files: 'spec/**/*'
|
14
14
|
gem_executables: 'puppet'
|
15
15
|
gem_default_executables: 'puppet'
|
16
|
+
gem_license: 'Apache-2.0'
|
16
17
|
gem_forge_project: 'puppet'
|
17
18
|
gem_required_ruby_version: '>= 2.5.0'
|
18
19
|
gem_required_rubygems_version: '> 1.3.1'
|
data/install.rb
CHANGED
@@ -159,10 +159,6 @@ def prepare_installation
|
|
159
159
|
opts.on('--[no-]ri', 'Prevents the creation of RI output.', 'Default off on mswin32.') do |onri|
|
160
160
|
InstallOptions.ri = onri
|
161
161
|
end
|
162
|
-
opts.on('--[no-]tests', 'Prevents the execution of unit tests.', 'Default off.') do |ontest|
|
163
|
-
InstallOptions.tests = ontest
|
164
|
-
warn "The tests flag is no longer functional in Puppet and is deprecated as of Dec 19, 2012. It will be removed in a future version of Puppet."
|
165
|
-
end
|
166
162
|
opts.on('--[no-]configs', 'Prevents the installation of config files', 'Default off.') do |ontest|
|
167
163
|
InstallOptions.configs = ontest
|
168
164
|
end
|
data/lib/puppet.rb
CHANGED
@@ -199,9 +199,9 @@ module Puppet
|
|
199
199
|
|
200
200
|
Facter.add(:agent_specified_environment) do
|
201
201
|
setcode do
|
202
|
-
|
203
|
-
Puppet
|
204
|
-
|
202
|
+
Puppet.settings.set_by_cli(:environment) ||
|
203
|
+
Puppet.settings.set_in_section(:environment, :agent) ||
|
204
|
+
Puppet.settings.set_in_section(:environment, :main)
|
205
205
|
end
|
206
206
|
end
|
207
207
|
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
require_relative '../../puppet/application'
|
2
2
|
|
3
3
|
class Puppet::Application::Resource < Puppet::Application
|
4
|
+
environment_mode :not_required
|
4
5
|
|
5
6
|
attr_accessor :host, :extra_params
|
6
7
|
|
@@ -14,8 +15,9 @@ class Puppet::Application::Resource < Puppet::Application
|
|
14
15
|
option("--to_yaml","-y")
|
15
16
|
|
16
17
|
option("--types", "-t") do |arg|
|
18
|
+
env = Puppet.lookup(:environments).get(Puppet[:environment]) || create_default_environment
|
17
19
|
types = []
|
18
|
-
Puppet::Type.loadall
|
20
|
+
Puppet::Type.typeloader.loadall(env)
|
19
21
|
Puppet::Type.eachtype do |t|
|
20
22
|
next if t.name == :component
|
21
23
|
types << t.name.to_s
|
@@ -134,7 +136,9 @@ Copyright (c) 2011 Puppet Inc., LLC Licensed under the Apache 2.0 License
|
|
134
136
|
end
|
135
137
|
|
136
138
|
def main
|
137
|
-
|
139
|
+
# If the specified environment does not exist locally, fall back to the default (production) environment
|
140
|
+
env = Puppet.lookup(:environments).get(Puppet[:environment]) || create_default_environment
|
141
|
+
|
138
142
|
Puppet.override(:current_environment => env, :loaders => Puppet::Pops::Loaders.new(env)) do
|
139
143
|
type, name, params = parse_args(command_line.args)
|
140
144
|
|
@@ -209,6 +213,15 @@ Copyright (c) 2011 Puppet Inc., LLC Licensed under the Apache 2.0 License
|
|
209
213
|
[type, name, params]
|
210
214
|
end
|
211
215
|
|
216
|
+
def create_default_environment
|
217
|
+
Puppet.debug("Specified environment '#{Puppet[:environment]}' does not exist on the filesystem, defaulting to 'production'")
|
218
|
+
Puppet[:environment] = :production
|
219
|
+
basemodulepath = Puppet::Node::Environment.split_path(Puppet[:basemodulepath])
|
220
|
+
modulepath = Puppet[:modulepath]
|
221
|
+
modulepath = (modulepath.nil? || modulepath.empty?) ? basemodulepath : Puppet::Node::Environment.split_path(modulepath)
|
222
|
+
Puppet::Node::Environment.create(Puppet[:environment], modulepath, Puppet::Node::Environment::NO_MANIFEST)
|
223
|
+
end
|
224
|
+
|
212
225
|
def find_or_save_resources(type, name, params)
|
213
226
|
key = local_key(type, name)
|
214
227
|
|
data/lib/puppet/defaults.rb
CHANGED
@@ -478,6 +478,7 @@ module Puppet
|
|
478
478
|
},
|
479
479
|
:maximum_uid => {
|
480
480
|
:default => 4294967290,
|
481
|
+
:type => :integer,
|
481
482
|
:desc => "The maximum allowed UID. Some platforms use negative UIDs
|
482
483
|
but then ship with tools that do not know how to handle signed ints,
|
483
484
|
so the UIDs show up as huge numbers that can then not be fed back into
|
@@ -615,6 +616,7 @@ module Puppet
|
|
615
616
|
},
|
616
617
|
:http_proxy_port => {
|
617
618
|
:default => 3128,
|
619
|
+
:type => :port,
|
618
620
|
:desc => "The HTTP proxy port to use for outgoing connections",
|
619
621
|
},
|
620
622
|
:http_proxy_user => {
|
@@ -1197,6 +1199,7 @@ EOT
|
|
1197
1199
|
},
|
1198
1200
|
:keylength => {
|
1199
1201
|
:default => 4096,
|
1202
|
+
:type => :integer,
|
1200
1203
|
:desc => "The bit length of keys.",
|
1201
1204
|
},
|
1202
1205
|
:cert_inventory => {
|
@@ -2023,6 +2026,7 @@ EOT
|
|
2023
2026
|
},
|
2024
2027
|
:ldapport => {
|
2025
2028
|
:default => 389,
|
2029
|
+
:type => :port,
|
2026
2030
|
:desc => "The LDAP port.",
|
2027
2031
|
},
|
2028
2032
|
|
@@ -2106,6 +2110,7 @@ EOT
|
|
2106
2110
|
settings.define_settings(:parser,
|
2107
2111
|
:max_errors => {
|
2108
2112
|
:default => 10,
|
2113
|
+
:type => :integer,
|
2109
2114
|
:desc => <<-'EOT'
|
2110
2115
|
Sets the max number of logged/displayed parser validation errors in case
|
2111
2116
|
multiple errors have been detected. A value of 0 is the same as a value of 1; a
|
@@ -2114,6 +2119,7 @@ EOT
|
|
2114
2119
|
},
|
2115
2120
|
:max_warnings => {
|
2116
2121
|
:default => 10,
|
2122
|
+
:type => :integer,
|
2117
2123
|
:desc => <<-'EOT'
|
2118
2124
|
Sets the max number of logged/displayed parser validation warnings in
|
2119
2125
|
case multiple warnings have been detected. A value of 0 blocks logging of
|
@@ -2122,6 +2128,7 @@ EOT
|
|
2122
2128
|
},
|
2123
2129
|
:max_deprecations => {
|
2124
2130
|
:default => 10,
|
2131
|
+
:type => :integer,
|
2125
2132
|
:desc => <<-'EOT'
|
2126
2133
|
Sets the max number of logged/displayed parser validation deprecation
|
2127
2134
|
warnings in case multiple deprecation warnings have been detected. A value of 0
|
data/lib/puppet/environments.rb
CHANGED
@@ -356,6 +356,16 @@ module Puppet::Environments
|
|
356
356
|
# Evict all that have expired, in the same way as `get`
|
357
357
|
clear_all_expired
|
358
358
|
|
359
|
+
# Evict all that was removed from diks
|
360
|
+
cached_envs = @cache.keys.map!(&:to_sym)
|
361
|
+
loader_envs = @loader.list.map!(&:name)
|
362
|
+
removed_envs = cached_envs - loader_envs
|
363
|
+
|
364
|
+
removed_envs.each do |env_name|
|
365
|
+
Puppet.debug { "Environment no longer exists '#{env_name}'"}
|
366
|
+
clear(env_name)
|
367
|
+
end
|
368
|
+
|
359
369
|
@loader.list.map do |env|
|
360
370
|
name = env.name
|
361
371
|
old_entry = @cache[name]
|
@@ -54,6 +54,7 @@ undocumented option
|
|
54
54
|
end
|
55
55
|
unless action.options.empty?
|
56
56
|
action.options.sort.each do |name|
|
57
|
+
next if name == :extra
|
57
58
|
option = action.get_option name -%>
|
58
59
|
<%= " " + option.optparse.join(" | ")[0,(optionroom - 1)].ljust(optionroom) + ' - ' -%>
|
59
60
|
<% if !(option.summary) -%>
|
@@ -49,6 +49,7 @@ undocumented option
|
|
49
49
|
end
|
50
50
|
unless face.options.empty?
|
51
51
|
face.options.sort.each do |name|
|
52
|
+
next if name == :extra
|
52
53
|
option = face.get_option name -%>
|
53
54
|
<%= " " + option.optparse.join(" | ")[0,(optionroom - 1)].ljust(optionroom) + ' - ' -%>
|
54
55
|
<% if !(option.summary) -%>
|
@@ -109,8 +109,8 @@ class Puppet::FileSystem::Windows < Puppet::FileSystem::Posix
|
|
109
109
|
end
|
110
110
|
|
111
111
|
def read_preserve_line_endings(path)
|
112
|
-
contents = path.read( :mode => 'rb', :encoding =>
|
113
|
-
contents = path.read( :mode => 'rb', :encoding => Encoding::default_external) unless contents.valid_encoding?
|
112
|
+
contents = path.read( :mode => 'rb', :encoding => 'bom|utf-8')
|
113
|
+
contents = path.read( :mode => 'rb', :encoding => "bom|#{Encoding::default_external.name}") unless contents.valid_encoding?
|
114
114
|
contents = path.read unless contents.valid_encoding?
|
115
115
|
|
116
116
|
contents
|
data/lib/puppet/forge.rb
CHANGED
@@ -70,7 +70,7 @@ class Puppet::Forge < SemanticPuppet::Dependency::Source
|
|
70
70
|
uri = decode_uri(result['pagination']['next'])
|
71
71
|
matches.concat result['results']
|
72
72
|
else
|
73
|
-
raise ResponseError.new(:uri =>
|
73
|
+
raise ResponseError.new(:uri => response.url, :response => response)
|
74
74
|
end
|
75
75
|
end
|
76
76
|
|
@@ -105,7 +105,7 @@ class Puppet::Forge < SemanticPuppet::Dependency::Source
|
|
105
105
|
if response.code == 200
|
106
106
|
response = Puppet::Util::Json.load(response.body)
|
107
107
|
else
|
108
|
-
raise ResponseError.new(:uri =>
|
108
|
+
raise ResponseError.new(:uri => response.url, :response => response)
|
109
109
|
end
|
110
110
|
|
111
111
|
releases.concat(process(response['results']))
|
@@ -208,7 +208,7 @@ class Puppet::Forge < SemanticPuppet::Dependency::Source
|
|
208
208
|
response = @source.make_http_request(uri, destination)
|
209
209
|
destination.flush and destination.close
|
210
210
|
unless response.code == 200
|
211
|
-
raise Puppet::Forge::Errors::ResponseError.new(:uri =>
|
211
|
+
raise Puppet::Forge::Errors::ResponseError.new(:uri => response.url, :response => response)
|
212
212
|
end
|
213
213
|
end
|
214
214
|
|
data/lib/puppet/forge/cache.rb
CHANGED
@@ -47,7 +47,7 @@ class Puppet::Forge
|
|
47
47
|
|
48
48
|
# Return the base Pathname for all the caches.
|
49
49
|
def self.base_path
|
50
|
-
(Pathname(Puppet.settings[:module_working_dir]) + 'cache').tap do |o|
|
50
|
+
(Pathname(Puppet.settings[:module_working_dir]) + 'cache').cleanpath.tap do |o|
|
51
51
|
o.mkpath unless o.exist?
|
52
52
|
end
|
53
53
|
end
|
@@ -26,6 +26,10 @@ Puppet::Functions.create_function(:empty) do
|
|
26
26
|
param 'Collection', :coll
|
27
27
|
end
|
28
28
|
|
29
|
+
dispatch :sensitive_string_empty do
|
30
|
+
param 'Sensitive[String]', :str
|
31
|
+
end
|
32
|
+
|
29
33
|
dispatch :string_empty do
|
30
34
|
param 'String', :str
|
31
35
|
end
|
@@ -46,6 +50,10 @@ Puppet::Functions.create_function(:empty) do
|
|
46
50
|
coll.empty?
|
47
51
|
end
|
48
52
|
|
53
|
+
def sensitive_string_empty(str)
|
54
|
+
str.unwrap.empty?
|
55
|
+
end
|
56
|
+
|
49
57
|
def string_empty(str)
|
50
58
|
str.empty?
|
51
59
|
end
|
@@ -1,4 +1,5 @@
|
|
1
1
|
# Unwraps a Sensitive value and returns the wrapped object.
|
2
|
+
# Returns the Value itself, if it is not Sensitive.
|
2
3
|
#
|
3
4
|
# @example Usage of unwrap
|
4
5
|
#
|
@@ -28,12 +29,17 @@
|
|
28
29
|
# @since 4.0.0
|
29
30
|
#
|
30
31
|
Puppet::Functions.create_function(:unwrap) do
|
31
|
-
dispatch :
|
32
|
+
dispatch :from_sensitive do
|
32
33
|
param 'Sensitive', :arg
|
33
34
|
optional_block_param
|
34
35
|
end
|
35
36
|
|
36
|
-
|
37
|
+
dispatch :from_any do
|
38
|
+
param 'Any', :arg
|
39
|
+
optional_block_param
|
40
|
+
end
|
41
|
+
|
42
|
+
def from_sensitive(arg)
|
37
43
|
unwrapped = arg.unwrap
|
38
44
|
if block_given?
|
39
45
|
yield(unwrapped)
|
@@ -41,4 +47,13 @@ Puppet::Functions.create_function(:unwrap) do
|
|
41
47
|
unwrapped
|
42
48
|
end
|
43
49
|
end
|
50
|
+
|
51
|
+
def from_any(arg)
|
52
|
+
unwrapped = arg
|
53
|
+
if block_given?
|
54
|
+
yield(unwrapped)
|
55
|
+
else
|
56
|
+
unwrapped
|
57
|
+
end
|
58
|
+
end
|
44
59
|
end
|