Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
27 lines (21 sloc) 922 Bytes
class Redpen < Formula
desc "Proofreading tool to help writers of technical documentation"
homepage ""
url ""
sha256 "39a148d3d89efef0e58ee7250e1bab7e26bf1edf83616934265c603623351fa0"
bottle :unneeded
depends_on :java => "1.8+"
def install
# Don't need Windows files.
rm_f Dir["bin/*.bat"]
libexec.install %w[conf lib sample-doc js]
prefix.install "bin"
bin.env_script_all_files(libexec/"bin", Language::Java.java_home_env("1.8+"))
test do
path = "#{libexec}/sample-doc/en/sampledoc-en.txt"
output = "#{bin}/redpen -l 20 -c #{libexec}/conf/redpen-conf-en.xml #{path}"
match = /^sampledoc-en.txt:1: ValidationError[SymbolWithSpace]*/
assert_match match, shell_output(output).split("\n").select { |line| line.start_with?("sampledoc-en.txt") }[0]
You can’t perform that action at this time.