Skip to content

Commit df8d99e

Browse files
(maint) Merge up 3bf0a59 to main
Generated by CI * commit '3bf0a595c6fb47ad7974cf564f5710762e37d06e': (PUP-11634) Rename Struct::{Group,Passwd} to Etc::{Group,Password} (PUP-11634) Call `exist?` instead of `exists?` (PUP-11634) Expect hash arguments instead of keywords
2 parents 381a3e2 + 3bf0a59 commit df8d99e

39 files changed

+162
-162
lines changed

Guardfile.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ notification(:terminal_notifier, app_name: "Puppet ::", group: `pwd`.chomp) if `
1616

1717
## Uncomment and set this to only include directories you want to watch
1818
# directories %w(app lib config test spec features) \
19-
# .select{|d| Dir.exists?(d) ? d : UI.warning("Directory #{d} does not exist")}
19+
# .select{|d| Dir.exist?(d) ? d : UI.warning("Directory #{d} does not exist")}
2020

2121
## Note: if you are using the `directories` clause above and you are not
2222
## watching the project directory ('.'), then you will want to move

acceptance/Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ group(:test) do
3030
gem "mocha", "~> 0.10.5", :require => false
3131
end
3232

33-
if File.exists? "#{__FILE__}.local"
33+
if File.exist? "#{__FILE__}.local"
3434
eval(File.read("#{__FILE__}.local"), binding)
3535
end

acceptance/tests/environment/custom_type_provider_from_same_environment.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def destroy
5353
File.unlink(@resource[:name])
5454
end
5555
def exists?
56-
File.exists?(@resource[:name])
56+
File.exist?(@resource[:name])
5757
end
5858
end
5959
PROVIDER

ext/windows/service/daemon.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def service_main(*argsv)
4848
#
4949
# Example code to register an event source;
5050
# eventlogdll = File.expand_path(File.join(basedir, 'puppet', 'ext', 'windows', 'eventlog', 'puppetres.dll'))
51-
# if (File.exists?(eventlogdll))
51+
# if (File.exist?(eventlogdll))
5252
# Win32::EventLog.add_event_source(
5353
# 'source' => "Application",
5454
# 'key_name' => "Puppet Agent",

spec/integration/application/agent_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ def with_another_agent_running(&block)
527527
}
528528

529529
# ensure file is written before yielding
530-
until File.exists?(path) && File.size(path) > 0 do
530+
until File.exist?(path) && File.size(path) > 0 do
531531
sleep 0.1
532532
end
533533

spec/unit/application/agent_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ def run(options = {}); end
524524
end
525525

526526
it "should stop the daemon" do
527-
expect(@daemon).to receive(:stop).with(:exit => false)
527+
expect(@daemon).to receive(:stop).with({:exit => false})
528528

529529
expect { execute_agent }.to exit_with 0
530530
end

spec/unit/application/device_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@
535535
end
536536

537537
it "makes the Puppet::Pops::Loaders available" do
538-
expect(configurer).to receive(:run).with(:network_device => true, :pluginsync => false) do
538+
expect(configurer).to receive(:run).with({:network_device => true, :pluginsync => false}) do
539539
fail('Loaders not available') unless Puppet.lookup(:loaders) { nil }.is_a?(Puppet::Pops::Loaders)
540540
true
541541
end.and_return(6, 2)

spec/unit/application/resource_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122
allow(@resource_app.command_line).to receive(:args).and_return(['type','name','param=temp'])
123123

124124
expect(Puppet::Resource.indirection).to receive(:save).with(@res, 'type/name').and_return([@res, @report])
125-
expect(Puppet::Resource).to receive(:new).with('type', 'name', :parameters => {'param' => 'temp'}).and_return(@res)
125+
expect(Puppet::Resource).to receive(:new).with('type', 'name', {:parameters => {'param' => 'temp'}}).and_return(@res)
126126

127127
@resource_app.main
128128
end

spec/unit/daemon_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def run_loop(jobs)
180180

181181
it "should shut down without exiting" do
182182
daemon.argv = %w{foo}
183-
expect(daemon).to receive(:stop).with(:exit => false)
183+
expect(daemon).to receive(:stop).with({:exit => false})
184184
daemon.reexec
185185
end
186186

spec/unit/file_bucket/dipper_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ def make_tmp_file(contents)
322322
file = make_tmp_file(plaintext)
323323

324324
expect(Puppet::FileBucket::File.indirection).to receive(:head).with(
325-
%r{#{digest_algorithm}/#{checksum}}, :bucket_path => "/my/bucket"
325+
%r{#{digest_algorithm}/#{checksum}}, {:bucket_path => "/my/bucket"}
326326
).and_return(true)
327327
expect(Puppet::FileBucket::File.indirection).not_to receive(:save)
328328
expect(@dipper.backup(file)).to eq(checksum)

0 commit comments

Comments
 (0)