Skip to content

YouWeApS/amazon_feed_validator

Repository files navigation

AmazonFeedValidator

Installation

Add this line to your application's Gemfile:

gem 'amazon_feed_validator'

Usage

To validate a single feed item based on Amazons feed type enumeration:

validator = AmazonFeedValidator.new(feed, name: 'Product')
validator.validate # => true or false
validator.errors # => ["Some error description"]

To validate a whole feed file:

validator = AmazonFeedValidator.new(feed, name: 'amzn-envelope')
validator.validate # => true or false
validator.errors # => ["Some error description"]

Development

To update xsd files run:

bundle exec rake amazon:xsd

Testing

To run all tests:

bundle exec rake

About

Validates amazon feeds

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •