miso 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.3
1
+ 0.2.4
@@ -17,7 +17,7 @@ module Miso
17
17
  # array.
18
18
  def processor_class
19
19
  @processor_class ||= processor_classes.find { |c| c.available? }
20
- raise "None of the Miso::Processor classes is available." unless @processor_class
20
+ raise "None of the Miso::Processor classes are available." unless @processor_class
21
21
  @processor_class
22
22
  end
23
23
 
@@ -10,7 +10,7 @@ module Miso
10
10
  class Processor
11
11
  class ImageMagick < Processor
12
12
  def self.available?
13
- system("which convert > /dev/null")
13
+ !find_executable('convert').nil?
14
14
  end
15
15
 
16
16
  def crop(width, height)
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{miso}
8
- s.version = "0.2.3"
8
+ s.version = "0.2.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Eloy Duran", "Manfred Stienstra"]
@@ -1,11 +1,11 @@
1
1
  require File.expand_path('../../../start', __FILE__)
2
2
 
3
- if system("which convert > /dev/null")
3
+ if Executioner::ClassMethods.find_executable('convert')
4
4
  describe "Miso::Processor::ImageMagick" do
5
5
  it "should check the load paths to see if ImageMagick is available" do
6
6
  Miso::Processor::ImageMagick.should.be.available
7
7
 
8
- Miso::Processor::ImageMagick.stubs(:system).returns(false)
8
+ Miso::Processor::ImageMagick.stubs(:find_executable).returns(nil)
9
9
  Miso::Processor::ImageMagick.should.not.be.available
10
10
  end
11
11
  end
@@ -8,6 +8,8 @@ $:.unshift(File.expand_path('../../lib', __FILE__))
8
8
 
9
9
  require 'miso'
10
10
  require 'miso/processor'
11
+ require 'miso/processor/core_image'
12
+ require 'miso/processor/image_magick'
11
13
 
12
14
  class Test::Unit::TestCase
13
15
  TMP_DIR = File.expand_path('../tmp', __FILE__)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: miso
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eloy Duran