/validate_page

validate links by parsing page which points to by the link

Primary LanguageRubyMIT LicenseMIT

Validate Page

Gem to validate link to pages based on content

To get started:

#Gemfile
gem 'validate_page'

#initializers/validate_page.rb
ValidatePage.set_parser(:text_parser)

#config/initializers/validate_page.rb
ValidatePage.set_validator(:capybara_validator) for pages from SPAs
OR
ValidatePage.set_validator(:text_validator) for fast and simple validation based on string match

#example model
validates_with ValidatePage.on(:name, 'offensive, violence, illegel, keyword_1, keyword_2, ...', 'The page you are trying to link has inappropreate content')