phoet / asin

:books: :package: Amazon Simple INterface - Support for ItemLookup, SimilarityLookup, Search, BrowseNode and Cart Operations
http://asin.herokuapp.com/
167 stars 59 forks source link

adds snake_case_hash and uses Hashie::SCHash in place of Hashie::Rash #46

Closed corprew closed 8 years ago

corprew commented 8 years ago

Hashie::Rash was redefined in version 3.x of the Hashie gem to be a regular expression-based hash. This replaces Hashie::Rash with a new class, Hashie::SCHash, that includes the old functionality that Hashie::Rash had.

A new Gem was introduced because the old Rash gem is defunct and has been forked by a new maintainer, but it can't be loaded in a Gemspec because of differences between Bundler and how gemspec articulates requirements. (Gemspec doesn't support github-based paths, specifically.)

2.1.5 :012 >   ASIN::Configuration.configure do |config|
2.1.5 :013 >       config.key = ENV['AWS_KEY']
2.1.5 :014?>     config.secret = ENV['AWS_SECRET']
2.1.5 :015?>     config.associate_tag = ENV['AWS_TAG']
2.1.5 :016?>   end
[...]
2.1.5 :022 > item = ASIN::Client.instance.lookup 'B00SSQOJRS'
[...]
2.1.5 :024 > item.first.asin
 => "B00SSQOJRS"
2.1.5 :027 > item.first.class
 => Hashie::SCHash
phoet commented 8 years ago

@corprew thx, i've built 2.0.2 and pushed it to rubygems