Skip to content

Commit

Permalink
Merge pull request #273 from cloudfoundry/ubuntu-bionic-ruby3-2
Browse files Browse the repository at this point in the history
getting ready for ruby 3.2 - bionic
  • Loading branch information
ramonskie authored and git committed Jan 19, 2023
2 parents 9f6525c + 1845dab commit 70ec389
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.2.0
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ GEM
remote: https://rubygems.org/
specs:
diff-lcs (1.4.4)
fakefs (1.3.2)
fakefs (2.0.0)
little-plugger (1.1.4)
logging (2.3.0)
little-plugger (~> 1.1)
Expand Down Expand Up @@ -48,4 +48,4 @@ DEPENDENCIES
timecop

BUNDLED WITH
2.2.22
2.4.4
2 changes: 1 addition & 1 deletion bosh-stemcell/lib/bosh/stemcell/archive.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def cloud_properties
end

def validate_stemcell
raise "Cannot find file '#{path}'" unless File.exists?(path)
raise "Cannot find file '#{path}'" unless File.exist?(path)
end
end
end
2 changes: 1 addition & 1 deletion bosh-stemcell/lib/bosh/stemcell/stage_runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def configure(stages)
stage_config_script = File.join(build_path, 'stages', stage.to_s, 'config.sh')

@report.measure_configure(stage) do
if File.exists?(stage_config_script) && File.executable?(stage_config_script)
if File.exist?(stage_config_script) && File.executable?(stage_config_script)
run_sudo_with_command_env("#{stage_config_script} #{settings_file}")
end
end
Expand Down
10 changes: 5 additions & 5 deletions bosh-stemcell/spec/bosh/stemcell/build_environment_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ module Bosh::Stemcell

subject.prepare_build

expect(Dir.exists?(build_path)).to be(true)
expect(Dir.exist?(build_path)).to be(true)
expect(File.read(settings_file)).to match(/some=var/)
expect(File.read(settings_file)).to match(/hello=world/)
end
Expand All @@ -132,13 +132,13 @@ module Bosh::Stemcell
it 'creates the work root' do
expect {
subject.prepare_build
}.to change { Dir.exists?(work_root) }.from(false).to(true)
}.to change { Dir.exist?(work_root) }.from(false).to(true)
end

it 'creates the stemcell path' do
expect {
subject.prepare_build
}.to change { Dir.exists?(File.join(root_dir, 'work/work/stemcell')) }.from(false).to(true)
}.to change { Dir.exist?(File.join(root_dir, 'work/work/stemcell')) }.from(false).to(true)
end

context 'when resume_from is set' do
Expand All @@ -157,15 +157,15 @@ module Bosh::Stemcell

subject.prepare_build

expect(Dir.exists?(build_path)).to be(true)
expect(Dir.exist?(build_path)).to be(true)
end

it 'does not run prepare_build_path' do
leftover_file = File.join(build_path, 'some_file')
FileUtils.touch(leftover_file)

subject.prepare_build
expect(File.exists?(leftover_file)).to be(true)
expect(File.exist?(leftover_file)).to be(true)
end

it 'still updates the settings file' do
Expand Down
Binary file removed vendor/cache/fakefs-1.3.2.gem
Binary file not shown.
Binary file added vendor/cache/fakefs-2.0.0.gem
Binary file not shown.

0 comments on commit 70ec389

Please sign in to comment.