earworm 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/History.txt +7 -0
  2. data/Rakefile +1 -0
  3. data/bin/earworm +10 -1
  4. data/lib/earworm.rb +2 -1
  5. metadata +3 -3
@@ -1,3 +1,10 @@
1
+ === 0.0.2
2
+
3
+ * 1 Bugfix
4
+
5
+ * Oop! Forgot a require. Thanks Mike McKay!
6
+ * Added better error messaging. Thanks again to Mike McKay.
7
+
1
8
  === 0.0.1 / 2008-08-01
2
9
 
3
10
  * 1 major enhancement
data/Rakefile CHANGED
@@ -8,6 +8,7 @@ require 'earworm'
8
8
 
9
9
  Hoe.new('earworm', Earworm::VERSION) do |p|
10
10
  p.developer('Aaron Patterson', 'aaronp@rubyforge.org')
11
+ p.description = p.paragraphs_of('README.txt', 3..8).join("\n\n")
11
12
  p.extra_deps = [['icanhasaudio', '>=0.1.1']]
12
13
  end
13
14
 
@@ -5,11 +5,20 @@ require 'earworm'
5
5
  require 'yaml'
6
6
 
7
7
  CONFIG = File.join(File.expand_path(ENV['HOME']), '.earworm')
8
- config = YAML.load_file(CONFIG)
8
+ begin
9
+ config = YAML.load_file(CONFIG)
10
+ rescue
11
+ raise "Please create a .earworm file in your home directory"
12
+ end
9
13
 
10
14
  (puts("USAGE: #{$0} unknown_file") || exit) unless ARGV[0]
11
15
 
16
+ begin
12
17
  ew = Earworm::Client.new(config['key'])
18
+ rescue
19
+ raise "\n\nYou need to generate a key here: http://www.musicip.com/dns/license.jsp\n then put the key into your .earworm file like this:
20
+ key: 012321312AA\n"
21
+ end
13
22
  track =
14
23
  if File.exists?(ARGV[0])
15
24
  ew.identify(:file => ARGV[0])
@@ -7,9 +7,10 @@ require 'earworm/fingerprint'
7
7
  require 'earworm/client'
8
8
  require 'rexml/document'
9
9
  require 'rexml/parsers/pullparser'
10
+ require 'net/http'
10
11
 
11
12
  module Earworm
12
- VERSION = '0.0.1'
13
+ VERSION = '0.0.2'
13
14
  URL = 'http://ofa.musicdns.org/ofa/1/track'
14
15
  class << self
15
16
  def ofa_version
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: earworm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Patterson
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-08-04 00:00:00 -07:00
12
+ date: 2008-08-05 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -32,7 +32,7 @@ dependencies:
32
32
  - !ruby/object:Gem::Version
33
33
  version: 1.7.0
34
34
  version:
35
- description: Earworm can identify unknown music using MusicDNS and libofa.
35
+ description: "Earworm can identify unknown music using MusicDNS and libofa. == FEATURES/PROBLEMS: * Identifies mp3, ogg, and wav files. == SYNOPSIS: Identify an unknown audio file: ew = Earworm::Client.new('MY Music DNS Key') info = ew.identify(:file => '/home/aaron/unknown.wav') puts \"#{info.artist_name} - #{info.title}\""
36
36
  email:
37
37
  - aaronp@rubyforge.org
38
38
  executables: