gherkin 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.mailmap +2 -0
- data/History.txt +9 -0
- data/README.rdoc +14 -43
- data/Rakefile +13 -17
- data/VERSION.yml +1 -1
- data/bin/gherkin +2 -7
- data/features/feature_parser.feature +36 -36
- data/features/native_lexer.feature +2 -2
- data/features/parser_with_native_lexer.feature +32 -32
- data/features/pretty_printer.feature +4 -4
- data/features/step_definitions/pretty_printer_steps.rb +2 -2
- data/features/steps_parser.feature +5 -5
- data/gherkin.gemspec +28 -16
- data/java/src/gherkin/FixJava.java +4 -4
- data/lib/gherkin/cli/main.rb +34 -0
- data/lib/gherkin/i18n.rb +8 -1
- data/lib/gherkin/i18n.yml +201 -201
- data/lib/gherkin/i18n_lexer.rb +8 -8
- data/lib/gherkin/lexer.rb +2 -1
- data/lib/gherkin/tools.rb +8 -0
- data/lib/gherkin/tools/files.rb +30 -0
- data/lib/gherkin/tools/{pretty_printer.rb → pretty_listener.rb} +5 -4
- data/lib/gherkin/tools/reformat.rb +19 -0
- data/lib/gherkin/tools/stats.rb +21 -0
- data/lib/gherkin/tools/stats_listener.rb +50 -0
- data/nativegems.sh +1 -1
- data/ragel/lexer.java.rl.erb +58 -58
- data/spec/gherkin/i18n_lexer_spec.rb +22 -0
- data/tasks/bench.rake +0 -7
- data/tasks/compile.rake +4 -4
- metadata +30 -12
- data/bin/gherkin-purdy +0 -16
data/bin/gherkin-purdy
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
$:.unshift(File.dirname(__FILE__) + '/../lib') unless $:.include?(File.dirname(__FILE__) + '/../lib')
|
3
|
-
|
4
|
-
require 'stringio'
|
5
|
-
require 'gherkin'
|
6
|
-
require 'gherkin/tools/pretty_printer'
|
7
|
-
|
8
|
-
Dir[ARGV[0]].each do |f|
|
9
|
-
purdy = StringIO.new
|
10
|
-
listener = Gherkin::Tools::PrettyPrinter.new(purdy)
|
11
|
-
parser = Gherkin::Parser.new(listener, true) # We could skip the parser here, if we don't want to verify well-formedness
|
12
|
-
lexer = Gherkin::I18nLexer.new(parser)
|
13
|
-
lexer.scan(IO.read(f))
|
14
|
-
purdy.rewind
|
15
|
-
File.open(f, 'w') {|io| io.write(purdy.read)}
|
16
|
-
end
|