Sha256: 88523f6f662dd691195a70afb3e5e34b6791a4652f552fbae9abe7a1e090edf8

Contents?: true

Size: 558 Bytes

Versions: 4

Compression:

Stored size: 558 Bytes

Contents

#!/usr/bin/env ruby
$:.unshift(File.dirname(__FILE__) + '/../lib') unless $:.include?(File.dirname(__FILE__) + '/../lib')

require 'stringio'
require 'gherkin'
require 'gherkin/tools/pretty_printer'

Dir[ARGV[0]].each do |f|
  purdy = StringIO.new
  listener = Gherkin::Tools::PrettyPrinter.new(purdy)
  parser = Gherkin::Parser.new(listener, true) # We could skip the parser here, if we don't want to verify well-formedness
  lexer = Gherkin::I18nLexer.new(parser)
  lexer.scan(IO.read(f))
  purdy.rewind
  File.open(f, 'w') {|io| io.write(purdy.read)}
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
gherkin-1.0.1-i386-mswin32 bin/gherkin-purdy
gherkin-1.0.1-i386-mingw32 bin/gherkin-purdy
gherkin-1.0.1-universal-java-1.5 bin/gherkin-purdy
gherkin-1.0.1 bin/gherkin-purdy