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,1371 @@
1
+ # To use the GUI JSON editor, start the edit_json.rb executable script. It
2
+ # requires ruby-gtk to be installed.
3
+
4
+ require 'gtk2'
5
+ require 'iconv'
6
+ require 'json'
7
+ require 'rbconfig'
8
+ require 'open-uri'
9
+
10
+ module JSON
11
+ module Editor
12
+ include Gtk
13
+
14
+ # Beginning of the editor window title
15
+ TITLE = 'JSON Editor'.freeze
16
+
17
+ # Columns constants
18
+ ICON_COL, TYPE_COL, CONTENT_COL = 0, 1, 2
19
+
20
+ # JSON primitive types (Containers)
21
+ CONTAINER_TYPES = %w[Array Hash].sort
22
+ # All JSON primitive types
23
+ ALL_TYPES = (%w[TrueClass FalseClass Numeric String NilClass] +
24
+ CONTAINER_TYPES).sort
25
+
26
+ # The Nodes necessary for the tree representation of a JSON document
27
+ ALL_NODES = (ALL_TYPES + %w[Key]).sort
28
+
29
+ DEFAULT_DIALOG_KEY_PRESS_HANDLER = lambda do |dialog, event|
30
+ case event.keyval
31
+ when Gdk::Keyval::GDK_Return
32
+ dialog.response Dialog::RESPONSE_ACCEPT
33
+ when Gdk::Keyval::GDK_Escape
34
+ dialog.response Dialog::RESPONSE_REJECT
35
+ end
36
+ end
37
+
38
+ # Returns the Gdk::Pixbuf of the icon named _name_ from the icon cache.
39
+ def Editor.fetch_icon(name)
40
+ @icon_cache ||= {}
41
+ unless @icon_cache.key?(name)
42
+ path = File.dirname(__FILE__)
43
+ @icon_cache[name] = Gdk::Pixbuf.new(File.join(path, name + '.xpm'))
44
+ end
45
+ @icon_cache[name]
46
+ end
47
+
48
+ # Opens an error dialog on top of _window_ showing the error message
49
+ # _text_.
50
+ def Editor.error_dialog(window, text)
51
+ dialog = MessageDialog.new(window, Dialog::MODAL,
52
+ MessageDialog::ERROR,
53
+ MessageDialog::BUTTONS_CLOSE, text)
54
+ dialog.show_all
55
+ dialog.run
56
+ rescue TypeError
57
+ dialog = MessageDialog.new(Editor.window, Dialog::MODAL,
58
+ MessageDialog::ERROR,
59
+ MessageDialog::BUTTONS_CLOSE, text)
60
+ dialog.show_all
61
+ dialog.run
62
+ ensure
63
+ dialog.destroy if dialog
64
+ end
65
+
66
+ # Opens a yes/no question dialog on top of _window_ showing the error
67
+ # message _text_. If yes was answered _true_ is returned, otherwise
68
+ # _false_.
69
+ def Editor.question_dialog(window, text)
70
+ dialog = MessageDialog.new(window, Dialog::MODAL,
71
+ MessageDialog::QUESTION,
72
+ MessageDialog::BUTTONS_YES_NO, text)
73
+ dialog.show_all
74
+ dialog.run do |response|
75
+ return Gtk::Dialog::RESPONSE_YES === response
76
+ end
77
+ ensure
78
+ dialog.destroy if dialog
79
+ end
80
+
81
+ # Convert the tree model starting from Gtk::TreeIter _iter_ into a Ruby
82
+ # data structure and return it.
83
+ def Editor.model2data(iter)
84
+ return nil if iter.nil?
85
+ case iter.type
86
+ when 'Hash'
87
+ hash = {}
88
+ iter.each { |c| hash[c.content] = Editor.model2data(c.first_child) }
89
+ hash
90
+ when 'Array'
91
+ array = Array.new(iter.n_children)
92
+ iter.each_with_index { |c, i| array[i] = Editor.model2data(c) }
93
+ array
94
+ when 'Key'
95
+ iter.content
96
+ when 'String'
97
+ iter.content
98
+ when 'Numeric'
99
+ content = iter.content
100
+ if /\./.match(content)
101
+ content.to_f
102
+ else
103
+ content.to_i
104
+ end
105
+ when 'TrueClass'
106
+ true
107
+ when 'FalseClass'
108
+ false
109
+ when 'NilClass'
110
+ nil
111
+ else
112
+ fail "Unknown type found in model: #{iter.type}"
113
+ end
114
+ end
115
+
116
+ # Convert the Ruby data structure _data_ into tree model data for Gtk and
117
+ # returns the whole model. If the parameter _model_ wasn't given a new
118
+ # Gtk::TreeStore is created as the model. The _parent_ parameter specifies
119
+ # the parent node (iter, Gtk:TreeIter instance) to which the data is
120
+ # appended, alternativeley the result of the yielded block is used as iter.
121
+ def Editor.data2model(data, model = nil, parent = nil)
122
+ model ||= TreeStore.new(Gdk::Pixbuf, String, String)
123
+ iter = if block_given?
124
+ yield model
125
+ else
126
+ model.append(parent)
127
+ end
128
+ case data
129
+ when Hash
130
+ iter.type = 'Hash'
131
+ data.sort.each do |key, value|
132
+ pair_iter = model.append(iter)
133
+ pair_iter.type = 'Key'
134
+ pair_iter.content = key.to_s
135
+ Editor.data2model(value, model, pair_iter)
136
+ end
137
+ when Array
138
+ iter.type = 'Array'
139
+ data.each do |value|
140
+ Editor.data2model(value, model, iter)
141
+ end
142
+ when Numeric
143
+ iter.type = 'Numeric'
144
+ iter.content = data.to_s
145
+ when String, true, false, nil
146
+ iter.type = data.class.name
147
+ iter.content = data.nil? ? 'null' : data.to_s
148
+ else
149
+ iter.type = 'String'
150
+ iter.content = data.to_s
151
+ end
152
+ model
153
+ end
154
+
155
+ # The Gtk::TreeIter class is reopened and some auxiliary methods are added.
156
+ class Gtk::TreeIter
157
+ include Enumerable
158
+
159
+ # Traverse each of this Gtk::TreeIter instance's children
160
+ # and yield to them.
161
+ def each
162
+ n_children.times { |i| yield nth_child(i) }
163
+ end
164
+
165
+ # Recursively traverse all nodes of this Gtk::TreeIter's subtree
166
+ # (including self) and yield to them.
167
+ def recursive_each(&block)
168
+ yield self
169
+ each do |i|
170
+ i.recursive_each(&block)
171
+ end
172
+ end
173
+
174
+ # Remove the subtree of this Gtk::TreeIter instance from the
175
+ # model _model_.
176
+ def remove_subtree(model)
177
+ while current = first_child
178
+ model.remove(current)
179
+ end
180
+ end
181
+
182
+ # Returns the type of this node.
183
+ def type
184
+ self[TYPE_COL]
185
+ end
186
+
187
+ # Sets the type of this node to _value_. This implies setting
188
+ # the respective icon accordingly.
189
+ def type=(value)
190
+ self[TYPE_COL] = value
191
+ self[ICON_COL] = Editor.fetch_icon(value)
192
+ end
193
+
194
+ # Returns the content of this node.
195
+ def content
196
+ self[CONTENT_COL]
197
+ end
198
+
199
+ # Sets the content of this node to _value_.
200
+ def content=(value)
201
+ self[CONTENT_COL] = value
202
+ end
203
+ end
204
+
205
+ # This module bundles some method, that can be used to create a menu. It
206
+ # should be included into the class in question.
207
+ module MenuExtension
208
+ include Gtk
209
+
210
+ # Creates a Menu, that includes MenuExtension. _treeview_ is the
211
+ # Gtk::TreeView, on which it operates.
212
+ def initialize(treeview)
213
+ @treeview = treeview
214
+ @menu = Menu.new
215
+ end
216
+
217
+ # Returns the Gtk::TreeView of this menu.
218
+ attr_reader :treeview
219
+
220
+ # Returns the menu.
221
+ attr_reader :menu
222
+
223
+ # Adds a Gtk::SeparatorMenuItem to this instance's #menu.
224
+ def add_separator
225
+ menu.append SeparatorMenuItem.new
226
+ end
227
+
228
+ # Adds a Gtk::MenuItem to this instance's #menu. _label_ is the label
229
+ # string, _klass_ is the item type, and _callback_ is the procedure, that
230
+ # is called if the _item_ is activated.
231
+ def add_item(label, keyval = nil, klass = MenuItem, &callback)
232
+ label = "#{label} (C-#{keyval.chr})" if keyval
233
+ item = klass.new(label)
234
+ item.signal_connect(:activate, &callback)
235
+ if keyval
236
+ self.signal_connect(:'key-press-event') do |item, event|
237
+ if event.state & Gdk::Window::ModifierType::CONTROL_MASK != 0 and
238
+ event.keyval == keyval
239
+ callback.call item
240
+ end
241
+ end
242
+ end
243
+ menu.append item
244
+ item
245
+ end
246
+
247
+ # This method should be implemented in subclasses to create the #menu of
248
+ # this instance. It has to be called after an instance of this class is
249
+ # created, to build the menu.
250
+ def create
251
+ raise NotImplementedError
252
+ end
253
+
254
+ def method_missing(*a, &b)
255
+ treeview.__send__(*a, &b)
256
+ end
257
+ end
258
+
259
+ # This class creates the popup menu, that opens when clicking onto the
260
+ # treeview.
261
+ class PopUpMenu
262
+ include MenuExtension
263
+
264
+ # Change the type or content of the selected node.
265
+ def change_node(item)
266
+ if current = selection.selected
267
+ parent = current.parent
268
+ old_type, old_content = current.type, current.content
269
+ if ALL_TYPES.include?(old_type)
270
+ @clipboard_data = Editor.model2data(current)
271
+ type, content = ask_for_element(parent, current.type,
272
+ current.content)
273
+ if type
274
+ current.type, current.content = type, content
275
+ current.remove_subtree(model)
276
+ toplevel.display_status("Changed a node in tree.")
277
+ window.change
278
+ end
279
+ else
280
+ toplevel.display_status(
281
+ "Cannot change node of type #{old_type} in tree!")
282
+ end
283
+ end
284
+ end
285
+
286
+ # Cut the selected node and its subtree, and save it into the
287
+ # clipboard.
288
+ def cut_node(item)
289
+ if current = selection.selected
290
+ if current and current.type == 'Key'
291
+ @clipboard_data = {
292
+ current.content => Editor.model2data(current.first_child)
293
+ }
294
+ else
295
+ @clipboard_data = Editor.model2data(current)
296
+ end
297
+ model.remove(current)
298
+ window.change
299
+ toplevel.display_status("Cut a node from tree.")
300
+ end
301
+ end
302
+
303
+ # Copy the selected node and its subtree, and save it into the
304
+ # clipboard.
305
+ def copy_node(item)
306
+ if current = selection.selected
307
+ if current and current.type == 'Key'
308
+ @clipboard_data = {
309
+ current.content => Editor.model2data(current.first_child)
310
+ }
311
+ else
312
+ @clipboard_data = Editor.model2data(current)
313
+ end
314
+ window.change
315
+ toplevel.display_status("Copied a node from tree.")
316
+ end
317
+ end
318
+
319
+ # Paste the data in the clipboard into the selected Array or Hash by
320
+ # appending it.
321
+ def paste_node_appending(item)
322
+ if current = selection.selected
323
+ if @clipboard_data
324
+ case current.type
325
+ when 'Array'
326
+ Editor.data2model(@clipboard_data, model, current)
327
+ expand_collapse(current)
328
+ when 'Hash'
329
+ if @clipboard_data.is_a? Hash
330
+ parent = current.parent
331
+ hash = Editor.model2data(current)
332
+ model.remove(current)
333
+ hash.update(@clipboard_data)
334
+ Editor.data2model(hash, model, parent)
335
+ if parent
336
+ expand_collapse(parent)
337
+ elsif @expanded
338
+ expand_all
339
+ end
340
+ window.change
341
+ else
342
+ toplevel.display_status(
343
+ "Cannot paste non-#{current.type} data into '#{current.type}'!")
344
+ end
345
+ else
346
+ toplevel.display_status(
347
+ "Cannot paste node below '#{current.type}'!")
348
+ end
349
+ else
350
+ toplevel.display_status("Nothing to paste in clipboard!")
351
+ end
352
+ else
353
+ toplevel.display_status("Append a node into the root first!")
354
+ end
355
+ end
356
+
357
+ # Paste the data in the clipboard into the selected Array inserting it
358
+ # before the selected element.
359
+ def paste_node_inserting_before(item)
360
+ if current = selection.selected
361
+ if @clipboard_data
362
+ parent = current.parent or return
363
+ parent_type = parent.type
364
+ if parent_type == 'Array'
365
+ selected_index = parent.each_with_index do |c, i|
366
+ break i if c == current
367
+ end
368
+ Editor.data2model(@clipboard_data, model, parent) do |m|
369
+ m.insert_before(parent, current)
370
+ end
371
+ expand_collapse(current)
372
+ toplevel.display_status("Inserted an element to " +
373
+ "'#{parent_type}' before index #{selected_index}.")
374
+ window.change
375
+ else
376
+ toplevel.display_status(
377
+ "Cannot insert node below '#{parent_type}'!")
378
+ end
379
+ else
380
+ toplevel.display_status("Nothing to paste in clipboard!")
381
+ end
382
+ else
383
+ toplevel.display_status("Append a node into the root first!")
384
+ end
385
+ end
386
+
387
+ # Append a new node to the selected Hash or Array.
388
+ def append_new_node(item)
389
+ if parent = selection.selected
390
+ parent_type = parent.type
391
+ case parent_type
392
+ when 'Hash'
393
+ key, type, content = ask_for_hash_pair(parent)
394
+ key or return
395
+ iter = create_node(parent, 'Key', key)
396
+ iter = create_node(iter, type, content)
397
+ toplevel.display_status(
398
+ "Added a (key, value)-pair to '#{parent_type}'.")
399
+ window.change
400
+ when 'Array'
401
+ type, content = ask_for_element(parent)
402
+ type or return
403
+ iter = create_node(parent, type, content)
404
+ window.change
405
+ toplevel.display_status("Appendend an element to '#{parent_type}'.")
406
+ else
407
+ toplevel.display_status("Cannot append to '#{parent_type}'!")
408
+ end
409
+ else
410
+ type, content = ask_for_element
411
+ type or return
412
+ iter = create_node(nil, type, content)
413
+ window.change
414
+ end
415
+ end
416
+
417
+ # Insert a new node into an Array before the selected element.
418
+ def insert_new_node(item)
419
+ if current = selection.selected
420
+ parent = current.parent or return
421
+ parent_parent = parent.parent
422
+ parent_type = parent.type
423
+ if parent_type == 'Array'
424
+ selected_index = parent.each_with_index do |c, i|
425
+ break i if c == current
426
+ end
427
+ type, content = ask_for_element(parent)
428
+ type or return
429
+ iter = model.insert_before(parent, current)
430
+ iter.type, iter.content = type, content
431
+ toplevel.display_status("Inserted an element to " +
432
+ "'#{parent_type}' before index #{selected_index}.")
433
+ window.change
434
+ else
435
+ toplevel.display_status(
436
+ "Cannot insert node below '#{parent_type}'!")
437
+ end
438
+ else
439
+ toplevel.display_status("Append a node into the root first!")
440
+ end
441
+ end
442
+
443
+ # Recursively collapse/expand a subtree starting from the selected node.
444
+ def collapse_expand(item)
445
+ if current = selection.selected
446
+ if row_expanded?(current.path)
447
+ collapse_row(current.path)
448
+ else
449
+ expand_row(current.path, true)
450
+ end
451
+ else
452
+ toplevel.display_status("Append a node into the root first!")
453
+ end
454
+ end
455
+
456
+ # Create the menu.
457
+ def create
458
+ add_item("Change node", ?n, &method(:change_node))
459
+ add_separator
460
+ add_item("Cut node", ?X, &method(:cut_node))
461
+ add_item("Copy node", ?C, &method(:copy_node))
462
+ add_item("Paste node (appending)", ?A, &method(:paste_node_appending))
463
+ add_item("Paste node (inserting before)", ?I,
464
+ &method(:paste_node_inserting_before))
465
+ add_separator
466
+ add_item("Append new node", ?a, &method(:append_new_node))
467
+ add_item("Insert new node before", ?i, &method(:insert_new_node))
468
+ add_separator
469
+ add_item("Collapse/Expand node (recursively)", ?e,
470
+ &method(:collapse_expand))
471
+
472
+ menu.show_all
473
+ signal_connect(:button_press_event) do |widget, event|
474
+ if event.kind_of? Gdk::EventButton and event.button == 3
475
+ menu.popup(nil, nil, event.button, event.time)
476
+ end
477
+ end
478
+ signal_connect(:popup_menu) do
479
+ menu.popup(nil, nil, 0, Gdk::Event::CURRENT_TIME)
480
+ end
481
+ end
482
+ end
483
+
484
+ # This class creates the File pulldown menu.
485
+ class FileMenu
486
+ include MenuExtension
487
+
488
+ # Clear the model and filename, but ask to save the JSON document, if
489
+ # unsaved changes have occured.
490
+ def new(item)
491
+ window.clear
492
+ end
493
+
494
+ # Open a file and load it into the editor. Ask to save the JSON document
495
+ # first, if unsaved changes have occured.
496
+ def open(item)
497
+ window.file_open
498
+ end
499
+
500
+ def open_location(item)
501
+ window.location_open
502
+ end
503
+
504
+ # Revert the current JSON document in the editor to the saved version.
505
+ def revert(item)
506
+ window.instance_eval do
507
+ @filename and file_open(@filename)
508
+ end
509
+ end
510
+
511
+ # Save the current JSON document.
512
+ def save(item)
513
+ window.file_save
514
+ end
515
+
516
+ # Save the current JSON document under the given filename.
517
+ def save_as(item)
518
+ window.file_save_as
519
+ end
520
+
521
+ # Quit the editor, after asking to save any unsaved changes first.
522
+ def quit(item)
523
+ window.quit
524
+ end
525
+
526
+ # Create the menu.
527
+ def create
528
+ title = MenuItem.new('File')
529
+ title.submenu = menu
530
+ add_item('New', &method(:new))
531
+ add_item('Open', ?o, &method(:open))
532
+ add_item('Open location', ?l, &method(:open_location))
533
+ add_item('Revert', &method(:revert))
534
+ add_separator
535
+ add_item('Save', ?s, &method(:save))
536
+ add_item('Save As', ?S, &method(:save_as))
537
+ add_separator
538
+ add_item('Quit', ?q, &method(:quit))
539
+ title
540
+ end
541
+ end
542
+
543
+ # This class creates the Edit pulldown menu.
544
+ class EditMenu
545
+ include MenuExtension
546
+
547
+ # Copy data from model into primary clipboard.
548
+ def copy(item)
549
+ data = Editor.model2data(model.iter_first)
550
+ json = JSON.pretty_generate(data, :max_nesting => false)
551
+ c = Gtk::Clipboard.get(Gdk::Selection::PRIMARY)
552
+ c.text = json
553
+ end
554
+
555
+ # Copy json text from primary clipboard into model.
556
+ def paste(item)
557
+ c = Gtk::Clipboard.get(Gdk::Selection::PRIMARY)
558
+ if json = c.wait_for_text
559
+ window.ask_save if @changed
560
+ begin
561
+ window.edit json
562
+ rescue JSON::ParserError
563
+ window.clear
564
+ end
565
+ end
566
+ end
567
+
568
+ # Find a string in all nodes' contents and select the found node in the
569
+ # treeview.
570
+ def find(item)
571
+ @search = ask_for_find_term(@search) or return
572
+ iter = model.get_iter('0') or return
573
+ iter.recursive_each do |i|
574
+ if @iter
575
+ if @iter != i
576
+ next
577
+ else
578
+ @iter = nil
579
+ next
580
+ end
581
+ elsif @search.match(i[CONTENT_COL])
582
+ set_cursor(i.path, nil, false)
583
+ @iter = i
584
+ break
585
+ end
586
+ end
587
+ end
588
+
589
+ # Repeat the last search given by #find.
590
+ def find_again(item)
591
+ @search or return
592
+ iter = model.get_iter('0')
593
+ iter.recursive_each do |i|
594
+ if @iter
595
+ if @iter != i
596
+ next
597
+ else
598
+ @iter = nil
599
+ next
600
+ end
601
+ elsif @search.match(i[CONTENT_COL])
602
+ set_cursor(i.path, nil, false)
603
+ @iter = i
604
+ break
605
+ end
606
+ end
607
+ end
608
+
609
+ # Sort (Reverse sort) all elements of the selected array by the given
610
+ # expression. _x_ is the element in question.
611
+ def sort(item)
612
+ if current = selection.selected
613
+ if current.type == 'Array'
614
+ parent = current.parent
615
+ ary = Editor.model2data(current)
616
+ order, reverse = ask_for_order
617
+ order or return
618
+ begin
619
+ block = eval "lambda { |x| #{order} }"
620
+ if reverse
621
+ ary.sort! { |a,b| block[b] <=> block[a] }
622
+ else
623
+ ary.sort! { |a,b| block[a] <=> block[b] }
624
+ end
625
+ rescue => e
626
+ Editor.error_dialog(self, "Failed to sort Array with #{order}: #{e}!")
627
+ else
628
+ Editor.data2model(ary, model, parent) do |m|
629
+ m.insert_before(parent, current)
630
+ end
631
+ model.remove(current)
632
+ expand_collapse(parent)
633
+ window.change
634
+ toplevel.display_status("Array has been sorted.")
635
+ end
636
+ else
637
+ toplevel.display_status("Only Array nodes can be sorted!")
638
+ end
639
+ else
640
+ toplevel.display_status("Select an Array to sort first!")
641
+ end
642
+ end
643
+
644
+ # Create the menu.
645
+ def create
646
+ title = MenuItem.new('Edit')
647
+ title.submenu = menu
648
+ add_item('Copy', ?c, &method(:copy))
649
+ add_item('Paste', ?v, &method(:paste))
650
+ add_separator
651
+ add_item('Find', ?f, &method(:find))
652
+ add_item('Find Again', ?g, &method(:find_again))
653
+ add_separator
654
+ add_item('Sort', ?S, &method(:sort))
655
+ title
656
+ end
657
+ end
658
+
659
+ class OptionsMenu
660
+ include MenuExtension
661
+
662
+ # Collapse/Expand all nodes by default.
663
+ def collapsed_nodes(item)
664
+ if expanded
665
+ self.expanded = false
666
+ collapse_all
667
+ else
668
+ self.expanded = true
669
+ expand_all
670
+ end
671
+ end
672
+
673
+ # Toggle pretty saving mode on/off.
674
+ def pretty_saving(item)
675
+ @pretty_item.toggled
676
+ window.change
677
+ end
678
+
679
+ attr_reader :pretty_item
680
+
681
+ # Create the menu.
682
+ def create
683
+ title = MenuItem.new('Options')
684
+ title.submenu = menu
685
+ add_item('Collapsed nodes', nil, CheckMenuItem, &method(:collapsed_nodes))
686
+ @pretty_item = add_item('Pretty saving', nil, CheckMenuItem,
687
+ &method(:pretty_saving))
688
+ @pretty_item.active = true
689
+ window.unchange
690
+ title
691
+ end
692
+ end
693
+
694
+ # This class inherits from Gtk::TreeView, to configure it and to add a lot
695
+ # of behaviour to it.
696
+ class JSONTreeView < Gtk::TreeView
697
+ include Gtk
698
+
699
+ # Creates a JSONTreeView instance, the parameter _window_ is
700
+ # a MainWindow instance and used for self delegation.
701
+ def initialize(window)
702
+ @window = window
703
+ super(TreeStore.new(Gdk::Pixbuf, String, String))
704
+ self.selection.mode = SELECTION_BROWSE
705
+
706
+ @expanded = false
707
+ self.headers_visible = false
708
+ add_columns
709
+ add_popup_menu
710
+ end
711
+
712
+ # Returns the MainWindow instance of this JSONTreeView.
713
+ attr_reader :window
714
+
715
+ # Returns true, if nodes are autoexpanding, false otherwise.
716
+ attr_accessor :expanded
717
+
718
+ private
719
+
720
+ def add_columns
721
+ cell = CellRendererPixbuf.new
722
+ column = TreeViewColumn.new('Icon', cell,
723
+ 'pixbuf' => ICON_COL
724
+ )
725
+ append_column(column)
726
+
727
+ cell = CellRendererText.new
728
+ column = TreeViewColumn.new('Type', cell,
729
+ 'text' => TYPE_COL
730
+ )
731
+ append_column(column)
732
+
733
+ cell = CellRendererText.new
734
+ cell.editable = true
735
+ column = TreeViewColumn.new('Content', cell,
736
+ 'text' => CONTENT_COL
737
+ )
738
+ cell.signal_connect(:edited, &method(:cell_edited))
739
+ append_column(column)
740
+ end
741
+
742
+ def unify_key(iter, key)
743
+ return unless iter.type == 'Key'
744
+ parent = iter.parent
745
+ if parent.any? { |c| c != iter and c.content == key }
746
+ old_key = key
747
+ i = 0
748
+ begin
749
+ key = sprintf("%s.%d", old_key, i += 1)
750
+ end while parent.any? { |c| c != iter and c.content == key }
751
+ end
752
+ iter.content = key
753
+ end
754
+
755
+ def cell_edited(cell, path, value)
756
+ iter = model.get_iter(path)
757
+ case iter.type
758
+ when 'Key'
759
+ unify_key(iter, value)
760
+ toplevel.display_status('Key has been changed.')
761
+ when 'FalseClass'
762
+ value.downcase!
763
+ if value == 'true'
764
+ iter.type, iter.content = 'TrueClass', 'true'
765
+ end
766
+ when 'TrueClass'
767
+ value.downcase!
768
+ if value == 'false'
769
+ iter.type, iter.content = 'FalseClass', 'false'
770
+ end
771
+ when 'Numeric'
772
+ iter.content =
773
+ if value == 'Infinity'
774
+ value
775
+ else
776
+ (Integer(value) rescue Float(value) rescue 0).to_s
777
+ end
778
+ when 'String'
779
+ iter.content = value
780
+ when 'Hash', 'Array'
781
+ return
782
+ else
783
+ fail "Unknown type found in model: #{iter.type}"
784
+ end
785
+ window.change
786
+ end
787
+
788
+ def configure_value(value, type)
789
+ value.editable = false
790
+ case type
791
+ when 'Array', 'Hash'
792
+ value.text = ''
793
+ when 'TrueClass'
794
+ value.text = 'true'
795
+ when 'FalseClass'
796
+ value.text = 'false'
797
+ when 'NilClass'
798
+ value.text = 'null'
799
+ when 'Numeric', 'String'
800
+ value.text ||= ''
801
+ value.editable = true
802
+ else
803
+ raise ArgumentError, "unknown type '#{type}' encountered"
804
+ end
805
+ end
806
+
807
+ def add_popup_menu
808
+ menu = PopUpMenu.new(self)
809
+ menu.create
810
+ end
811
+
812
+ public
813
+
814
+ # Create a _type_ node with content _content_, and add it to _parent_
815
+ # in the model. If _parent_ is nil, create a new model and put it into
816
+ # the editor treeview.
817
+ def create_node(parent, type, content)
818
+ iter = if parent
819
+ model.append(parent)
820
+ else
821
+ new_model = Editor.data2model(nil)
822
+ toplevel.view_new_model(new_model)
823
+ new_model.iter_first
824
+ end
825
+ iter.type, iter.content = type, content
826
+ expand_collapse(parent) if parent
827
+ iter
828
+ end
829
+
830
+ # Ask for a hash key, value pair to be added to the Hash node _parent_.
831
+ def ask_for_hash_pair(parent)
832
+ key_input = type_input = value_input = nil
833
+
834
+ dialog = Dialog.new("New (key, value) pair for Hash", nil, nil,
835
+ [ Stock::OK, Dialog::RESPONSE_ACCEPT ],
836
+ [ Stock::CANCEL, Dialog::RESPONSE_REJECT ]
837
+ )
838
+ dialog.width_request = 640
839
+
840
+ hbox = HBox.new(false, 5)
841
+ hbox.pack_start(Label.new("Key:"), false)
842
+ hbox.pack_start(key_input = Entry.new)
843
+ key_input.text = @key || ''
844
+ dialog.vbox.pack_start(hbox, false)
845
+ key_input.signal_connect(:activate) do
846
+ if parent.any? { |c| c.content == key_input.text }
847
+ toplevel.display_status('Key already exists in Hash!')
848
+ key_input.text = ''
849
+ else
850
+ toplevel.display_status('Key has been changed.')
851
+ end
852
+ end
853
+
854
+ hbox = HBox.new(false, 5)
855
+ hbox.pack_start(Label.new("Type:"), false)
856
+ hbox.pack_start(type_input = ComboBox.new(true))
857
+ ALL_TYPES.each { |t| type_input.append_text(t) }
858
+ type_input.active = @type || 0
859
+ dialog.vbox.pack_start(hbox, false)
860
+
861
+ type_input.signal_connect(:changed) do
862
+ value_input.editable = false
863
+ case ALL_TYPES[type_input.active]
864
+ when 'Array', 'Hash'
865
+ value_input.text = ''
866
+ when 'TrueClass'
867
+ value_input.text = 'true'
868
+ when 'FalseClass'
869
+ value_input.text = 'false'
870
+ when 'NilClass'
871
+ value_input.text = 'null'
872
+ else
873
+ value_input.text = ''
874
+ value_input.editable = true
875
+ end
876
+ end
877
+
878
+ hbox = HBox.new(false, 5)
879
+ hbox.pack_start(Label.new("Value:"), false)
880
+ hbox.pack_start(value_input = Entry.new)
881
+ value_input.width_chars = 60
882
+ value_input.text = @value || ''
883
+ dialog.vbox.pack_start(hbox, false)
884
+
885
+ dialog.signal_connect(:'key-press-event', &DEFAULT_DIALOG_KEY_PRESS_HANDLER)
886
+ dialog.show_all
887
+ self.focus = dialog
888
+ dialog.run do |response|
889
+ if response == Dialog::RESPONSE_ACCEPT
890
+ @key = key_input.text
891
+ type = ALL_TYPES[@type = type_input.active]
892
+ content = value_input.text
893
+ return @key, type, content
894
+ end
895
+ end
896
+ return
897
+ ensure
898
+ dialog.destroy
899
+ end
900
+
901
+ # Ask for an element to be appended _parent_.
902
+ def ask_for_element(parent = nil, default_type = nil, value_text = @content)
903
+ type_input = value_input = nil
904
+
905
+ dialog = Dialog.new(
906
+ "New element into #{parent ? parent.type : 'root'}",
907
+ nil, nil,
908
+ [ Stock::OK, Dialog::RESPONSE_ACCEPT ],
909
+ [ Stock::CANCEL, Dialog::RESPONSE_REJECT ]
910
+ )
911
+ hbox = HBox.new(false, 5)
912
+ hbox.pack_start(Label.new("Type:"), false)
913
+ hbox.pack_start(type_input = ComboBox.new(true))
914
+ default_active = 0
915
+ types = parent ? ALL_TYPES : CONTAINER_TYPES
916
+ types.each_with_index do |t, i|
917
+ type_input.append_text(t)
918
+ if t == default_type
919
+ default_active = i
920
+ end
921
+ end
922
+ type_input.active = default_active
923
+ dialog.vbox.pack_start(hbox, false)
924
+ type_input.signal_connect(:changed) do
925
+ configure_value(value_input, types[type_input.active])
926
+ end
927
+
928
+ hbox = HBox.new(false, 5)
929
+ hbox.pack_start(Label.new("Value:"), false)
930
+ hbox.pack_start(value_input = Entry.new)
931
+ value_input.width_chars = 60
932
+ value_input.text = value_text if value_text
933
+ configure_value(value_input, types[type_input.active])
934
+
935
+ dialog.vbox.pack_start(hbox, false)
936
+
937
+ dialog.signal_connect(:'key-press-event', &DEFAULT_DIALOG_KEY_PRESS_HANDLER)
938
+ dialog.show_all
939
+ self.focus = dialog
940
+ dialog.run do |response|
941
+ if response == Dialog::RESPONSE_ACCEPT
942
+ type = types[type_input.active]
943
+ @content = case type
944
+ when 'Numeric'
945
+ if (t = value_input.text) == 'Infinity'
946
+ 1 / 0.0
947
+ else
948
+ Integer(t) rescue Float(t) rescue 0
949
+ end
950
+ else
951
+ value_input.text
952
+ end.to_s
953
+ return type, @content
954
+ end
955
+ end
956
+ return
957
+ ensure
958
+ dialog.destroy if dialog
959
+ end
960
+
961
+ # Ask for an order criteria for sorting, using _x_ for the element in
962
+ # question. Returns the order criterium, and true/false for reverse
963
+ # sorting.
964
+ def ask_for_order
965
+ dialog = Dialog.new(
966
+ "Give an order criterium for 'x'.",
967
+ nil, nil,
968
+ [ Stock::OK, Dialog::RESPONSE_ACCEPT ],
969
+ [ Stock::CANCEL, Dialog::RESPONSE_REJECT ]
970
+ )
971
+ hbox = HBox.new(false, 5)
972
+
973
+ hbox.pack_start(Label.new("Order:"), false)
974
+ hbox.pack_start(order_input = Entry.new)
975
+ order_input.text = @order || 'x'
976
+ order_input.width_chars = 60
977
+
978
+ hbox.pack_start(reverse_checkbox = CheckButton.new('Reverse'), false)
979
+
980
+ dialog.vbox.pack_start(hbox, false)
981
+
982
+ dialog.signal_connect(:'key-press-event', &DEFAULT_DIALOG_KEY_PRESS_HANDLER)
983
+ dialog.show_all
984
+ self.focus = dialog
985
+ dialog.run do |response|
986
+ if response == Dialog::RESPONSE_ACCEPT
987
+ return @order = order_input.text, reverse_checkbox.active?
988
+ end
989
+ end
990
+ return
991
+ ensure
992
+ dialog.destroy if dialog
993
+ end
994
+
995
+ # Ask for a find term to search for in the tree. Returns the term as a
996
+ # string.
997
+ def ask_for_find_term(search = nil)
998
+ dialog = Dialog.new(
999
+ "Find a node matching regex in tree.",
1000
+ nil, nil,
1001
+ [ Stock::OK, Dialog::RESPONSE_ACCEPT ],
1002
+ [ Stock::CANCEL, Dialog::RESPONSE_REJECT ]
1003
+ )
1004
+ hbox = HBox.new(false, 5)
1005
+
1006
+ hbox.pack_start(Label.new("Regex:"), false)
1007
+ hbox.pack_start(regex_input = Entry.new)
1008
+ hbox.pack_start(icase_checkbox = CheckButton.new('Icase'), false)
1009
+ regex_input.width_chars = 60
1010
+ if search
1011
+ regex_input.text = search.source
1012
+ icase_checkbox.active = search.casefold?
1013
+ end
1014
+
1015
+ dialog.vbox.pack_start(hbox, false)
1016
+
1017
+ dialog.signal_connect(:'key-press-event', &DEFAULT_DIALOG_KEY_PRESS_HANDLER)
1018
+ dialog.show_all
1019
+ self.focus = dialog
1020
+ dialog.run do |response|
1021
+ if response == Dialog::RESPONSE_ACCEPT
1022
+ begin
1023
+ return Regexp.new(regex_input.text, icase_checkbox.active? ? Regexp::IGNORECASE : 0)
1024
+ rescue => e
1025
+ Editor.error_dialog(self, "Evaluation of regex /#{regex_input.text}/ failed: #{e}!")
1026
+ return
1027
+ end
1028
+ end
1029
+ end
1030
+ return
1031
+ ensure
1032
+ dialog.destroy if dialog
1033
+ end
1034
+
1035
+ # Expand or collapse row pointed to by _iter_ according
1036
+ # to the #expanded attribute.
1037
+ def expand_collapse(iter)
1038
+ if expanded
1039
+ expand_row(iter.path, true)
1040
+ else
1041
+ collapse_row(iter.path)
1042
+ end
1043
+ end
1044
+ end
1045
+
1046
+ # The editor main window
1047
+ class MainWindow < Gtk::Window
1048
+ include Gtk
1049
+
1050
+ def initialize(encoding)
1051
+ @changed = false
1052
+ @encoding = encoding
1053
+ super(TOPLEVEL)
1054
+ display_title
1055
+ set_default_size(800, 600)
1056
+ signal_connect(:delete_event) { quit }
1057
+
1058
+ vbox = VBox.new(false, 0)
1059
+ add(vbox)
1060
+ #vbox.border_width = 0
1061
+
1062
+ @treeview = JSONTreeView.new(self)
1063
+ @treeview.signal_connect(:'cursor-changed') do
1064
+ display_status('')
1065
+ end
1066
+
1067
+ menu_bar = create_menu_bar
1068
+ vbox.pack_start(menu_bar, false, false, 0)
1069
+
1070
+ sw = ScrolledWindow.new(nil, nil)
1071
+ sw.shadow_type = SHADOW_ETCHED_IN
1072
+ sw.set_policy(POLICY_AUTOMATIC, POLICY_AUTOMATIC)
1073
+ vbox.pack_start(sw, true, true, 0)
1074
+ sw.add(@treeview)
1075
+
1076
+ @status_bar = Statusbar.new
1077
+ vbox.pack_start(@status_bar, false, false, 0)
1078
+
1079
+ @filename ||= nil
1080
+ if @filename
1081
+ data = read_data(@filename)
1082
+ view_new_model Editor.data2model(data)
1083
+ end
1084
+
1085
+ signal_connect(:button_release_event) do |_,event|
1086
+ if event.button == 2
1087
+ c = Gtk::Clipboard.get(Gdk::Selection::PRIMARY)
1088
+ if url = c.wait_for_text
1089
+ location_open url
1090
+ end
1091
+ false
1092
+ else
1093
+ true
1094
+ end
1095
+ end
1096
+ end
1097
+
1098
+ # Creates the menu bar with the pulldown menus and returns it.
1099
+ def create_menu_bar
1100
+ menu_bar = MenuBar.new
1101
+ @file_menu = FileMenu.new(@treeview)
1102
+ menu_bar.append @file_menu.create
1103
+ @edit_menu = EditMenu.new(@treeview)
1104
+ menu_bar.append @edit_menu.create
1105
+ @options_menu = OptionsMenu.new(@treeview)
1106
+ menu_bar.append @options_menu.create
1107
+ menu_bar
1108
+ end
1109
+
1110
+ # Sets editor status to changed, to indicate that the edited data
1111
+ # containts unsaved changes.
1112
+ def change
1113
+ @changed = true
1114
+ display_title
1115
+ end
1116
+
1117
+ # Sets editor status to unchanged, to indicate that the edited data
1118
+ # doesn't containt unsaved changes.
1119
+ def unchange
1120
+ @changed = false
1121
+ display_title
1122
+ end
1123
+
1124
+ # Puts a new model _model_ into the Gtk::TreeView to be edited.
1125
+ def view_new_model(model)
1126
+ @treeview.model = model
1127
+ @treeview.expanded = true
1128
+ @treeview.expand_all
1129
+ unchange
1130
+ end
1131
+
1132
+ # Displays _text_ in the status bar.
1133
+ def display_status(text)
1134
+ @cid ||= nil
1135
+ @status_bar.pop(@cid) if @cid
1136
+ @cid = @status_bar.get_context_id('dummy')
1137
+ @status_bar.push(@cid, text)
1138
+ end
1139
+
1140
+ # Opens a dialog, asking, if changes should be saved to a file.
1141
+ def ask_save
1142
+ if Editor.question_dialog(self,
1143
+ "Unsaved changes to JSON model. Save?")
1144
+ if @filename
1145
+ file_save
1146
+ else
1147
+ file_save_as
1148
+ end
1149
+ end
1150
+ end
1151
+
1152
+ # Quit this editor, that is, leave this editor's main loop.
1153
+ def quit
1154
+ ask_save if @changed
1155
+ if Gtk.main_level > 0
1156
+ destroy
1157
+ Gtk.main_quit
1158
+ end
1159
+ nil
1160
+ end
1161
+
1162
+ # Display the new title according to the editor's current state.
1163
+ def display_title
1164
+ title = TITLE.dup
1165
+ title << ": #@filename" if @filename
1166
+ title << " *" if @changed
1167
+ self.title = title
1168
+ end
1169
+
1170
+ # Clear the current model, after asking to save all unsaved changes.
1171
+ def clear
1172
+ ask_save if @changed
1173
+ @filename = nil
1174
+ self.view_new_model nil
1175
+ end
1176
+
1177
+ def check_pretty_printed(json)
1178
+ pretty = !!((nl_index = json.index("\n")) && nl_index != json.size - 1)
1179
+ @options_menu.pretty_item.active = pretty
1180
+ end
1181
+ private :check_pretty_printed
1182
+
1183
+ # Open the data at the location _uri_, if given. Otherwise open a dialog
1184
+ # to ask for the _uri_.
1185
+ def location_open(uri = nil)
1186
+ uri = ask_for_location unless uri
1187
+ uri or return
1188
+ ask_save if @changed
1189
+ data = load_location(uri) or return
1190
+ view_new_model Editor.data2model(data)
1191
+ end
1192
+
1193
+ # Open the file _filename_ or call the #select_file method to ask for a
1194
+ # filename.
1195
+ def file_open(filename = nil)
1196
+ filename = select_file('Open as a JSON file') unless filename
1197
+ data = load_file(filename) or return
1198
+ view_new_model Editor.data2model(data)
1199
+ end
1200
+
1201
+ # Edit the string _json_ in the editor.
1202
+ def edit(json)
1203
+ if json.respond_to? :read
1204
+ json = json.read
1205
+ end
1206
+ data = parse_json json
1207
+ view_new_model Editor.data2model(data)
1208
+ end
1209
+
1210
+ # Save the current file.
1211
+ def file_save
1212
+ if @filename
1213
+ store_file(@filename)
1214
+ else
1215
+ file_save_as
1216
+ end
1217
+ end
1218
+
1219
+ # Save the current file as the filename
1220
+ def file_save_as
1221
+ filename = select_file('Save as a JSON file')
1222
+ store_file(filename)
1223
+ end
1224
+
1225
+ # Store the current JSON document to _path_.
1226
+ def store_file(path)
1227
+ if path
1228
+ data = Editor.model2data(@treeview.model.iter_first)
1229
+ File.open(path + '.tmp', 'wb') do |output|
1230
+ data or break
1231
+ if @options_menu.pretty_item.active?
1232
+ output.puts JSON.pretty_generate(data, :max_nesting => false)
1233
+ else
1234
+ output.write JSON.generate(data, :max_nesting => false)
1235
+ end
1236
+ end
1237
+ File.rename path + '.tmp', path
1238
+ @filename = path
1239
+ toplevel.display_status("Saved data to '#@filename'.")
1240
+ unchange
1241
+ end
1242
+ rescue SystemCallError => e
1243
+ Editor.error_dialog(self, "Failed to store JSON file: #{e}!")
1244
+ end
1245
+
1246
+ # Load the file named _filename_ into the editor as a JSON document.
1247
+ def load_file(filename)
1248
+ if filename
1249
+ if File.directory?(filename)
1250
+ Editor.error_dialog(self, "Try to select a JSON file!")
1251
+ nil
1252
+ else
1253
+ @filename = filename
1254
+ if data = read_data(filename)
1255
+ toplevel.display_status("Loaded data from '#@filename'.")
1256
+ end
1257
+ display_title
1258
+ data
1259
+ end
1260
+ end
1261
+ end
1262
+
1263
+ # Load the data at location _uri_ into the editor as a JSON document.
1264
+ def load_location(uri)
1265
+ data = read_data(uri) or return
1266
+ @filename = nil
1267
+ toplevel.display_status("Loaded data from '#{uri}'.")
1268
+ display_title
1269
+ data
1270
+ end
1271
+
1272
+ def parse_json(json)
1273
+ check_pretty_printed(json)
1274
+ if @encoding && !/^utf8$/i.match(@encoding)
1275
+ iconverter = Iconv.new('utf8', @encoding)
1276
+ json = iconverter.iconv(json)
1277
+ end
1278
+ JSON::parse(json, :max_nesting => false, :create_additions => false)
1279
+ end
1280
+ private :parse_json
1281
+
1282
+ # Read a JSON document from the file named _filename_, parse it into a
1283
+ # ruby data structure, and return the data.
1284
+ def read_data(filename)
1285
+ open(filename) do |f|
1286
+ json = f.read
1287
+ return parse_json(json)
1288
+ end
1289
+ rescue => e
1290
+ Editor.error_dialog(self, "Failed to parse JSON file: #{e}!")
1291
+ return
1292
+ end
1293
+
1294
+ # Open a file selecton dialog, displaying _message_, and return the
1295
+ # selected filename or nil, if no file was selected.
1296
+ def select_file(message)
1297
+ filename = nil
1298
+ fs = FileSelection.new(message)
1299
+ fs.set_modal(true)
1300
+ @default_dir = File.join(Dir.pwd, '') unless @default_dir
1301
+ fs.set_filename(@default_dir)
1302
+ fs.set_transient_for(self)
1303
+ fs.signal_connect(:destroy) { Gtk.main_quit }
1304
+ fs.ok_button.signal_connect(:clicked) do
1305
+ filename = fs.filename
1306
+ @default_dir = File.join(File.dirname(filename), '')
1307
+ fs.destroy
1308
+ Gtk.main_quit
1309
+ end
1310
+ fs.cancel_button.signal_connect(:clicked) do
1311
+ fs.destroy
1312
+ Gtk.main_quit
1313
+ end
1314
+ fs.show_all
1315
+ Gtk.main
1316
+ filename
1317
+ end
1318
+
1319
+ # Ask for location URI a to load data from. Returns the URI as a string.
1320
+ def ask_for_location
1321
+ dialog = Dialog.new(
1322
+ "Load data from location...",
1323
+ nil, nil,
1324
+ [ Stock::OK, Dialog::RESPONSE_ACCEPT ],
1325
+ [ Stock::CANCEL, Dialog::RESPONSE_REJECT ]
1326
+ )
1327
+ hbox = HBox.new(false, 5)
1328
+
1329
+ hbox.pack_start(Label.new("Location:"), false)
1330
+ hbox.pack_start(location_input = Entry.new)
1331
+ location_input.width_chars = 60
1332
+ location_input.text = @location || ''
1333
+
1334
+ dialog.vbox.pack_start(hbox, false)
1335
+
1336
+ dialog.signal_connect(:'key-press-event', &DEFAULT_DIALOG_KEY_PRESS_HANDLER)
1337
+ dialog.show_all
1338
+ dialog.run do |response|
1339
+ if response == Dialog::RESPONSE_ACCEPT
1340
+ return @location = location_input.text
1341
+ end
1342
+ end
1343
+ return
1344
+ ensure
1345
+ dialog.destroy if dialog
1346
+ end
1347
+ end
1348
+
1349
+ class << self
1350
+ # Starts a JSON Editor. If a block was given, it yields
1351
+ # to the JSON::Editor::MainWindow instance.
1352
+ def start(encoding = 'utf8') # :yield: window
1353
+ Gtk.init
1354
+ @window = Editor::MainWindow.new(encoding)
1355
+ @window.icon_list = [ Editor.fetch_icon('json') ]
1356
+ yield @window if block_given?
1357
+ @window.show_all
1358
+ Gtk.main
1359
+ end
1360
+
1361
+ # Edit the string _json_ with encoding _encoding_ in the editor.
1362
+ def edit(json, encoding = 'utf8')
1363
+ start(encoding) do |window|
1364
+ window.edit json
1365
+ end
1366
+ end
1367
+
1368
+ attr_reader :window
1369
+ end
1370
+ end
1371
+ end