Merge pull request #4461 from MikeMcQuaid/portable-ruby-2.3.7

Use Ruby 2.3.7
This commit is contained in:
Mike McQuaid 2018-07-13 09:40:38 +01:00 committed by GitHub
commit a4a976b7f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 17 additions and 21 deletions

View File

@ -13,22 +13,17 @@ if [[ -n "$HOMEBREW_MACOS" ]]
then
if [[ "$HOMEBREW_PROCESSOR" = "Intel" ]]
then
ruby_URL="$HOMEBREW_BOTTLE_DOMAIN/bottles-portable-ruby/portable-ruby-2.3.3_2.leopard_64.bottle.tar.gz"
ruby_URL2="https://github.com/Homebrew/homebrew-portable-ruby/releases/download/2.3.3_2/portable-ruby-2.3.3_2.leopard_64.bottle.tar.gz"
ruby_SHA="f1db8863543d256e6a8e704bf618025030b3d22a7a6b19749d19f599b5554212"
ruby_URL="$HOMEBREW_BOTTLE_DOMAIN/bottles-portable-ruby/portable-ruby-2.3.7.leopard_64.bottle.tar.gz"
ruby_URL2="https://github.com/Homebrew/homebrew-portable-ruby/releases/download/2.3.7/portable-ruby-2.3.7.leopard_64.bottle.tar.gz"
ruby_SHA="033ac518bb14abdb1bb47d968dc9e967c3ae2035499383a21a79b49d523065d1"
fi
elif [[ -n "$HOMEBREW_LINUX" ]]
then
case "$HOMEBREW_PROCESSOR" in
x86_64)
ruby_URL="$HOMEBREW_BOTTLE_DOMAIN/bottles-portable-ruby/portable-ruby-2.3.3_2.x86_64_linux.bottle.tar.gz"
ruby_URL2="https://github.com/Homebrew/homebrew-portable-ruby/releases/download/2.3.3_2/portable-ruby-2.3.3_2.x86_64_linux.bottle.tar.gz"
ruby_SHA="b5c320c1bc2c4d42d4674643855c582ba2772fc951689d298ee079b74bac29a7"
;;
armv[67]*)
ruby_URL="$HOMEBREW_BOTTLE_DOMAIN/bottles-portable-ruby/portable-ruby-2.3.3_2.armv6_linux.bottle.tar.gz"
ruby_URL2="https://github.com/Homebrew/homebrew-portable-ruby/releases/download/2.3.3_2/portable-ruby-2.3.3_2.armv6_linux.bottle.tar.gz"
ruby_SHA="6ac992c4620912b50b3c74f2d4447d541bac4f1839e557c3edcfdebb141c9802"
ruby_URL="$HOMEBREW_BOTTLE_DOMAIN/bottles-portable-ruby/portable-ruby-2.3.7.x86_64_linux.bottle.tar.gz"
ruby_URL2="https://github.com/Homebrew/homebrew-portable-ruby/releases/download/2.3.7/portable-ruby-2.3.7.x86_64_linux.bottle.tar.gz"
ruby_SHA="9df214085a0e566a580eea3dd9eab14a2a94930ff74fbf97fb1284e905c8921d"
;;
esac
fi

View File

@ -86,9 +86,9 @@ module FileUtils
alias old_mkdir mkdir
# A version of mkdir that also changes to that folder in a block.
def mkdir(name, &_block)
mkdir_p(name)
return unless block_given?
def mkdir(name, mode: nil, noop: nil, verbose: nil, &_block)
result = mkdir_p(name, mode: mode, noop: noop, verbose: verbose)
return result unless block_given?
chdir name do
yield
end

View File

@ -12,7 +12,6 @@ module Hardware
# See https://software.intel.com/en-us/articles/intel-architecture-and-processor-identification-with-cpuid-model-and-family-numbers
cpu_family = cpuinfo[/^cpu family\s*: ([0-9]+)/, 1].to_i
cpu_model = cpuinfo[/^model\s*: ([0-9]+)/, 1].to_i
cpu_family_model = "0x" + ((cpu_family << 8) | cpu_model).to_s(16)
case cpu_family
when 0x06
case cpu_model
@ -41,7 +40,7 @@ module Hardware
when 0x8e
:kabylake
else
cpu_family_model
:dunno
end
when 0x0f
case cpu_model
@ -50,10 +49,10 @@ module Hardware
when 0x03, 0x04
:prescott
else
cpu_family_model
:dunno
end
else
cpu_family_model
:dunno
end
end

View File

@ -165,7 +165,7 @@ module Homebrew
end
def check_ruby_version
ruby_version = "2.3.3"
ruby_version = "2.3.7"
return if RUBY_VERSION == ruby_version
return if ARGV.homebrew_developer? && OS::Mac.prerelease?

View File

@ -37,6 +37,8 @@ describe Hbc::CLI, :cask do
let(:noop_command) { double("CLI::Noop") }
before do
skip "random test failures due to leaking doubles"
allow(Hbc).to receive(:init)
allow(described_class).to receive(:lookup_command).with("noop").and_return(noop_command)
allow(noop_command).to receive(:run)

View File

@ -3,7 +3,7 @@ setup-ruby-path() {
local vendor_ruby_current_version
local vendor_ruby_path
local ruby_version_new_enough
local minimum_ruby_version="2.3.3"
local minimum_ruby_version="2.3.7"
vendor_dir="$HOMEBREW_LIBRARY/Homebrew/vendor"
vendor_ruby_current_version="$vendor_dir/portable-ruby/current"

View File

@ -1 +1 @@
2.3.3_2
2.3.7