Skip to content

Commit

Permalink
Issue galetahub#794 replace cocaine gem with terrapin
Browse files Browse the repository at this point in the history
  • Loading branch information
galetahub committed Mar 2, 2018
1 parent 32bc0c6 commit ff350bc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
6 changes: 4 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ PATH
remote: .
specs:
ckeditor (4.2.4)
cocaine
orm_adapter (~> 0.5.0)
terrapin

GEM
remote: http://rubygems.org/
Expand Down Expand Up @@ -182,6 +182,8 @@ GEM
sqlite3 (1.3.13)
term-ansicolor (1.6.0)
tins (~> 1.0)
terrapin (0.6.0)
climate_control (>= 0.0.3, < 1.0)
thor (0.19.4)
thread_safe (0.3.6)
tilt (2.0.7)
Expand Down Expand Up @@ -222,4 +224,4 @@ DEPENDENCIES
unicorn (~> 4.0.1)

BUNDLED WITH
1.15.0
1.15.3
2 changes: 1 addition & 1 deletion ckeditor.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ Gem::Specification.new do |s|
s.extra_rdoc_files = ["README.md"]
s.require_paths = ["lib"]

s.add_dependency("cocaine")
s.add_dependency("terrapin")
s.add_dependency("orm_adapter", "~> 0.5.0")
end
7 changes: 3 additions & 4 deletions lib/ckeditor/utils/content_type_detector.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# encoding: utf-8
require 'cocaine'
require 'terrapin'

module Ckeditor
module Utils
Expand Down Expand Up @@ -29,8 +28,8 @@ def empty_file?
end

def content_type_from_file_command
Cocaine::CommandLine.new('file', '-b --mime-type :file').run(file: @file_path).strip
rescue Cocaine::CommandLineError
Terrapin::CommandLine.new('file', '-b --mime-type :path').run(path: @file_path).strip
rescue Terrapin::ExitStatusError
DEFAULT_CONTENT_TYPE
end
end
Expand Down

0 comments on commit ff350bc

Please sign in to comment.