pHash 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/phash/audio.rb +4 -4
  2. data/pHash.gemspec +1 -1
  3. metadata +3 -3
@@ -77,7 +77,7 @@ module Phash
77
77
  end
78
78
 
79
79
  # Use <tt>audio_data</tt> and <tt>audio_data_hash</tt> to compute hash for file at path, specify max length in seconds to read
80
- def audio_hash(path, length = 0, sample_rate = nil)
80
+ def audio_hash(path, length = nil, sample_rate = nil)
81
81
  sample_rate ||= DEFAULT_SAMPLE_RATE
82
82
  if audio_data = audio_data(path, length, sample_rate)
83
83
  audio_data_hash(audio_data, sample_rate)
@@ -116,12 +116,12 @@ module Phash
116
116
  attr_reader :length
117
117
 
118
118
  # Audio path and optional length in seconds to read
119
- def initialize(path, length = 0)
120
- @path, @length = path, length
119
+ def initialize(path, length = nil, sample_rate = nil)
120
+ @path, @length, @sample_rate = path, length, sample_rate
121
121
  end
122
122
 
123
123
  def compute_phash
124
- Phash.audio_hash(@path, @length)
124
+ Phash.audio_hash(@path, @length, @sample_rate)
125
125
  end
126
126
  end
127
127
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'pHash'
5
- s.version = '1.1.0'
5
+ s.version = '1.1.1'
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']
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: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 1
9
- - 0
10
- version: 1.1.0
9
+ - 1
10
+ version: 1.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ivan Kuchin