0.01
No release in over 3 years
Low commit activity in last 3 years
Interface to the W3C Feed Validation online service http://validator.w3.org/feed/
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

 Project Readme

FeedValidator Build Status Gem Version

FeedValidator is an interface to the W3C Feed Validation online service, based on its SOAP 1.2 support.

It helps to find errors in RSS or ATOM feeds.

FeedValidator add a new assertion (assert_valid_feed) which you can use in Rails applications. This assertion implements a cache to improve the performance of the tests and to not abuse of the W3C Feed Validation online service

Installation

Add this line to your application's Gemfile:

gem 'feed_validator'

And then execute:

$ bundle

Or install it yourself as:

$ gem install feed_validator

Examples

  • For use FeedValidator just do this:

    require 'feed_validator'
    
    v = W3C::FeedValidator.new()
    v.validate_url('http://www.w3.org/QA/news.rss')
    puts v.to_s unless v.valid?
  • In Rails you can use it in your functional tests, just modify your /test/test_helper.rb adding this line:

    require 'feed_validator/assertions'

    And now you can use in your functional test, in this way:

    def test_bar_valid_feed
      get :bar
      assert_valid_feed
    end

    Or use the class-level method to quickly create validation tests for a bunch of actions at once:

    assert_valid_feed :bar, :foo

Documentation

Documentation can be found at

License

FeedValidator is released under the MIT license.