gherkin 2.7.6 → 2.7.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. data/History.md +6 -0
  2. data/README.md +1 -1
  3. data/ext/gherkin_lexer_ar/extconf.rb +1 -1
  4. data/ext/gherkin_lexer_bg/extconf.rb +1 -1
  5. data/ext/gherkin_lexer_ca/extconf.rb +1 -1
  6. data/ext/gherkin_lexer_cs/extconf.rb +1 -1
  7. data/ext/gherkin_lexer_cy_gb/extconf.rb +1 -1
  8. data/ext/gherkin_lexer_da/extconf.rb +1 -1
  9. data/ext/gherkin_lexer_de/extconf.rb +1 -1
  10. data/ext/gherkin_lexer_en/extconf.rb +1 -1
  11. data/ext/gherkin_lexer_en_au/extconf.rb +1 -1
  12. data/ext/gherkin_lexer_en_lol/extconf.rb +1 -1
  13. data/ext/gherkin_lexer_en_pirate/extconf.rb +1 -1
  14. data/ext/gherkin_lexer_en_scouse/extconf.rb +1 -1
  15. data/ext/gherkin_lexer_en_tx/extconf.rb +1 -1
  16. data/ext/gherkin_lexer_eo/extconf.rb +1 -1
  17. data/ext/gherkin_lexer_es/extconf.rb +1 -1
  18. data/ext/gherkin_lexer_et/extconf.rb +1 -1
  19. data/ext/gherkin_lexer_fi/extconf.rb +1 -1
  20. data/ext/gherkin_lexer_fr/extconf.rb +1 -1
  21. data/ext/gherkin_lexer_he/extconf.rb +1 -1
  22. data/ext/gherkin_lexer_hr/extconf.rb +1 -1
  23. data/ext/gherkin_lexer_hu/extconf.rb +1 -1
  24. data/ext/gherkin_lexer_id/extconf.rb +1 -1
  25. data/ext/gherkin_lexer_is/extconf.rb +1 -1
  26. data/ext/gherkin_lexer_it/extconf.rb +1 -1
  27. data/ext/gherkin_lexer_ja/extconf.rb +1 -1
  28. data/ext/gherkin_lexer_ko/extconf.rb +1 -1
  29. data/ext/gherkin_lexer_lt/extconf.rb +1 -1
  30. data/ext/gherkin_lexer_lu/extconf.rb +1 -1
  31. data/ext/gherkin_lexer_lv/extconf.rb +1 -1
  32. data/ext/gherkin_lexer_nl/extconf.rb +1 -1
  33. data/ext/gherkin_lexer_no/extconf.rb +1 -1
  34. data/ext/gherkin_lexer_pl/extconf.rb +1 -1
  35. data/ext/gherkin_lexer_pt/extconf.rb +1 -1
  36. data/ext/gherkin_lexer_ro/extconf.rb +1 -1
  37. data/ext/gherkin_lexer_ru/extconf.rb +1 -1
  38. data/ext/gherkin_lexer_sk/extconf.rb +1 -1
  39. data/ext/gherkin_lexer_sr_cyrl/extconf.rb +1 -1
  40. data/ext/gherkin_lexer_sr_latn/extconf.rb +1 -1
  41. data/ext/gherkin_lexer_sv/extconf.rb +1 -1
  42. data/ext/gherkin_lexer_tr/extconf.rb +1 -1
  43. data/ext/gherkin_lexer_uk/extconf.rb +1 -1
  44. data/ext/gherkin_lexer_uz/extconf.rb +1 -1
  45. data/ext/gherkin_lexer_vi/extconf.rb +1 -1
  46. data/ext/gherkin_lexer_zh_cn/extconf.rb +1 -1
  47. data/ext/gherkin_lexer_zh_tw/extconf.rb +1 -1
  48. data/gherkin.gemspec +2 -2
  49. data/lib/gherkin/formatter/ansi_escapes.rb +2 -0
  50. data/lib/gherkin/i18n.rb +11 -11
  51. data/lib/gherkin/lexer/i18n_lexer.rb +0 -1
  52. data/spec/gherkin/formatter/ansi_escapes_spec.rb +19 -6
  53. data/spec/gherkin/json_parser_spec.rb +10 -6
  54. data/tasks/compile.rake +1 -1
  55. data/tasks/ragel_task.rb +12 -1
  56. metadata +28 -28
data/History.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## [2.7.7](https://github.com/cucumber/gherkin/compare/v2.7.6...v2.7.7)
2
+
3
+ * [C] Allow compilation with clang (datanoise)
4
+ * [Ruby] Expose AnsiEscapes methods on the class level as well, for easy calling without inclusion ([#161](https://github.com/cucumber/gherkin/pull/161) Ben Woosley)
5
+ * [Ruby] Lexer load failure fix ([#159](https://github.com/cucumber/gherkin/pull/159) Ben Woosley)
6
+
1
7
  ## [2.7.6](https://github.com/cucumber/gherkin/compare/v2.7.5...v2.7.6)
2
8
 
3
9
  * [Java] Previous release accidentally had pretty formatting for both JSONFormatter and JSONPrettyFormatter (Aslak Hellesøy)
data/README.md CHANGED
@@ -54,7 +54,7 @@ The jar file is in the central Maven repo.
54
54
  <dependency>
55
55
  <groupId>info.cukes</groupId>
56
56
  <artifactId>gherkin</artifactId>
57
- <version>2.7.6</version>
57
+ <version>2.7.7</version>
58
58
  </dependency>
59
59
 
60
60
  You can get it manually from [Maven Central](http://search.maven.org/#browse%7C-2073395818)
@@ -1,6 +1,6 @@
1
1
  require 'mkmf'
2
2
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
3
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
3
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
4
4
  dir_config("gherkin_lexer_ar")
5
5
  have_library("c", "main")
6
6
  create_makefile("gherkin_lexer_ar")
@@ -1,6 +1,6 @@
1
1
  require 'mkmf'
2
2
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
3
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
3
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
4
4
  dir_config("gherkin_lexer_bg")
5
5
  have_library("c", "main")
6
6
  create_makefile("gherkin_lexer_bg")
@@ -1,6 +1,6 @@
1
1
  require 'mkmf'
2
2
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
3
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
3
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
4
4
  dir_config("gherkin_lexer_ca")
5
5
  have_library("c", "main")
6
6
  create_makefile("gherkin_lexer_ca")
@@ -1,6 +1,6 @@
1
1
  require 'mkmf'
2
2
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
3
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
3
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
4
4
  dir_config("gherkin_lexer_cs")
5
5
  have_library("c", "main")
6
6
  create_makefile("gherkin_lexer_cs")
@@ -1,6 +1,6 @@
1
1
  require 'mkmf'
2
2
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
3
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
3
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
4
4
  dir_config("gherkin_lexer_cy_gb")
5
5
  have_library("c", "main")
6
6
  create_makefile("gherkin_lexer_cy_gb")
@@ -1,6 +1,6 @@
1
1
  require 'mkmf'
2
2
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
3
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
3
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
4
4
  dir_config("gherkin_lexer_da")
5
5
  have_library("c", "main")
6
6
  create_makefile("gherkin_lexer_da")
@@ -1,6 +1,6 @@
1
1
  require 'mkmf'
2
2
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
3
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
3
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
4
4
  dir_config("gherkin_lexer_de")
5
5
  have_library("c", "main")
6
6
  create_makefile("gherkin_lexer_de")
@@ -1,6 +1,6 @@
1
1
  require 'mkmf'
2
2
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
3
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
3
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
4
4
  dir_config("gherkin_lexer_en")
5
5
  have_library("c", "main")
6
6
  create_makefile("gherkin_lexer_en")
@@ -1,6 +1,6 @@
1
1
  require 'mkmf'
2
2
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
3
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
3
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
4
4
  dir_config("gherkin_lexer_en_au")
5
5
  have_library("c", "main")
6
6
  create_makefile("gherkin_lexer_en_au")
@@ -1,6 +1,6 @@
1
1
  require 'mkmf'
2
2
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
3
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
3
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
4
4
  dir_config("gherkin_lexer_en_lol")
5
5
  have_library("c", "main")
6
6
  create_makefile("gherkin_lexer_en_lol")
@@ -1,6 +1,6 @@
1
1
  require 'mkmf'
2
2
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
3
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
3
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
4
4
  dir_config("gherkin_lexer_en_pirate")
5
5
  have_library("c", "main")
6
6
  create_makefile("gherkin_lexer_en_pirate")
@@ -1,6 +1,6 @@
1
1
  require 'mkmf'
2
2
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
3
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
3
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
4
4
  dir_config("gherkin_lexer_en_scouse")
5
5
  have_library("c", "main")
6
6
  create_makefile("gherkin_lexer_en_scouse")
@@ -1,6 +1,6 @@
1
1
  require 'mkmf'
2
2
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
3
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
3
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
4
4
  dir_config("gherkin_lexer_en_tx")
5
5
  have_library("c", "main")
6
6
  create_makefile("gherkin_lexer_en_tx")
@@ -1,6 +1,6 @@
1
1
  require 'mkmf'
2
2
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
3
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
3
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
4
4
  dir_config("gherkin_lexer_eo")
5
5
  have_library("c", "main")
6
6
  create_makefile("gherkin_lexer_eo")
@@ -1,6 +1,6 @@
1
1
  require 'mkmf'
2
2
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
3
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
3
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
4
4
  dir_config("gherkin_lexer_es")
5
5
  have_library("c", "main")
6
6
  create_makefile("gherkin_lexer_es")
@@ -1,6 +1,6 @@
1
1
  require 'mkmf'
2
2
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
3
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
3
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
4
4
  dir_config("gherkin_lexer_et")
5
5
  have_library("c", "main")
6
6
  create_makefile("gherkin_lexer_et")
@@ -1,6 +1,6 @@
1
1
  require 'mkmf'
2
2
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
3
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
3
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
4
4
  dir_config("gherkin_lexer_fi")
5
5
  have_library("c", "main")
6
6
  create_makefile("gherkin_lexer_fi")
@@ -1,6 +1,6 @@
1
1
  require 'mkmf'
2
2
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
3
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
3
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
4
4
  dir_config("gherkin_lexer_fr")
5
5
  have_library("c", "main")
6
6
  create_makefile("gherkin_lexer_fr")
@@ -1,6 +1,6 @@
1
1
  require 'mkmf'
2
2
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
3
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
3
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
4
4
  dir_config("gherkin_lexer_he")
5
5
  have_library("c", "main")
6
6
  create_makefile("gherkin_lexer_he")
@@ -1,6 +1,6 @@
1
1
  require 'mkmf'
2
2
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
3
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
3
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
4
4
  dir_config("gherkin_lexer_hr")
5
5
  have_library("c", "main")
6
6
  create_makefile("gherkin_lexer_hr")
@@ -1,6 +1,6 @@
1
1
  require 'mkmf'
2
2
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
3
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
3
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
4
4
  dir_config("gherkin_lexer_hu")
5
5
  have_library("c", "main")
6
6
  create_makefile("gherkin_lexer_hu")
@@ -1,6 +1,6 @@
1
1
  require 'mkmf'
2
2
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
3
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
3
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
4
4
  dir_config("gherkin_lexer_id")
5
5
  have_library("c", "main")
6
6
  create_makefile("gherkin_lexer_id")
@@ -1,6 +1,6 @@
1
1
  require 'mkmf'
2
2
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
3
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
3
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
4
4
  dir_config("gherkin_lexer_is")
5
5
  have_library("c", "main")
6
6
  create_makefile("gherkin_lexer_is")
@@ -1,6 +1,6 @@
1
1
  require 'mkmf'
2
2
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
3
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
3
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
4
4
  dir_config("gherkin_lexer_it")
5
5
  have_library("c", "main")
6
6
  create_makefile("gherkin_lexer_it")
@@ -1,6 +1,6 @@
1
1
  require 'mkmf'
2
2
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
3
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
3
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
4
4
  dir_config("gherkin_lexer_ja")
5
5
  have_library("c", "main")
6
6
  create_makefile("gherkin_lexer_ja")
@@ -1,6 +1,6 @@
1
1
  require 'mkmf'
2
2
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
3
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
3
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
4
4
  dir_config("gherkin_lexer_ko")
5
5
  have_library("c", "main")
6
6
  create_makefile("gherkin_lexer_ko")
@@ -1,6 +1,6 @@
1
1
  require 'mkmf'
2
2
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
3
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
3
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
4
4
  dir_config("gherkin_lexer_lt")
5
5
  have_library("c", "main")
6
6
  create_makefile("gherkin_lexer_lt")
@@ -1,6 +1,6 @@
1
1
  require 'mkmf'
2
2
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
3
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
3
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
4
4
  dir_config("gherkin_lexer_lu")
5
5
  have_library("c", "main")
6
6
  create_makefile("gherkin_lexer_lu")
@@ -1,6 +1,6 @@
1
1
  require 'mkmf'
2
2
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
3
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
3
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
4
4
  dir_config("gherkin_lexer_lv")
5
5
  have_library("c", "main")
6
6
  create_makefile("gherkin_lexer_lv")
@@ -1,6 +1,6 @@
1
1
  require 'mkmf'
2
2
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
3
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
3
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
4
4
  dir_config("gherkin_lexer_nl")
5
5
  have_library("c", "main")
6
6
  create_makefile("gherkin_lexer_nl")
@@ -1,6 +1,6 @@
1
1
  require 'mkmf'
2
2
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
3
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
3
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
4
4
  dir_config("gherkin_lexer_no")
5
5
  have_library("c", "main")
6
6
  create_makefile("gherkin_lexer_no")
@@ -1,6 +1,6 @@
1
1
  require 'mkmf'
2
2
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
3
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
3
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
4
4
  dir_config("gherkin_lexer_pl")
5
5
  have_library("c", "main")
6
6
  create_makefile("gherkin_lexer_pl")
@@ -1,6 +1,6 @@
1
1
  require 'mkmf'
2
2
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
3
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
3
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
4
4
  dir_config("gherkin_lexer_pt")
5
5
  have_library("c", "main")
6
6
  create_makefile("gherkin_lexer_pt")
@@ -1,6 +1,6 @@
1
1
  require 'mkmf'
2
2
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
3
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
3
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
4
4
  dir_config("gherkin_lexer_ro")
5
5
  have_library("c", "main")
6
6
  create_makefile("gherkin_lexer_ro")
@@ -1,6 +1,6 @@
1
1
  require 'mkmf'
2
2
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
3
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
3
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
4
4
  dir_config("gherkin_lexer_ru")
5
5
  have_library("c", "main")
6
6
  create_makefile("gherkin_lexer_ru")
@@ -1,6 +1,6 @@
1
1
  require 'mkmf'
2
2
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
3
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
3
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
4
4
  dir_config("gherkin_lexer_sk")
5
5
  have_library("c", "main")
6
6
  create_makefile("gherkin_lexer_sk")
@@ -1,6 +1,6 @@
1
1
  require 'mkmf'
2
2
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
3
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
3
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
4
4
  dir_config("gherkin_lexer_sr_cyrl")
5
5
  have_library("c", "main")
6
6
  create_makefile("gherkin_lexer_sr_cyrl")
@@ -1,6 +1,6 @@
1
1
  require 'mkmf'
2
2
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
3
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
3
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
4
4
  dir_config("gherkin_lexer_sr_latn")
5
5
  have_library("c", "main")
6
6
  create_makefile("gherkin_lexer_sr_latn")
@@ -1,6 +1,6 @@
1
1
  require 'mkmf'
2
2
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
3
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
3
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
4
4
  dir_config("gherkin_lexer_sv")
5
5
  have_library("c", "main")
6
6
  create_makefile("gherkin_lexer_sv")
@@ -1,6 +1,6 @@
1
1
  require 'mkmf'
2
2
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
3
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
3
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
4
4
  dir_config("gherkin_lexer_tr")
5
5
  have_library("c", "main")
6
6
  create_makefile("gherkin_lexer_tr")
@@ -1,6 +1,6 @@
1
1
  require 'mkmf'
2
2
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
3
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
3
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
4
4
  dir_config("gherkin_lexer_uk")
5
5
  have_library("c", "main")
6
6
  create_makefile("gherkin_lexer_uk")
@@ -1,6 +1,6 @@
1
1
  require 'mkmf'
2
2
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
3
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
3
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
4
4
  dir_config("gherkin_lexer_uz")
5
5
  have_library("c", "main")
6
6
  create_makefile("gherkin_lexer_uz")
@@ -1,6 +1,6 @@
1
1
  require 'mkmf'
2
2
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
3
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
3
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
4
4
  dir_config("gherkin_lexer_vi")
5
5
  have_library("c", "main")
6
6
  create_makefile("gherkin_lexer_vi")
@@ -1,6 +1,6 @@
1
1
  require 'mkmf'
2
2
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
3
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
3
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
4
4
  dir_config("gherkin_lexer_zh_cn")
5
5
  have_library("c", "main")
6
6
  create_makefile("gherkin_lexer_zh_cn")
@@ -1,6 +1,6 @@
1
1
  require 'mkmf'
2
2
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
3
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
3
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
4
4
  dir_config("gherkin_lexer_zh_tw")
5
5
  have_library("c", "main")
6
6
  create_makefile("gherkin_lexer_zh_tw")
data/gherkin.gemspec CHANGED
@@ -3,7 +3,7 @@
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "gherkin"
5
5
  # If bumping the major version here, comment out the cucumber dependency below and uncomment in the Gemfile to build against a local cucumber.
6
- s.version = "2.7.6"
6
+ s.version = "2.7.7"
7
7
  s.authors = ["Mike Sassak", "Gregory Hnatiuk", "Aslak Hellesøy"]
8
8
  s.description = "A fast Gherkin lexer/parser based on the Ragel State Machine Compiler."
9
9
  s.summary = "#{s.name}-#{s.version}"
@@ -55,7 +55,7 @@ Gem::Specification.new do |s|
55
55
  unless ENV['RUBY_CC_VERSION'] || defined?(JRUBY_VERSION)
56
56
  s.add_development_dependency('therubyracer', '>= 0.9.9') if ENV['GHERKIN_JS']
57
57
  # For Documentation:
58
- s.add_development_dependency('yard', '>= 0.7.4')
58
+ s.add_development_dependency('yard', '>= 0.7.5')
59
59
  s.add_development_dependency('rdiscount', '>= 1.6.8')
60
60
  end
61
61
 
@@ -90,6 +90,8 @@ module Gherkin
90
90
  def up(n)
91
91
  "\e[#{n}A"
92
92
  end
93
+
94
+ extend self
93
95
  end
94
96
  end
95
97
  end
data/lib/gherkin/i18n.rb CHANGED
@@ -4,6 +4,8 @@ require 'gherkin/native'
4
4
 
5
5
  module Gherkin
6
6
  class I18n
7
+ LexerNotFound = Class.new(LoadError)
8
+
7
9
  native_impl('gherkin') unless defined?(BYPASS_NATIVE_IMPL)
8
10
 
9
11
  FEATURE_ELEMENT_KEYS = %w{feature background scenario scenario_outline examples}
@@ -92,20 +94,18 @@ module Gherkin
92
94
  end
93
95
 
94
96
  def lexer(listener, force_ruby=false)
95
- begin
96
- if force_ruby
97
+ if force_ruby
98
+ rb(listener)
99
+ else
100
+ begin
101
+ c(listener)
102
+ rescue NameError, LoadError => e
103
+ warn("WARNING: #{e.message}. Reverting to Ruby lexer.")
97
104
  rb(listener)
98
- else
99
- begin
100
- c(listener)
101
- rescue NameError, LoadError => e
102
- warn("WARNING: #{e.message}. Reverting to Ruby lexer.")
103
- rb(listener)
104
- end
105
105
  end
106
- rescue LoadError => e
107
- raise I18nLexerNotFound, "No lexer was found for #{i18n_language_name} (#{e.message}). Supported languages are listed in gherkin/i18n.yml."
108
106
  end
107
+ rescue LoadError => e
108
+ raise LexerNotFound, "No lexer was found for #{iso_code} (#{e.message}). Supported languages are listed in gherkin/i18n.yml."
109
109
  end
110
110
 
111
111
  def c(listener)
@@ -3,7 +3,6 @@ require 'gherkin/native'
3
3
 
4
4
  module Gherkin
5
5
  module Lexer
6
- I18nLexerNotFound = Class.new(LoadError)
7
6
  LexingError = Class.new(StandardError)
8
7
 
9
8
  # The main entry point to lexing Gherkin source.
@@ -4,16 +4,29 @@ require 'gherkin/formatter/ansi_escapes'
4
4
  module Gherkin
5
5
  module Formatter
6
6
  describe AnsiEscapes do
7
- include Gherkin::Formatter::AnsiEscapes
7
+ describe "instance methods" do
8
+ include AnsiEscapes
8
9
 
9
- it "failed should be red" do
10
- failed.should == "\e[31m"
11
- end
10
+ it "failed should be red" do
11
+ failed.should == "\e[31m"
12
+ end
12
13
 
13
- it "failed arg should be red bold" do
14
- failed_arg.should == "\e[31m\e[1m"
14
+ it "failed_arg should be red bold" do
15
+ failed_arg.should == "\e[31m\e[1m"
16
+ end
15
17
  end
16
18
 
19
+ describe "class methods" do
20
+ subject { AnsiEscapes }
21
+
22
+ it "failed should be red" do
23
+ subject.failed.should == "\e[31m"
24
+ end
25
+
26
+ it "failed_arg should be red bold" do
27
+ subject.failed_arg.should == "\e[31m\e[1m"
28
+ end
29
+ end
17
30
  end
18
31
  end
19
32
  end
@@ -16,13 +16,17 @@ module Gherkin
16
16
  expected = JSON.parse(json)
17
17
  actual = JSON.parse(io.string)
18
18
 
19
- puts "EXPECTED"
20
- puts json
21
- puts "ACTUAL"
22
- puts io.string
23
- puts "======"
19
+ begin
20
+ actual.should == expected
21
+ rescue
22
+ puts "EXPECTED"
23
+ puts json
24
+ puts "ACTUAL"
25
+ puts io.string
26
+ puts "======"
24
27
 
25
- actual.should == expected
28
+ raise
29
+ end
26
30
  end
27
31
 
28
32
  xit "should parse a barely empty feature" do
data/tasks/compile.rake CHANGED
@@ -81,7 +81,7 @@ langs.each do |i18n|
81
81
  io.write(<<-EOF)
82
82
  require 'mkmf'
83
83
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
84
- $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc/
84
+ $CFLAGS << ' -O0 -Wall' if CONFIG['CC'] =~ /gcc|clang/
85
85
  dir_config("gherkin_lexer_#{i18n.underscored_iso_code}")
86
86
  have_library("c", "main")
87
87
  create_makefile("gherkin_lexer_#{i18n.underscored_iso_code}")
data/tasks/ragel_task.rb CHANGED
@@ -19,7 +19,10 @@ class RagelTask
19
19
  end
20
20
 
21
21
  def define_tasks
22
- file target => [lang_ragel, common_ragel] do
22
+ deps = [lang_ragel, common_ragel]
23
+ deps.unshift(UGLIFYJS) if(@lang == 'js')
24
+
25
+ file target => deps do
23
26
  mkdir_p(File.dirname(target)) unless File.directory?(File.dirname(target))
24
27
  sh "ragel #{flags} #{lang_ragel} -o #{target}"
25
28
  if(@lang == 'js')
@@ -31,6 +34,14 @@ class RagelTask
31
34
  end
32
35
  end
33
36
 
37
+ file UGLIFYJS do
38
+ unless File.exist?(UGLIFYJS)
39
+ Dir.chdir('js') do
40
+ sh "npm link"
41
+ end
42
+ end
43
+ end
44
+
34
45
  file lang_ragel => lang_erb do
35
46
  write(ERB.new(IO.read(lang_erb)).result(binding), lang_ragel)
36
47
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gherkin
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.6
4
+ version: 2.7.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,11 +11,11 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-01-25 00:00:00.000000000 Z
14
+ date: 2012-02-08 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rake-compiler
18
- requirement: &2156073600 !ruby/object:Gem::Requirement
18
+ requirement: &2165788340 !ruby/object:Gem::Requirement
19
19
  none: false
20
20
  requirements:
21
21
  - - ! '>='
@@ -23,10 +23,10 @@ dependencies:
23
23
  version: 0.7.9
24
24
  type: :development
25
25
  prerelease: false
26
- version_requirements: *2156073600
26
+ version_requirements: *2165788340
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: json
29
- requirement: &2156067440 !ruby/object:Gem::Requirement
29
+ requirement: &2165784440 !ruby/object:Gem::Requirement
30
30
  none: false
31
31
  requirements:
32
32
  - - ! '>='
@@ -34,10 +34,10 @@ dependencies:
34
34
  version: 1.4.6
35
35
  type: :runtime
36
36
  prerelease: false
37
- version_requirements: *2156067440
37
+ version_requirements: *2165784440
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: cucumber
40
- requirement: &2156066700 !ruby/object:Gem::Requirement
40
+ requirement: &2165783980 !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
43
  - - ! '>='
@@ -45,10 +45,10 @@ dependencies:
45
45
  version: 1.1.4
46
46
  type: :development
47
47
  prerelease: false
48
- version_requirements: *2156066700
48
+ version_requirements: *2165783980
49
49
  - !ruby/object:Gem::Dependency
50
50
  name: rake
51
- requirement: &2156065340 !ruby/object:Gem::Requirement
51
+ requirement: &2165799880 !ruby/object:Gem::Requirement
52
52
  none: false
53
53
  requirements:
54
54
  - - ! '>='
@@ -56,10 +56,10 @@ dependencies:
56
56
  version: 0.9.2
57
57
  type: :development
58
58
  prerelease: false
59
- version_requirements: *2156065340
59
+ version_requirements: *2165799880
60
60
  - !ruby/object:Gem::Dependency
61
61
  name: bundler
62
- requirement: &2156063740 !ruby/object:Gem::Requirement
62
+ requirement: &2165799420 !ruby/object:Gem::Requirement
63
63
  none: false
64
64
  requirements:
65
65
  - - ! '>='
@@ -67,10 +67,10 @@ dependencies:
67
67
  version: 1.0.21
68
68
  type: :development
69
69
  prerelease: false
70
- version_requirements: *2156063740
70
+ version_requirements: *2165799420
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: rspec
73
- requirement: &2156060920 !ruby/object:Gem::Requirement
73
+ requirement: &2165798960 !ruby/object:Gem::Requirement
74
74
  none: false
75
75
  requirements:
76
76
  - - ~>
@@ -78,10 +78,10 @@ dependencies:
78
78
  version: 2.7.0
79
79
  type: :development
80
80
  prerelease: false
81
- version_requirements: *2156060920
81
+ version_requirements: *2165798960
82
82
  - !ruby/object:Gem::Dependency
83
83
  name: rubyzip
84
- requirement: &2156058000 !ruby/object:Gem::Requirement
84
+ requirement: &2165798500 !ruby/object:Gem::Requirement
85
85
  none: false
86
86
  requirements:
87
87
  - - ! '>='
@@ -89,10 +89,10 @@ dependencies:
89
89
  version: 0.9.5
90
90
  type: :development
91
91
  prerelease: false
92
- version_requirements: *2156058000
92
+ version_requirements: *2165798500
93
93
  - !ruby/object:Gem::Dependency
94
94
  name: therubyracer
95
- requirement: &2156056640 !ruby/object:Gem::Requirement
95
+ requirement: &2165797960 !ruby/object:Gem::Requirement
96
96
  none: false
97
97
  requirements:
98
98
  - - ! '>='
@@ -100,21 +100,21 @@ dependencies:
100
100
  version: 0.9.9
101
101
  type: :development
102
102
  prerelease: false
103
- version_requirements: *2156056640
103
+ version_requirements: *2165797960
104
104
  - !ruby/object:Gem::Dependency
105
105
  name: yard
106
- requirement: &2156053980 !ruby/object:Gem::Requirement
106
+ requirement: &2165797500 !ruby/object:Gem::Requirement
107
107
  none: false
108
108
  requirements:
109
109
  - - ! '>='
110
110
  - !ruby/object:Gem::Version
111
- version: 0.7.4
111
+ version: 0.7.5
112
112
  type: :development
113
113
  prerelease: false
114
- version_requirements: *2156053980
114
+ version_requirements: *2165797500
115
115
  - !ruby/object:Gem::Dependency
116
116
  name: rdiscount
117
- requirement: &2156052980 !ruby/object:Gem::Requirement
117
+ requirement: &2165797040 !ruby/object:Gem::Requirement
118
118
  none: false
119
119
  requirements:
120
120
  - - ! '>='
@@ -122,10 +122,10 @@ dependencies:
122
122
  version: 1.6.8
123
123
  type: :development
124
124
  prerelease: false
125
- version_requirements: *2156052980
125
+ version_requirements: *2165797040
126
126
  - !ruby/object:Gem::Dependency
127
127
  name: term-ansicolor
128
- requirement: &2156051300 !ruby/object:Gem::Requirement
128
+ requirement: &2165796580 !ruby/object:Gem::Requirement
129
129
  none: false
130
130
  requirements:
131
131
  - - ! '>='
@@ -133,10 +133,10 @@ dependencies:
133
133
  version: 1.0.6
134
134
  type: :development
135
135
  prerelease: false
136
- version_requirements: *2156051300
136
+ version_requirements: *2165796580
137
137
  - !ruby/object:Gem::Dependency
138
138
  name: builder
139
- requirement: &2156050440 !ruby/object:Gem::Requirement
139
+ requirement: &2165796120 !ruby/object:Gem::Requirement
140
140
  none: false
141
141
  requirements:
142
142
  - - ! '>='
@@ -144,7 +144,7 @@ dependencies:
144
144
  version: 2.1.2
145
145
  type: :development
146
146
  prerelease: false
147
- version_requirements: *2156050440
147
+ version_requirements: *2165796120
148
148
  description: A fast Gherkin lexer/parser based on the Ragel State Machine Compiler.
149
149
  email: cukes@googlegroups.com
150
150
  executables: []
@@ -490,7 +490,7 @@ rubyforge_project:
490
490
  rubygems_version: 1.8.10
491
491
  signing_key:
492
492
  specification_version: 3
493
- summary: gherkin-2.7.6
493
+ summary: gherkin-2.7.7
494
494
  test_files:
495
495
  - features/escaped_pipes.feature
496
496
  - features/feature_parser.feature