pHash 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/README.markdown +5 -0
  2. data/lib/phash.rb +1 -1
  3. data/pHash.gemspec +6 -4
  4. metadata +24 -10
@@ -8,6 +8,11 @@ Interface to [pHash](http://pHash.org/).
8
8
 
9
9
  Audio hash functions needs to be compiled with C linkage, so if you get `FFI::NotFoundError` check names of methods in `libpHash`. Tiny patch for pHash 0.9.4 is in `audiophash.diff`.
10
10
 
11
+ ## Dependencies
12
+
13
+ * [pHash](http://www.phash.org/download/)
14
+ * [ffi](https://github.com/ffi/ffi#readme) ~> 1.0
15
+
11
16
  ## Usage
12
17
 
13
18
  Compare two mp3s:
@@ -55,7 +55,7 @@ module Phash
55
55
 
56
56
  extend FFI::Library
57
57
 
58
- ffi_lib(ENV['PHASH_LIB'] || Dir['/{usr,usr/local,opt/local}/lib/libpHash.{dylib,so}'].first)
58
+ ffi_lib ENV.fetch('PHASH_LIB','pHash')
59
59
 
60
60
  autoload :Audio, 'phash/audio'
61
61
  autoload :Image, 'phash/image'
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'pHash'
5
- s.version = '1.1.1'
5
+ s.version = '1.1.2'
6
6
  s.summary = %q{Use pHash with ruby}
7
7
  s.homepage = "http://github.com/toy/#{s.name}"
8
8
  s.authors = ['Ivan Kuchin']
@@ -10,11 +10,13 @@ Gem::Specification.new do |s|
10
10
 
11
11
  s.rubyforge_project = s.name
12
12
 
13
- s.files = `git ls-files`.split("\n")
14
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
15
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
13
+ s.files = `git ls-files`.split($/)
14
+ s.executables = s.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
15
+ s.test_files = s.files.grep(%r{^(test|spec|features)/})
16
16
  s.require_paths = %w[lib]
17
17
 
18
+ s.add_dependency 'ffi', '~> 1.0'
19
+
18
20
  s.add_development_dependency 'rspec'
19
21
  s.add_development_dependency 'fspath'
20
22
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pHash
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 1
9
- - 1
10
- version: 1.1.1
9
+ - 2
10
+ version: 1.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ivan Kuchin
@@ -15,12 +15,27 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-12-27 00:00:00 Z
18
+ date: 2012-06-10 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
- name: rspec
21
+ name: ffi
22
22
  prerelease: false
23
23
  requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
25
+ requirements:
26
+ - - ~>
27
+ - !ruby/object:Gem::Version
28
+ hash: 15
29
+ segments:
30
+ - 1
31
+ - 0
32
+ version: "1.0"
33
+ type: :runtime
34
+ version_requirements: *id001
35
+ - !ruby/object:Gem::Dependency
36
+ name: rspec
37
+ prerelease: false
38
+ requirement: &id002 !ruby/object:Gem::Requirement
24
39
  none: false
25
40
  requirements:
26
41
  - - ">="
@@ -30,11 +45,11 @@ dependencies:
30
45
  - 0
31
46
  version: "0"
32
47
  type: :development
33
- version_requirements: *id001
48
+ version_requirements: *id002
34
49
  - !ruby/object:Gem::Dependency
35
50
  name: fspath
36
51
  prerelease: false
37
- requirement: &id002 !ruby/object:Gem::Requirement
52
+ requirement: &id003 !ruby/object:Gem::Requirement
38
53
  none: false
39
54
  requirements:
40
55
  - - ">="
@@ -44,7 +59,7 @@ dependencies:
44
59
  - 0
45
60
  version: "0"
46
61
  type: :development
47
- version_requirements: *id002
62
+ version_requirements: *id003
48
63
  description:
49
64
  email:
50
65
  executables: []
@@ -136,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
151
  requirements: []
137
152
 
138
153
  rubyforge_project: pHash
139
- rubygems_version: 1.8.12
154
+ rubygems_version: 1.8.24
140
155
  signing_key:
141
156
  specification_version: 3
142
157
  summary: Use pHash with ruby
@@ -183,4 +198,3 @@ test_files:
183
198
  - spec/data/vader-o.mp3
184
199
  - spec/phash_spec.rb
185
200
  - spec/spec_helper.rb
186
- has_rdoc: