Add Ruby 2.5 support (#648)

* Fix os version detection not to include newline
* Add ruby 2.4 and 2.5 to CI
This commit is contained in:
Sergey Ponomarev authored and Grant Timmerman committed 2018-03-22 08:29:35 -07:00
1 parent 066195ba9c
commit 3bffde39e2
4 files changed
+39 -6

No files matched your search

+2 -2
View File
@@ -21,7 +21,7 @@ module Google
# @private
OS_VERSION = begin
if RUBY_PLATFORM =~ /mswin|win32|mingw|bccwin|cygwin/
`ver`.sub(/\s*\[Version\s*/, '/').sub(']', '').strip
`ver`.sub(/\s*\[Version\s*/, '/').sub(']', '')
elsif RUBY_PLATFORM =~ /darwin/i
"Mac OS X/#{`sw_vers -productVersion`}"
elsif RUBY_PLATFORM == 'java'
@@ -31,7 +31,7 @@ module Google
"#{name}/#{version}"
else
`uname -sr`.sub(' ', '/')
end
end.strip
rescue
RUBY_PLATFORM
end