wand 0.2 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/lib/wand.rb +2 -4
  2. data/test/test_wand.rb +0 -5
  3. data/wand.gemspec +2 -2
  4. metadata +2 -2
@@ -1,8 +1,7 @@
1
1
  require 'mime/types'
2
- require 'shellwords'
3
2
 
4
3
  module Wand
5
- Version = '0.2'
4
+ Version = '0.2.1'
6
5
 
7
6
  def self.wave(path)
8
7
  type = MIME::Types.type_for(path)[0].to_s
@@ -12,7 +11,6 @@ module Wand
12
11
  end
13
12
 
14
13
  def self.executable
15
- return @executable if defined?(@executable)
16
14
  @executable ||= `which file`.chomp
17
15
  end
18
16
 
@@ -21,6 +19,6 @@ module Wand
21
19
  end
22
20
 
23
21
  def self.execute_file_cmd(path)
24
- `#{executable} --mime --brief #{path.shellescape}`
22
+ `#{executable} --mime --brief #{path}`
25
23
  end
26
24
  end
@@ -49,10 +49,5 @@ class TestWand < Test::Unit::TestCase
49
49
  Wand.expects(:execute_file_cmd).returns("image/jpeg\n")
50
50
  assert_equal "image/jpeg", Wand.wave(FilePath.join(name).expand_path.to_s)
51
51
  end
52
-
53
- should "escape path" do
54
- output = Wand.execute_file_cmd(FilePath.join(name).expand_path.to_s + ' && echo $USER')
55
- assert_match /cannot\sopen/, output
56
- end
57
52
  end
58
53
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{wand}
8
- s.version = "0.2"
8
+ s.version = "0.2.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["John Nunemaker"]
12
- s.date = %q{2010-03-08}
12
+ s.date = %q{2010-03-10}
13
13
  s.description = %q{Mime-Type gem with fallback to unix file command}
14
14
  s.email = %q{nunemaker@gmail.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wand
3
3
  version: !ruby/object:Gem::Version
4
- version: "0.2"
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Nunemaker
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-03-08 00:00:00 -05:00
12
+ date: 2010-03-10 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency