Skip to content

Commit

Permalink
Fix Standard issues
Browse files Browse the repository at this point in the history
  • Loading branch information
fractaledmind committed Dec 11, 2023
1 parent f0c629c commit 0d78901
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion exe/litestream
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ begin
puts command.inspect
exec(*command)
rescue Litestream::Commands::UnsupportedPlatformException, Litestream::Commands::ExecutableNotFoundException => e
STDERR.puts("ERROR: " + e.message)
warn("ERROR: " + e.message)
exit 1
end
2 changes: 1 addition & 1 deletion lib/litestream/upstream.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module Upstream
"arm64-darwin" => "litestream-#{VERSION}-darwin-arm64.zip",
"arm64-linux" => "litestream-#{VERSION}-linux-arm64.tar.gz",
"x86_64-darwin" => "litestream-#{VERSION}-darwin-amd64.zip",
"x86_64-linux" => "litestream-#{VERSION}-linux-amd64.tar.gz",
"x86_64-linux" => "litestream-#{VERSION}-linux-amd64.tar.gz"
}
end
end
9 changes: 3 additions & 6 deletions rakelib/package.rake
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# coding: utf-8
#
# Rake tasks to manage native gem packages with binary executables from benbjohnson/litestream
#
Expand Down Expand Up @@ -93,7 +92,7 @@ Litestream::Upstream::NATIVE_PLATFORMS.each do |platform, filename|
warn "Downloading #{exepath} from #{release_url} ..."

# lazy, but fine for now.
URI.open(release_url) do |remote|
URI.open(release_url) do |remote| # standard:disable Security/Open
if release_url.end_with?(".zip")
Zip::File.open_buffer(remote) do |zip_file|
zip_file.extract("litestream", exepath)
Expand All @@ -102,15 +101,13 @@ Litestream::Upstream::NATIVE_PLATFORMS.each do |platform, filename|
Zlib::GzipReader.wrap(remote) do |gz|
Gem::Package::TarReader.new(gz) do |reader|
reader.seek("litestream") do |file|
File.open(exepath, "wb") do |local|
local.write(file.read)
end
File.binwrite(exepath, file.read)
end
end
end
end
end
FileUtils.chmod(0755, exepath, verbose: true)
FileUtils.chmod(0o755, exepath, verbose: true)
end
end
end
Expand Down

0 comments on commit 0d78901

Please sign in to comment.