From e04b4b9d33007f0a0ceb8fe0fa0bf85135a42087 Mon Sep 17 00:00:00 2001 From: Joshua Pinter Date: Fri, 17 Apr 2026 11:36:16 -0600 Subject: [PATCH] Replace cocaine dependency with terrapin. Depend on the latest version of terrapin because it includes a number of importing fixes. If this is an issue, we can relax that constraint a bit. --- av.gemspec | 2 +- lib/av.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/av.gemspec b/av.gemspec index fb10d58..3f25397 100644 --- a/av.gemspec +++ b/av.gemspec @@ -23,5 +23,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency "rspec", "~> 3.0.0" spec.add_development_dependency "coveralls" - spec.add_dependency "cocaine", "~> 0.5.3" + spec.add_dependency "terrapin", ">= 1.1.1" end diff --git a/lib/av.rb b/lib/av.rb index 9c8593a..537602e 100644 --- a/lib/av.rb +++ b/lib/av.rb @@ -5,7 +5,7 @@ require "av/param_hash" require "av/commands/ffmpeg" require "av/commands/avconv" -require "cocaine" +require "terrapin" require "av/engine" if defined?(Rails) module Av @@ -27,8 +27,8 @@ def cli(options = {}) def run line, codes = [0] ::Av.log("Running command: #{line}") begin - Cocaine::CommandLine.new(line, "", expected_outcodes: codes).run - rescue Cocaine::ExitStatusError => e + Terrapin::CommandLine.new(line, "", expected_outcodes: codes).run + rescue Terrapin::ExitStatusError => e raise Av::CommandError, "error while running command #{line}: #{e}" end end