vim-jar 0.0.3 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (926) hide show
  1. data/.gitignore +2 -0
  2. data/Gemfile.lock +21 -1
  3. data/README.md +35 -1
  4. data/autotest/discover.rb +2 -0
  5. data/bundler/ruby/1.8/bin/autotest +4 -6
  6. data/bundler/ruby/1.8/bin/cdiff +19 -0
  7. data/bundler/ruby/1.8/bin/cucumber +19 -0
  8. data/bundler/ruby/1.8/bin/decolor +19 -0
  9. data/bundler/ruby/1.8/bin/edit_json.rb +19 -0
  10. data/bundler/ruby/1.8/bin/prettify_json.rb +19 -0
  11. data/bundler/ruby/1.8/bin/unit_diff +4 -6
  12. data/bundler/ruby/1.8/gems/aruba-0.2.6/.document +5 -0
  13. data/bundler/ruby/1.8/gems/aruba-0.2.6/.gitignore +23 -0
  14. data/bundler/ruby/1.8/gems/aruba-0.2.6/.rvmrc +1 -0
  15. data/bundler/ruby/1.8/gems/aruba-0.2.6/Gemfile +10 -0
  16. data/bundler/ruby/1.8/gems/aruba-0.2.6/History.txt +123 -0
  17. data/bundler/ruby/1.8/gems/aruba-0.2.6/LICENSE +20 -0
  18. data/bundler/ruby/1.8/gems/aruba-0.2.6/README.rdoc +41 -0
  19. data/bundler/ruby/1.8/gems/aruba-0.2.6/Rakefile +13 -0
  20. data/bundler/ruby/1.8/gems/aruba-0.2.6/aruba.gemspec +24 -0
  21. data/bundler/ruby/1.8/gems/aruba-0.2.6/config/.gitignore +1 -0
  22. data/bundler/ruby/1.8/gems/aruba-0.2.6/cucumber.yml +2 -0
  23. data/bundler/ruby/1.8/gems/aruba-0.2.6/features/exit_statuses.feature +29 -0
  24. data/bundler/ruby/1.8/gems/aruba-0.2.6/features/file_system_commands.feature +128 -0
  25. data/bundler/ruby/1.8/gems/aruba-0.2.6/features/flushing.feature +23 -0
  26. data/bundler/ruby/1.8/gems/aruba-0.2.6/features/interactive.feature +38 -0
  27. data/bundler/ruby/1.8/gems/aruba-0.2.6/features/output.feature +171 -0
  28. data/bundler/ruby/1.8/gems/aruba-0.2.6/features/step_definitions/aruba_dev_steps.rb +24 -0
  29. data/bundler/ruby/1.8/gems/aruba-0.2.6/features/support/env.rb +15 -0
  30. data/bundler/ruby/1.8/gems/aruba-0.2.6/lib/aruba/api.rb +297 -0
  31. data/bundler/ruby/1.8/gems/aruba-0.2.6/lib/aruba/cucumber.rb +273 -0
  32. data/bundler/ruby/1.8/gems/aruba-0.2.6/lib/aruba/process.rb +46 -0
  33. data/bundler/ruby/1.8/gems/aruba-0.2.6/lib/aruba.rb +1 -0
  34. data/bundler/ruby/1.8/gems/autotest-4.4.5/.autotest +18 -0
  35. data/bundler/ruby/1.8/gems/autotest-4.4.5/.gitignore +1 -0
  36. data/bundler/ruby/1.8/gems/autotest-4.4.5/Gemfile +7 -0
  37. data/bundler/ruby/1.8/gems/autotest-4.4.5/Gemfile.lock +38 -0
  38. data/bundler/ruby/1.8/gems/autotest-4.4.5/History.txt +709 -0
  39. data/bundler/ruby/1.8/gems/autotest-4.4.5/Rakefile +67 -0
  40. data/bundler/ruby/1.8/gems/autotest-4.4.5/Readme.md +95 -0
  41. data/bundler/ruby/1.8/gems/autotest-4.4.5/VERSION +1 -0
  42. data/bundler/ruby/1.8/gems/autotest-4.4.5/articles/getting_started_with_autotest.html +533 -0
  43. data/bundler/ruby/1.8/gems/autotest-4.4.5/autotest.gemspec +62 -0
  44. data/bundler/ruby/1.8/gems/autotest-4.4.5/bin/autotest +67 -0
  45. data/bundler/ruby/1.8/gems/autotest-4.4.5/bin/unit_diff +44 -0
  46. data/bundler/ruby/1.8/gems/autotest-4.4.5/example_dot_autotest.rb +12 -0
  47. data/bundler/ruby/1.8/gems/autotest-4.4.5/lib/autotest/autoupdate.rb +26 -0
  48. data/bundler/ruby/1.8/gems/autotest-4.4.5/lib/autotest/once.rb +9 -0
  49. data/bundler/ruby/1.8/gems/autotest-4.4.5/lib/autotest/rcov.rb +27 -0
  50. data/bundler/ruby/1.8/gems/autotest-4.4.5/lib/autotest/restart.rb +12 -0
  51. data/bundler/ruby/1.8/gems/autotest-4.4.5/lib/autotest/timestamp.rb +9 -0
  52. data/bundler/ruby/1.8/gems/autotest-4.4.5/lib/autotest.rb +724 -0
  53. data/bundler/ruby/1.8/gems/autotest-4.4.5/lib/unit_diff.rb +274 -0
  54. data/bundler/ruby/1.8/gems/autotest-4.4.5/test/helper.rb +6 -0
  55. data/bundler/ruby/1.8/gems/autotest-4.4.5/test/test_autotest.rb +515 -0
  56. data/bundler/ruby/1.8/gems/autotest-4.4.5/test/test_autotest_integration.rb +95 -0
  57. data/bundler/ruby/1.8/gems/autotest-4.4.5/test/test_unit_diff.rb +335 -0
  58. data/bundler/ruby/1.8/gems/background_process-1.2/MIT-LICENSE +20 -0
  59. data/bundler/ruby/1.8/gems/background_process-1.2/README.textile +82 -0
  60. data/bundler/ruby/1.8/gems/background_process-1.2/lib/background_process/background_process.rb +114 -0
  61. data/bundler/ruby/1.8/gems/background_process-1.2/lib/background_process/io_helpers.rb +24 -0
  62. data/bundler/ruby/1.8/gems/background_process-1.2/lib/background_process/pty_background_process.rb +64 -0
  63. data/bundler/ruby/1.8/gems/background_process-1.2/lib/background_process.rb +3 -0
  64. data/bundler/ruby/1.8/gems/background_process-1.2/spec/background_process/background_process_spec.rb +129 -0
  65. data/bundler/ruby/1.8/gems/background_process-1.2/spec/background_process/io_helpers_spec.rb +30 -0
  66. data/bundler/ruby/1.8/gems/background_process-1.2/spec/background_process/pty_background_process_spec.rb +49 -0
  67. data/bundler/ruby/1.8/gems/background_process-1.2/spec/spec_helper.rb +1 -0
  68. data/bundler/ruby/1.8/gems/builder-2.1.2/CHANGES +85 -0
  69. data/bundler/ruby/1.8/gems/builder-2.1.2/README +210 -0
  70. data/bundler/ruby/1.8/gems/builder-2.1.2/Rakefile +263 -0
  71. data/bundler/ruby/1.8/gems/builder-2.1.2/doc/releases/builder-1.2.4.rdoc +31 -0
  72. data/bundler/ruby/1.8/gems/builder-2.1.2/doc/releases/builder-2.0.0.rdoc +46 -0
  73. data/bundler/ruby/1.8/gems/builder-2.1.2/doc/releases/builder-2.1.1.rdoc +58 -0
  74. data/bundler/ruby/1.8/gems/builder-2.1.2/lib/blankslate.rb +113 -0
  75. data/bundler/ruby/1.8/gems/builder-2.1.2/lib/builder/blankslate.rb +20 -0
  76. data/bundler/ruby/1.8/gems/builder-2.1.2/lib/builder/xchar.rb +115 -0
  77. data/bundler/ruby/1.8/gems/builder-2.1.2/lib/builder/xmlbase.rb +139 -0
  78. data/bundler/ruby/1.8/gems/builder-2.1.2/lib/builder/xmlevents.rb +63 -0
  79. data/bundler/ruby/1.8/gems/builder-2.1.2/lib/builder/xmlmarkup.rb +328 -0
  80. data/bundler/ruby/1.8/gems/builder-2.1.2/lib/builder.rb +13 -0
  81. data/bundler/ruby/1.8/gems/builder-2.1.2/scripts/publish.rb +17 -0
  82. data/bundler/ruby/1.8/gems/builder-2.1.2/test/performance.rb +30 -0
  83. data/bundler/ruby/1.8/gems/builder-2.1.2/test/preload.rb +29 -0
  84. data/bundler/ruby/1.8/gems/builder-2.1.2/test/test_xchar.rb +37 -0
  85. data/bundler/ruby/1.8/gems/builder-2.1.2/test/testblankslate.rb +183 -0
  86. data/bundler/ruby/1.8/gems/builder-2.1.2/test/testeventbuilder.rb +133 -0
  87. data/bundler/ruby/1.8/gems/builder-2.1.2/test/testmarkupbuilder.rb +449 -0
  88. data/bundler/ruby/1.8/gems/cucumber-0.9.4/.gitattributes +1 -0
  89. data/bundler/ruby/1.8/gems/cucumber-0.9.4/.gitignore +24 -0
  90. data/bundler/ruby/1.8/gems/cucumber-0.9.4/.rspec +1 -0
  91. data/bundler/ruby/1.8/gems/cucumber-0.9.4/Gemfile +7 -0
  92. data/bundler/ruby/1.8/gems/cucumber-0.9.4/History.txt +1597 -0
  93. data/bundler/ruby/1.8/gems/cucumber-0.9.4/LICENSE +22 -0
  94. data/bundler/ruby/1.8/gems/cucumber-0.9.4/README.rdoc +26 -0
  95. data/bundler/ruby/1.8/gems/cucumber-0.9.4/Rakefile +12 -0
  96. data/bundler/ruby/1.8/gems/cucumber-0.9.4/bin/cucumber +16 -0
  97. data/bundler/ruby/1.8/gems/cucumber-0.9.4/cucumber.gemspec +49 -0
  98. data/bundler/ruby/1.8/gems/cucumber-0.9.4/cucumber.yml +20 -0
  99. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/README.textile +18 -0
  100. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/Rakefile +33 -0
  101. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/ar/Rakefile +6 -0
  102. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/ar/features/addition.feature +17 -0
  103. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/ar/features/step_definitons/calculator_steps.rb +24 -0
  104. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/ar/lib/calculator.rb +11 -0
  105. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/bg/Rakefile +6 -0
  106. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/bg/features/addition.feature +12 -0
  107. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/bg/features/consecutive_calculations.feature +19 -0
  108. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/bg/features/division.feature +17 -0
  109. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/bg/features/step_definitons/calculator_steps.rb +24 -0
  110. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/bg/features/support/env.rb +5 -0
  111. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/bg/features/support/world.rb +8 -0
  112. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/bg/lib/calculator.rb +24 -0
  113. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/ca/Rakefile +6 -0
  114. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/ca/features/step_definitons/calculator_steps.rb +21 -0
  115. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/ca/features/suma.feature +17 -0
  116. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/ca/lib/calculadora.rb +16 -0
  117. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/da/Rakefile +6 -0
  118. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/da/features/sammenlaegning.feature +18 -0
  119. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/da/features/step_definitons/lommeregner_steps.rb +24 -0
  120. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/da/lib/lommeregner.rb +11 -0
  121. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/de/.gitignore +1 -0
  122. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/de/Rakefile +6 -0
  123. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/de/features/addition.feature +17 -0
  124. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/de/features/division.feature +10 -0
  125. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/de/features/step_definitons/calculator_steps.rb +24 -0
  126. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/de/lib/calculator.rb +14 -0
  127. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/en/.gitignore +1 -0
  128. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/en/Rakefile +6 -0
  129. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/en/features/addition.feature +17 -0
  130. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/en/features/division.feature +10 -0
  131. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/en/features/step_definitons/calculator_steps.rb +24 -0
  132. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/en/lib/calculator.rb +14 -0
  133. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/en-lol/Rakefile +4 -0
  134. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/en-lol/features/step_definitions/cucumbrz_steps.rb +16 -0
  135. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/en-lol/features/stuffing.feature +8 -0
  136. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/en-lol/features/support/env.rb +7 -0
  137. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/en-lol/lib/basket.rb +12 -0
  138. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/en-lol/lib/belly.rb +11 -0
  139. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/eo/.gitignore +1 -0
  140. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/eo/Rakefile +6 -0
  141. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/eo/features/adicio.feature +17 -0
  142. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/eo/features/divido.feature +10 -0
  143. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/eo/features/step_definitons/calculator_steps.rb +24 -0
  144. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/eo/lib/calculator.rb +14 -0
  145. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/es/Rakefile +6 -0
  146. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/es/features/adicion.feature +17 -0
  147. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/es/features/step_definitons/calculador_steps.rb +21 -0
  148. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/es/lib/calculador.rb +14 -0
  149. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/et/Rakefile +6 -0
  150. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/et/features/jagamine.feature +10 -0
  151. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/et/features/liitmine.feature +17 -0
  152. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/et/features/step_definitions/kalkulaator_steps.rb +24 -0
  153. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/et/lib/kalkulaator.rb +14 -0
  154. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/fi/.gitignore +1 -0
  155. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/fi/Rakefile +6 -0
  156. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/fi/features/jakolasku.feature +10 -0
  157. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/fi/features/step_definitons/laskin_steps.rb +24 -0
  158. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/fi/features/yhteenlasku.feature +17 -0
  159. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/fi/lib/laskin.rb +14 -0
  160. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/fr/Rakefile +6 -0
  161. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/fr/features/addition.feature +18 -0
  162. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/fr/features/addition2.feature +17 -0
  163. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/fr/features/step_definitions/calculatrice_steps.rb +32 -0
  164. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/fr/features/support/env.rb +5 -0
  165. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/fr/lib/calculatrice.rb +10 -0
  166. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/he/Rakefile +6 -0
  167. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/he/features/addition.feature +17 -0
  168. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/he/features/division.feature +10 -0
  169. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/he/features/step_definitons/calculator_steps.rb +24 -0
  170. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/he/lib/calculator.rb +15 -0
  171. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/hu/.gitignore +1 -0
  172. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/hu/Rakefile +6 -0
  173. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/hu/features/osszeadas.feature +17 -0
  174. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/hu/features/osztas.feature +10 -0
  175. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/hu/features/step_definitons/calculator_steps.rb +25 -0
  176. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/hu/lib/calculator.rb +14 -0
  177. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/id/.gitignore +1 -0
  178. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/id/Rakefile +6 -0
  179. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/id/features/addition.feature +17 -0
  180. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/id/features/division.feature +10 -0
  181. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/id/features/step_definitons/calculator_steps.rb +24 -0
  182. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/id/lib/calculator.rb +14 -0
  183. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/it/Rakefile +6 -0
  184. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/it/features/somma.feature +11 -0
  185. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/it/features/step_definitons/calcolatrice_steps.rb +24 -0
  186. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/it/lib/calcolatrice.rb +11 -0
  187. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/ja/.gitignore +1 -0
  188. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/ja/Rakefile +6 -0
  189. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/ja/features/addition.feature +17 -0
  190. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/ja/features/division.feature +10 -0
  191. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/ja/features/step_definitons/calculator_steps.rb +19 -0
  192. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/ja/features/support/env.rb +5 -0
  193. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/ja/lib/calculator.rb +14 -0
  194. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/ko/.gitignore +1 -0
  195. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/ko/Rakefile +6 -0
  196. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/ko/features/addition.feature +17 -0
  197. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/ko/features/division.feature +11 -0
  198. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/ko/features/step_definitons/calculator_steps.rb +24 -0
  199. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/ko/lib/calculator.rb +14 -0
  200. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/lt/.gitignore +1 -0
  201. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/lt/Rakefile +6 -0
  202. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/lt/features/addition.feature +17 -0
  203. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/lt/features/division.feature +10 -0
  204. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/lt/features/step_definitons/calculator_steps.rb +24 -0
  205. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/lt/lib/calculator.rb +14 -0
  206. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/lv/Rakefile +6 -0
  207. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/lv/features/addition.feature +17 -0
  208. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/lv/features/division.feature +10 -0
  209. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/lv/features/step_definitons/calculator_steps.rb +24 -0
  210. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/lv/lib/calculator.rb +14 -0
  211. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/no/Rakefile +6 -0
  212. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/no/features/step_definitons/kalkulator_steps.rb +17 -0
  213. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/no/features/summering.feature +19 -0
  214. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/no/features/support/env.rb +6 -0
  215. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/no/lib/kalkulator.rb +11 -0
  216. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/pl/.gitignore +1 -0
  217. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/pl/Rakefile +6 -0
  218. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/pl/features/addition.feature +17 -0
  219. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/pl/features/division.feature +10 -0
  220. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/pl/features/step_definitons/calculator_steps.rb +24 -0
  221. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/pl/features/support/env.rb +5 -0
  222. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/pl/lib/calculator.rb +14 -0
  223. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/pt/Rakefile +6 -0
  224. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/pt/features/adicao.feature +11 -0
  225. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/pt/features/step_definitions/calculadora_steps.rb +20 -0
  226. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/pt/features/support/env.rb +5 -0
  227. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/pt/lib/calculadora.rb +10 -0
  228. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/ro/Rakefile +6 -0
  229. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/ro/features/step_definitons/calculator_steps.rb +24 -0
  230. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/ro/features/suma.feature +11 -0
  231. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/ro/lib/calculator.rb +11 -0
  232. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/ru/Rakefile +6 -0
  233. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/ru/features/addition.feature +11 -0
  234. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/ru/features/consecutive_calculations.feature +17 -0
  235. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/ru/features/division.feature +16 -0
  236. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/ru/features/step_definitons/calculator_steps.rb +19 -0
  237. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/ru/features/support/env.rb +5 -0
  238. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/ru/features/support/world.rb +8 -0
  239. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/ru/lib/calculator.rb +24 -0
  240. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/sk/.gitignore +1 -0
  241. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/sk/Rakefile +6 -0
  242. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/sk/features/addition.feature +17 -0
  243. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/sk/features/division.feature +10 -0
  244. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/sk/features/step_definitons/calculator_steps.rb +24 -0
  245. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/sk/lib/calculator.rb +14 -0
  246. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/sr-Cyrl/Rakefile +6 -0
  247. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/sr-Cyrl/features/sabiranje.feature +18 -0
  248. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/sr-Cyrl/features/step_definitons/calculator_steps.rb +20 -0
  249. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/sr-Cyrl/features/support/env.rb +5 -0
  250. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/sr-Cyrl/lib/calculator.rb +12 -0
  251. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/sr-Latn/Rakefile +6 -0
  252. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/sr-Latn/features/sabiranje.feature +18 -0
  253. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/sr-Latn/features/step_definitons/calculator_steps.rb +24 -0
  254. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/sr-Latn/lib/calculator.rb +12 -0
  255. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/sv/Rakefile +6 -0
  256. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/sv/features/step_definitons/kalkulator_steps.rb +24 -0
  257. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/sv/features/summering.feature +18 -0
  258. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/sv/lib/kalkulator.rb +11 -0
  259. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/tr/.gitignore +1 -0
  260. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/tr/Rakefile +6 -0
  261. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/tr/features/bolme.feature +10 -0
  262. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/tr/features/step_definitons/hesap_makinesi_adimlari.rb +24 -0
  263. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/tr/features/toplama.feature +18 -0
  264. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/tr/lib/hesap_makinesi.rb +15 -0
  265. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/uk/Rakefile +6 -0
  266. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/uk/features/addition.feature +11 -0
  267. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/uk/features/consecutive_calculations.feature +17 -0
  268. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/uk/features/division.feature +16 -0
  269. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/uk/features/step_definitons/calculator_steps.rb +19 -0
  270. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/uk/features/support/env.rb +5 -0
  271. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/uk/features/support/world.rb +8 -0
  272. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/uk/lib/calculator.rb +24 -0
  273. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/uz/Rakefile +6 -0
  274. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/uz/features/addition.feature +10 -0
  275. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/uz/features/consecutive_calculations.feature +17 -0
  276. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/uz/features/division.feature +17 -0
  277. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/uz/features/step_definitons/calculator_steps.rb +19 -0
  278. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/uz/features/support/env.rb +5 -0
  279. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/uz/features/support/world.rb +8 -0
  280. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/uz/lib/calculator.rb +24 -0
  281. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/zh-CN/Rakefile +4 -0
  282. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/zh-CN/features/addition.feature +18 -0
  283. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/zh-CN/features/step_definitons/calculator_steps.rb +26 -0
  284. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/zh-CN/lib/calculator.rb +10 -0
  285. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/zh-TW/.gitignore +1 -0
  286. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/zh-TW/Rakefile +4 -0
  287. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/zh-TW/features/addition.feature +17 -0
  288. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/zh-TW/features/division.feature +11 -0
  289. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/zh-TW/features/step_definitons/calculator_steps.rb +24 -0
  290. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/i18n/zh-TW/lib/calculator.rb +14 -0
  291. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/python/README.textile +7 -0
  292. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/python/Rakefile +4 -0
  293. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/python/features/fibonacci.feature +19 -0
  294. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/python/features/step_definitions/fib_steps.py +11 -0
  295. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/python/lib/.gitignore +1 -0
  296. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/python/lib/fib.py +7 -0
  297. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/ramaze/README.textile +7 -0
  298. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/ramaze/Rakefile +6 -0
  299. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/ramaze/app.rb +21 -0
  300. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/ramaze/features/add.feature +11 -0
  301. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/ramaze/features/step_definitions/add_steps.rb +15 -0
  302. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/ramaze/features/support/env.rb +32 -0
  303. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/ramaze/layout/default.html.erb +8 -0
  304. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/ramaze/view/index.html.erb +5 -0
  305. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/rspec_doubles/Rakefile +4 -0
  306. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/rspec_doubles/features/mocking.feature +9 -0
  307. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/rspec_doubles/features/step_definitions/calvin_steps.rb +19 -0
  308. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/rspec_doubles/features/support/env.rb +12 -0
  309. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/ruby2python/README.textile +7 -0
  310. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/ruby2python/Rakefile +4 -0
  311. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/ruby2python/features/fibonacci.feature +19 -0
  312. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/ruby2python/features/step_definitions/fib_steps.rb +7 -0
  313. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/ruby2python/features/support/env.rb +21 -0
  314. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/ruby2python/lib/.gitignore +1 -0
  315. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/ruby2python/lib/fib.py +7 -0
  316. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/sinatra/README.textile +13 -0
  317. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/sinatra/Rakefile +6 -0
  318. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/sinatra/app.rb +14 -0
  319. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/sinatra/features/add.feature +11 -0
  320. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/sinatra/features/step_definitions/add_steps.rb +15 -0
  321. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/sinatra/features/support/env.rb +13 -0
  322. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/sinatra/views/add.erb +7 -0
  323. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/sinatra/views/layout.erb +8 -0
  324. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/tcl/README.textile +11 -0
  325. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/tcl/Rakefile +6 -0
  326. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/tcl/features/fibonnacci.feature +17 -0
  327. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/tcl/features/step_definitions/fib_steps.rb +7 -0
  328. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/tcl/features/support/env.rb +6 -0
  329. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/tcl/src/fib.tcl +3 -0
  330. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/test_unit/Rakefile +6 -0
  331. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/test_unit/features/step_definitions/test_unit_steps.rb +23 -0
  332. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/test_unit/features/test_unit.feature +9 -0
  333. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/v8/Rakefile +6 -0
  334. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/v8/features/fibonacci.feature +43 -0
  335. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/v8/features/step_definitions/fib_steps.js +49 -0
  336. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/v8/features/support/env.js +14 -0
  337. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/v8/lib/fibonacci.js +19 -0
  338. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/watir/.gitignore +2 -0
  339. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/watir/README.textile +16 -0
  340. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/watir/Rakefile +12 -0
  341. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/watir/cucumber.yml +1 -0
  342. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/watir/features/search.feature +12 -0
  343. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/watir/features/step_definitions/search_steps.rb +26 -0
  344. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/watir/features/support/env.rb +32 -0
  345. data/bundler/ruby/1.8/gems/cucumber-0.9.4/examples/watir/features/support/screenshots.rb +47 -0
  346. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/announce.feature +164 -0
  347. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/api/list_step_defs_as_json.feature +50 -0
  348. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/api/run_cli_main_with_existing_runtime.feature +34 -0
  349. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/around_hooks.feature +232 -0
  350. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/background.feature +309 -0
  351. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/bug_371.feature +32 -0
  352. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/bug_464.feature +16 -0
  353. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/bug_475.feature +42 -0
  354. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/bug_585_tab_indentation.feature +22 -0
  355. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/bug_600.feature +67 -0
  356. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/call_steps_from_stepdefs.feature +154 -0
  357. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/cucumber_cli.feature +591 -0
  358. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/cucumber_cli_outlines.feature +117 -0
  359. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/custom_formatter.feature +111 -0
  360. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/default_snippets.feature +42 -0
  361. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/diffing.feature +25 -0
  362. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/drb_server_integration.feature +174 -0
  363. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/exception_in_after_block.feature +127 -0
  364. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/exception_in_after_step_block.feature +104 -0
  365. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/exception_in_before_block.feature +98 -0
  366. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/exclude_files.feature +20 -0
  367. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/expand.feature +60 -0
  368. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/html_formatter/a.html +582 -0
  369. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/html_formatter.feature +8 -0
  370. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/json_formatter.feature +333 -0
  371. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/junit_formatter.feature +92 -0
  372. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/language_from_header.feature +30 -0
  373. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/language_help.feature +78 -0
  374. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/listener_debugger_formatter.feature +42 -0
  375. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/multiline_names.feature +44 -0
  376. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/negative_tagged_hooks.feature +60 -0
  377. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/post_configuration_hook.feature +50 -0
  378. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/profiles.feature +126 -0
  379. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/rake_task.feature +152 -0
  380. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/report_called_undefined_steps.feature +34 -0
  381. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/rerun_formatter.feature +45 -0
  382. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/simplest.feature +11 -0
  383. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/snippet.feature +23 -0
  384. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/snippets_when_using_star_keyword.feature +36 -0
  385. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/step_definitions/cucumber_steps.rb +166 -0
  386. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/step_definitions/extra_steps.rb +2 -0
  387. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/step_definitions/simplest_steps.rb +3 -0
  388. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/step_definitions/wire_steps.rb +33 -0
  389. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/support/env.rb +157 -0
  390. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/support/env.rb.simplest +7 -0
  391. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/support/fake_wire_server.rb +77 -0
  392. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/table_diffing.feature +45 -0
  393. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/table_mapping.feature +34 -0
  394. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/tag_logic.feature +258 -0
  395. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/transform.feature +245 -0
  396. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/unicode_table.feature +35 -0
  397. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/usage_and_stepdefs_formatter.feature +169 -0
  398. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/wire_protocol.feature +332 -0
  399. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/wire_protocol_table_diffing.feature +119 -0
  400. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/wire_protocol_tags.feature +87 -0
  401. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/wire_protocol_timeouts.feature +63 -0
  402. data/bundler/ruby/1.8/gems/cucumber-0.9.4/features/work_in_progress.feature +156 -0
  403. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/json/features/background.feature +7 -0
  404. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/json/features/embed.feature +4 -0
  405. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/json/features/one_passing_one_failing.feature +11 -0
  406. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/json/features/pystring.feature +8 -0
  407. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/json/features/step_definitions/steps.rb +32 -0
  408. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/json/features/tables.feature +13 -0
  409. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/junit/features/one_passing_one_failing.feature +8 -0
  410. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/junit/features/pending.feature +5 -0
  411. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/junit/features/step_definitions/steps.rb +11 -0
  412. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/self_test/.gitignore +1 -0
  413. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/self_test/README.textile +6 -0
  414. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/self_test/Rakefile +6 -0
  415. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/self_test/features/background/background_tagged_before_on_outline.feature +12 -0
  416. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/self_test/features/background/background_with_name.feature +7 -0
  417. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/self_test/features/background/failing_background.feature +12 -0
  418. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/self_test/features/background/failing_background_after_success.feature +11 -0
  419. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/self_test/features/background/multiline_args_background.feature +32 -0
  420. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/self_test/features/background/passing_background.feature +10 -0
  421. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/self_test/features/background/pending_background.feature +10 -0
  422. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/self_test/features/background/scenario_outline_failing_background.feature +16 -0
  423. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/self_test/features/background/scenario_outline_passing_background.feature +16 -0
  424. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/self_test/features/call_undefined_step_from_step_def.feature +7 -0
  425. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/self_test/features/failing_expectation.feature +4 -0
  426. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/self_test/features/lots_of_undefined.feature +8 -0
  427. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/self_test/features/multiline_name.feature +27 -0
  428. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/self_test/features/outline_sample.feature +15 -0
  429. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/self_test/features/sample.feature +21 -0
  430. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/self_test/features/search_sample.feature +32 -0
  431. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/self_test/features/step_definitions/sample_steps.rb +84 -0
  432. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/self_test/features/support/env.rb +18 -0
  433. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/self_test/features/tags_sample.feature +17 -0
  434. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/self_test/features/tons_of_cukes.feature +52 -0
  435. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/self_test/features/undefined_multiline_args.feature +12 -0
  436. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/self_test/list-of-features.txt +1 -0
  437. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/steps_library/features/step_definitions/steps_lib1.rb +8 -0
  438. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/steps_library/features/step_definitions/steps_lib2.rb +8 -0
  439. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/tickets/Rakefile +20 -0
  440. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/tickets/features/172.feature +28 -0
  441. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/tickets/features/177/1.feature +28 -0
  442. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/tickets/features/177/2.feature +20 -0
  443. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/tickets/features/177/3.feature +18 -0
  444. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/tickets/features/180.feature +7 -0
  445. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/tickets/features/229/tagged_hooks.feature +8 -0
  446. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/tickets/features/229/tagged_hooks.rb +14 -0
  447. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/tickets/features/236.feature +13 -0
  448. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/tickets/features/241.feature +12 -0
  449. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/tickets/features/246.feature +4 -0
  450. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/tickets/features/248.feature +11 -0
  451. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/tickets/features/270/back.feature +14 -0
  452. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/tickets/features/270/back.steps.rb +14 -0
  453. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/tickets/features/272/hooks.feature +26 -0
  454. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/tickets/features/272/hooks_steps.rb +53 -0
  455. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/tickets/features/279/py_string_indent.feature +25 -0
  456. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/tickets/features/279/py_string_indent.steps.rb +12 -0
  457. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/tickets/features/279/wrong.feature_ +11 -0
  458. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/tickets/features/301/filter_background_tagged_hooks.feature +6 -0
  459. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/tickets/features/301/filter_background_tagged_hooks_steps.rb +12 -0
  460. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/tickets/features/306/only_background.feature +4 -0
  461. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/tickets/features/around_timeout.feature +6 -0
  462. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/tickets/features/gherkin_67.feature +12 -0
  463. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/tickets/features/gherkin_68.feature +4 -0
  464. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/tickets/features/half_manual.feature +11 -0
  465. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/tickets/features/lib/eatting_machine.rb +18 -0
  466. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/tickets/features/lib/pantry.rb +20 -0
  467. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/tickets/features/scenario_outline.feature +95 -0
  468. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/tickets/features/step_definitons/246_steps.rb +3 -0
  469. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/tickets/features/step_definitons/248_steps.rb +15 -0
  470. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/tickets/features/step_definitons/around_timeout_steps.rb +9 -0
  471. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/tickets/features/step_definitons/half_manual_steps.rb +11 -0
  472. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/tickets/features/step_definitons/scenario_outline_steps.rb +42 -0
  473. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/tickets/features/step_definitons/tickets_steps.rb +88 -0
  474. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/tickets/features/table_diffing.feature +13 -0
  475. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/tickets/features/tickets.feature +28 -0
  476. data/bundler/ruby/1.8/gems/cucumber-0.9.4/fixtures/tickets/features.html +138 -0
  477. data/bundler/ruby/1.8/gems/cucumber-0.9.4/gem_tasks/contributors.rake +15 -0
  478. data/bundler/ruby/1.8/gems/cucumber-0.9.4/gem_tasks/environment.rake +7 -0
  479. data/bundler/ruby/1.8/gems/cucumber-0.9.4/gem_tasks/examples.rake +11 -0
  480. data/bundler/ruby/1.8/gems/cucumber-0.9.4/gem_tasks/features.rake +14 -0
  481. data/bundler/ruby/1.8/gems/cucumber-0.9.4/gem_tasks/fix_cr_lf.rake +10 -0
  482. data/bundler/ruby/1.8/gems/cucumber-0.9.4/gem_tasks/flog.rake +4 -0
  483. data/bundler/ruby/1.8/gems/cucumber-0.9.4/gem_tasks/rspec.rake +8 -0
  484. data/bundler/ruby/1.8/gems/cucumber-0.9.4/gem_tasks/sass.rake +4 -0
  485. data/bundler/ruby/1.8/gems/cucumber-0.9.4/gem_tasks/sdoc.rake +12 -0
  486. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/README.rdoc +12 -0
  487. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/autotest/cucumber.rb +6 -0
  488. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/autotest/cucumber_mixin.rb +135 -0
  489. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/autotest/cucumber_rails.rb +6 -0
  490. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/autotest/cucumber_rails_rspec.rb +6 -0
  491. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/autotest/cucumber_rails_rspec2.rb +6 -0
  492. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/autotest/cucumber_rspec.rb +6 -0
  493. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/autotest/cucumber_rspec2.rb +6 -0
  494. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/autotest/discover.rb +9 -0
  495. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/ast/background.rb +99 -0
  496. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/ast/comment.rb +31 -0
  497. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/ast/examples.rb +38 -0
  498. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/ast/feature.rb +98 -0
  499. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/ast/feature_element.rb +73 -0
  500. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/ast/features.rb +35 -0
  501. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/ast/outline_table.rb +187 -0
  502. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/ast/py_string.rb +80 -0
  503. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/ast/scenario.rb +117 -0
  504. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/ast/scenario_outline.rb +117 -0
  505. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/ast/step.rb +121 -0
  506. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/ast/step_collection.rb +76 -0
  507. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/ast/step_invocation.rb +195 -0
  508. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/ast/table.rb +688 -0
  509. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/ast/tags.rb +28 -0
  510. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/ast/tree_walker.rb +222 -0
  511. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/ast/visitor.rb +11 -0
  512. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/ast.rb +30 -0
  513. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/broadcaster.rb +13 -0
  514. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/cli/configuration.rb +209 -0
  515. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/cli/drb_client.rb +43 -0
  516. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/cli/main.rb +83 -0
  517. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/cli/options.rb +407 -0
  518. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/cli/profile_loader.rb +91 -0
  519. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/configuration.rb +49 -0
  520. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/constantize.rb +34 -0
  521. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/core_ext/disable_mini_unit_autorun.rb +14 -0
  522. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/core_ext/instance_exec.rb +98 -0
  523. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/core_ext/proc.rb +34 -0
  524. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/core_ext/string.rb +9 -0
  525. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/errors.rb +40 -0
  526. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/feature_file.rb +62 -0
  527. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/formatter/ansicolor.rb +162 -0
  528. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/formatter/color_io.rb +23 -0
  529. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/formatter/console.rb +177 -0
  530. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/formatter/cucumber.css +275 -0
  531. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/formatter/cucumber.sass +271 -0
  532. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/formatter/debug.rb +33 -0
  533. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/formatter/duration.rb +13 -0
  534. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/formatter/html.rb +644 -0
  535. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/formatter/io.rb +33 -0
  536. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/formatter/jquery-min.js +154 -0
  537. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/formatter/json.rb +166 -0
  538. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/formatter/json_pretty.rb +14 -0
  539. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/formatter/junit.rb +150 -0
  540. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/formatter/ordered_xml_markup.rb +24 -0
  541. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/formatter/pdf.rb +244 -0
  542. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/formatter/pretty.rb +237 -0
  543. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/formatter/progress.rb +92 -0
  544. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/formatter/rerun.rb +55 -0
  545. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/formatter/stepdefs.rb +14 -0
  546. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/formatter/steps.rb +49 -0
  547. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/formatter/summary.rb +35 -0
  548. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/formatter/tag_cloud.rb +35 -0
  549. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/formatter/unicode.rb +58 -0
  550. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/formatter/usage.rb +127 -0
  551. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/js_support/js_dsl.js +57 -0
  552. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/js_support/js_language.rb +185 -0
  553. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/js_support/js_snippets.rb +27 -0
  554. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/language_support/language_methods.rb +129 -0
  555. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/language_support.rb +30 -0
  556. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/parser/gherkin_builder.rb +124 -0
  557. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/parser.rb +2 -0
  558. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/platform.rb +29 -0
  559. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/py_support/py_dsl.py +10 -0
  560. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/py_support/py_language.py +10 -0
  561. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/py_support/py_language.rb +84 -0
  562. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/rake/task.rb +170 -0
  563. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/rb_support/rb_dsl.rb +112 -0
  564. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/rb_support/rb_hook.rb +18 -0
  565. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/rb_support/rb_language.rb +195 -0
  566. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/rb_support/rb_step_definition.rb +82 -0
  567. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/rb_support/rb_transform.rb +37 -0
  568. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/rb_support/rb_world.rb +95 -0
  569. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/rb_support/regexp_argument_matcher.rb +21 -0
  570. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/rspec/disable_option_parser.rb +23 -0
  571. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/rspec/doubles.rb +16 -0
  572. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/runtime/features_loader.rb +62 -0
  573. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/runtime/for_programming_languages.rb +65 -0
  574. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/runtime/results.rb +64 -0
  575. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/runtime/support_code.rb +203 -0
  576. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/runtime/user_interface.rb +80 -0
  577. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/runtime.rb +145 -0
  578. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/step_argument.rb +9 -0
  579. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/step_definition_light.rb +20 -0
  580. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/step_definitions.rb +14 -0
  581. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/step_match.rb +111 -0
  582. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/step_mother.rb +10 -0
  583. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/wire_support/configuration.rb +30 -0
  584. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/wire_support/connection.rb +55 -0
  585. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/wire_support/request_handler.rb +32 -0
  586. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/wire_support/wire_exception.rb +32 -0
  587. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/wire_support/wire_language.rb +54 -0
  588. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/wire_support/wire_packet.rb +32 -0
  589. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/wire_support/wire_protocol/requests.rb +123 -0
  590. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/wire_support/wire_protocol.rb +44 -0
  591. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber/wire_support/wire_step_definition.rb +26 -0
  592. data/bundler/ruby/1.8/gems/cucumber-0.9.4/lib/cucumber.rb +27 -0
  593. data/bundler/ruby/1.8/gems/cucumber-0.9.4/spec/cucumber/ast/background_spec.rb +110 -0
  594. data/bundler/ruby/1.8/gems/cucumber-0.9.4/spec/cucumber/ast/feature_factory.rb +60 -0
  595. data/bundler/ruby/1.8/gems/cucumber-0.9.4/spec/cucumber/ast/feature_spec.rb +63 -0
  596. data/bundler/ruby/1.8/gems/cucumber-0.9.4/spec/cucumber/ast/outline_table_spec.rb +21 -0
  597. data/bundler/ruby/1.8/gems/cucumber-0.9.4/spec/cucumber/ast/py_string_spec.rb +40 -0
  598. data/bundler/ruby/1.8/gems/cucumber-0.9.4/spec/cucumber/ast/scenario_outline_spec.rb +65 -0
  599. data/bundler/ruby/1.8/gems/cucumber-0.9.4/spec/cucumber/ast/scenario_spec.rb +43 -0
  600. data/bundler/ruby/1.8/gems/cucumber-0.9.4/spec/cucumber/ast/step_spec.rb +66 -0
  601. data/bundler/ruby/1.8/gems/cucumber-0.9.4/spec/cucumber/ast/table_spec.rb +465 -0
  602. data/bundler/ruby/1.8/gems/cucumber-0.9.4/spec/cucumber/ast/tree_walker_spec.rb +11 -0
  603. data/bundler/ruby/1.8/gems/cucumber-0.9.4/spec/cucumber/broadcaster_spec.rb +15 -0
  604. data/bundler/ruby/1.8/gems/cucumber-0.9.4/spec/cucumber/cli/configuration_spec.rb +431 -0
  605. data/bundler/ruby/1.8/gems/cucumber-0.9.4/spec/cucumber/cli/drb_client_spec.rb +77 -0
  606. data/bundler/ruby/1.8/gems/cucumber-0.9.4/spec/cucumber/cli/main_spec.rb +134 -0
  607. data/bundler/ruby/1.8/gems/cucumber-0.9.4/spec/cucumber/cli/options_spec.rb +351 -0
  608. data/bundler/ruby/1.8/gems/cucumber-0.9.4/spec/cucumber/cli/profile_loader_spec.rb +35 -0
  609. data/bundler/ruby/1.8/gems/cucumber-0.9.4/spec/cucumber/configuration_spec.rb +23 -0
  610. data/bundler/ruby/1.8/gems/cucumber-0.9.4/spec/cucumber/core_ext/proc_spec.rb +68 -0
  611. data/bundler/ruby/1.8/gems/cucumber-0.9.4/spec/cucumber/formatter/ansicolor_spec.rb +31 -0
  612. data/bundler/ruby/1.8/gems/cucumber-0.9.4/spec/cucumber/formatter/color_io_spec.rb +29 -0
  613. data/bundler/ruby/1.8/gems/cucumber-0.9.4/spec/cucumber/formatter/duration_spec.rb +22 -0
  614. data/bundler/ruby/1.8/gems/cucumber-0.9.4/spec/cucumber/formatter/html_spec.rb +258 -0
  615. data/bundler/ruby/1.8/gems/cucumber-0.9.4/spec/cucumber/formatter/junit_spec.rb +111 -0
  616. data/bundler/ruby/1.8/gems/cucumber-0.9.4/spec/cucumber/formatter/progress_spec.rb +38 -0
  617. data/bundler/ruby/1.8/gems/cucumber-0.9.4/spec/cucumber/formatter/spec_helper.rb +51 -0
  618. data/bundler/ruby/1.8/gems/cucumber-0.9.4/spec/cucumber/rb_support/rb_language_spec.rb +283 -0
  619. data/bundler/ruby/1.8/gems/cucumber-0.9.4/spec/cucumber/rb_support/rb_step_definition_spec.rb +99 -0
  620. data/bundler/ruby/1.8/gems/cucumber-0.9.4/spec/cucumber/rb_support/regexp_argument_matcher_spec.rb +18 -0
  621. data/bundler/ruby/1.8/gems/cucumber-0.9.4/spec/cucumber/runtime/support_code_spec.rb +112 -0
  622. data/bundler/ruby/1.8/gems/cucumber-0.9.4/spec/cucumber/runtime_spec.rb +41 -0
  623. data/bundler/ruby/1.8/gems/cucumber-0.9.4/spec/cucumber/sell_cucumbers.feature +19 -0
  624. data/bundler/ruby/1.8/gems/cucumber-0.9.4/spec/cucumber/step_match_spec.rb +69 -0
  625. data/bundler/ruby/1.8/gems/cucumber-0.9.4/spec/cucumber/wire_support/configuration_spec.rb +51 -0
  626. data/bundler/ruby/1.8/gems/cucumber-0.9.4/spec/cucumber/wire_support/connection_spec.rb +46 -0
  627. data/bundler/ruby/1.8/gems/cucumber-0.9.4/spec/cucumber/wire_support/wire_exception_spec.rb +44 -0
  628. data/bundler/ruby/1.8/gems/cucumber-0.9.4/spec/cucumber/wire_support/wire_language_spec.rb +47 -0
  629. data/bundler/ruby/1.8/gems/cucumber-0.9.4/spec/cucumber/wire_support/wire_packet_spec.rb +40 -0
  630. data/bundler/ruby/1.8/gems/cucumber-0.9.4/spec/cucumber/wire_support/wire_step_definition_spec.rb +20 -0
  631. data/bundler/ruby/1.8/gems/cucumber-0.9.4/spec/cucumber/world/pending_spec.rb +46 -0
  632. data/bundler/ruby/1.8/gems/cucumber-0.9.4/spec/spec_helper.rb +10 -0
  633. data/bundler/ruby/1.8/gems/gherkin-2.2.9/.gitattributes +2 -0
  634. data/bundler/ruby/1.8/gems/gherkin-2.2.9/.gitignore +11 -0
  635. data/bundler/ruby/1.8/gems/gherkin-2.2.9/.mailmap +2 -0
  636. data/bundler/ruby/1.8/gems/gherkin-2.2.9/.rspec +1 -0
  637. data/bundler/ruby/1.8/gems/gherkin-2.2.9/.rvmrc +1 -0
  638. data/bundler/ruby/1.8/gems/gherkin-2.2.9/Gemfile +5 -0
  639. data/bundler/ruby/1.8/gems/gherkin-2.2.9/History.txt +327 -0
  640. data/bundler/ruby/1.8/gems/gherkin-2.2.9/LICENSE +20 -0
  641. data/bundler/ruby/1.8/gems/gherkin-2.2.9/README.rdoc +59 -0
  642. data/bundler/ruby/1.8/gems/gherkin-2.2.9/Rakefile +16 -0
  643. data/bundler/ruby/1.8/gems/gherkin-2.2.9/VERSION +1 -0
  644. data/bundler/ruby/1.8/gems/gherkin-2.2.9/build_native_gems.sh +8 -0
  645. data/bundler/ruby/1.8/gems/gherkin-2.2.9/cucumber.yml +3 -0
  646. data/bundler/ruby/1.8/gems/gherkin-2.2.9/features/escaped_pipes.feature +8 -0
  647. data/bundler/ruby/1.8/gems/gherkin-2.2.9/features/feature_parser.feature +237 -0
  648. data/bundler/ruby/1.8/gems/gherkin-2.2.9/features/json_formatter.feature +278 -0
  649. data/bundler/ruby/1.8/gems/gherkin-2.2.9/features/json_parser.feature +318 -0
  650. data/bundler/ruby/1.8/gems/gherkin-2.2.9/features/native_lexer.feature +19 -0
  651. data/bundler/ruby/1.8/gems/gherkin-2.2.9/features/parser_with_native_lexer.feature +205 -0
  652. data/bundler/ruby/1.8/gems/gherkin-2.2.9/features/pretty_formatter.feature +15 -0
  653. data/bundler/ruby/1.8/gems/gherkin-2.2.9/features/step_definitions/eyeball_steps.rb +3 -0
  654. data/bundler/ruby/1.8/gems/gherkin-2.2.9/features/step_definitions/gherkin_steps.rb +29 -0
  655. data/bundler/ruby/1.8/gems/gherkin-2.2.9/features/step_definitions/json_formatter_steps.rb +28 -0
  656. data/bundler/ruby/1.8/gems/gherkin-2.2.9/features/step_definitions/json_parser_steps.rb +22 -0
  657. data/bundler/ruby/1.8/gems/gherkin-2.2.9/features/step_definitions/pretty_formatter_steps.rb +84 -0
  658. data/bundler/ruby/1.8/gems/gherkin-2.2.9/features/steps_parser.feature +46 -0
  659. data/bundler/ruby/1.8/gems/gherkin-2.2.9/features/support/env.rb +39 -0
  660. data/bundler/ruby/1.8/gems/gherkin-2.2.9/gherkin.gemspec +58 -0
  661. data/bundler/ruby/1.8/gems/gherkin-2.2.9/ikvm/.gitignore +3 -0
  662. data/bundler/ruby/1.8/gems/gherkin-2.2.9/java/.gitignore +5 -0
  663. data/bundler/ruby/1.8/gems/gherkin-2.2.9/java/src/main/java/gherkin/lexer/i18n/.gitignore +1 -0
  664. data/bundler/ruby/1.8/gems/gherkin-2.2.9/java/src/main/resources/gherkin/.gitignore +1 -0
  665. data/bundler/ruby/1.8/gems/gherkin-2.2.9/lib/.gitignore +4 -0
  666. data/bundler/ruby/1.8/gems/gherkin-2.2.9/lib/gherkin/c_lexer.rb +17 -0
  667. data/bundler/ruby/1.8/gems/gherkin-2.2.9/lib/gherkin/formatter/argument.rb +15 -0
  668. data/bundler/ruby/1.8/gems/gherkin-2.2.9/lib/gherkin/formatter/colors.rb +116 -0
  669. data/bundler/ruby/1.8/gems/gherkin-2.2.9/lib/gherkin/formatter/escaping.rb +15 -0
  670. data/bundler/ruby/1.8/gems/gherkin-2.2.9/lib/gherkin/formatter/filter_formatter.rb +136 -0
  671. data/bundler/ruby/1.8/gems/gherkin-2.2.9/lib/gherkin/formatter/json_formatter.rb +72 -0
  672. data/bundler/ruby/1.8/gems/gherkin-2.2.9/lib/gherkin/formatter/line_filter.rb +26 -0
  673. data/bundler/ruby/1.8/gems/gherkin-2.2.9/lib/gherkin/formatter/model.rb +239 -0
  674. data/bundler/ruby/1.8/gems/gherkin-2.2.9/lib/gherkin/formatter/pretty_formatter.rb +217 -0
  675. data/bundler/ruby/1.8/gems/gherkin-2.2.9/lib/gherkin/formatter/regexp_filter.rb +21 -0
  676. data/bundler/ruby/1.8/gems/gherkin-2.2.9/lib/gherkin/formatter/step_printer.rb +17 -0
  677. data/bundler/ruby/1.8/gems/gherkin-2.2.9/lib/gherkin/formatter/tag_count_formatter.rb +47 -0
  678. data/bundler/ruby/1.8/gems/gherkin-2.2.9/lib/gherkin/formatter/tag_filter.rb +19 -0
  679. data/bundler/ruby/1.8/gems/gherkin-2.2.9/lib/gherkin/i18n.rb +180 -0
  680. data/bundler/ruby/1.8/gems/gherkin-2.2.9/lib/gherkin/i18n.yml +601 -0
  681. data/bundler/ruby/1.8/gems/gherkin-2.2.9/lib/gherkin/json_parser.rb +88 -0
  682. data/bundler/ruby/1.8/gems/gherkin-2.2.9/lib/gherkin/lexer/i18n_lexer.rb +47 -0
  683. data/bundler/ruby/1.8/gems/gherkin-2.2.9/lib/gherkin/listener/event.rb +45 -0
  684. data/bundler/ruby/1.8/gems/gherkin-2.2.9/lib/gherkin/listener/formatter_listener.rb +113 -0
  685. data/bundler/ruby/1.8/gems/gherkin-2.2.9/lib/gherkin/native/ikvm.rb +55 -0
  686. data/bundler/ruby/1.8/gems/gherkin-2.2.9/lib/gherkin/native/java.rb +55 -0
  687. data/bundler/ruby/1.8/gems/gherkin-2.2.9/lib/gherkin/native/null.rb +9 -0
  688. data/bundler/ruby/1.8/gems/gherkin-2.2.9/lib/gherkin/native.rb +7 -0
  689. data/bundler/ruby/1.8/gems/gherkin-2.2.9/lib/gherkin/parser/meta.txt +5 -0
  690. data/bundler/ruby/1.8/gems/gherkin-2.2.9/lib/gherkin/parser/parser.rb +164 -0
  691. data/bundler/ruby/1.8/gems/gherkin-2.2.9/lib/gherkin/parser/root.txt +11 -0
  692. data/bundler/ruby/1.8/gems/gherkin-2.2.9/lib/gherkin/parser/steps.txt +4 -0
  693. data/bundler/ruby/1.8/gems/gherkin-2.2.9/lib/gherkin/rb_lexer/.gitignore +1 -0
  694. data/bundler/ruby/1.8/gems/gherkin-2.2.9/lib/gherkin/rb_lexer/README.rdoc +8 -0
  695. data/bundler/ruby/1.8/gems/gherkin-2.2.9/lib/gherkin/rb_lexer.rb +8 -0
  696. data/bundler/ruby/1.8/gems/gherkin-2.2.9/lib/gherkin/rubify.rb +24 -0
  697. data/bundler/ruby/1.8/gems/gherkin-2.2.9/lib/gherkin/tag_expression.rb +62 -0
  698. data/bundler/ruby/1.8/gems/gherkin-2.2.9/lib/gherkin/version.rb +3 -0
  699. data/bundler/ruby/1.8/gems/gherkin-2.2.9/lib/gherkin.rb +2 -0
  700. data/bundler/ruby/1.8/gems/gherkin-2.2.9/ragel/i18n/.gitignore +1 -0
  701. data/bundler/ruby/1.8/gems/gherkin-2.2.9/ragel/lexer.c.rl.erb +459 -0
  702. data/bundler/ruby/1.8/gems/gherkin-2.2.9/ragel/lexer.java.rl.erb +224 -0
  703. data/bundler/ruby/1.8/gems/gherkin-2.2.9/ragel/lexer.rb.rl.erb +179 -0
  704. data/bundler/ruby/1.8/gems/gherkin-2.2.9/ragel/lexer_common.rl.erb +50 -0
  705. data/bundler/ruby/1.8/gems/gherkin-2.2.9/spec/gherkin/c_lexer_spec.rb +21 -0
  706. data/bundler/ruby/1.8/gems/gherkin-2.2.9/spec/gherkin/fixtures/1.feature +8 -0
  707. data/bundler/ruby/1.8/gems/gherkin-2.2.9/spec/gherkin/fixtures/comments_in_table.feature +9 -0
  708. data/bundler/ruby/1.8/gems/gherkin-2.2.9/spec/gherkin/fixtures/complex.feature +45 -0
  709. data/bundler/ruby/1.8/gems/gherkin-2.2.9/spec/gherkin/fixtures/complex.json +143 -0
  710. data/bundler/ruby/1.8/gems/gherkin-2.2.9/spec/gherkin/fixtures/complex_for_filtering.feature +60 -0
  711. data/bundler/ruby/1.8/gems/gherkin-2.2.9/spec/gherkin/fixtures/complex_with_tags.feature +61 -0
  712. data/bundler/ruby/1.8/gems/gherkin-2.2.9/spec/gherkin/fixtures/dos_line_endings.feature +45 -0
  713. data/bundler/ruby/1.8/gems/gherkin-2.2.9/spec/gherkin/fixtures/hantu_pisang.feature +35 -0
  714. data/bundler/ruby/1.8/gems/gherkin-2.2.9/spec/gherkin/fixtures/i18n_fr.feature +14 -0
  715. data/bundler/ruby/1.8/gems/gherkin-2.2.9/spec/gherkin/fixtures/i18n_no.feature +7 -0
  716. data/bundler/ruby/1.8/gems/gherkin-2.2.9/spec/gherkin/fixtures/i18n_zh-CN.feature +9 -0
  717. data/bundler/ruby/1.8/gems/gherkin-2.2.9/spec/gherkin/fixtures/scenario_outline_with_tags.feature +13 -0
  718. data/bundler/ruby/1.8/gems/gherkin-2.2.9/spec/gherkin/fixtures/scenario_without_steps.feature +5 -0
  719. data/bundler/ruby/1.8/gems/gherkin-2.2.9/spec/gherkin/fixtures/simple_with_comments.feature +7 -0
  720. data/bundler/ruby/1.8/gems/gherkin-2.2.9/spec/gherkin/fixtures/simple_with_tags.feature +11 -0
  721. data/bundler/ruby/1.8/gems/gherkin-2.2.9/spec/gherkin/fixtures/with_bom.feature +3 -0
  722. data/bundler/ruby/1.8/gems/gherkin-2.2.9/spec/gherkin/formatter/colors_spec.rb +18 -0
  723. data/bundler/ruby/1.8/gems/gherkin-2.2.9/spec/gherkin/formatter/filter_formatter_spec.rb +167 -0
  724. data/bundler/ruby/1.8/gems/gherkin-2.2.9/spec/gherkin/formatter/model_spec.rb +15 -0
  725. data/bundler/ruby/1.8/gems/gherkin-2.2.9/spec/gherkin/formatter/pretty_formatter_spec.rb +147 -0
  726. data/bundler/ruby/1.8/gems/gherkin-2.2.9/spec/gherkin/formatter/spaces.feature +9 -0
  727. data/bundler/ruby/1.8/gems/gherkin-2.2.9/spec/gherkin/formatter/step_printer_spec.rb +55 -0
  728. data/bundler/ruby/1.8/gems/gherkin-2.2.9/spec/gherkin/formatter/tabs.feature +9 -0
  729. data/bundler/ruby/1.8/gems/gherkin-2.2.9/spec/gherkin/formatter/tag_count_formatter_spec.rb +30 -0
  730. data/bundler/ruby/1.8/gems/gherkin-2.2.9/spec/gherkin/i18n_spec.rb +153 -0
  731. data/bundler/ruby/1.8/gems/gherkin-2.2.9/spec/gherkin/java_lexer_spec.rb +20 -0
  732. data/bundler/ruby/1.8/gems/gherkin-2.2.9/spec/gherkin/java_libs.rb +13 -0
  733. data/bundler/ruby/1.8/gems/gherkin-2.2.9/spec/gherkin/json.rb +5 -0
  734. data/bundler/ruby/1.8/gems/gherkin-2.2.9/spec/gherkin/json_parser_spec.rb +67 -0
  735. data/bundler/ruby/1.8/gems/gherkin-2.2.9/spec/gherkin/lexer/i18n_lexer_spec.rb +43 -0
  736. data/bundler/ruby/1.8/gems/gherkin-2.2.9/spec/gherkin/output_stream_string_io.rb +20 -0
  737. data/bundler/ruby/1.8/gems/gherkin-2.2.9/spec/gherkin/parser/parser_spec.rb +16 -0
  738. data/bundler/ruby/1.8/gems/gherkin-2.2.9/spec/gherkin/rb_lexer_spec.rb +19 -0
  739. data/bundler/ruby/1.8/gems/gherkin-2.2.9/spec/gherkin/sexp_recorder.rb +56 -0
  740. data/bundler/ruby/1.8/gems/gherkin-2.2.9/spec/gherkin/shared/lexer_group.rb +592 -0
  741. data/bundler/ruby/1.8/gems/gherkin-2.2.9/spec/gherkin/shared/py_string_group.rb +153 -0
  742. data/bundler/ruby/1.8/gems/gherkin-2.2.9/spec/gherkin/shared/row_group.rb +120 -0
  743. data/bundler/ruby/1.8/gems/gherkin-2.2.9/spec/gherkin/shared/tags_group.rb +54 -0
  744. data/bundler/ruby/1.8/gems/gherkin-2.2.9/spec/gherkin/tag_expression_spec.rb +137 -0
  745. data/bundler/ruby/1.8/gems/gherkin-2.2.9/spec/spec_helper.rb +69 -0
  746. data/bundler/ruby/1.8/gems/gherkin-2.2.9/tasks/bench/feature_builder.rb +49 -0
  747. data/bundler/ruby/1.8/gems/gherkin-2.2.9/tasks/bench/generated/.gitignore +1 -0
  748. data/bundler/ruby/1.8/gems/gherkin-2.2.9/tasks/bench/null_listener.rb +4 -0
  749. data/bundler/ruby/1.8/gems/gherkin-2.2.9/tasks/bench.rake +184 -0
  750. data/bundler/ruby/1.8/gems/gherkin-2.2.9/tasks/compile.rake +102 -0
  751. data/bundler/ruby/1.8/gems/gherkin-2.2.9/tasks/cucumber.rake +18 -0
  752. data/bundler/ruby/1.8/gems/gherkin-2.2.9/tasks/gems.rake +42 -0
  753. data/bundler/ruby/1.8/gems/gherkin-2.2.9/tasks/ikvm.rake +54 -0
  754. data/bundler/ruby/1.8/gems/gherkin-2.2.9/tasks/ragel_task.rb +70 -0
  755. data/bundler/ruby/1.8/gems/gherkin-2.2.9/tasks/rdoc.rake +9 -0
  756. data/bundler/ruby/1.8/gems/gherkin-2.2.9/tasks/release.rake +30 -0
  757. data/bundler/ruby/1.8/gems/gherkin-2.2.9/tasks/rspec.rake +8 -0
  758. data/bundler/ruby/1.8/gems/json-1.4.6/.require_paths +4 -0
  759. data/bundler/ruby/1.8/gems/json-1.4.6/CHANGES +179 -0
  760. data/bundler/ruby/1.8/gems/json-1.4.6/COPYING +58 -0
  761. data/bundler/ruby/1.8/gems/json-1.4.6/GPL +340 -0
  762. data/bundler/ruby/1.8/gems/json-1.4.6/README +356 -0
  763. data/bundler/ruby/1.8/gems/json-1.4.6/Rakefile +292 -0
  764. data/bundler/ruby/1.8/gems/json-1.4.6/TODO +1 -0
  765. data/bundler/ruby/1.8/gems/json-1.4.6/VERSION +1 -0
  766. data/bundler/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkComparison.log +52 -0
  767. data/bundler/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_fast-autocorrelation.dat +1000 -0
  768. data/bundler/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_fast.dat +1001 -0
  769. data/bundler/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_pretty-autocorrelation.dat +900 -0
  770. data/bundler/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_pretty.dat +901 -0
  771. data/bundler/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_safe-autocorrelation.dat +1000 -0
  772. data/bundler/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_safe.dat +1001 -0
  773. data/bundler/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt.log +261 -0
  774. data/bundler/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_fast-autocorrelation.dat +1000 -0
  775. data/bundler/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_fast.dat +1001 -0
  776. data/bundler/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_pretty-autocorrelation.dat +1000 -0
  777. data/bundler/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_pretty.dat +1001 -0
  778. data/bundler/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_safe-autocorrelation.dat +1000 -0
  779. data/bundler/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_safe.dat +1001 -0
  780. data/bundler/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure.log +262 -0
  781. data/bundler/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails#generator-autocorrelation.dat +1000 -0
  782. data/bundler/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails#generator.dat +1001 -0
  783. data/bundler/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails.log +82 -0
  784. data/bundler/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkComparison.log +34 -0
  785. data/bundler/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt#parser-autocorrelation.dat +900 -0
  786. data/bundler/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt#parser.dat +901 -0
  787. data/bundler/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt.log +81 -0
  788. data/bundler/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure#parser-autocorrelation.dat +1000 -0
  789. data/bundler/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure#parser.dat +1001 -0
  790. data/bundler/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure.log +82 -0
  791. data/bundler/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails#parser-autocorrelation.dat +1000 -0
  792. data/bundler/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails#parser.dat +1001 -0
  793. data/bundler/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails.log +82 -0
  794. data/bundler/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML#parser-autocorrelation.dat +1000 -0
  795. data/bundler/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML#parser.dat +1001 -0
  796. data/bundler/ruby/1.8/gems/json-1.4.6/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML.log +82 -0
  797. data/bundler/ruby/1.8/gems/json-1.4.6/benchmarks/generator2_benchmark.rb +222 -0
  798. data/bundler/ruby/1.8/gems/json-1.4.6/benchmarks/generator_benchmark.rb +224 -0
  799. data/bundler/ruby/1.8/gems/json-1.4.6/benchmarks/ohai.json +1216 -0
  800. data/bundler/ruby/1.8/gems/json-1.4.6/benchmarks/ohai.ruby +1 -0
  801. data/bundler/ruby/1.8/gems/json-1.4.6/benchmarks/parser2_benchmark.rb +251 -0
  802. data/bundler/ruby/1.8/gems/json-1.4.6/benchmarks/parser_benchmark.rb +259 -0
  803. data/bundler/ruby/1.8/gems/json-1.4.6/bin/edit_json.rb +9 -0
  804. data/bundler/ruby/1.8/gems/json-1.4.6/bin/prettify_json.rb +75 -0
  805. data/bundler/ruby/1.8/gems/json-1.4.6/data/example.json +1 -0
  806. data/bundler/ruby/1.8/gems/json-1.4.6/data/index.html +38 -0
  807. data/bundler/ruby/1.8/gems/json-1.4.6/data/prototype.js +4184 -0
  808. data/bundler/ruby/1.8/gems/json-1.4.6/ext/json/ext/generator/Makefile +157 -0
  809. data/bundler/ruby/1.8/gems/json-1.4.6/ext/json/ext/generator/extconf.rb +20 -0
  810. data/bundler/ruby/1.8/gems/json-1.4.6/ext/json/ext/generator/generator.bundle +0 -0
  811. data/bundler/ruby/1.8/gems/json-1.4.6/ext/json/ext/generator/generator.c +1417 -0
  812. data/bundler/ruby/1.8/gems/json-1.4.6/ext/json/ext/generator/generator.h +197 -0
  813. data/bundler/ruby/1.8/gems/json-1.4.6/ext/json/ext/generator/generator.o +0 -0
  814. data/bundler/ruby/1.8/gems/json-1.4.6/ext/json/ext/generator/mkmf.log +10 -0
  815. data/bundler/ruby/1.8/gems/json-1.4.6/ext/json/ext/json/ext/generator.bundle +0 -0
  816. data/bundler/ruby/1.8/gems/json-1.4.6/ext/json/ext/json/ext/parser.bundle +0 -0
  817. data/bundler/ruby/1.8/gems/json-1.4.6/ext/json/ext/parser/Makefile +157 -0
  818. data/bundler/ruby/1.8/gems/json-1.4.6/ext/json/ext/parser/extconf.rb +15 -0
  819. data/bundler/ruby/1.8/gems/json-1.4.6/ext/json/ext/parser/mkmf.log +10 -0
  820. data/bundler/ruby/1.8/gems/json-1.4.6/ext/json/ext/parser/parser.bundle +0 -0
  821. data/bundler/ruby/1.8/gems/json-1.4.6/ext/json/ext/parser/parser.c +1935 -0
  822. data/bundler/ruby/1.8/gems/json-1.4.6/ext/json/ext/parser/parser.h +71 -0
  823. data/bundler/ruby/1.8/gems/json-1.4.6/ext/json/ext/parser/parser.o +0 -0
  824. data/bundler/ruby/1.8/gems/json-1.4.6/ext/json/ext/parser/parser.rl +792 -0
  825. data/bundler/ruby/1.8/gems/json-1.4.6/install.rb +26 -0
  826. data/bundler/ruby/1.8/gems/json-1.4.6/lib/json/Array.xpm +21 -0
  827. data/bundler/ruby/1.8/gems/json-1.4.6/lib/json/FalseClass.xpm +21 -0
  828. data/bundler/ruby/1.8/gems/json-1.4.6/lib/json/Hash.xpm +21 -0
  829. data/bundler/ruby/1.8/gems/json-1.4.6/lib/json/Key.xpm +73 -0
  830. data/bundler/ruby/1.8/gems/json-1.4.6/lib/json/NilClass.xpm +21 -0
  831. data/bundler/ruby/1.8/gems/json-1.4.6/lib/json/Numeric.xpm +28 -0
  832. data/bundler/ruby/1.8/gems/json-1.4.6/lib/json/String.xpm +96 -0
  833. data/bundler/ruby/1.8/gems/json-1.4.6/lib/json/TrueClass.xpm +21 -0
  834. data/bundler/ruby/1.8/gems/json-1.4.6/lib/json/add/core.rb +148 -0
  835. data/bundler/ruby/1.8/gems/json-1.4.6/lib/json/add/rails.rb +58 -0
  836. data/bundler/ruby/1.8/gems/json-1.4.6/lib/json/common.rb +391 -0
  837. data/bundler/ruby/1.8/gems/json-1.4.6/lib/json/editor.rb +1371 -0
  838. data/bundler/ruby/1.8/gems/json-1.4.6/lib/json/ext.rb +15 -0
  839. data/bundler/ruby/1.8/gems/json-1.4.6/lib/json/json.xpm +1499 -0
  840. data/bundler/ruby/1.8/gems/json-1.4.6/lib/json/pure/generator.rb +439 -0
  841. data/bundler/ruby/1.8/gems/json-1.4.6/lib/json/pure/parser.rb +309 -0
  842. data/bundler/ruby/1.8/gems/json-1.4.6/lib/json/pure.rb +77 -0
  843. data/bundler/ruby/1.8/gems/json-1.4.6/lib/json/version.rb +8 -0
  844. data/bundler/ruby/1.8/gems/json-1.4.6/lib/json.rb +10 -0
  845. data/bundler/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail1.json +1 -0
  846. data/bundler/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail10.json +1 -0
  847. data/bundler/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail11.json +1 -0
  848. data/bundler/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail12.json +1 -0
  849. data/bundler/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail13.json +1 -0
  850. data/bundler/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail14.json +1 -0
  851. data/bundler/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail18.json +1 -0
  852. data/bundler/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail19.json +1 -0
  853. data/bundler/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail2.json +1 -0
  854. data/bundler/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail20.json +1 -0
  855. data/bundler/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail21.json +1 -0
  856. data/bundler/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail22.json +1 -0
  857. data/bundler/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail23.json +1 -0
  858. data/bundler/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail24.json +1 -0
  859. data/bundler/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail25.json +1 -0
  860. data/bundler/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail27.json +2 -0
  861. data/bundler/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail28.json +2 -0
  862. data/bundler/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail3.json +1 -0
  863. data/bundler/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail4.json +1 -0
  864. data/bundler/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail5.json +1 -0
  865. data/bundler/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail6.json +1 -0
  866. data/bundler/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail7.json +1 -0
  867. data/bundler/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail8.json +1 -0
  868. data/bundler/ruby/1.8/gems/json-1.4.6/tests/fixtures/fail9.json +1 -0
  869. data/bundler/ruby/1.8/gems/json-1.4.6/tests/fixtures/pass1.json +56 -0
  870. data/bundler/ruby/1.8/gems/json-1.4.6/tests/fixtures/pass15.json +1 -0
  871. data/bundler/ruby/1.8/gems/json-1.4.6/tests/fixtures/pass16.json +1 -0
  872. data/bundler/ruby/1.8/gems/json-1.4.6/tests/fixtures/pass17.json +1 -0
  873. data/bundler/ruby/1.8/gems/json-1.4.6/tests/fixtures/pass2.json +1 -0
  874. data/bundler/ruby/1.8/gems/json-1.4.6/tests/fixtures/pass26.json +1 -0
  875. data/bundler/ruby/1.8/gems/json-1.4.6/tests/fixtures/pass3.json +6 -0
  876. data/bundler/ruby/1.8/gems/json-1.4.6/tests/test_json.rb +394 -0
  877. data/bundler/ruby/1.8/gems/json-1.4.6/tests/test_json_addition.rb +162 -0
  878. data/bundler/ruby/1.8/gems/json-1.4.6/tests/test_json_encoding.rb +68 -0
  879. data/bundler/ruby/1.8/gems/json-1.4.6/tests/test_json_fixtures.rb +34 -0
  880. data/bundler/ruby/1.8/gems/json-1.4.6/tests/test_json_generate.rb +181 -0
  881. data/bundler/ruby/1.8/gems/json-1.4.6/tests/test_json_rails.rb +144 -0
  882. data/bundler/ruby/1.8/gems/json-1.4.6/tests/test_json_unicode.rb +76 -0
  883. data/bundler/ruby/1.8/gems/json-1.4.6/tools/fuzz.rb +139 -0
  884. data/bundler/ruby/1.8/gems/json-1.4.6/tools/server.rb +61 -0
  885. data/bundler/ruby/1.8/gems/term-ansicolor-1.0.5/CHANGES +28 -0
  886. data/bundler/ruby/1.8/gems/term-ansicolor-1.0.5/COPYING +340 -0
  887. data/bundler/ruby/1.8/gems/term-ansicolor-1.0.5/README +137 -0
  888. data/bundler/ruby/1.8/gems/term-ansicolor-1.0.5/Rakefile +88 -0
  889. data/bundler/ruby/1.8/gems/term-ansicolor-1.0.5/VERSION +1 -0
  890. data/bundler/ruby/1.8/gems/term-ansicolor-1.0.5/bin/cdiff +19 -0
  891. data/bundler/ruby/1.8/gems/term-ansicolor-1.0.5/bin/decolor +12 -0
  892. data/bundler/ruby/1.8/gems/term-ansicolor-1.0.5/examples/example.rb +90 -0
  893. data/bundler/ruby/1.8/gems/term-ansicolor-1.0.5/install.rb +15 -0
  894. data/bundler/ruby/1.8/gems/term-ansicolor-1.0.5/lib/term/ansicolor/version.rb +10 -0
  895. data/bundler/ruby/1.8/gems/term-ansicolor-1.0.5/lib/term/ansicolor.rb +102 -0
  896. data/bundler/ruby/1.8/gems/term-ansicolor-1.0.5/tests/ansicolor_test.rb +66 -0
  897. data/bundler/ruby/1.8/specifications/aruba-0.2.6.gemspec +39 -0
  898. data/bundler/ruby/1.8/specifications/autotest-4.4.5.gemspec +28 -0
  899. data/bundler/ruby/1.8/specifications/background_process-1.2.gemspec +31 -0
  900. data/bundler/ruby/1.8/specifications/builder-2.1.2.gemspec +33 -0
  901. data/bundler/ruby/1.8/specifications/cucumber-0.9.4.gemspec +78 -0
  902. data/bundler/ruby/1.8/specifications/gherkin-2.2.9.gemspec +53 -0
  903. data/bundler/ruby/1.8/specifications/json-1.4.6.gemspec +34 -0
  904. data/bundler/ruby/1.8/specifications/term-ansicolor-1.0.5.gemspec +32 -0
  905. data/cucumber.yml +6 -0
  906. data/features/init.feature +31 -0
  907. data/features/install.feature +25 -0
  908. data/features/list.feature +6 -0
  909. data/features/step_definitions/command_steps.rb +9 -0
  910. data/features/step_definitions/environment_steps.rb +31 -0
  911. data/features/step_definitions/file_check_steps.rb +16 -0
  912. data/features/step_definitions/message_steps.rb +28 -0
  913. data/features/step_definitions/plugin_steps.rb +4 -0
  914. data/features/support/env.rb +20 -0
  915. data/features/support/hook.rb +8 -0
  916. data/features/support/stubs.rb +0 -0
  917. data/features/uninstall.feature +13 -0
  918. data/lib/vim-jar/cli.rb +1 -25
  919. data/lib/vim-jar/config.rb +65 -11
  920. data/lib/vim-jar/pathogen/pathogen_v1.2.vim +139 -0
  921. data/lib/vim-jar/plugin.rb +2 -0
  922. data/lib/vim-jar/plugins.yml +5 -0
  923. data/lib/vim-jar/version.rb +1 -1
  924. data/spec/vim-jar/config_spec.rb +33 -4
  925. data/vim-jar.gemspec +4 -0
  926. metadata +972 -5
@@ -0,0 +1,1417 @@
1
+ #include "generator.h"
2
+
3
+ #ifdef HAVE_RUBY_ENCODING_H
4
+ static VALUE CEncoding_UTF_8;
5
+ static ID i_encoding, i_encode;
6
+ #endif
7
+
8
+ static VALUE mJSON, mExt, mGenerator, cState, mGeneratorMethods, mObject,
9
+ mHash, mArray, mFixnum, mBignum, mFloat, mString, mString_Extend,
10
+ mTrueClass, mFalseClass, mNilClass, eGeneratorError,
11
+ eNestingError, CRegexp_MULTILINE, CJSON_SAFE_STATE_PROTOTYPE,
12
+ i_SAFE_STATE_PROTOTYPE;
13
+
14
+ static ID i_to_s, i_to_json, i_new, i_indent, i_space, i_space_before,
15
+ i_object_nl, i_array_nl, i_max_nesting, i_allow_nan, i_ascii_only,
16
+ i_pack, i_unpack, i_create_id, i_extend, i_key_p, i_aref, i_send,
17
+ i_respond_to_p, i_match, i_keys, i_depth, i_dup;
18
+
19
+ /*
20
+ * Copyright 2001-2004 Unicode, Inc.
21
+ *
22
+ * Disclaimer
23
+ *
24
+ * This source code is provided as is by Unicode, Inc. No claims are
25
+ * made as to fitness for any particular purpose. No warranties of any
26
+ * kind are expressed or implied. The recipient agrees to determine
27
+ * applicability of information provided. If this file has been
28
+ * purchased on magnetic or optical media from Unicode, Inc., the
29
+ * sole remedy for any claim will be exchange of defective media
30
+ * within 90 days of receipt.
31
+ *
32
+ * Limitations on Rights to Redistribute This Code
33
+ *
34
+ * Unicode, Inc. hereby grants the right to freely use the information
35
+ * supplied in this file in the creation of products supporting the
36
+ * Unicode Standard, and to make copies of this file in any form
37
+ * for internal or external distribution as long as this notice
38
+ * remains attached.
39
+ */
40
+
41
+ /*
42
+ * Index into the table below with the first byte of a UTF-8 sequence to
43
+ * get the number of trailing bytes that are supposed to follow it.
44
+ * Note that *legal* UTF-8 values can't have 4 or 5-bytes. The table is
45
+ * left as-is for anyone who may want to do such conversion, which was
46
+ * allowed in earlier algorithms.
47
+ */
48
+ static const char trailingBytesForUTF8[256] = {
49
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
50
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
51
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
52
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
53
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
54
+ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
55
+ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
56
+ 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5
57
+ };
58
+
59
+ /*
60
+ * Magic values subtracted from a buffer value during UTF8 conversion.
61
+ * This table contains as many values as there might be trailing bytes
62
+ * in a UTF-8 sequence.
63
+ */
64
+ static const UTF32 offsetsFromUTF8[6] = { 0x00000000UL, 0x00003080UL, 0x000E2080UL,
65
+ 0x03C82080UL, 0xFA082080UL, 0x82082080UL };
66
+
67
+ /*
68
+ * Utility routine to tell whether a sequence of bytes is legal UTF-8.
69
+ * This must be called with the length pre-determined by the first byte.
70
+ * If not calling this from ConvertUTF8to*, then the length can be set by:
71
+ * length = trailingBytesForUTF8[*source]+1;
72
+ * and the sequence is illegal right away if there aren't that many bytes
73
+ * available.
74
+ * If presented with a length > 4, this returns 0. The Unicode
75
+ * definition of UTF-8 goes up to 4-byte sequences.
76
+ */
77
+ static unsigned char isLegalUTF8(const UTF8 *source, int length)
78
+ {
79
+ UTF8 a;
80
+ const UTF8 *srcptr = source+length;
81
+ switch (length) {
82
+ default: return 0;
83
+ /* Everything else falls through when "1"... */
84
+ case 4: if ((a = (*--srcptr)) < 0x80 || a > 0xBF) return 0;
85
+ case 3: if ((a = (*--srcptr)) < 0x80 || a > 0xBF) return 0;
86
+ case 2: if ((a = (*--srcptr)) > 0xBF) return 0;
87
+
88
+ switch (*source) {
89
+ /* no fall-through in this inner switch */
90
+ case 0xE0: if (a < 0xA0) return 0; break;
91
+ case 0xED: if (a > 0x9F) return 0; break;
92
+ case 0xF0: if (a < 0x90) return 0; break;
93
+ case 0xF4: if (a > 0x8F) return 0; break;
94
+ default: if (a < 0x80) return 0;
95
+ }
96
+
97
+ case 1: if (*source >= 0x80 && *source < 0xC2) return 0;
98
+ }
99
+ if (*source > 0xF4) return 0;
100
+ return 1;
101
+ }
102
+
103
+ /* Escapes the UTF16 character and stores the result in the buffer buf. */
104
+ static void unicode_escape(char *buf, UTF16 character)
105
+ {
106
+ const char *digits = "0123456789abcdef";
107
+
108
+ buf[2] = digits[character >> 12];
109
+ buf[3] = digits[(character >> 8) & 0xf];
110
+ buf[4] = digits[(character >> 4) & 0xf];
111
+ buf[5] = digits[character & 0xf];
112
+ }
113
+
114
+ /* Escapes the UTF16 character and stores the result in the buffer buf, then
115
+ * the buffer buf іs appended to the FBuffer buffer. */
116
+ static void unicode_escape_to_buffer(FBuffer *buffer, char buf[6], UTF16
117
+ character)
118
+ {
119
+ unicode_escape(buf, character);
120
+ fbuffer_append(buffer, buf, 6);
121
+ }
122
+
123
+ /* Converts string to a JSON string in FBuffer buffer, where all but the ASCII
124
+ * and control characters are JSON escaped. */
125
+ static void convert_UTF8_to_JSON_ASCII(FBuffer *buffer, VALUE string)
126
+ {
127
+ const UTF8 *source = (UTF8 *) RSTRING_PTR(string);
128
+ const UTF8 *sourceEnd = source + RSTRING_LEN(string);
129
+ char buf[6] = { '\\', 'u' };
130
+
131
+ while (source < sourceEnd) {
132
+ UTF32 ch = 0;
133
+ unsigned short extraBytesToRead = trailingBytesForUTF8[*source];
134
+ if (source + extraBytesToRead >= sourceEnd) {
135
+ rb_raise(rb_path2class("JSON::GeneratorError"),
136
+ "partial character in source, but hit end");
137
+ }
138
+ if (!isLegalUTF8(source, extraBytesToRead+1)) {
139
+ rb_raise(rb_path2class("JSON::GeneratorError"),
140
+ "source sequence is illegal/malformed utf-8");
141
+ }
142
+ /*
143
+ * The cases all fall through. See "Note A" below.
144
+ */
145
+ switch (extraBytesToRead) {
146
+ case 5: ch += *source++; ch <<= 6; /* remember, illegal UTF-8 */
147
+ case 4: ch += *source++; ch <<= 6; /* remember, illegal UTF-8 */
148
+ case 3: ch += *source++; ch <<= 6;
149
+ case 2: ch += *source++; ch <<= 6;
150
+ case 1: ch += *source++; ch <<= 6;
151
+ case 0: ch += *source++;
152
+ }
153
+ ch -= offsetsFromUTF8[extraBytesToRead];
154
+
155
+ if (ch <= UNI_MAX_BMP) { /* Target is a character <= 0xFFFF */
156
+ /* UTF-16 surrogate values are illegal in UTF-32 */
157
+ if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_LOW_END) {
158
+ #if UNI_STRICT_CONVERSION
159
+ source -= (extraBytesToRead+1); /* return to the illegal value itself */
160
+ rb_raise(rb_path2class("JSON::GeneratorError"),
161
+ "source sequence is illegal/malformed utf-8");
162
+ #else
163
+ unicode_escape_to_buffer(buffer, buf, UNI_REPLACEMENT_CHAR);
164
+ #endif
165
+ } else {
166
+ /* normal case */
167
+ if (ch >= 0x20 && ch <= 0x7f) {
168
+ switch (ch) {
169
+ case '\\':
170
+ fbuffer_append(buffer, "\\\\", 2);
171
+ break;
172
+ case '"':
173
+ fbuffer_append(buffer, "\\\"", 2);
174
+ break;
175
+ default:
176
+ fbuffer_append_char(buffer, (char)ch);
177
+ break;
178
+ }
179
+ } else {
180
+ switch (ch) {
181
+ case '\n':
182
+ fbuffer_append(buffer, "\\n", 2);
183
+ break;
184
+ case '\r':
185
+ fbuffer_append(buffer, "\\r", 2);
186
+ break;
187
+ case '\t':
188
+ fbuffer_append(buffer, "\\t", 2);
189
+ break;
190
+ case '\f':
191
+ fbuffer_append(buffer, "\\f", 2);
192
+ break;
193
+ case '\b':
194
+ fbuffer_append(buffer, "\\b", 2);
195
+ break;
196
+ default:
197
+ unicode_escape_to_buffer(buffer, buf, (UTF16) ch);
198
+ break;
199
+ }
200
+ }
201
+ }
202
+ } else if (ch > UNI_MAX_UTF16) {
203
+ #if UNI_STRICT_CONVERSION
204
+ source -= (extraBytesToRead+1); /* return to the start */
205
+ rb_raise(rb_path2class("JSON::GeneratorError"),
206
+ "source sequence is illegal/malformed utf8");
207
+ #else
208
+ unicode_escape_to_buffer(buffer, buf, UNI_REPLACEMENT_CHAR);
209
+ #endif
210
+ } else {
211
+ /* target is a character in range 0xFFFF - 0x10FFFF. */
212
+ ch -= halfBase;
213
+ unicode_escape_to_buffer(buffer, buf, (UTF16)((ch >> halfShift) + UNI_SUR_HIGH_START));
214
+ unicode_escape_to_buffer(buffer, buf, (UTF16)((ch & halfMask) + UNI_SUR_LOW_START));
215
+ }
216
+ }
217
+ }
218
+
219
+ /* Converts string to a JSON string in FBuffer buffer, where only the
220
+ * characters required by the JSON standard are JSON escaped. The remaining
221
+ * characters (should be UTF8) are just passed through and appended to the
222
+ * result. */
223
+ static void convert_UTF8_to_JSON(FBuffer *buffer, VALUE string)
224
+ {
225
+ const char *ptr = RSTRING_PTR(string), *p;
226
+ int len = RSTRING_LEN(string), start = 0, end = 0;
227
+ const char *escape = NULL;
228
+ int escape_len;
229
+ unsigned char c;
230
+ char buf[6] = { '\\', 'u' };
231
+
232
+ for (start = 0, end = 0; end < len;) {
233
+ p = ptr + end;
234
+ c = (unsigned char) *p;
235
+ if (c < 0x20) {
236
+ switch (c) {
237
+ case '\n':
238
+ escape = "\\n";
239
+ escape_len = 2;
240
+ break;
241
+ case '\r':
242
+ escape = "\\r";
243
+ escape_len = 2;
244
+ break;
245
+ case '\t':
246
+ escape = "\\t";
247
+ escape_len = 2;
248
+ break;
249
+ case '\f':
250
+ escape = "\\f";
251
+ escape_len = 2;
252
+ break;
253
+ case '\b':
254
+ escape = "\\b";
255
+ escape_len = 2;
256
+ break;
257
+ default:
258
+ unicode_escape(buf, (UTF16) *p);
259
+ escape = buf;
260
+ escape_len = 6;
261
+ break;
262
+ }
263
+ } else {
264
+ switch (c) {
265
+ case '\\':
266
+ escape = "\\\\";
267
+ escape_len = 2;
268
+ break;
269
+ case '"':
270
+ escape = "\\\"";
271
+ escape_len = 2;
272
+ break;
273
+ default:
274
+ end++;
275
+ continue;
276
+ break;
277
+ }
278
+ }
279
+ fbuffer_append(buffer, ptr + start, end - start);
280
+ fbuffer_append(buffer, escape, escape_len);
281
+ start = ++end;
282
+ escape = NULL;
283
+ }
284
+ fbuffer_append(buffer, ptr + start, end - start);
285
+ }
286
+
287
+ static char *fstrndup(const char *ptr, int len) {
288
+ char *result;
289
+ if (len <= 0) return NULL;
290
+ result = ALLOC_N(char, len);
291
+ memccpy(result, ptr, 0, len);
292
+ return result;
293
+ }
294
+
295
+ /* fbuffer implementation */
296
+
297
+ static FBuffer *fbuffer_alloc()
298
+ {
299
+ FBuffer *fb = ALLOC(FBuffer);
300
+ memset((void *) fb, 0, sizeof(FBuffer));
301
+ fb->initial_length = FBUFFER_INITIAL_LENGTH;
302
+ return fb;
303
+ }
304
+
305
+ static FBuffer *fbuffer_alloc_with_length(unsigned int initial_length)
306
+ {
307
+ FBuffer *fb;
308
+ assert(initial_length > 0);
309
+ fb = ALLOC(FBuffer);
310
+ memset((void *) fb, 0, sizeof(FBuffer));
311
+ fb->initial_length = initial_length;
312
+ return fb;
313
+ }
314
+
315
+ static void fbuffer_free(FBuffer *fb)
316
+ {
317
+ if (fb->ptr) ruby_xfree(fb->ptr);
318
+ ruby_xfree(fb);
319
+ }
320
+
321
+ static void fbuffer_free_only_buffer(FBuffer *fb)
322
+ {
323
+ ruby_xfree(fb);
324
+ }
325
+
326
+ static void fbuffer_clear(FBuffer *fb)
327
+ {
328
+ fb->len = 0;
329
+ }
330
+
331
+ static void fbuffer_inc_capa(FBuffer *fb, unsigned int requested)
332
+ {
333
+ unsigned int required;
334
+
335
+ if (!fb->ptr) {
336
+ fb->ptr = ALLOC_N(char, fb->initial_length);
337
+ fb->capa = fb->initial_length;
338
+ }
339
+
340
+ for (required = fb->capa; requested > required - fb->len; required <<= 1);
341
+
342
+ if (required > fb->capa) {
343
+ REALLOC_N(fb->ptr, char, required);
344
+ fb->capa = required;
345
+ }
346
+ }
347
+
348
+ static void fbuffer_append(FBuffer *fb, const char *newstr, unsigned int len)
349
+ {
350
+ if (len > 0) {
351
+ fbuffer_inc_capa(fb, len);
352
+ MEMCPY(fb->ptr + fb->len, newstr, char, len);
353
+ fb->len += len;
354
+ }
355
+ }
356
+
357
+ static void fbuffer_append_char(FBuffer *fb, char newchr)
358
+ {
359
+ fbuffer_inc_capa(fb, 1);
360
+ *(fb->ptr + fb->len) = newchr;
361
+ fb->len++;
362
+ }
363
+
364
+ static void freverse(char *start, char *end)
365
+ {
366
+ char c;
367
+
368
+ while (end > start) {
369
+ c = *end, *end-- = *start, *start++ = c;
370
+ }
371
+ }
372
+
373
+ static int fltoa(long number, char *buf)
374
+ {
375
+ static char digits[] = "0123456789";
376
+ long sign = number;
377
+ char* tmp = buf;
378
+
379
+ if (sign < 0) number = -number;
380
+ do *tmp++ = digits[number % 10]; while (number /= 10);
381
+ if (sign < 0) *tmp++ = '-';
382
+ freverse(buf, tmp - 1);
383
+ return tmp - buf;
384
+ }
385
+
386
+ static void fbuffer_append_long(FBuffer *fb, long number)
387
+ {
388
+ char buf[20];
389
+ int len = fltoa(number, buf);
390
+ fbuffer_append(fb, buf, len);
391
+ }
392
+
393
+ static FBuffer *fbuffer_dup(FBuffer *fb)
394
+ {
395
+ int len = fb->len;
396
+ FBuffer *result;
397
+
398
+ if (len > 0) {
399
+ result = fbuffer_alloc_with_length(len);
400
+ fbuffer_append(result, FBUFFER_PAIR(fb));
401
+ } else {
402
+ result = fbuffer_alloc();
403
+ }
404
+ return result;
405
+ }
406
+
407
+ /*
408
+ * Document-module: JSON::Ext::Generator
409
+ *
410
+ * This is the JSON generator implemented as a C extension. It can be
411
+ * configured to be used by setting
412
+ *
413
+ * JSON.generator = JSON::Ext::Generator
414
+ *
415
+ * with the method generator= in JSON.
416
+ *
417
+ */
418
+
419
+ /*
420
+ * call-seq: to_json(state = nil)
421
+ *
422
+ * Returns a JSON string containing a JSON object, that is generated from
423
+ * this Hash instance.
424
+ * _state_ is a JSON::State object, that can also be used to configure the
425
+ * produced JSON string output further.
426
+ */
427
+ static VALUE mHash_to_json(int argc, VALUE *argv, VALUE self)
428
+ {
429
+ GENERATE_JSON(object);
430
+ }
431
+
432
+ /*
433
+ * call-seq: to_json(state = nil)
434
+ *
435
+ * Returns a JSON string containing a JSON array, that is generated from
436
+ * this Array instance.
437
+ * _state_ is a JSON::State object, that can also be used to configure the
438
+ * produced JSON string output further.
439
+ */
440
+ static VALUE mArray_to_json(int argc, VALUE *argv, VALUE self) {
441
+ GENERATE_JSON(array);
442
+ }
443
+
444
+ /*
445
+ * call-seq: to_json(*)
446
+ *
447
+ * Returns a JSON string representation for this Integer number.
448
+ */
449
+ static VALUE mFixnum_to_json(int argc, VALUE *argv, VALUE self)
450
+ {
451
+ GENERATE_JSON(fixnum);
452
+ }
453
+
454
+ /*
455
+ * call-seq: to_json(*)
456
+ *
457
+ * Returns a JSON string representation for this Integer number.
458
+ */
459
+ static VALUE mBignum_to_json(int argc, VALUE *argv, VALUE self)
460
+ {
461
+ GENERATE_JSON(bignum);
462
+ }
463
+
464
+ /*
465
+ * call-seq: to_json(*)
466
+ *
467
+ * Returns a JSON string representation for this Float number.
468
+ */
469
+ static VALUE mFloat_to_json(int argc, VALUE *argv, VALUE self)
470
+ {
471
+ GENERATE_JSON(float);
472
+ }
473
+
474
+ /*
475
+ * call-seq: String.included(modul)
476
+ *
477
+ * Extends _modul_ with the String::Extend module.
478
+ */
479
+ static VALUE mString_included_s(VALUE self, VALUE modul) {
480
+ VALUE result = rb_funcall(modul, i_extend, 1, mString_Extend);
481
+ return result;
482
+ }
483
+
484
+ /*
485
+ * call-seq: to_json(*)
486
+ *
487
+ * This string should be encoded with UTF-8 A call to this method
488
+ * returns a JSON string encoded with UTF16 big endian characters as
489
+ * \u????.
490
+ */
491
+ static VALUE mString_to_json(int argc, VALUE *argv, VALUE self)
492
+ {
493
+ GENERATE_JSON(string);
494
+ }
495
+
496
+ /*
497
+ * call-seq: to_json_raw_object()
498
+ *
499
+ * This method creates a raw object hash, that can be nested into
500
+ * other data structures and will be generated as a raw string. This
501
+ * method should be used, if you want to convert raw strings to JSON
502
+ * instead of UTF-8 strings, e. g. binary data.
503
+ */
504
+ static VALUE mString_to_json_raw_object(VALUE self)
505
+ {
506
+ VALUE ary;
507
+ VALUE result = rb_hash_new();
508
+ rb_hash_aset(result, rb_funcall(mJSON, i_create_id, 0), rb_class_name(rb_obj_class(self)));
509
+ ary = rb_funcall(self, i_unpack, 1, rb_str_new2("C*"));
510
+ rb_hash_aset(result, rb_str_new2("raw"), ary);
511
+ return result;
512
+ }
513
+
514
+ /*
515
+ * call-seq: to_json_raw(*args)
516
+ *
517
+ * This method creates a JSON text from the result of a call to
518
+ * to_json_raw_object of this String.
519
+ */
520
+ static VALUE mString_to_json_raw(int argc, VALUE *argv, VALUE self)
521
+ {
522
+ VALUE obj = mString_to_json_raw_object(self);
523
+ Check_Type(obj, T_HASH);
524
+ return mHash_to_json(argc, argv, obj);
525
+ }
526
+
527
+ /*
528
+ * call-seq: json_create(o)
529
+ *
530
+ * Raw Strings are JSON Objects (the raw bytes are stored in an array for the
531
+ * key "raw"). The Ruby String can be created by this module method.
532
+ */
533
+ static VALUE mString_Extend_json_create(VALUE self, VALUE o)
534
+ {
535
+ VALUE ary;
536
+ Check_Type(o, T_HASH);
537
+ ary = rb_hash_aref(o, rb_str_new2("raw"));
538
+ return rb_funcall(ary, i_pack, 1, rb_str_new2("C*"));
539
+ }
540
+
541
+ /*
542
+ * call-seq: to_json(*)
543
+ *
544
+ * Returns a JSON string for true: 'true'.
545
+ */
546
+ static VALUE mTrueClass_to_json(int argc, VALUE *argv, VALUE self)
547
+ {
548
+ GENERATE_JSON(true);
549
+ }
550
+
551
+ /*
552
+ * call-seq: to_json(*)
553
+ *
554
+ * Returns a JSON string for false: 'false'.
555
+ */
556
+ static VALUE mFalseClass_to_json(int argc, VALUE *argv, VALUE self)
557
+ {
558
+ GENERATE_JSON(false);
559
+ }
560
+
561
+ /*
562
+ * call-seq: to_json(*)
563
+ *
564
+ */
565
+ static VALUE mNilClass_to_json(int argc, VALUE *argv, VALUE self)
566
+ {
567
+ GENERATE_JSON(null);
568
+ }
569
+
570
+ /*
571
+ * call-seq: to_json(*)
572
+ *
573
+ * Converts this object to a string (calling #to_s), converts
574
+ * it to a JSON string, and returns the result. This is a fallback, if no
575
+ * special method #to_json was defined for some object.
576
+ */
577
+ static VALUE mObject_to_json(int argc, VALUE *argv, VALUE self)
578
+ {
579
+ VALUE state;
580
+ VALUE string = rb_funcall(self, i_to_s, 0);
581
+ rb_scan_args(argc, argv, "01", &state);
582
+ Check_Type(string, T_STRING);
583
+ state = cState_from_state_s(cState, state);
584
+ return cState_partial_generate(state, string);
585
+ }
586
+
587
+ static void State_free(JSON_Generator_State *state)
588
+ {
589
+ if (state->indent) ruby_xfree(state->indent);
590
+ if (state->space) ruby_xfree(state->space);
591
+ if (state->space_before) ruby_xfree(state->space_before);
592
+ if (state->object_nl) ruby_xfree(state->object_nl);
593
+ if (state->array_nl) ruby_xfree(state->array_nl);
594
+ if (state->array_delim) fbuffer_free(state->array_delim);
595
+ if (state->object_delim) fbuffer_free(state->object_delim);
596
+ if (state->object_delim2) fbuffer_free(state->object_delim2);
597
+ ruby_xfree(state);
598
+ }
599
+
600
+ static JSON_Generator_State *State_allocate()
601
+ {
602
+ JSON_Generator_State *state = ALLOC(JSON_Generator_State);
603
+ MEMZERO(state, JSON_Generator_State, 1);
604
+ return state;
605
+ }
606
+
607
+ static VALUE cState_s_allocate(VALUE klass)
608
+ {
609
+ JSON_Generator_State *state = State_allocate();
610
+ return Data_Wrap_Struct(klass, NULL, State_free, state);
611
+ }
612
+
613
+ /*
614
+ * call-seq: configure(opts)
615
+ *
616
+ * Configure this State instance with the Hash _opts_, and return
617
+ * itself.
618
+ */
619
+ static VALUE cState_configure(VALUE self, VALUE opts)
620
+ {
621
+ VALUE tmp;
622
+ GET_STATE(self);
623
+ tmp = rb_convert_type(opts, T_HASH, "Hash", "to_hash");
624
+ if (NIL_P(tmp)) tmp = rb_convert_type(opts, T_HASH, "Hash", "to_h");
625
+ if (NIL_P(tmp)) {
626
+ rb_raise(rb_eArgError, "opts has to be hash like or convertable into a hash");
627
+ }
628
+ opts = tmp;
629
+ tmp = rb_hash_aref(opts, ID2SYM(i_indent));
630
+ if (RTEST(tmp)) {
631
+ int len;
632
+ Check_Type(tmp, T_STRING);
633
+ len = RSTRING_LEN(tmp);
634
+ state->indent = fstrndup(RSTRING_PTR(tmp), len);
635
+ state->indent_len = len;
636
+ }
637
+ tmp = rb_hash_aref(opts, ID2SYM(i_space));
638
+ if (RTEST(tmp)) {
639
+ int len;
640
+ Check_Type(tmp, T_STRING);
641
+ len = RSTRING_LEN(tmp);
642
+ state->space = fstrndup(RSTRING_PTR(tmp), len);
643
+ state->space_len = len;
644
+ }
645
+ tmp = rb_hash_aref(opts, ID2SYM(i_space_before));
646
+ if (RTEST(tmp)) {
647
+ int len;
648
+ Check_Type(tmp, T_STRING);
649
+ len = RSTRING_LEN(tmp);
650
+ state->space_before = fstrndup(RSTRING_PTR(tmp), len);
651
+ state->space_before_len = len;
652
+ }
653
+ tmp = rb_hash_aref(opts, ID2SYM(i_array_nl));
654
+ if (RTEST(tmp)) {
655
+ int len;
656
+ Check_Type(tmp, T_STRING);
657
+ len = RSTRING_LEN(tmp);
658
+ state->array_nl = fstrndup(RSTRING_PTR(tmp), len);
659
+ state->array_nl_len = len;
660
+ }
661
+ tmp = rb_hash_aref(opts, ID2SYM(i_object_nl));
662
+ if (RTEST(tmp)) {
663
+ int len;
664
+ Check_Type(tmp, T_STRING);
665
+ len = RSTRING_LEN(tmp);
666
+ state->object_nl = fstrndup(RSTRING_PTR(tmp), len);
667
+ state->object_nl_len = len;
668
+ }
669
+ tmp = ID2SYM(i_max_nesting);
670
+ state->max_nesting = 19;
671
+ if (option_given_p(opts, tmp)) {
672
+ VALUE max_nesting = rb_hash_aref(opts, tmp);
673
+ if (RTEST(max_nesting)) {
674
+ Check_Type(max_nesting, T_FIXNUM);
675
+ state->max_nesting = FIX2LONG(max_nesting);
676
+ } else {
677
+ state->max_nesting = 0;
678
+ }
679
+ }
680
+ tmp = ID2SYM(i_depth);
681
+ state->depth = 0;
682
+ if (option_given_p(opts, tmp)) {
683
+ VALUE depth = rb_hash_aref(opts, tmp);
684
+ if (RTEST(depth)) {
685
+ Check_Type(depth, T_FIXNUM);
686
+ state->depth = FIX2LONG(depth);
687
+ } else {
688
+ state->depth = 0;
689
+ }
690
+ }
691
+ tmp = rb_hash_aref(opts, ID2SYM(i_allow_nan));
692
+ state->allow_nan = RTEST(tmp);
693
+ tmp = rb_hash_aref(opts, ID2SYM(i_ascii_only));
694
+ state->ascii_only = RTEST(tmp);
695
+ return self;
696
+ }
697
+
698
+ /*
699
+ * call-seq: to_h
700
+ *
701
+ * Returns the configuration instance variables as a hash, that can be
702
+ * passed to the configure method.
703
+ */
704
+ static VALUE cState_to_h(VALUE self)
705
+ {
706
+ VALUE result = rb_hash_new();
707
+ GET_STATE(self);
708
+ rb_hash_aset(result, ID2SYM(i_indent), rb_str_new(state->indent, state->indent_len));
709
+ rb_hash_aset(result, ID2SYM(i_space), rb_str_new(state->space, state->space_len));
710
+ rb_hash_aset(result, ID2SYM(i_space_before), rb_str_new(state->space_before, state->space_before_len));
711
+ rb_hash_aset(result, ID2SYM(i_object_nl), rb_str_new(state->object_nl, state->object_nl_len));
712
+ rb_hash_aset(result, ID2SYM(i_array_nl), rb_str_new(state->array_nl, state->array_nl_len));
713
+ rb_hash_aset(result, ID2SYM(i_allow_nan), state->allow_nan ? Qtrue : Qfalse);
714
+ rb_hash_aset(result, ID2SYM(i_ascii_only), state->ascii_only ? Qtrue : Qfalse);
715
+ rb_hash_aset(result, ID2SYM(i_max_nesting), LONG2FIX(state->max_nesting));
716
+ rb_hash_aset(result, ID2SYM(i_depth), LONG2FIX(state->depth));
717
+ return result;
718
+ }
719
+
720
+ /*
721
+ * call-seq: [](name)
722
+ *
723
+ * Return the value returned by method +name+.
724
+ */
725
+ static VALUE cState_aref(VALUE self, VALUE name)
726
+ {
727
+ GET_STATE(self);
728
+ if (RTEST(rb_funcall(self, i_respond_to_p, 1, name))) {
729
+ return rb_funcall(self, i_send, 1, name);
730
+ } else {
731
+ return Qnil;
732
+ }
733
+ }
734
+
735
+ static void generate_json_object(FBuffer *buffer, VALUE Vstate, JSON_Generator_State *state, VALUE obj)
736
+ {
737
+ char *object_nl = state->object_nl;
738
+ long object_nl_len = state->object_nl_len;
739
+ char *indent = state->indent;
740
+ long indent_len = state->indent_len;
741
+ long max_nesting = state->max_nesting;
742
+ char *delim = FBUFFER_PTR(state->object_delim);
743
+ long delim_len = FBUFFER_LEN(state->object_delim);
744
+ char *delim2 = FBUFFER_PTR(state->object_delim2);
745
+ long delim2_len = FBUFFER_LEN(state->object_delim2);
746
+ long depth = ++state->depth;
747
+ int i, j;
748
+ VALUE key, key_to_s, keys;
749
+ if (max_nesting != 0 && depth > max_nesting) {
750
+ fbuffer_free(buffer);
751
+ rb_raise(eNestingError, "nesting of %ld is too deep", --state->depth);
752
+ }
753
+ fbuffer_append_char(buffer, '{');
754
+ keys = rb_funcall(obj, i_keys, 0);
755
+ for(i = 0; i < RARRAY_LEN(keys); i++) {
756
+ if (i > 0) fbuffer_append(buffer, delim, delim_len);
757
+ if (object_nl) {
758
+ fbuffer_append(buffer, object_nl, object_nl_len);
759
+ }
760
+ if (indent) {
761
+ for (j = 0; j < depth; j++) {
762
+ fbuffer_append(buffer, indent, indent_len);
763
+ }
764
+ }
765
+ key = rb_ary_entry(keys, i);
766
+ key_to_s = rb_funcall(key, i_to_s, 0);
767
+ Check_Type(key_to_s, T_STRING);
768
+ generate_json(buffer, Vstate, state, key_to_s);
769
+ fbuffer_append(buffer, delim2, delim2_len);
770
+ generate_json(buffer, Vstate, state, rb_hash_aref(obj, key));
771
+ }
772
+ depth = --state->depth;
773
+ if (object_nl) {
774
+ fbuffer_append(buffer, object_nl, object_nl_len);
775
+ if (indent) {
776
+ for (j = 0; j < depth; j++) {
777
+ fbuffer_append(buffer, indent, indent_len);
778
+ }
779
+ }
780
+ }
781
+ fbuffer_append_char(buffer, '}');
782
+ }
783
+
784
+ static void generate_json_array(FBuffer *buffer, VALUE Vstate, JSON_Generator_State *state, VALUE obj)
785
+ {
786
+ char *array_nl = state->array_nl;
787
+ long array_nl_len = state->array_nl_len;
788
+ char *indent = state->indent;
789
+ long indent_len = state->indent_len;
790
+ long max_nesting = state->max_nesting;
791
+ char *delim = FBUFFER_PTR(state->array_delim);
792
+ long delim_len = FBUFFER_LEN(state->array_delim);
793
+ long depth = ++state->depth;
794
+ int i, j;
795
+ if (max_nesting != 0 && depth > max_nesting) {
796
+ fbuffer_free(buffer);
797
+ rb_raise(eNestingError, "nesting of %ld is too deep", --state->depth);
798
+ }
799
+ fbuffer_append_char(buffer, '[');
800
+ if (array_nl) fbuffer_append(buffer, array_nl, array_nl_len);
801
+ for(i = 0; i < RARRAY_LEN(obj); i++) {
802
+ if (i > 0) fbuffer_append(buffer, delim, delim_len);
803
+ if (indent) {
804
+ for (j = 0; j < depth; j++) {
805
+ fbuffer_append(buffer, indent, indent_len);
806
+ }
807
+ }
808
+ generate_json(buffer, Vstate, state, rb_ary_entry(obj, i));
809
+ }
810
+ state->depth = --depth;
811
+ if (array_nl) {
812
+ fbuffer_append(buffer, array_nl, array_nl_len);
813
+ if (indent) {
814
+ for (j = 0; j < depth; j++) {
815
+ fbuffer_append(buffer, indent, indent_len);
816
+ }
817
+ }
818
+ }
819
+ fbuffer_append_char(buffer, ']');
820
+ }
821
+
822
+ static void generate_json_string(FBuffer *buffer, VALUE Vstate, JSON_Generator_State *state, VALUE obj)
823
+ {
824
+ fbuffer_append_char(buffer, '"');
825
+ #ifdef HAVE_RUBY_ENCODING_H
826
+ obj = rb_funcall(obj, i_encode, 1, CEncoding_UTF_8);
827
+ #endif
828
+ if (state->ascii_only) {
829
+ convert_UTF8_to_JSON_ASCII(buffer, obj);
830
+ } else {
831
+ convert_UTF8_to_JSON(buffer, obj);
832
+ }
833
+ fbuffer_append_char(buffer, '"');
834
+ }
835
+
836
+ static void generate_json_null(FBuffer *buffer, VALUE Vstate, JSON_Generator_State *state, VALUE obj)
837
+ {
838
+ fbuffer_append(buffer, "null", 4);
839
+ }
840
+
841
+ static void generate_json_false(FBuffer *buffer, VALUE Vstate, JSON_Generator_State *state, VALUE obj)
842
+ {
843
+ fbuffer_append(buffer, "false", 5);
844
+ }
845
+
846
+ static void generate_json_true(FBuffer *buffer, VALUE Vstate, JSON_Generator_State *state, VALUE obj)
847
+ {
848
+ fbuffer_append(buffer, "true", 4);
849
+ }
850
+
851
+ static void generate_json_fixnum(FBuffer *buffer, VALUE Vstate, JSON_Generator_State *state, VALUE obj)
852
+ {
853
+ fbuffer_append_long(buffer, FIX2LONG(obj));
854
+ }
855
+
856
+ static void generate_json_bignum(FBuffer *buffer, VALUE Vstate, JSON_Generator_State *state, VALUE obj)
857
+ {
858
+ VALUE tmp = rb_funcall(obj, i_to_s, 0);
859
+ fbuffer_append(buffer, RSTRING_PAIR(tmp));
860
+ }
861
+
862
+ static void generate_json_float(FBuffer *buffer, VALUE Vstate, JSON_Generator_State *state, VALUE obj)
863
+ {
864
+ double value = RFLOAT_VALUE(obj);
865
+ char allow_nan = state->allow_nan;
866
+ VALUE tmp = rb_funcall(obj, i_to_s, 0);
867
+ if (!allow_nan) {
868
+ if (isinf(value)) {
869
+ fbuffer_free(buffer);
870
+ rb_raise(eGeneratorError, "%u: %s not allowed in JSON", __LINE__, StringValueCStr(tmp));
871
+ } else if (isnan(value)) {
872
+ fbuffer_free(buffer);
873
+ rb_raise(eGeneratorError, "%u: %s not allowed in JSON", __LINE__, StringValueCStr(tmp));
874
+ }
875
+ }
876
+ fbuffer_append(buffer, RSTRING_PAIR(tmp));
877
+ }
878
+
879
+ static void generate_json(FBuffer *buffer, VALUE Vstate, JSON_Generator_State *state, VALUE obj)
880
+ {
881
+ VALUE tmp;
882
+ VALUE klass = CLASS_OF(obj);
883
+ if (klass == rb_cHash) {
884
+ generate_json_object(buffer, Vstate, state, obj);
885
+ } else if (klass == rb_cArray) {
886
+ generate_json_array(buffer, Vstate, state, obj);
887
+ } else if (klass == rb_cString) {
888
+ generate_json_string(buffer, Vstate, state, obj);
889
+ } else if (obj == Qnil) {
890
+ generate_json_null(buffer, Vstate, state, obj);
891
+ } else if (obj == Qfalse) {
892
+ generate_json_false(buffer, Vstate, state, obj);
893
+ } else if (obj == Qtrue) {
894
+ generate_json_true(buffer, Vstate, state, obj);
895
+ } else if (klass == rb_cFixnum) {
896
+ generate_json_fixnum(buffer, Vstate, state, obj);
897
+ } else if (klass == rb_cBignum) {
898
+ generate_json_bignum(buffer, Vstate, state, obj);
899
+ } else if (klass == rb_cFloat) {
900
+ generate_json_float(buffer, Vstate, state, obj);
901
+ } else if (rb_respond_to(obj, i_to_json)) {
902
+ tmp = rb_funcall(obj, i_to_json, 1, Vstate);
903
+ Check_Type(tmp, T_STRING);
904
+ fbuffer_append(buffer, RSTRING_PAIR(tmp));
905
+ } else {
906
+ tmp = rb_funcall(obj, i_to_s, 0);
907
+ Check_Type(tmp, T_STRING);
908
+ generate_json(buffer, Vstate, state, tmp);
909
+ }
910
+ }
911
+
912
+ static FBuffer *cState_prepare_buffer(VALUE self)
913
+ {
914
+ FBuffer *buffer = fbuffer_alloc();
915
+ GET_STATE(self);
916
+
917
+ if (state->object_delim) {
918
+ fbuffer_clear(state->object_delim);
919
+ } else {
920
+ state->object_delim = fbuffer_alloc_with_length(16);
921
+ }
922
+ fbuffer_append_char(state->object_delim, ',');
923
+ if (state->object_delim2) {
924
+ fbuffer_clear(state->object_delim2);
925
+ } else {
926
+ state->object_delim2 = fbuffer_alloc_with_length(16);
927
+ }
928
+ fbuffer_append_char(state->object_delim2, ':');
929
+ if (state->space) fbuffer_append(state->object_delim2, state->space, state->space_len);
930
+
931
+ if (state->array_delim) {
932
+ fbuffer_clear(state->array_delim);
933
+ } else {
934
+ state->array_delim = fbuffer_alloc_with_length(16);
935
+ }
936
+ fbuffer_append_char(state->array_delim, ',');
937
+ if (state->array_nl) fbuffer_append(state->array_delim, state->array_nl, state->array_nl_len);
938
+ return buffer;
939
+ }
940
+
941
+ static VALUE fbuffer_to_s(FBuffer *fb)
942
+ {
943
+ VALUE result = rb_str_new(FBUFFER_PAIR(fb));
944
+ fbuffer_free(fb);
945
+ FORCE_UTF8(result);
946
+ return result;
947
+ }
948
+
949
+ static VALUE cState_partial_generate(VALUE self, VALUE obj)
950
+ {
951
+ FBuffer *buffer = cState_prepare_buffer(self);
952
+ GET_STATE(self);
953
+ generate_json(buffer, self, state, obj);
954
+ return fbuffer_to_s(buffer);
955
+ }
956
+
957
+ /*
958
+ * call-seq: generate(obj)
959
+ *
960
+ * Generates a valid JSON document from object +obj+ and returns the
961
+ * result. If no valid JSON document can be created this method raises a
962
+ * GeneratorError exception.
963
+ */
964
+ static VALUE cState_generate(VALUE self, VALUE obj)
965
+ {
966
+ VALUE result = cState_partial_generate(self, obj);
967
+ VALUE re, args[2];
968
+ args[0] = rb_str_new2("\\A\\s*(?:\\[.*\\]|\\{.*\\})\\s*\\Z");
969
+ args[1] = CRegexp_MULTILINE;
970
+ re = rb_class_new_instance(2, args, rb_cRegexp);
971
+ if (NIL_P(rb_funcall(re, i_match, 1, result))) {
972
+ rb_raise(eGeneratorError, "only generation of JSON objects or arrays allowed");
973
+ }
974
+ return result;
975
+ }
976
+
977
+ /*
978
+ * call-seq: new(opts = {})
979
+ *
980
+ * Instantiates a new State object, configured by _opts_.
981
+ *
982
+ * _opts_ can have the following keys:
983
+ *
984
+ * * *indent*: a string used to indent levels (default: ''),
985
+ * * *space*: a string that is put after, a : or , delimiter (default: ''),
986
+ * * *space_before*: a string that is put before a : pair delimiter (default: ''),
987
+ * * *object_nl*: a string that is put at the end of a JSON object (default: ''),
988
+ * * *array_nl*: a string that is put at the end of a JSON array (default: ''),
989
+ * * *allow_nan*: true if NaN, Infinity, and -Infinity should be
990
+ * generated, otherwise an exception is thrown, if these values are
991
+ * encountered. This options defaults to false.
992
+ */
993
+ static VALUE cState_initialize(int argc, VALUE *argv, VALUE self)
994
+ {
995
+ VALUE opts;
996
+ GET_STATE(self);
997
+ state->max_nesting = 19;
998
+ rb_scan_args(argc, argv, "01", &opts);
999
+ if (!NIL_P(opts)) cState_configure(self, opts);
1000
+ return self;
1001
+ }
1002
+
1003
+ /*
1004
+ * call-seq: initialize_copy(orig)
1005
+ *
1006
+ * Initializes this object from orig if it to be duplicated/cloned and returns
1007
+ * it.
1008
+ */
1009
+ static VALUE cState_init_copy(VALUE obj, VALUE orig)
1010
+ {
1011
+ JSON_Generator_State *objState, *origState;
1012
+
1013
+ Data_Get_Struct(obj, JSON_Generator_State, objState);
1014
+ Data_Get_Struct(orig, JSON_Generator_State, origState);
1015
+ if (!objState) rb_raise(rb_eArgError, "unallocated JSON::State");
1016
+
1017
+ MEMCPY(objState, origState, JSON_Generator_State, 1);
1018
+ objState->indent = fstrndup(origState->indent, origState->indent_len);
1019
+ objState->space = fstrndup(origState->space, origState->space_len);
1020
+ objState->space_before = fstrndup(origState->space_before, origState->space_before_len);
1021
+ objState->object_nl = fstrndup(origState->object_nl, origState->object_nl_len);
1022
+ objState->array_nl = fstrndup(origState->array_nl, origState->array_nl_len);
1023
+ if (origState->array_delim) objState->array_delim = fbuffer_dup(origState->array_delim);
1024
+ if (origState->object_delim) objState->object_delim = fbuffer_dup(origState->object_delim);
1025
+ if (origState->object_delim2) objState->object_delim2 = fbuffer_dup(origState->object_delim2);
1026
+ return obj;
1027
+ }
1028
+
1029
+ /*
1030
+ * call-seq: from_state(opts)
1031
+ *
1032
+ * Creates a State object from _opts_, which ought to be Hash to create a
1033
+ * new State instance configured by _opts_, something else to create an
1034
+ * unconfigured instance. If _opts_ is a State object, it is just returned.
1035
+ */
1036
+ static VALUE cState_from_state_s(VALUE self, VALUE opts)
1037
+ {
1038
+ if (rb_obj_is_kind_of(opts, self)) {
1039
+ return opts;
1040
+ } else if (rb_obj_is_kind_of(opts, rb_cHash)) {
1041
+ return rb_funcall(self, i_new, 1, opts);
1042
+ } else {
1043
+ if (NIL_P(CJSON_SAFE_STATE_PROTOTYPE)) {
1044
+ CJSON_SAFE_STATE_PROTOTYPE = rb_const_get(mJSON, i_SAFE_STATE_PROTOTYPE);
1045
+ }
1046
+ return rb_funcall(CJSON_SAFE_STATE_PROTOTYPE, i_dup, 0);
1047
+ }
1048
+ }
1049
+
1050
+ /*
1051
+ * call-seq: indent()
1052
+ *
1053
+ * This string is used to indent levels in the JSON text.
1054
+ */
1055
+ static VALUE cState_indent(VALUE self)
1056
+ {
1057
+ GET_STATE(self);
1058
+ return state->indent ? rb_str_new2(state->indent) : rb_str_new2("");
1059
+ }
1060
+
1061
+ /*
1062
+ * call-seq: indent=(indent)
1063
+ *
1064
+ * This string is used to indent levels in the JSON text.
1065
+ */
1066
+ static VALUE cState_indent_set(VALUE self, VALUE indent)
1067
+ {
1068
+ int len;
1069
+ GET_STATE(self);
1070
+ Check_Type(indent, T_STRING);
1071
+ len = RSTRING_LEN(indent);
1072
+ if (len == 0) {
1073
+ if (state->indent) {
1074
+ ruby_xfree(state->indent);
1075
+ state->indent = NULL;
1076
+ state->indent_len = 0;
1077
+ }
1078
+ } else {
1079
+ if (state->indent) ruby_xfree(state->indent);
1080
+ state->indent = strdup(RSTRING_PTR(indent));
1081
+ state->indent_len = len;
1082
+ }
1083
+ return Qnil;
1084
+ }
1085
+
1086
+ /*
1087
+ * call-seq: space()
1088
+ *
1089
+ * This string is used to insert a space between the tokens in a JSON
1090
+ * string.
1091
+ */
1092
+ static VALUE cState_space(VALUE self)
1093
+ {
1094
+ GET_STATE(self);
1095
+ return state->space ? rb_str_new2(state->space) : rb_str_new2("");
1096
+ }
1097
+
1098
+ /*
1099
+ * call-seq: space=(space)
1100
+ *
1101
+ * This string is used to insert a space between the tokens in a JSON
1102
+ * string.
1103
+ */
1104
+ static VALUE cState_space_set(VALUE self, VALUE space)
1105
+ {
1106
+ int len;
1107
+ GET_STATE(self);
1108
+ Check_Type(space, T_STRING);
1109
+ len = RSTRING_LEN(space);
1110
+ if (len == 0) {
1111
+ if (state->space) {
1112
+ ruby_xfree(state->space);
1113
+ state->space = NULL;
1114
+ state->space_len = 0;
1115
+ }
1116
+ } else {
1117
+ if (state->space) ruby_xfree(state->space);
1118
+ state->space = strdup(RSTRING_PTR(space));
1119
+ state->space_len = len;
1120
+ }
1121
+ return Qnil;
1122
+ }
1123
+
1124
+ /*
1125
+ * call-seq: space_before()
1126
+ *
1127
+ * This string is used to insert a space before the ':' in JSON objects.
1128
+ */
1129
+ static VALUE cState_space_before(VALUE self)
1130
+ {
1131
+ GET_STATE(self);
1132
+ return state->space_before ? rb_str_new2(state->space_before) : rb_str_new2("");
1133
+ }
1134
+
1135
+ /*
1136
+ * call-seq: space_before=(space_before)
1137
+ *
1138
+ * This string is used to insert a space before the ':' in JSON objects.
1139
+ */
1140
+ static VALUE cState_space_before_set(VALUE self, VALUE space_before)
1141
+ {
1142
+ int len;
1143
+ GET_STATE(self);
1144
+ Check_Type(space_before, T_STRING);
1145
+ len = RSTRING_LEN(space_before);
1146
+ if (len == 0) {
1147
+ if (state->space_before) {
1148
+ ruby_xfree(state->space_before);
1149
+ state->space_before = NULL;
1150
+ state->space_before_len = 0;
1151
+ }
1152
+ } else {
1153
+ if (state->space_before) ruby_xfree(state->space_before);
1154
+ state->space_before = strdup(RSTRING_PTR(space_before));
1155
+ state->space_before_len = len;
1156
+ }
1157
+ return Qnil;
1158
+ }
1159
+
1160
+ /*
1161
+ * call-seq: object_nl()
1162
+ *
1163
+ * This string is put at the end of a line that holds a JSON object (or
1164
+ * Hash).
1165
+ */
1166
+ static VALUE cState_object_nl(VALUE self)
1167
+ {
1168
+ GET_STATE(self);
1169
+ return state->object_nl ? rb_str_new2(state->object_nl) : rb_str_new2("");
1170
+ }
1171
+
1172
+ /*
1173
+ * call-seq: object_nl=(object_nl)
1174
+ *
1175
+ * This string is put at the end of a line that holds a JSON object (or
1176
+ * Hash).
1177
+ */
1178
+ static VALUE cState_object_nl_set(VALUE self, VALUE object_nl)
1179
+ {
1180
+ int len;
1181
+ GET_STATE(self);
1182
+ Check_Type(object_nl, T_STRING);
1183
+ len = RSTRING_LEN(object_nl);
1184
+ if (len == 0) {
1185
+ if (state->object_nl) {
1186
+ ruby_xfree(state->object_nl);
1187
+ state->object_nl = NULL;
1188
+ }
1189
+ } else {
1190
+ if (state->object_nl) ruby_xfree(state->object_nl);
1191
+ state->object_nl = strdup(RSTRING_PTR(object_nl));
1192
+ state->object_nl_len = len;
1193
+ }
1194
+ return Qnil;
1195
+ }
1196
+
1197
+ /*
1198
+ * call-seq: array_nl()
1199
+ *
1200
+ * This string is put at the end of a line that holds a JSON array.
1201
+ */
1202
+ static VALUE cState_array_nl(VALUE self)
1203
+ {
1204
+ GET_STATE(self);
1205
+ return state->array_nl ? rb_str_new2(state->array_nl) : rb_str_new2("");
1206
+ }
1207
+
1208
+ /*
1209
+ * call-seq: array_nl=(array_nl)
1210
+ *
1211
+ * This string is put at the end of a line that holds a JSON array.
1212
+ */
1213
+ static VALUE cState_array_nl_set(VALUE self, VALUE array_nl)
1214
+ {
1215
+ int len;
1216
+ GET_STATE(self);
1217
+ Check_Type(array_nl, T_STRING);
1218
+ len = RSTRING_LEN(array_nl);
1219
+ if (len == 0) {
1220
+ if (state->array_nl) {
1221
+ ruby_xfree(state->array_nl);
1222
+ state->array_nl = NULL;
1223
+ }
1224
+ } else {
1225
+ if (state->array_nl) ruby_xfree(state->array_nl);
1226
+ state->array_nl = strdup(RSTRING_PTR(array_nl));
1227
+ state->array_nl_len = len;
1228
+ }
1229
+ return Qnil;
1230
+ }
1231
+
1232
+
1233
+ /*
1234
+ * call-seq: check_circular?
1235
+ *
1236
+ * Returns true, if circular data structures should be checked,
1237
+ * otherwise returns false.
1238
+ */
1239
+ static VALUE cState_check_circular_p(VALUE self)
1240
+ {
1241
+ GET_STATE(self);
1242
+ return state->max_nesting ? Qtrue : Qfalse;
1243
+ }
1244
+
1245
+ /*
1246
+ * call-seq: max_nesting
1247
+ *
1248
+ * This integer returns the maximum level of data structure nesting in
1249
+ * the generated JSON, max_nesting = 0 if no maximum is checked.
1250
+ */
1251
+ static VALUE cState_max_nesting(VALUE self)
1252
+ {
1253
+ GET_STATE(self);
1254
+ return LONG2FIX(state->max_nesting);
1255
+ }
1256
+
1257
+ /*
1258
+ * call-seq: max_nesting=(depth)
1259
+ *
1260
+ * This sets the maximum level of data structure nesting in the generated JSON
1261
+ * to the integer depth, max_nesting = 0 if no maximum should be checked.
1262
+ */
1263
+ static VALUE cState_max_nesting_set(VALUE self, VALUE depth)
1264
+ {
1265
+ GET_STATE(self);
1266
+ Check_Type(depth, T_FIXNUM);
1267
+ return state->max_nesting = FIX2LONG(depth);
1268
+ }
1269
+
1270
+ /*
1271
+ * call-seq: allow_nan?
1272
+ *
1273
+ * Returns true, if NaN, Infinity, and -Infinity should be generated, otherwise
1274
+ * returns false.
1275
+ */
1276
+ static VALUE cState_allow_nan_p(VALUE self)
1277
+ {
1278
+ GET_STATE(self);
1279
+ return state->allow_nan ? Qtrue : Qfalse;
1280
+ }
1281
+
1282
+ /*
1283
+ * call-seq: ascii_only?
1284
+ *
1285
+ * Returns true, if NaN, Infinity, and -Infinity should be generated, otherwise
1286
+ * returns false.
1287
+ */
1288
+ static VALUE cState_ascii_only_p(VALUE self)
1289
+ {
1290
+ GET_STATE(self);
1291
+ return state->ascii_only ? Qtrue : Qfalse;
1292
+ }
1293
+
1294
+ /*
1295
+ * call-seq: depth
1296
+ *
1297
+ * This integer returns the current depth of data structure nesting.
1298
+ */
1299
+ static VALUE cState_depth(VALUE self)
1300
+ {
1301
+ GET_STATE(self);
1302
+ return LONG2FIX(state->depth);
1303
+ }
1304
+
1305
+ /*
1306
+ * call-seq: depth=(depth)
1307
+ *
1308
+ * This sets the maximum level of data structure nesting in the generated JSON
1309
+ * to the integer depth, max_nesting = 0 if no maximum should be checked.
1310
+ */
1311
+ static VALUE cState_depth_set(VALUE self, VALUE depth)
1312
+ {
1313
+ GET_STATE(self);
1314
+ Check_Type(depth, T_FIXNUM);
1315
+ return state->depth = FIX2LONG(depth);
1316
+ }
1317
+
1318
+ /*
1319
+ *
1320
+ */
1321
+ void Init_generator()
1322
+ {
1323
+ rb_require("json/common");
1324
+
1325
+ mJSON = rb_define_module("JSON");
1326
+ mExt = rb_define_module_under(mJSON, "Ext");
1327
+ mGenerator = rb_define_module_under(mExt, "Generator");
1328
+
1329
+ eGeneratorError = rb_path2class("JSON::GeneratorError");
1330
+ eNestingError = rb_path2class("JSON::NestingError");
1331
+
1332
+ cState = rb_define_class_under(mGenerator, "State", rb_cObject);
1333
+ rb_define_alloc_func(cState, cState_s_allocate);
1334
+ rb_define_singleton_method(cState, "from_state", cState_from_state_s, 1);
1335
+ rb_define_method(cState, "initialize", cState_initialize, -1);
1336
+ rb_define_method(cState, "initialize_copy", cState_init_copy, 1);
1337
+ rb_define_method(cState, "indent", cState_indent, 0);
1338
+ rb_define_method(cState, "indent=", cState_indent_set, 1);
1339
+ rb_define_method(cState, "space", cState_space, 0);
1340
+ rb_define_method(cState, "space=", cState_space_set, 1);
1341
+ rb_define_method(cState, "space_before", cState_space_before, 0);
1342
+ rb_define_method(cState, "space_before=", cState_space_before_set, 1);
1343
+ rb_define_method(cState, "object_nl", cState_object_nl, 0);
1344
+ rb_define_method(cState, "object_nl=", cState_object_nl_set, 1);
1345
+ rb_define_method(cState, "array_nl", cState_array_nl, 0);
1346
+ rb_define_method(cState, "array_nl=", cState_array_nl_set, 1);
1347
+ rb_define_method(cState, "max_nesting", cState_max_nesting, 0);
1348
+ rb_define_method(cState, "max_nesting=", cState_max_nesting_set, 1);
1349
+ rb_define_method(cState, "check_circular?", cState_check_circular_p, 0);
1350
+ rb_define_method(cState, "allow_nan?", cState_allow_nan_p, 0);
1351
+ rb_define_method(cState, "ascii_only?", cState_ascii_only_p, 0);
1352
+ rb_define_method(cState, "depth", cState_depth, 0);
1353
+ rb_define_method(cState, "depth=", cState_depth_set, 1);
1354
+ rb_define_method(cState, "configure", cState_configure, 1);
1355
+ rb_define_method(cState, "to_h", cState_to_h, 0);
1356
+ rb_define_method(cState, "[]", cState_aref, 1);
1357
+ rb_define_method(cState, "generate", cState_generate, 1);
1358
+
1359
+ mGeneratorMethods = rb_define_module_under(mGenerator, "GeneratorMethods");
1360
+ mObject = rb_define_module_under(mGeneratorMethods, "Object");
1361
+ rb_define_method(mObject, "to_json", mObject_to_json, -1);
1362
+ mHash = rb_define_module_under(mGeneratorMethods, "Hash");
1363
+ rb_define_method(mHash, "to_json", mHash_to_json, -1);
1364
+ mArray = rb_define_module_under(mGeneratorMethods, "Array");
1365
+ rb_define_method(mArray, "to_json", mArray_to_json, -1);
1366
+ mFixnum = rb_define_module_under(mGeneratorMethods, "Fixnum");
1367
+ rb_define_method(mFixnum, "to_json", mFixnum_to_json, -1);
1368
+ mBignum = rb_define_module_under(mGeneratorMethods, "Bignum");
1369
+ rb_define_method(mBignum, "to_json", mBignum_to_json, -1);
1370
+ mFloat = rb_define_module_under(mGeneratorMethods, "Float");
1371
+ rb_define_method(mFloat, "to_json", mFloat_to_json, -1);
1372
+ mString = rb_define_module_under(mGeneratorMethods, "String");
1373
+ rb_define_singleton_method(mString, "included", mString_included_s, 1);
1374
+ rb_define_method(mString, "to_json", mString_to_json, -1);
1375
+ rb_define_method(mString, "to_json_raw", mString_to_json_raw, -1);
1376
+ rb_define_method(mString, "to_json_raw_object", mString_to_json_raw_object, 0);
1377
+ mString_Extend = rb_define_module_under(mString, "Extend");
1378
+ rb_define_method(mString_Extend, "json_create", mString_Extend_json_create, 1);
1379
+ mTrueClass = rb_define_module_under(mGeneratorMethods, "TrueClass");
1380
+ rb_define_method(mTrueClass, "to_json", mTrueClass_to_json, -1);
1381
+ mFalseClass = rb_define_module_under(mGeneratorMethods, "FalseClass");
1382
+ rb_define_method(mFalseClass, "to_json", mFalseClass_to_json, -1);
1383
+ mNilClass = rb_define_module_under(mGeneratorMethods, "NilClass");
1384
+ rb_define_method(mNilClass, "to_json", mNilClass_to_json, -1);
1385
+
1386
+ CRegexp_MULTILINE = rb_const_get(rb_cRegexp, rb_intern("MULTILINE"));
1387
+ i_to_s = rb_intern("to_s");
1388
+ i_to_json = rb_intern("to_json");
1389
+ i_new = rb_intern("new");
1390
+ i_indent = rb_intern("indent");
1391
+ i_space = rb_intern("space");
1392
+ i_space_before = rb_intern("space_before");
1393
+ i_object_nl = rb_intern("object_nl");
1394
+ i_array_nl = rb_intern("array_nl");
1395
+ i_max_nesting = rb_intern("max_nesting");
1396
+ i_allow_nan = rb_intern("allow_nan");
1397
+ i_ascii_only = rb_intern("ascii_only");
1398
+ i_depth = rb_intern("depth");
1399
+ i_pack = rb_intern("pack");
1400
+ i_unpack = rb_intern("unpack");
1401
+ i_create_id = rb_intern("create_id");
1402
+ i_extend = rb_intern("extend");
1403
+ i_key_p = rb_intern("key?");
1404
+ i_aref = rb_intern("[]");
1405
+ i_send = rb_intern("__send__");
1406
+ i_respond_to_p = rb_intern("respond_to?");
1407
+ i_match = rb_intern("match");
1408
+ i_keys = rb_intern("keys");
1409
+ i_dup = rb_intern("dup");
1410
+ #ifdef HAVE_RUBY_ENCODING_H
1411
+ CEncoding_UTF_8 = rb_funcall(rb_path2class("Encoding"), rb_intern("find"), 1, rb_str_new2("utf-8"));
1412
+ i_encoding = rb_intern("encoding");
1413
+ i_encode = rb_intern("encode");
1414
+ #endif
1415
+ i_SAFE_STATE_PROTOTYPE = rb_intern("SAFE_STATE_PROTOTYPE");
1416
+ CJSON_SAFE_STATE_PROTOTYPE = Qnil;
1417
+ }