Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Replace cocaine to terrapin #2553

Merged
merged 1 commit into from
Mar 9, 2018
Merged

Replace cocaine to terrapin #2553

merged 1 commit into from
Mar 9, 2018

Conversation

ykzts
Copy link
Contributor

@ykzts ykzts commented Feb 13, 2018

Cocaine has been renamed to Terrapin (ref thoughtbot/cocaine#99).

This Pull Request replaces Cocaine:: with Terrapin::.

@@ -189,7 +189,7 @@
it "lets us know when a command isn't found versus a processing error" do
old_path = ENV['PATH']
begin
Cocaine::CommandLine.path = ''
Terrapin::CommandLine.path = ''

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

@@ -48,7 +48,7 @@
it "lets us know when a command isn't found versus a processing error" do
old_path = ENV['PATH']
begin
Cocaine::CommandLine.path = ''
Terrapin::CommandLine.path = ''

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

Paperclip.options[:log_command] = false
Cocaine::CommandLine.expects(:new).with("identify", "stuff", {}).returns(stub(:run))
Terrapin::CommandLine.expects(:new).with("identify", "stuff", {}).returns(stub(:run))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [91/80]

Paperclip.options[:log_command] = false
Cocaine::CommandLine.expects(:new).with("convert", "stuff", {}).returns(stub(:run))
Terrapin::CommandLine.expects(:new).with("convert", "stuff", {}).returns(stub(:run))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [90/80]

@@ -63,7 +63,7 @@
context "Calling Paperclip.run with a logger" do
it "passes the defined logger if :log_command is set" do
Paperclip.options[:log_command] = true
Cocaine::CommandLine.expects(:new).with("convert", "stuff", logger: Paperclip.logger).returns(stub(:run))
Terrapin::CommandLine.expects(:new).with("convert", "stuff", logger: Paperclip.logger).returns(stub(:run))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [112/80]

if logging? && (options[:log_command] || local_options[:log_command])
local_options = local_options.merge(:logger => logger)
end
Cocaine::CommandLine.new(cmd, arguments, local_options).run(interpolation_values)
Terrapin::CommandLine.new(cmd, arguments, local_options).run(interpolation_values)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [88/80]

cocaine_path_array = Cocaine::CommandLine.path.try(:split, Cocaine::OS.path_separator)
Cocaine::CommandLine.path = [cocaine_path_array, command_path].flatten.compact.uniq
terrapin_path_array = Terrapin::CommandLine.path.try(:split, Terrapin::OS.path_separator)
Terrapin::CommandLine.path = [terrapin_path_array, command_path].flatten.compact.uniq

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [91/80]

@@ -27,12 +27,12 @@ def interpolates key, &block
#
def run(cmd, arguments = "", interpolation_values = {}, local_options = {})
command_path = options[:command_path]
cocaine_path_array = Cocaine::CommandLine.path.try(:split, Cocaine::OS.path_separator)
Cocaine::CommandLine.path = [cocaine_path_array, command_path].flatten.compact.uniq
terrapin_path_array = Terrapin::CommandLine.path.try(:split, Terrapin::OS.path_separator)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [95/80]

""
rescue Cocaine::CommandNotFoundError => e
rescue Terrapin::CommandNotFoundError => e

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Useless assignment to variable - e.

@@ -67,7 +67,7 @@
require 'mimemagic'
require 'mimemagic/overlay'
require 'logger'
require 'cocaine'
require 'terrapin'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

@sidraval
Copy link
Contributor

sidraval commented Mar 9, 2018

Thanks for the PR 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants