RedPenRuby is a Ruby wrapper for redpen: a text inspection tool.
Add this line to your application's Gemfile:
gem 'redpen_ruby'
And then execute:
$ bundle install --path vendor/bundle --binstubs vendor/bundle/bin
Or install it yourself as:
$ gem install redpen_ruby
Usage CLI:
$ bundle exec redpen_ruby /path/to/config.xml /path/to/target_file
Usage Ruby script:
require 'redpen_ruby'
config_file = './lib/redpen-cli-1.1/conf/redpen-conf-en.xml'
target_file = './lib/redpen-cli-1.1/sample-doc/en/sampledoc-en.md'
redpen = RedpenRuby.check(config_file, target_file)
if redpen.valid?
puts 'Ok, Valid!'
else
puts redpen.messages
end
- Fork it ( https://github.com/[my-github-username]/redpen_ruby/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request