amazon-album-art 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.document +5 -0
 - data/Gemfile +17 -0
 - data/Gemfile.lock +29 -0
 - data/LICENSE.txt +20 -0
 - data/README.rdoc +48 -0
 - data/Rakefile +56 -0
 - data/VERSION +1 -0
 - data/amazon-album-art.gemspec +77 -0
 - data/lib/amazon-album-art.rb +1 -0
 - data/lib/amazon-album-art/client.rb +114 -0
 - data/test/helper.rb +25 -0
 - data/test/test_amazon-album-art.rb +66 -0
 - metadata +193 -0
 
    
        data/.document
    ADDED
    
    
    
        data/Gemfile
    ADDED
    
    | 
         @@ -0,0 +1,17 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            source "http://rubygems.org"
         
     | 
| 
      
 2 
     | 
    
         
            +
            # Add dependencies required to use your gem here.
         
     | 
| 
      
 3 
     | 
    
         
            +
            # Example:
         
     | 
| 
      
 4 
     | 
    
         
            +
            #   gem "activesupport", ">= 2.3.5"
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            gem 'nokogiri', '>= 1.4.4'
         
     | 
| 
      
 7 
     | 
    
         
            +
            gem 'sucker', '>= 1.1.4'
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
            # Add dependencies to develop your gem here.
         
     | 
| 
      
 11 
     | 
    
         
            +
            # Include everything needed to run rake, tests, features, etc.
         
     | 
| 
      
 12 
     | 
    
         
            +
            group :development do
         
     | 
| 
      
 13 
     | 
    
         
            +
              gem "shoulda", ">= 0"
         
     | 
| 
      
 14 
     | 
    
         
            +
              gem "bundler", "~> 1.0.0"
         
     | 
| 
      
 15 
     | 
    
         
            +
              gem "jeweler", "~> 1.5.2"
         
     | 
| 
      
 16 
     | 
    
         
            +
              gem "rcov", ">= 0"
         
     | 
| 
      
 17 
     | 
    
         
            +
            end
         
     | 
    
        data/Gemfile.lock
    ADDED
    
    | 
         @@ -0,0 +1,29 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            GEM
         
     | 
| 
      
 2 
     | 
    
         
            +
              remote: http://rubygems.org/
         
     | 
| 
      
 3 
     | 
    
         
            +
              specs:
         
     | 
| 
      
 4 
     | 
    
         
            +
                activesupport (3.0.3)
         
     | 
| 
      
 5 
     | 
    
         
            +
                curb (0.7.9)
         
     | 
| 
      
 6 
     | 
    
         
            +
                git (1.2.5)
         
     | 
| 
      
 7 
     | 
    
         
            +
                jeweler (1.5.2)
         
     | 
| 
      
 8 
     | 
    
         
            +
                  bundler (~> 1.0.0)
         
     | 
| 
      
 9 
     | 
    
         
            +
                  git (>= 1.2.5)
         
     | 
| 
      
 10 
     | 
    
         
            +
                  rake
         
     | 
| 
      
 11 
     | 
    
         
            +
                nokogiri (1.4.4)
         
     | 
| 
      
 12 
     | 
    
         
            +
                rake (0.8.7)
         
     | 
| 
      
 13 
     | 
    
         
            +
                rcov (0.9.9)
         
     | 
| 
      
 14 
     | 
    
         
            +
                shoulda (2.11.3)
         
     | 
| 
      
 15 
     | 
    
         
            +
                sucker (1.1.4)
         
     | 
| 
      
 16 
     | 
    
         
            +
                  activesupport (>= 2.3.2)
         
     | 
| 
      
 17 
     | 
    
         
            +
                  curb (~> 0.7.0)
         
     | 
| 
      
 18 
     | 
    
         
            +
                  nokogiri (~> 1.4.0)
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
            PLATFORMS
         
     | 
| 
      
 21 
     | 
    
         
            +
              ruby
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
            DEPENDENCIES
         
     | 
| 
      
 24 
     | 
    
         
            +
              bundler (~> 1.0.0)
         
     | 
| 
      
 25 
     | 
    
         
            +
              jeweler (~> 1.5.2)
         
     | 
| 
      
 26 
     | 
    
         
            +
              nokogiri (>= 1.4.4)
         
     | 
| 
      
 27 
     | 
    
         
            +
              rcov
         
     | 
| 
      
 28 
     | 
    
         
            +
              shoulda
         
     | 
| 
      
 29 
     | 
    
         
            +
              sucker (>= 1.1.4)
         
     | 
    
        data/LICENSE.txt
    ADDED
    
    | 
         @@ -0,0 +1,20 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            Copyright (c) 2011 John Allen
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            Permission is hereby granted, free of charge, to any person obtaining
         
     | 
| 
      
 4 
     | 
    
         
            +
            a copy of this software and associated documentation files (the
         
     | 
| 
      
 5 
     | 
    
         
            +
            "Software"), to deal in the Software without restriction, including
         
     | 
| 
      
 6 
     | 
    
         
            +
            without limitation the rights to use, copy, modify, merge, publish,
         
     | 
| 
      
 7 
     | 
    
         
            +
            distribute, sublicense, and/or sell copies of the Software, and to
         
     | 
| 
      
 8 
     | 
    
         
            +
            permit persons to whom the Software is furnished to do so, subject to
         
     | 
| 
      
 9 
     | 
    
         
            +
            the following conditions:
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
            The above copyright notice and this permission notice shall be
         
     | 
| 
      
 12 
     | 
    
         
            +
            included in all copies or substantial portions of the Software.
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
            THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
         
     | 
| 
      
 15 
     | 
    
         
            +
            EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
         
     | 
| 
      
 16 
     | 
    
         
            +
            MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
         
     | 
| 
      
 17 
     | 
    
         
            +
            NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
         
     | 
| 
      
 18 
     | 
    
         
            +
            LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
         
     | 
| 
      
 19 
     | 
    
         
            +
            OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
         
     | 
| 
      
 20 
     | 
    
         
            +
            WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
         
     | 
    
        data/README.rdoc
    ADDED
    
    | 
         @@ -0,0 +1,48 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            = amazon-album-art
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            A specialized Amazon AWS gem for finding Album Art running on top of the 'sucker' gem
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            == INSTALLATION:
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
              gem install amazon-album-art
         
     | 
| 
      
 8 
     | 
    
         
            +
              
         
     | 
| 
      
 9 
     | 
    
         
            +
            == USAGE:
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
            Create a client
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
              client = AmazonAlbumArt.new('YOUR_ACCESS_KEY', 'YOUR_SECRET_KEY')
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
            Search for all available image sizes
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
              client.search("phish", "rift")
         
     | 
| 
      
 18 
     | 
    
         
            +
              
         
     | 
| 
      
 19 
     | 
    
         
            +
            Or search for a medium and large image
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
              client.search("phish", "rift", [:medium, :large])
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
            These methods will return a hash with the found artist and album names along with URL's to the requested image sizes. Example: 
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
      
 25 
     | 
    
         
            +
              { :artist => "Phish", :album => "Rift", :images => { :medium => "http://ecx.images-amazon.com/images/I/511RmbQV7dL._SL160_.jpg", :large => "http://ecx.images-amazon.com/images/I/511RmbQV7dL.jpg" } }
         
     | 
| 
      
 26 
     | 
    
         
            +
             
     | 
| 
      
 27 
     | 
    
         
            +
            * TODO: offer options to return different image sets (Primary, Vibrant etc...)
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
      
 29 
     | 
    
         
            +
            == ACKNOWLEDGEMENTS 
         
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
      
 31 
     | 
    
         
            +
            * The sucker gem by papercavalier does all the heavy lifting: https://github.com/papercavalier/sucker/
         
     | 
| 
      
 32 
     | 
    
         
            +
            * Grabbed some fuzzy match code from: http://code.coneybeare.net/amazon-album-covers-in-ruby-on-rails/
         
     | 
| 
      
 33 
     | 
    
         
            +
             
     | 
| 
      
 34 
     | 
    
         
            +
            == Contributing to amazon-album-art
         
     | 
| 
      
 35 
     | 
    
         
            +
             
         
     | 
| 
      
 36 
     | 
    
         
            +
            * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
         
     | 
| 
      
 37 
     | 
    
         
            +
            * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
         
     | 
| 
      
 38 
     | 
    
         
            +
            * Fork the project
         
     | 
| 
      
 39 
     | 
    
         
            +
            * Start a feature/bugfix branch
         
     | 
| 
      
 40 
     | 
    
         
            +
            * Commit and push until you are happy with your contribution
         
     | 
| 
      
 41 
     | 
    
         
            +
            * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
         
     | 
| 
      
 42 
     | 
    
         
            +
            * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
         
     | 
| 
      
 43 
     | 
    
         
            +
             
     | 
| 
      
 44 
     | 
    
         
            +
            == Copyright
         
     | 
| 
      
 45 
     | 
    
         
            +
             
     | 
| 
      
 46 
     | 
    
         
            +
            Copyright (c) 2011 John Allen. See LICENSE.txt for
         
     | 
| 
      
 47 
     | 
    
         
            +
            further details.
         
     | 
| 
      
 48 
     | 
    
         
            +
             
     | 
    
        data/Rakefile
    ADDED
    
    | 
         @@ -0,0 +1,56 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'rubygems'
         
     | 
| 
      
 2 
     | 
    
         
            +
            require 'bundler'
         
     | 
| 
      
 3 
     | 
    
         
            +
            begin
         
     | 
| 
      
 4 
     | 
    
         
            +
              Bundler.setup(:default, :development)
         
     | 
| 
      
 5 
     | 
    
         
            +
            rescue Bundler::BundlerError => e
         
     | 
| 
      
 6 
     | 
    
         
            +
              $stderr.puts e.message
         
     | 
| 
      
 7 
     | 
    
         
            +
              $stderr.puts "Run `bundle install` to install missing gems"
         
     | 
| 
      
 8 
     | 
    
         
            +
              exit e.status_code
         
     | 
| 
      
 9 
     | 
    
         
            +
            end
         
     | 
| 
      
 10 
     | 
    
         
            +
            require 'rake'
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
            require 'jeweler'
         
     | 
| 
      
 13 
     | 
    
         
            +
            Jeweler::Tasks.new do |gem|
         
     | 
| 
      
 14 
     | 
    
         
            +
              # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
         
     | 
| 
      
 15 
     | 
    
         
            +
              gem.name = "amazon-album-art"
         
     | 
| 
      
 16 
     | 
    
         
            +
              gem.homepage = "http://github.com/johnallen3d/amazon-album-art"
         
     | 
| 
      
 17 
     | 
    
         
            +
              gem.license = "MIT"
         
     | 
| 
      
 18 
     | 
    
         
            +
              gem.summary = %Q{A specialized Amazon AWS gem for finding Album Art}
         
     | 
| 
      
 19 
     | 
    
         
            +
              gem.description = %Q{A specialized Amazon AWS gem for finding Album Art running on top of the 'sucker' gem}
         
     | 
| 
      
 20 
     | 
    
         
            +
              gem.email = "john@threedogconsulting.com"
         
     | 
| 
      
 21 
     | 
    
         
            +
              gem.authors = ["John Allen"]
         
     | 
| 
      
 22 
     | 
    
         
            +
              # Include your dependencies below. Runtime dependencies are required when using your gem,
         
     | 
| 
      
 23 
     | 
    
         
            +
              # and development dependencies are only needed for development (ie running rake tasks, tests, etc)
         
     | 
| 
      
 24 
     | 
    
         
            +
              #  gem.add_runtime_dependency 'jabber4r', '> 0.1'
         
     | 
| 
      
 25 
     | 
    
         
            +
              #  gem.add_development_dependency 'rspec', '> 1.2.3'
         
     | 
| 
      
 26 
     | 
    
         
            +
              gem.add_runtime_dependency 'nokogiri', '>= 1.4.4'
         
     | 
| 
      
 27 
     | 
    
         
            +
              gem.add_runtime_dependency 'sucker', '>= 1.1.4'
         
     | 
| 
      
 28 
     | 
    
         
            +
              
         
     | 
| 
      
 29 
     | 
    
         
            +
            end
         
     | 
| 
      
 30 
     | 
    
         
            +
            Jeweler::RubygemsDotOrgTasks.new
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
      
 32 
     | 
    
         
            +
            require 'rake/testtask'
         
     | 
| 
      
 33 
     | 
    
         
            +
            Rake::TestTask.new(:test) do |test|
         
     | 
| 
      
 34 
     | 
    
         
            +
              test.libs << 'lib' << 'test'
         
     | 
| 
      
 35 
     | 
    
         
            +
              test.pattern = 'test/**/test_*.rb'
         
     | 
| 
      
 36 
     | 
    
         
            +
              test.verbose = true
         
     | 
| 
      
 37 
     | 
    
         
            +
            end
         
     | 
| 
      
 38 
     | 
    
         
            +
             
     | 
| 
      
 39 
     | 
    
         
            +
            require 'rcov/rcovtask'
         
     | 
| 
      
 40 
     | 
    
         
            +
            Rcov::RcovTask.new do |test|
         
     | 
| 
      
 41 
     | 
    
         
            +
              test.libs << 'test'
         
     | 
| 
      
 42 
     | 
    
         
            +
              test.pattern = 'test/**/test_*.rb'
         
     | 
| 
      
 43 
     | 
    
         
            +
              test.verbose = true
         
     | 
| 
      
 44 
     | 
    
         
            +
            end
         
     | 
| 
      
 45 
     | 
    
         
            +
             
     | 
| 
      
 46 
     | 
    
         
            +
            task :default => :test
         
     | 
| 
      
 47 
     | 
    
         
            +
             
     | 
| 
      
 48 
     | 
    
         
            +
            require 'rake/rdoctask'
         
     | 
| 
      
 49 
     | 
    
         
            +
            Rake::RDocTask.new do |rdoc|
         
     | 
| 
      
 50 
     | 
    
         
            +
              version = File.exist?('VERSION') ? File.read('VERSION') : ""
         
     | 
| 
      
 51 
     | 
    
         
            +
             
     | 
| 
      
 52 
     | 
    
         
            +
              rdoc.rdoc_dir = 'rdoc'
         
     | 
| 
      
 53 
     | 
    
         
            +
              rdoc.title = "amazon-album-art #{version}"
         
     | 
| 
      
 54 
     | 
    
         
            +
              rdoc.rdoc_files.include('README*')
         
     | 
| 
      
 55 
     | 
    
         
            +
              rdoc.rdoc_files.include('lib/**/*.rb')
         
     | 
| 
      
 56 
     | 
    
         
            +
            end
         
     | 
    
        data/VERSION
    ADDED
    
    | 
         @@ -0,0 +1 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            0.1.0
         
     | 
| 
         @@ -0,0 +1,77 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            # Generated by jeweler
         
     | 
| 
      
 2 
     | 
    
         
            +
            # DO NOT EDIT THIS FILE DIRECTLY
         
     | 
| 
      
 3 
     | 
    
         
            +
            # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
         
     | 
| 
      
 4 
     | 
    
         
            +
            # -*- encoding: utf-8 -*-
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
            Gem::Specification.new do |s|
         
     | 
| 
      
 7 
     | 
    
         
            +
              s.name = %q{amazon-album-art}
         
     | 
| 
      
 8 
     | 
    
         
            +
              s.version = "0.1.0"
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
              s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
         
     | 
| 
      
 11 
     | 
    
         
            +
              s.authors = ["John Allen"]
         
     | 
| 
      
 12 
     | 
    
         
            +
              s.date = %q{2011-01-13}
         
     | 
| 
      
 13 
     | 
    
         
            +
              s.description = %q{A specialized Amazon AWS gem for finding Album Art running on top of the 'sucker' gem}
         
     | 
| 
      
 14 
     | 
    
         
            +
              s.email = %q{john@threedogconsulting.com}
         
     | 
| 
      
 15 
     | 
    
         
            +
              s.extra_rdoc_files = [
         
     | 
| 
      
 16 
     | 
    
         
            +
                "LICENSE.txt",
         
     | 
| 
      
 17 
     | 
    
         
            +
                "README.rdoc"
         
     | 
| 
      
 18 
     | 
    
         
            +
              ]
         
     | 
| 
      
 19 
     | 
    
         
            +
              s.files = [
         
     | 
| 
      
 20 
     | 
    
         
            +
                ".document",
         
     | 
| 
      
 21 
     | 
    
         
            +
                "Gemfile",
         
     | 
| 
      
 22 
     | 
    
         
            +
                "Gemfile.lock",
         
     | 
| 
      
 23 
     | 
    
         
            +
                "LICENSE.txt",
         
     | 
| 
      
 24 
     | 
    
         
            +
                "README.rdoc",
         
     | 
| 
      
 25 
     | 
    
         
            +
                "Rakefile",
         
     | 
| 
      
 26 
     | 
    
         
            +
                "VERSION",
         
     | 
| 
      
 27 
     | 
    
         
            +
                "amazon-album-art.gemspec",
         
     | 
| 
      
 28 
     | 
    
         
            +
                "lib/amazon-album-art.rb",
         
     | 
| 
      
 29 
     | 
    
         
            +
                "lib/amazon-album-art/client.rb",
         
     | 
| 
      
 30 
     | 
    
         
            +
                "test/helper.rb",
         
     | 
| 
      
 31 
     | 
    
         
            +
                "test/test_amazon-album-art.rb"
         
     | 
| 
      
 32 
     | 
    
         
            +
              ]
         
     | 
| 
      
 33 
     | 
    
         
            +
              s.homepage = %q{http://github.com/johnallen3d/amazon-album-art}
         
     | 
| 
      
 34 
     | 
    
         
            +
              s.licenses = ["MIT"]
         
     | 
| 
      
 35 
     | 
    
         
            +
              s.require_paths = ["lib"]
         
     | 
| 
      
 36 
     | 
    
         
            +
              s.rubygems_version = %q{1.3.7}
         
     | 
| 
      
 37 
     | 
    
         
            +
              s.summary = %q{A specialized Amazon AWS gem for finding Album Art}
         
     | 
| 
      
 38 
     | 
    
         
            +
              s.test_files = [
         
     | 
| 
      
 39 
     | 
    
         
            +
                "test/helper.rb",
         
     | 
| 
      
 40 
     | 
    
         
            +
                "test/test_amazon-album-art.rb"
         
     | 
| 
      
 41 
     | 
    
         
            +
              ]
         
     | 
| 
      
 42 
     | 
    
         
            +
             
     | 
| 
      
 43 
     | 
    
         
            +
              if s.respond_to? :specification_version then
         
     | 
| 
      
 44 
     | 
    
         
            +
                current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
         
     | 
| 
      
 45 
     | 
    
         
            +
                s.specification_version = 3
         
     | 
| 
      
 46 
     | 
    
         
            +
             
     | 
| 
      
 47 
     | 
    
         
            +
                if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
         
     | 
| 
      
 48 
     | 
    
         
            +
                  s.add_runtime_dependency(%q<nokogiri>, [">= 1.4.4"])
         
     | 
| 
      
 49 
     | 
    
         
            +
                  s.add_runtime_dependency(%q<sucker>, [">= 1.1.4"])
         
     | 
| 
      
 50 
     | 
    
         
            +
                  s.add_development_dependency(%q<shoulda>, [">= 0"])
         
     | 
| 
      
 51 
     | 
    
         
            +
                  s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
         
     | 
| 
      
 52 
     | 
    
         
            +
                  s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
         
     | 
| 
      
 53 
     | 
    
         
            +
                  s.add_development_dependency(%q<rcov>, [">= 0"])
         
     | 
| 
      
 54 
     | 
    
         
            +
                  s.add_runtime_dependency(%q<nokogiri>, [">= 1.4.4"])
         
     | 
| 
      
 55 
     | 
    
         
            +
                  s.add_runtime_dependency(%q<sucker>, [">= 1.1.4"])
         
     | 
| 
      
 56 
     | 
    
         
            +
                else
         
     | 
| 
      
 57 
     | 
    
         
            +
                  s.add_dependency(%q<nokogiri>, [">= 1.4.4"])
         
     | 
| 
      
 58 
     | 
    
         
            +
                  s.add_dependency(%q<sucker>, [">= 1.1.4"])
         
     | 
| 
      
 59 
     | 
    
         
            +
                  s.add_dependency(%q<shoulda>, [">= 0"])
         
     | 
| 
      
 60 
     | 
    
         
            +
                  s.add_dependency(%q<bundler>, ["~> 1.0.0"])
         
     | 
| 
      
 61 
     | 
    
         
            +
                  s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
         
     | 
| 
      
 62 
     | 
    
         
            +
                  s.add_dependency(%q<rcov>, [">= 0"])
         
     | 
| 
      
 63 
     | 
    
         
            +
                  s.add_dependency(%q<nokogiri>, [">= 1.4.4"])
         
     | 
| 
      
 64 
     | 
    
         
            +
                  s.add_dependency(%q<sucker>, [">= 1.1.4"])
         
     | 
| 
      
 65 
     | 
    
         
            +
                end
         
     | 
| 
      
 66 
     | 
    
         
            +
              else
         
     | 
| 
      
 67 
     | 
    
         
            +
                s.add_dependency(%q<nokogiri>, [">= 1.4.4"])
         
     | 
| 
      
 68 
     | 
    
         
            +
                s.add_dependency(%q<sucker>, [">= 1.1.4"])
         
     | 
| 
      
 69 
     | 
    
         
            +
                s.add_dependency(%q<shoulda>, [">= 0"])
         
     | 
| 
      
 70 
     | 
    
         
            +
                s.add_dependency(%q<bundler>, ["~> 1.0.0"])
         
     | 
| 
      
 71 
     | 
    
         
            +
                s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
         
     | 
| 
      
 72 
     | 
    
         
            +
                s.add_dependency(%q<rcov>, [">= 0"])
         
     | 
| 
      
 73 
     | 
    
         
            +
                s.add_dependency(%q<nokogiri>, [">= 1.4.4"])
         
     | 
| 
      
 74 
     | 
    
         
            +
                s.add_dependency(%q<sucker>, [">= 1.1.4"])
         
     | 
| 
      
 75 
     | 
    
         
            +
              end
         
     | 
| 
      
 76 
     | 
    
         
            +
            end
         
     | 
| 
      
 77 
     | 
    
         
            +
             
     | 
| 
         @@ -0,0 +1 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'amazon-album-art/client'
         
     | 
| 
         @@ -0,0 +1,114 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'nokogiri'
         
     | 
| 
      
 2 
     | 
    
         
            +
            require 'sucker'
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
            module AmazonAlbumArt
         
     | 
| 
      
 5 
     | 
    
         
            +
             
     | 
| 
      
 6 
     | 
    
         
            +
              def self.new(access_key, secret_key, locale = "us")
         
     | 
| 
      
 7 
     | 
    
         
            +
                Client.new(access_key, secret_key, locale)
         
     | 
| 
      
 8 
     | 
    
         
            +
              end
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
              class Client
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
                def initialize(access_key, secret_key, locale)
         
     | 
| 
      
 13 
     | 
    
         
            +
                  raise ArgumentError.new("An access and secret key are require") if access_key.blank? || secret_key.blank?
         
     | 
| 
      
 14 
     | 
    
         
            +
                  
         
     | 
| 
      
 15 
     | 
    
         
            +
                  @worker = Sucker.new(
         
     | 
| 
      
 16 
     | 
    
         
            +
                    :locale => "us",
         
     | 
| 
      
 17 
     | 
    
         
            +
                    :key    => access_key, 
         
     | 
| 
      
 18 
     | 
    
         
            +
                    :secret => secret_key
         
     | 
| 
      
 19 
     | 
    
         
            +
                  )
         
     | 
| 
      
 20 
     | 
    
         
            +
                end
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
                def search(artist, album, sizes = [:swatch, :small, :thumbnail, :tiny, :medium, :large])
         
     | 
| 
      
 23 
     | 
    
         
            +
                  raise ArgumentError.new("An artist and album are required to search") if artist.blank? || album.blank?
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
      
 25 
     | 
    
         
            +
                  # Prepare a request.
         
     | 
| 
      
 26 
     | 
    
         
            +
                  @worker << {
         
     | 
| 
      
 27 
     | 
    
         
            +
                    "Operation"     => "ItemSearch",
         
     | 
| 
      
 28 
     | 
    
         
            +
                    "SearchIndex"   => "Music",
         
     | 
| 
      
 29 
     | 
    
         
            +
                    "Title"         => album,
         
     | 
| 
      
 30 
     | 
    
         
            +
                    "Artist"        => artist
         
     | 
| 
      
 31 
     | 
    
         
            +
                  }
         
     | 
| 
      
 32 
     | 
    
         
            +
             
     | 
| 
      
 33 
     | 
    
         
            +
                  # Get a response.
         
     | 
| 
      
 34 
     | 
    
         
            +
                  results = @worker.get
         
     | 
| 
      
 35 
     | 
    
         
            +
             
     | 
| 
      
 36 
     | 
    
         
            +
                  # Make sure nothing went awry.
         
     | 
| 
      
 37 
     | 
    
         
            +
                  raise AmazonAlbumArtError.new("Error finding album") unless results.valid?
         
     | 
| 
      
 38 
     | 
    
         
            +
             
     | 
| 
      
 39 
     | 
    
         
            +
                  # Now parse it.
         
     | 
| 
      
 40 
     | 
    
         
            +
                  results.map("Item") do |match|
         
     | 
| 
      
 41 
     | 
    
         
            +
                    attribs = match['ItemAttributes']
         
     | 
| 
      
 42 
     | 
    
         
            +
             
     | 
| 
      
 43 
     | 
    
         
            +
                    # grab values that were returned
         
     | 
| 
      
 44 
     | 
    
         
            +
                    found_artist, found_album = (attribs['Artist'] ||= attribs['Author'] ||= attribs["Creator"]["__content__"]), match['ItemAttributes']['Title']
         
     | 
| 
      
 45 
     | 
    
         
            +
             
     | 
| 
      
 46 
     | 
    
         
            +
                    # check to see if we have a reasonable match
         
     | 
| 
      
 47 
     | 
    
         
            +
                    next unless !found_album.blank? && !found_artist.blank? && matches?(album, found_album) && matches?(artist, found_artist)
         
     | 
| 
      
 48 
     | 
    
         
            +
             
     | 
| 
      
 49 
     | 
    
         
            +
                    # remove params not used for image search
         
     | 
| 
      
 50 
     | 
    
         
            +
                    @worker.parameters.delete_if { |k,v| %w{SearchIndex Title Artist}.include? k }
         
     | 
| 
      
 51 
     | 
    
         
            +
             
     | 
| 
      
 52 
     | 
    
         
            +
                    # fetch images
         
     | 
| 
      
 53 
     | 
    
         
            +
                    @worker << {
         
     | 
| 
      
 54 
     | 
    
         
            +
                      "Operation"     => "ItemLookup",
         
     | 
| 
      
 55 
     | 
    
         
            +
                      "IdType"        => "ASIN",
         
     | 
| 
      
 56 
     | 
    
         
            +
                      "ResponseGroup" => "Images",
         
     | 
| 
      
 57 
     | 
    
         
            +
                      "ItemId"        => match["ASIN"]
         
     | 
| 
      
 58 
     | 
    
         
            +
                    }
         
     | 
| 
      
 59 
     | 
    
         
            +
             
     | 
| 
      
 60 
     | 
    
         
            +
                    # Get a response.
         
     | 
| 
      
 61 
     | 
    
         
            +
                    images = @worker.get
         
     | 
| 
      
 62 
     | 
    
         
            +
             
     | 
| 
      
 63 
     | 
    
         
            +
                    # Make sure nothing went awry.
         
     | 
| 
      
 64 
     | 
    
         
            +
                    raise AmazonAlbumArtError.new("Error finding images") unless images.valid?
         
     | 
| 
      
 65 
     | 
    
         
            +
             
     | 
| 
      
 66 
     | 
    
         
            +
                    # parse response
         
     | 
| 
      
 67 
     | 
    
         
            +
                    doc = Nokogiri::XML.parse(images.body)
         
     | 
| 
      
 68 
     | 
    
         
            +
             
     | 
| 
      
 69 
     | 
    
         
            +
                    urls = {}
         
     | 
| 
      
 70 
     | 
    
         
            +
             
     | 
| 
      
 71 
     | 
    
         
            +
                    # build the hash with requested values
         
     | 
| 
      
 72 
     | 
    
         
            +
                    sizes.each do |size|
         
     | 
| 
      
 73 
     | 
    
         
            +
                      urls.merge!({ size => doc.css("Item > ImageSets > ImageSet[@Category=\"primary\"] > #{size.to_s.capitalize}Image > URL").text })
         
     | 
| 
      
 74 
     | 
    
         
            +
                    end
         
     | 
| 
      
 75 
     | 
    
         
            +
             
     | 
| 
      
 76 
     | 
    
         
            +
                    return { :artist => found_artist, :album => found_album, :images => urls }
         
     | 
| 
      
 77 
     | 
    
         
            +
                  end
         
     | 
| 
      
 78 
     | 
    
         
            +
                end
         
     | 
| 
      
 79 
     | 
    
         
            +
             
     | 
| 
      
 80 
     | 
    
         
            +
                def matches?(s1, s2, tolerance = 2)
         
     | 
| 
      
 81 
     | 
    
         
            +
                  s1 == s2 ||
         
     | 
| 
      
 82 
     | 
    
         
            +
                  s1 =~ /#{Regexp.escape s2}/i ||
         
     | 
| 
      
 83 
     | 
    
         
            +
                  s2 =~ /#{Regexp.escape s1}/i ||
         
     | 
| 
      
 84 
     | 
    
         
            +
                  (levenshtein(s1, s2) <= tolerance)
         
     | 
| 
      
 85 
     | 
    
         
            +
                end
         
     | 
| 
      
 86 
     | 
    
         
            +
             
     | 
| 
      
 87 
     | 
    
         
            +
                def levenshtein(str1, str2)
         
     | 
| 
      
 88 
     | 
    
         
            +
                  s, t = [str1.unpack('U*'), str2.unpack('U*')]
         
     | 
| 
      
 89 
     | 
    
         
            +
                  n, m = [s.length, t.length]
         
     | 
| 
      
 90 
     | 
    
         
            +
                  return m if (0 == n)
         
     | 
| 
      
 91 
     | 
    
         
            +
                  return n if (0 == m)
         
     | 
| 
      
 92 
     | 
    
         
            +
                  d = (0..m).to_a
         
     | 
| 
      
 93 
     | 
    
         
            +
                  x = nil
         
     | 
| 
      
 94 
     | 
    
         
            +
                  (0...n).each do |i|
         
     | 
| 
      
 95 
     | 
    
         
            +
                      e = i+1
         
     | 
| 
      
 96 
     | 
    
         
            +
                      (0...m).each do |j|
         
     | 
| 
      
 97 
     | 
    
         
            +
                          cost = (s[i] == t[j]) ? 0 : 1
         
     | 
| 
      
 98 
     | 
    
         
            +
                          x = [d[j+1] + 1, e + 1, d[j] + cost].min
         
     | 
| 
      
 99 
     | 
    
         
            +
                          d[j] = e
         
     | 
| 
      
 100 
     | 
    
         
            +
                          e = x
         
     | 
| 
      
 101 
     | 
    
         
            +
                      end
         
     | 
| 
      
 102 
     | 
    
         
            +
                      d[m] = x
         
     | 
| 
      
 103 
     | 
    
         
            +
                  end
         
     | 
| 
      
 104 
     | 
    
         
            +
                  return x
         
     | 
| 
      
 105 
     | 
    
         
            +
                end
         
     | 
| 
      
 106 
     | 
    
         
            +
              end
         
     | 
| 
      
 107 
     | 
    
         
            +
              
         
     | 
| 
      
 108 
     | 
    
         
            +
              class AmazonAlbumArtError < StandardError
         
     | 
| 
      
 109 
     | 
    
         
            +
                alias :msg :message
         
     | 
| 
      
 110 
     | 
    
         
            +
                def initialize(msg)
         
     | 
| 
      
 111 
     | 
    
         
            +
                  super(msg)
         
     | 
| 
      
 112 
     | 
    
         
            +
                end
         
     | 
| 
      
 113 
     | 
    
         
            +
              end
         
     | 
| 
      
 114 
     | 
    
         
            +
            end
         
     | 
    
        data/test/helper.rb
    ADDED
    
    | 
         @@ -0,0 +1,25 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'rubygems'
         
     | 
| 
      
 2 
     | 
    
         
            +
            require 'bundler'
         
     | 
| 
      
 3 
     | 
    
         
            +
            begin
         
     | 
| 
      
 4 
     | 
    
         
            +
              Bundler.setup(:default, :development)
         
     | 
| 
      
 5 
     | 
    
         
            +
            rescue Bundler::BundlerError => e
         
     | 
| 
      
 6 
     | 
    
         
            +
              $stderr.puts e.message
         
     | 
| 
      
 7 
     | 
    
         
            +
              $stderr.puts "Run `bundle install` to install missing gems"
         
     | 
| 
      
 8 
     | 
    
         
            +
              exit e.status_code
         
     | 
| 
      
 9 
     | 
    
         
            +
            end
         
     | 
| 
      
 10 
     | 
    
         
            +
            require 'test/unit'
         
     | 
| 
      
 11 
     | 
    
         
            +
            require 'shoulda'
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
            $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
         
     | 
| 
      
 14 
     | 
    
         
            +
            $LOAD_PATH.unshift(File.dirname(__FILE__))
         
     | 
| 
      
 15 
     | 
    
         
            +
            require 'amazon-album-art'
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
            class Test::Unit::TestCase
         
     | 
| 
      
 18 
     | 
    
         
            +
              def api_key
         
     | 
| 
      
 19 
     | 
    
         
            +
                'test_key'
         
     | 
| 
      
 20 
     | 
    
         
            +
              end
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
              def secret_key
         
     | 
| 
      
 23 
     | 
    
         
            +
                'secret_key'
         
     | 
| 
      
 24 
     | 
    
         
            +
              end
         
     | 
| 
      
 25 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,66 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'helper'
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            class TestAmazonAlbumArt < Test::Unit::TestCase
         
     | 
| 
      
 4 
     | 
    
         
            +
              context "amazon-album-art module" do
         
     | 
| 
      
 5 
     | 
    
         
            +
                  should "create a new client" do
         
     | 
| 
      
 6 
     | 
    
         
            +
                    c = AmazonAlbumArt.new(api_key, secret_key)
         
     | 
| 
      
 7 
     | 
    
         
            +
                    assert_equal AmazonAlbumArt::Client, c.class
         
     | 
| 
      
 8 
     | 
    
         
            +
                  end
         
     | 
| 
      
 9 
     | 
    
         
            +
                end
         
     | 
| 
      
 10 
     | 
    
         
            +
                context "using the amazon-amazon-art client" do
         
     | 
| 
      
 11 
     | 
    
         
            +
                  setup do
         
     | 
| 
      
 12 
     | 
    
         
            +
                    @client = AmazonAlbumArt.new(api_key, secret_key)
         
     | 
| 
      
 13 
     | 
    
         
            +
                  end
         
     | 
| 
      
 14 
     | 
    
         
            +
                  context "search for known items" do
         
     | 
| 
      
 15 
     | 
    
         
            +
                    context "and for all images sizes" do
         
     | 
| 
      
 16 
     | 
    
         
            +
                      setup do
         
     | 
| 
      
 17 
     | 
    
         
            +
                        @result = @client.search("phish", "rift")
         
     | 
| 
      
 18 
     | 
    
         
            +
                      end
         
     | 
| 
      
 19 
     | 
    
         
            +
                      should "return a hash" do
         
     | 
| 
      
 20 
     | 
    
         
            +
                        assert_kind_of Hash, @result
         
     | 
| 
      
 21 
     | 
    
         
            +
                      end
         
     | 
| 
      
 22 
     | 
    
         
            +
                      should "include the found artists name" do
         
     | 
| 
      
 23 
     | 
    
         
            +
                        assert_equal "Phish", @result[:artist]
         
     | 
| 
      
 24 
     | 
    
         
            +
                      end
         
     | 
| 
      
 25 
     | 
    
         
            +
                      should "include the found artists name" do
         
     | 
| 
      
 26 
     | 
    
         
            +
                        assert_equal "Rift", @result[:album]
         
     | 
| 
      
 27 
     | 
    
         
            +
                      end
         
     | 
| 
      
 28 
     | 
    
         
            +
                      should "include an images key" do
         
     | 
| 
      
 29 
     | 
    
         
            +
                        assert @result.has_key?(:images)
         
     | 
| 
      
 30 
     | 
    
         
            +
                      end
         
     | 
| 
      
 31 
     | 
    
         
            +
                      setup do
         
     | 
| 
      
 32 
     | 
    
         
            +
                        @images = @result[:images]
         
     | 
| 
      
 33 
     | 
    
         
            +
                      end
         
     | 
| 
      
 34 
     | 
    
         
            +
                      should "include include all image sizes" do
         
     | 
| 
      
 35 
     | 
    
         
            +
                        [:swatch, :small, :thumbnail, :tiny, :medium, :large].each do |key|
         
     | 
| 
      
 36 
     | 
    
         
            +
                          assert @images.has_key?(key)
         
     | 
| 
      
 37 
     | 
    
         
            +
                        end
         
     | 
| 
      
 38 
     | 
    
         
            +
                      end
         
     | 
| 
      
 39 
     | 
    
         
            +
                    end
         
     | 
| 
      
 40 
     | 
    
         
            +
                    context "and just a medium search" do
         
     | 
| 
      
 41 
     | 
    
         
            +
                      setup do
         
     | 
| 
      
 42 
     | 
    
         
            +
                        @result = @client.search("phish", "rift", [:medium])
         
     | 
| 
      
 43 
     | 
    
         
            +
                      end
         
     | 
| 
      
 44 
     | 
    
         
            +
                      context "just a medium image" do
         
     | 
| 
      
 45 
     | 
    
         
            +
                        should "include a medium image url" do
         
     | 
| 
      
 46 
     | 
    
         
            +
                          assert_equal "http://ecx.images-amazon.com/images/I/511RmbQV7dL._SL160_.jpg", @result[:images][:medium]
         
     | 
| 
      
 47 
     | 
    
         
            +
                        end
         
     | 
| 
      
 48 
     | 
    
         
            +
                      end
         
     | 
| 
      
 49 
     | 
    
         
            +
                    end
         
     | 
| 
      
 50 
     | 
    
         
            +
                    context "no search values" do
         
     | 
| 
      
 51 
     | 
    
         
            +
                      should "raise an ArgumentError" do
         
     | 
| 
      
 52 
     | 
    
         
            +
                        assert_raise ArgumentError do
         
     | 
| 
      
 53 
     | 
    
         
            +
                          @client.search
         
     | 
| 
      
 54 
     | 
    
         
            +
                        end
         
     | 
| 
      
 55 
     | 
    
         
            +
                      end
         
     | 
| 
      
 56 
     | 
    
         
            +
                    end
         
     | 
| 
      
 57 
     | 
    
         
            +
                  end
         
     | 
| 
      
 58 
     | 
    
         
            +
                end
         
     | 
| 
      
 59 
     | 
    
         
            +
                context "no keys" do
         
     | 
| 
      
 60 
     | 
    
         
            +
                  should "raise an ArgumentError" do
         
     | 
| 
      
 61 
     | 
    
         
            +
                    assert_raise ArgumentError do
         
     | 
| 
      
 62 
     | 
    
         
            +
                      AmazonAlbumArt.new
         
     | 
| 
      
 63 
     | 
    
         
            +
                    end
         
     | 
| 
      
 64 
     | 
    
         
            +
                  end
         
     | 
| 
      
 65 
     | 
    
         
            +
                end
         
     | 
| 
      
 66 
     | 
    
         
            +
            end
         
     | 
    
        metadata
    ADDED
    
    | 
         @@ -0,0 +1,193 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            --- !ruby/object:Gem::Specification 
         
     | 
| 
      
 2 
     | 
    
         
            +
            name: amazon-album-art
         
     | 
| 
      
 3 
     | 
    
         
            +
            version: !ruby/object:Gem::Version 
         
     | 
| 
      
 4 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 5 
     | 
    
         
            +
              segments: 
         
     | 
| 
      
 6 
     | 
    
         
            +
              - 0
         
     | 
| 
      
 7 
     | 
    
         
            +
              - 1
         
     | 
| 
      
 8 
     | 
    
         
            +
              - 0
         
     | 
| 
      
 9 
     | 
    
         
            +
              version: 0.1.0
         
     | 
| 
      
 10 
     | 
    
         
            +
            platform: ruby
         
     | 
| 
      
 11 
     | 
    
         
            +
            authors: 
         
     | 
| 
      
 12 
     | 
    
         
            +
            - John Allen
         
     | 
| 
      
 13 
     | 
    
         
            +
            autorequire: 
         
     | 
| 
      
 14 
     | 
    
         
            +
            bindir: bin
         
     | 
| 
      
 15 
     | 
    
         
            +
            cert_chain: []
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
            date: 2011-01-13 00:00:00 -05:00
         
     | 
| 
      
 18 
     | 
    
         
            +
            default_executable: 
         
     | 
| 
      
 19 
     | 
    
         
            +
            dependencies: 
         
     | 
| 
      
 20 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency 
         
     | 
| 
      
 21 
     | 
    
         
            +
              name: nokogiri
         
     | 
| 
      
 22 
     | 
    
         
            +
              requirement: &id001 !ruby/object:Gem::Requirement 
         
     | 
| 
      
 23 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 24 
     | 
    
         
            +
                requirements: 
         
     | 
| 
      
 25 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 26 
     | 
    
         
            +
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 27 
     | 
    
         
            +
                    segments: 
         
     | 
| 
      
 28 
     | 
    
         
            +
                    - 1
         
     | 
| 
      
 29 
     | 
    
         
            +
                    - 4
         
     | 
| 
      
 30 
     | 
    
         
            +
                    - 4
         
     | 
| 
      
 31 
     | 
    
         
            +
                    version: 1.4.4
         
     | 
| 
      
 32 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 33 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 34 
     | 
    
         
            +
              version_requirements: *id001
         
     | 
| 
      
 35 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency 
         
     | 
| 
      
 36 
     | 
    
         
            +
              name: sucker
         
     | 
| 
      
 37 
     | 
    
         
            +
              requirement: &id002 !ruby/object:Gem::Requirement 
         
     | 
| 
      
 38 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 39 
     | 
    
         
            +
                requirements: 
         
     | 
| 
      
 40 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 41 
     | 
    
         
            +
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 42 
     | 
    
         
            +
                    segments: 
         
     | 
| 
      
 43 
     | 
    
         
            +
                    - 1
         
     | 
| 
      
 44 
     | 
    
         
            +
                    - 1
         
     | 
| 
      
 45 
     | 
    
         
            +
                    - 4
         
     | 
| 
      
 46 
     | 
    
         
            +
                    version: 1.1.4
         
     | 
| 
      
 47 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 48 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 49 
     | 
    
         
            +
              version_requirements: *id002
         
     | 
| 
      
 50 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency 
         
     | 
| 
      
 51 
     | 
    
         
            +
              name: shoulda
         
     | 
| 
      
 52 
     | 
    
         
            +
              requirement: &id003 !ruby/object:Gem::Requirement 
         
     | 
| 
      
 53 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 54 
     | 
    
         
            +
                requirements: 
         
     | 
| 
      
 55 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 56 
     | 
    
         
            +
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 57 
     | 
    
         
            +
                    segments: 
         
     | 
| 
      
 58 
     | 
    
         
            +
                    - 0
         
     | 
| 
      
 59 
     | 
    
         
            +
                    version: "0"
         
     | 
| 
      
 60 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 61 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 62 
     | 
    
         
            +
              version_requirements: *id003
         
     | 
| 
      
 63 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency 
         
     | 
| 
      
 64 
     | 
    
         
            +
              name: bundler
         
     | 
| 
      
 65 
     | 
    
         
            +
              requirement: &id004 !ruby/object:Gem::Requirement 
         
     | 
| 
      
 66 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 67 
     | 
    
         
            +
                requirements: 
         
     | 
| 
      
 68 
     | 
    
         
            +
                - - ~>
         
     | 
| 
      
 69 
     | 
    
         
            +
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 70 
     | 
    
         
            +
                    segments: 
         
     | 
| 
      
 71 
     | 
    
         
            +
                    - 1
         
     | 
| 
      
 72 
     | 
    
         
            +
                    - 0
         
     | 
| 
      
 73 
     | 
    
         
            +
                    - 0
         
     | 
| 
      
 74 
     | 
    
         
            +
                    version: 1.0.0
         
     | 
| 
      
 75 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 76 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 77 
     | 
    
         
            +
              version_requirements: *id004
         
     | 
| 
      
 78 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency 
         
     | 
| 
      
 79 
     | 
    
         
            +
              name: jeweler
         
     | 
| 
      
 80 
     | 
    
         
            +
              requirement: &id005 !ruby/object:Gem::Requirement 
         
     | 
| 
      
 81 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 82 
     | 
    
         
            +
                requirements: 
         
     | 
| 
      
 83 
     | 
    
         
            +
                - - ~>
         
     | 
| 
      
 84 
     | 
    
         
            +
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 85 
     | 
    
         
            +
                    segments: 
         
     | 
| 
      
 86 
     | 
    
         
            +
                    - 1
         
     | 
| 
      
 87 
     | 
    
         
            +
                    - 5
         
     | 
| 
      
 88 
     | 
    
         
            +
                    - 2
         
     | 
| 
      
 89 
     | 
    
         
            +
                    version: 1.5.2
         
     | 
| 
      
 90 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 91 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 92 
     | 
    
         
            +
              version_requirements: *id005
         
     | 
| 
      
 93 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency 
         
     | 
| 
      
 94 
     | 
    
         
            +
              name: rcov
         
     | 
| 
      
 95 
     | 
    
         
            +
              requirement: &id006 !ruby/object:Gem::Requirement 
         
     | 
| 
      
 96 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 97 
     | 
    
         
            +
                requirements: 
         
     | 
| 
      
 98 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 99 
     | 
    
         
            +
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 100 
     | 
    
         
            +
                    segments: 
         
     | 
| 
      
 101 
     | 
    
         
            +
                    - 0
         
     | 
| 
      
 102 
     | 
    
         
            +
                    version: "0"
         
     | 
| 
      
 103 
     | 
    
         
            +
              type: :development
         
     | 
| 
      
 104 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 105 
     | 
    
         
            +
              version_requirements: *id006
         
     | 
| 
      
 106 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency 
         
     | 
| 
      
 107 
     | 
    
         
            +
              name: nokogiri
         
     | 
| 
      
 108 
     | 
    
         
            +
              requirement: &id007 !ruby/object:Gem::Requirement 
         
     | 
| 
      
 109 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 110 
     | 
    
         
            +
                requirements: 
         
     | 
| 
      
 111 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 112 
     | 
    
         
            +
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 113 
     | 
    
         
            +
                    segments: 
         
     | 
| 
      
 114 
     | 
    
         
            +
                    - 1
         
     | 
| 
      
 115 
     | 
    
         
            +
                    - 4
         
     | 
| 
      
 116 
     | 
    
         
            +
                    - 4
         
     | 
| 
      
 117 
     | 
    
         
            +
                    version: 1.4.4
         
     | 
| 
      
 118 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 119 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 120 
     | 
    
         
            +
              version_requirements: *id007
         
     | 
| 
      
 121 
     | 
    
         
            +
            - !ruby/object:Gem::Dependency 
         
     | 
| 
      
 122 
     | 
    
         
            +
              name: sucker
         
     | 
| 
      
 123 
     | 
    
         
            +
              requirement: &id008 !ruby/object:Gem::Requirement 
         
     | 
| 
      
 124 
     | 
    
         
            +
                none: false
         
     | 
| 
      
 125 
     | 
    
         
            +
                requirements: 
         
     | 
| 
      
 126 
     | 
    
         
            +
                - - ">="
         
     | 
| 
      
 127 
     | 
    
         
            +
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 128 
     | 
    
         
            +
                    segments: 
         
     | 
| 
      
 129 
     | 
    
         
            +
                    - 1
         
     | 
| 
      
 130 
     | 
    
         
            +
                    - 1
         
     | 
| 
      
 131 
     | 
    
         
            +
                    - 4
         
     | 
| 
      
 132 
     | 
    
         
            +
                    version: 1.1.4
         
     | 
| 
      
 133 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
      
 134 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 135 
     | 
    
         
            +
              version_requirements: *id008
         
     | 
| 
      
 136 
     | 
    
         
            +
            description: A specialized Amazon AWS gem for finding Album Art running on top of the 'sucker' gem
         
     | 
| 
      
 137 
     | 
    
         
            +
            email: john@threedogconsulting.com
         
     | 
| 
      
 138 
     | 
    
         
            +
            executables: []
         
     | 
| 
      
 139 
     | 
    
         
            +
             
     | 
| 
      
 140 
     | 
    
         
            +
            extensions: []
         
     | 
| 
      
 141 
     | 
    
         
            +
             
     | 
| 
      
 142 
     | 
    
         
            +
            extra_rdoc_files: 
         
     | 
| 
      
 143 
     | 
    
         
            +
            - LICENSE.txt
         
     | 
| 
      
 144 
     | 
    
         
            +
            - README.rdoc
         
     | 
| 
      
 145 
     | 
    
         
            +
            files: 
         
     | 
| 
      
 146 
     | 
    
         
            +
            - .document
         
     | 
| 
      
 147 
     | 
    
         
            +
            - Gemfile
         
     | 
| 
      
 148 
     | 
    
         
            +
            - Gemfile.lock
         
     | 
| 
      
 149 
     | 
    
         
            +
            - LICENSE.txt
         
     | 
| 
      
 150 
     | 
    
         
            +
            - README.rdoc
         
     | 
| 
      
 151 
     | 
    
         
            +
            - Rakefile
         
     | 
| 
      
 152 
     | 
    
         
            +
            - VERSION
         
     | 
| 
      
 153 
     | 
    
         
            +
            - amazon-album-art.gemspec
         
     | 
| 
      
 154 
     | 
    
         
            +
            - lib/amazon-album-art.rb
         
     | 
| 
      
 155 
     | 
    
         
            +
            - lib/amazon-album-art/client.rb
         
     | 
| 
      
 156 
     | 
    
         
            +
            - test/helper.rb
         
     | 
| 
      
 157 
     | 
    
         
            +
            - test/test_amazon-album-art.rb
         
     | 
| 
      
 158 
     | 
    
         
            +
            has_rdoc: true
         
     | 
| 
      
 159 
     | 
    
         
            +
            homepage: http://github.com/johnallen3d/amazon-album-art
         
     | 
| 
      
 160 
     | 
    
         
            +
            licenses: 
         
     | 
| 
      
 161 
     | 
    
         
            +
            - MIT
         
     | 
| 
      
 162 
     | 
    
         
            +
            post_install_message: 
         
     | 
| 
      
 163 
     | 
    
         
            +
            rdoc_options: []
         
     | 
| 
      
 164 
     | 
    
         
            +
             
     | 
| 
      
 165 
     | 
    
         
            +
            require_paths: 
         
     | 
| 
      
 166 
     | 
    
         
            +
            - lib
         
     | 
| 
      
 167 
     | 
    
         
            +
            required_ruby_version: !ruby/object:Gem::Requirement 
         
     | 
| 
      
 168 
     | 
    
         
            +
              none: false
         
     | 
| 
      
 169 
     | 
    
         
            +
              requirements: 
         
     | 
| 
      
 170 
     | 
    
         
            +
              - - ">="
         
     | 
| 
      
 171 
     | 
    
         
            +
                - !ruby/object:Gem::Version 
         
     | 
| 
      
 172 
     | 
    
         
            +
                  hash: 3269156557234574606
         
     | 
| 
      
 173 
     | 
    
         
            +
                  segments: 
         
     | 
| 
      
 174 
     | 
    
         
            +
                  - 0
         
     | 
| 
      
 175 
     | 
    
         
            +
                  version: "0"
         
     | 
| 
      
 176 
     | 
    
         
            +
            required_rubygems_version: !ruby/object:Gem::Requirement 
         
     | 
| 
      
 177 
     | 
    
         
            +
              none: false
         
     | 
| 
      
 178 
     | 
    
         
            +
              requirements: 
         
     | 
| 
      
 179 
     | 
    
         
            +
              - - ">="
         
     | 
| 
      
 180 
     | 
    
         
            +
                - !ruby/object:Gem::Version 
         
     | 
| 
      
 181 
     | 
    
         
            +
                  segments: 
         
     | 
| 
      
 182 
     | 
    
         
            +
                  - 0
         
     | 
| 
      
 183 
     | 
    
         
            +
                  version: "0"
         
     | 
| 
      
 184 
     | 
    
         
            +
            requirements: []
         
     | 
| 
      
 185 
     | 
    
         
            +
             
     | 
| 
      
 186 
     | 
    
         
            +
            rubyforge_project: 
         
     | 
| 
      
 187 
     | 
    
         
            +
            rubygems_version: 1.3.7
         
     | 
| 
      
 188 
     | 
    
         
            +
            signing_key: 
         
     | 
| 
      
 189 
     | 
    
         
            +
            specification_version: 3
         
     | 
| 
      
 190 
     | 
    
         
            +
            summary: A specialized Amazon AWS gem for finding Album Art
         
     | 
| 
      
 191 
     | 
    
         
            +
            test_files: 
         
     | 
| 
      
 192 
     | 
    
         
            +
            - test/helper.rb
         
     | 
| 
      
 193 
     | 
    
         
            +
            - test/test_amazon-album-art.rb
         
     |