diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 000000000..944880fa1 --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +3.2.0 diff --git a/Gemfile.lock b/Gemfile.lock index 8359e0993..f748fc29a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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) @@ -48,4 +48,4 @@ DEPENDENCIES timecop BUNDLED WITH - 2.2.22 + 2.4.4 diff --git a/bosh-stemcell/lib/bosh/stemcell/archive.rb b/bosh-stemcell/lib/bosh/stemcell/archive.rb index 0f79b1f9f..4253da89c 100644 --- a/bosh-stemcell/lib/bosh/stemcell/archive.rb +++ b/bosh-stemcell/lib/bosh/stemcell/archive.rb @@ -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 diff --git a/bosh-stemcell/lib/bosh/stemcell/stage_runner.rb b/bosh-stemcell/lib/bosh/stemcell/stage_runner.rb index a58869adc..056d2cb10 100644 --- a/bosh-stemcell/lib/bosh/stemcell/stage_runner.rb +++ b/bosh-stemcell/lib/bosh/stemcell/stage_runner.rb @@ -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 diff --git a/bosh-stemcell/spec/bosh/stemcell/build_environment_spec.rb b/bosh-stemcell/spec/bosh/stemcell/build_environment_spec.rb index 7bc70d718..53faa56ab 100644 --- a/bosh-stemcell/spec/bosh/stemcell/build_environment_spec.rb +++ b/bosh-stemcell/spec/bosh/stemcell/build_environment_spec.rb @@ -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 @@ -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 @@ -157,7 +157,7 @@ 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 @@ -165,7 +165,7 @@ module Bosh::Stemcell 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 diff --git a/vendor/cache/fakefs-1.3.2.gem b/vendor/cache/fakefs-1.3.2.gem deleted file mode 100644 index daa9df212..000000000 Binary files a/vendor/cache/fakefs-1.3.2.gem and /dev/null differ diff --git a/vendor/cache/fakefs-2.0.0.gem b/vendor/cache/fakefs-2.0.0.gem new file mode 100644 index 000000000..ec66c4ca2 Binary files /dev/null and b/vendor/cache/fakefs-2.0.0.gem differ