aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGheorghe Popescu <gheorghe.popescu@puppet.com>2021-02-23 11:28:37 +0200
committerGitHub <noreply@github.com>2021-02-23 11:28:37 +0200
commitcb37f1f5a405923a3a98ee92b173384a0cf182c9 (patch)
tree010e0198e5fa38a6f888b45cb842d879094ada3d
parent5b1e7bda012d339e4fc830274569a52a9b71a8de (diff)
parent44be62fc43407528d5873cdee1559c55a373257b (diff)
downloadpuppet-augeas_core-cb37f1f5a405923a3a98ee92b173384a0cf182c9.tar.gz
puppet-augeas_core-cb37f1f5a405923a3a98ee92b173384a0cf182c9.tar.bz2
Merge pull request #37 from GabrielNagy/MODULES-10950/fix-augeas-loadpath
-rw-r--r--lib/puppet/provider/augeas/augeas.rb2
-rw-r--r--metadata.json26
-rw-r--r--spec/unit/provider/augeas/augeas_spec.rb4
3 files changed, 21 insertions, 11 deletions
diff --git a/lib/puppet/provider/augeas/augeas.rb b/lib/puppet/provider/augeas/augeas.rb
index c8f9643..b0a3e4f 100644
--- a/lib/puppet/provider/augeas/augeas.rb
+++ b/lib/puppet/provider/augeas/augeas.rb
@@ -367,7 +367,7 @@ Puppet::Type.type(:augeas).provide(:augeas) do
load_path.flatten!
end
- if Puppet::Application.name == :agent
+ if Puppet.run_mode.name == :agent
if Puppet::FileSystem.exist?("#{Puppet[:libdir]}/augeas/lenses")
load_path << "#{Puppet[:libdir]}/augeas/lenses"
end
diff --git a/metadata.json b/metadata.json
index 47b9e66..6e47c12 100644
--- a/metadata.json
+++ b/metadata.json
@@ -14,50 +14,60 @@
{
"operatingsystem": "CentOS",
"operatingsystemrelease": [
- "7"
+ "7",
+ "8"
]
},
{
"operatingsystem": "OracleLinux",
"operatingsystemrelease": [
- "7"
+ "7",
+ "8"
]
},
{
"operatingsystem": "RedHat",
"operatingsystemrelease": [
- "7"
+ "7",
+ "8"
]
},
{
"operatingsystem": "Scientific",
"operatingsystemrelease": [
- "7"
+ "7",
+ "8"
]
},
{
"operatingsystem": "Debian",
"operatingsystemrelease": [
- "8"
+ "8",
+ "9",
+ "10"
]
},
{
"operatingsystem": "Ubuntu",
"operatingsystemrelease": [
- "16.04"
+ "16.04",
+ "18.04",
+ "20.04"
]
},
{
"operatingsystem": "Fedora",
"operatingsystemrelease": [
- "25"
+ "30",
+ "31",
+ "32"
]
}
],
"requirements": [
{
"name": "puppet",
- "version_requirement": ">= 6.0.0 < 7.0.0"
+ "version_requirement": ">= 6.0.0 < 8.0.0"
}
],
"pdk-version": "1.14.0",
diff --git a/spec/unit/provider/augeas/augeas_spec.rb b/spec/unit/provider/augeas/augeas_spec.rb
index 2d53933..f98a0f4 100644
--- a/spec/unit/provider/augeas/augeas_spec.rb
+++ b/spec/unit/provider/augeas/augeas_spec.rb
@@ -1124,7 +1124,7 @@ describe Puppet::Type.type(:augeas).provider(:augeas) do
context 'when running application is agent' do
before(:each) do
Puppet[:libdir] = my_fixture_dir
- Puppet::Application.stubs(:name).returns(:agent)
+ Puppet.run_mode.stubs(:name).returns(:agent)
end
it 'offers pluginsync augeas/lenses subdir' do
@@ -1139,7 +1139,7 @@ describe Puppet::Type.type(:augeas).provider(:augeas) do
context 'when running application is not agent' do
before(:each) do
- Puppet::Application.stubs(:name).returns(:apply)
+ Puppet.run_mode.stubs(:name).returns(:user)
env = Puppet::Node::Environment.create('root', ['/modules/foobar'])
Puppet.stubs(:lookup).returns(env)