Skip to content

Commit

Permalink
Merge pull request #37 from mmyoji/cocaine-to-terrapin
Browse files Browse the repository at this point in the history
Cocaine -> Terrapin
  • Loading branch information
jonbuda committed Apr 25, 2018
2 parents 712572d + e8098ba commit fb13180
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/miro.rb
@@ -1,5 +1,5 @@
require "miro/version"
require "cocaine"
require "terrapin"
require "color"
require "tempfile"
require "open-uri"
Expand Down
4 changes: 2 additions & 2 deletions lib/miro/dominant_colors.rb
Expand Up @@ -54,7 +54,7 @@ def histogram

def downsample_and_histogram
@source_image = open_source_image
hstring = Cocaine::CommandLine.new(Miro.options[:image_magick_path], image_magick_params).
hstring = Terrapin::CommandLine.new(Miro.options[:image_magick_path], image_magick_params).
run(:in => Shellwords.escape(File.expand_path(@source_image.path)),
:resolution => Miro.options[:resolution],
:colors => Miro.options[:color_count].to_s,
Expand All @@ -80,7 +80,7 @@ def downsample_colors_and_convert_to_png!
@source_image = open_source_image
@downsampled_image = open_downsampled_image

Cocaine::CommandLine.new(Miro.options[:image_magick_path], image_magick_params).
Terrapin::CommandLine.new(Miro.options[:image_magick_path], image_magick_params).
run(:in => Shellwords.escape(File.expand_path(@source_image.path)),
:resolution => Miro.options[:resolution],
:colors => Miro.options[:color_count].to_s,
Expand Down
2 changes: 1 addition & 1 deletion miro.gemspec
Expand Up @@ -10,7 +10,7 @@ Gem::Specification.new do |gem|

gem.requirements = 'ImageMagick'

gem.add_dependency "cocaine"
gem.add_dependency "terrapin"
gem.add_dependency "color"
gem.add_dependency "chunky_png"
gem.add_dependency "oily_png" if RUBY_ENGINE != "jruby"
Expand Down
4 changes: 2 additions & 2 deletions spec/miro/dominant_colors_spec.rb
Expand Up @@ -22,7 +22,7 @@

before do
Miro.stub(:histogram?).and_return(false)
Cocaine::CommandLine.stub(:new).and_return(double('command', :run => true))
Terrapin::CommandLine.stub(:new).and_return(double('command', :run => true))
ChunkyPNG::Image.stub(:from_file).and_return(chunky_png_results)
end

Expand Down Expand Up @@ -59,7 +59,7 @@
it "runs the imagemagick command line with the correct arguments" do
subject.stub(:open_downsampled_image).and_return(mock_downsampled_image)
line = double('line')
Cocaine::CommandLine.should_receive(:new).with(Miro.options[:image_magick_path],
Terrapin::CommandLine.should_receive(:new).with(Miro.options[:image_magick_path],
"':in[0]' -resize :resolution -colors :colors -colorspace :quantize -quantize :quantize :out").and_return(line)

line.should_receive(:run).with(:in => '/path/to/source_image',
Expand Down

0 comments on commit fb13180

Please sign in to comment.