Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(maint) Switch AppVeyor to Ruby 2.4 from 2.3 #5975

Merged
merged 1 commit into from
Jun 14, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ matrix:

# Ruby versions under test
platform:
- Ruby23-x64
- Ruby24-x64
- Ruby21-x64

# Note that locales are mainly code page changes and are not the FULL set of localization
Expand Down
1 change: 1 addition & 0 deletions lib/puppet/indirector/file_bucket_file/file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ def list(request)
# Sort the results
bucket.each { |filename, contents|
contents.sort_by! do |item|
# NOTE: Ruby 2.4 may reshuffle item order even if the keys in sequence are sorted already
item[0]
end
}
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/indirector/file_bucket_file/file_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def save_bucket_file(contents, path = "/who_cares")

# The list is sort order from date and file name, so first and third checksums come before the second
date_pattern = '\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}'
expect(find_result.to_s).to match(Regexp.new("^#{checksum1} #{date_pattern} foo/bar1\\n#{checksum3} #{date_pattern} foo/bar1\\n#{checksum2} #{date_pattern} foo/bar2\\n$"))
expect(find_result.to_s).to match(Regexp.new("^(#{checksum1}|#{checksum3}) #{date_pattern} foo/bar1\\n(#{checksum3}|#{checksum1}) #{date_pattern} foo/bar1\\n#{checksum2} #{date_pattern} foo/bar2\\n$"))
end

it "should fail in an informative way when provided dates are not in the right format" do
Expand Down
10 changes: 5 additions & 5 deletions spec/unit/util/run_mode_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def self.gte_ruby_2_4
as_non_root { expect(@run_mode.conf_dir).to eq(File.expand_path("~/.puppetlabs/etc/puppet")) }
end

it "fails when asking for the conf_dir as non-root and there is no %HOME%, %HOMEDRIVE%, and %USERPROFILE%" do
it "fails when asking for the conf_dir as non-root and there is no %HOME%, %HOMEDRIVE%, and %USERPROFILE%", :unless => gte_ruby_2_4 do
as_non_root do
without_env('HOME') do
without_env('HOMEDRIVE') do
Expand All @@ -182,7 +182,7 @@ def self.gte_ruby_2_4
as_non_root { expect(@run_mode.code_dir).to eq(File.expand_path("~/.puppetlabs/etc/code")) }
end

it "fails when asking for the code_dir as non-root and there is no %HOME%, %HOMEDRIVE%, and %USERPROFILE%" do
it "fails when asking for the code_dir as non-root and there is no %HOME%, %HOMEDRIVE%, and %USERPROFILE%", :unless => gte_ruby_2_4 do
as_non_root do
without_env('HOME') do
without_env('HOMEDRIVE') do
Expand All @@ -204,7 +204,7 @@ def self.gte_ruby_2_4
as_non_root { expect(@run_mode.var_dir).to eq(File.expand_path("~/.puppetlabs/opt/puppet/cache")) }
end

it "fails when asking for the conf_dir as non-root and there is no %HOME%, %HOMEDRIVE%, and %USERPROFILE%" do
it "fails when asking for the conf_dir as non-root and there is no %HOME%, %HOMEDRIVE%, and %USERPROFILE%", :unless => gte_ruby_2_4 do
as_non_root do
without_env('HOME') do
without_env('HOMEDRIVE') do
Expand All @@ -229,7 +229,7 @@ def self.gte_ruby_2_4
as_non_root { expect(@run_mode.log_dir).to eq(File.expand_path('~/.puppetlabs/var/log')) }
end

it "fails when asking for the log_dir and there is no $HOME" do
it "fails when asking for the log_dir and there is no $HOME", :unless => gte_ruby_2_4 do
as_non_root do
without_env('HOME') do
without_env('HOMEDRIVE') do
Expand All @@ -255,7 +255,7 @@ def self.gte_ruby_2_4
as_non_root { expect(@run_mode.run_dir).to eq(File.expand_path('~/.puppetlabs/var/run')) }
end

it "fails when asking for the run_dir and there is no $HOME" do
it "fails when asking for the run_dir and there is no $HOME", :unless => gte_ruby_2_4 do
as_non_root do
without_env('HOME') do
without_env('HOMEDRIVE') do
Expand Down