Skip to content

Commit cb37f1f

Browse files
authored
Merge pull request #37 from GabrielNagy/MODULES-10950/fix-augeas-loadpath
2 parents 5b1e7bd + 44be62f commit cb37f1f

File tree

3 files changed

+21
-11
lines changed

3 files changed

+21
-11
lines changed

lib/puppet/provider/augeas/augeas.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ def get_load_path(resource)
367367
load_path.flatten!
368368
end
369369

370-
if Puppet::Application.name == :agent
370+
if Puppet.run_mode.name == :agent
371371
if Puppet::FileSystem.exist?("#{Puppet[:libdir]}/augeas/lenses")
372372
load_path << "#{Puppet[:libdir]}/augeas/lenses"
373373
end

metadata.json

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,50 +14,60 @@
1414
{
1515
"operatingsystem": "CentOS",
1616
"operatingsystemrelease": [
17-
"7"
17+
"7",
18+
"8"
1819
]
1920
},
2021
{
2122
"operatingsystem": "OracleLinux",
2223
"operatingsystemrelease": [
23-
"7"
24+
"7",
25+
"8"
2426
]
2527
},
2628
{
2729
"operatingsystem": "RedHat",
2830
"operatingsystemrelease": [
29-
"7"
31+
"7",
32+
"8"
3033
]
3134
},
3235
{
3336
"operatingsystem": "Scientific",
3437
"operatingsystemrelease": [
35-
"7"
38+
"7",
39+
"8"
3640
]
3741
},
3842
{
3943
"operatingsystem": "Debian",
4044
"operatingsystemrelease": [
41-
"8"
45+
"8",
46+
"9",
47+
"10"
4248
]
4349
},
4450
{
4551
"operatingsystem": "Ubuntu",
4652
"operatingsystemrelease": [
47-
"16.04"
53+
"16.04",
54+
"18.04",
55+
"20.04"
4856
]
4957
},
5058
{
5159
"operatingsystem": "Fedora",
5260
"operatingsystemrelease": [
53-
"25"
61+
"30",
62+
"31",
63+
"32"
5464
]
5565
}
5666
],
5767
"requirements": [
5868
{
5969
"name": "puppet",
60-
"version_requirement": ">= 6.0.0 < 7.0.0"
70+
"version_requirement": ">= 6.0.0 < 8.0.0"
6171
}
6272
],
6373
"pdk-version": "1.14.0",

spec/unit/provider/augeas/augeas_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,7 +1124,7 @@ def make_tmpname((prefix, suffix), n)
11241124
context 'when running application is agent' do
11251125
before(:each) do
11261126
Puppet[:libdir] = my_fixture_dir
1127-
Puppet::Application.stubs(:name).returns(:agent)
1127+
Puppet.run_mode.stubs(:name).returns(:agent)
11281128
end
11291129

11301130
it 'offers pluginsync augeas/lenses subdir' do
@@ -1139,7 +1139,7 @@ def make_tmpname((prefix, suffix), n)
11391139

11401140
context 'when running application is not agent' do
11411141
before(:each) do
1142-
Puppet::Application.stubs(:name).returns(:apply)
1142+
Puppet.run_mode.stubs(:name).returns(:user)
11431143

11441144
env = Puppet::Node::Environment.create('root', ['/modules/foobar'])
11451145
Puppet.stubs(:lookup).returns(env)

0 commit comments

Comments
 (0)