gemrage 0.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (891) hide show
  1. data/.document +5 -0
  2. data/.gitignore +21 -0
  3. data/Gemfile +9 -0
  4. data/Gemfile.lock +35 -0
  5. data/LICENSE +20 -0
  6. data/README.rdoc +17 -0
  7. data/Rakefile +55 -0
  8. data/VERSION +1 -0
  9. data/gemrage.gemspec +923 -0
  10. data/lib/gemrage.rb +0 -0
  11. data/lib/rubygems/commands/scan_command.rb +25 -0
  12. data/lib/rubygems_plugin.rb +4 -0
  13. data/spec/gemrage_spec.rb +7 -0
  14. data/spec/spec.opts +1 -0
  15. data/spec/spec_helper.rb +9 -0
  16. data/vendor/ruby/1.8/bin/bundle +19 -0
  17. data/vendor/ruby/1.8/bin/edit_json.rb +19 -0
  18. data/vendor/ruby/1.8/bin/htmldiff +19 -0
  19. data/vendor/ruby/1.8/bin/jeweler +19 -0
  20. data/vendor/ruby/1.8/bin/ldiff +19 -0
  21. data/vendor/ruby/1.8/bin/prettify_json.rb +19 -0
  22. data/vendor/ruby/1.8/bin/restclient +19 -0
  23. data/vendor/ruby/1.8/bin/rspec +19 -0
  24. data/vendor/ruby/1.8/bin/rubyforge +19 -0
  25. data/vendor/ruby/1.8/cache/bundler-1.0.3.gem +0 -0
  26. data/vendor/ruby/1.8/cache/diff-lcs-1.1.2.gem +0 -0
  27. data/vendor/ruby/1.8/cache/gemcutter-0.6.1.gem +0 -0
  28. data/vendor/ruby/1.8/cache/git-1.2.5.gem +0 -0
  29. data/vendor/ruby/1.8/cache/jeweler-1.4.0.gem +0 -0
  30. data/vendor/ruby/1.8/cache/json_pure-1.4.6.gem +0 -0
  31. data/vendor/ruby/1.8/cache/mime-types-1.16.gem +0 -0
  32. data/vendor/ruby/1.8/cache/rest-client-1.6.1.gem +0 -0
  33. data/vendor/ruby/1.8/cache/rspec-2.0.0.gem +0 -0
  34. data/vendor/ruby/1.8/cache/rspec-core-2.0.0.gem +0 -0
  35. data/vendor/ruby/1.8/cache/rspec-expectations-2.0.0.gem +0 -0
  36. data/vendor/ruby/1.8/cache/rspec-mocks-2.0.0.gem +0 -0
  37. data/vendor/ruby/1.8/cache/rubyforge-2.0.4.gem +0 -0
  38. data/vendor/ruby/1.8/gems/bundler-1.0.3/.gitignore +12 -0
  39. data/vendor/ruby/1.8/gems/bundler-1.0.3/CHANGELOG.md +547 -0
  40. data/vendor/ruby/1.8/gems/bundler-1.0.3/ISSUES.md +32 -0
  41. data/vendor/ruby/1.8/gems/bundler-1.0.3/LICENSE +20 -0
  42. data/vendor/ruby/1.8/gems/bundler-1.0.3/README.md +29 -0
  43. data/vendor/ruby/1.8/gems/bundler-1.0.3/Rakefile +139 -0
  44. data/vendor/ruby/1.8/gems/bundler-1.0.3/UPGRADING.md +103 -0
  45. data/vendor/ruby/1.8/gems/bundler-1.0.3/bin/bundle +21 -0
  46. data/vendor/ruby/1.8/gems/bundler-1.0.3/bundler.gemspec +30 -0
  47. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/capistrano.rb +11 -0
  48. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/cli.rb +515 -0
  49. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/definition.rb +421 -0
  50. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/dependency.rb +114 -0
  51. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/deployment.rb +37 -0
  52. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/dsl.rb +245 -0
  53. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/environment.rb +47 -0
  54. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/gem_helper.rb +148 -0
  55. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/graph.rb +130 -0
  56. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/index.rb +114 -0
  57. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/installer.rb +84 -0
  58. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/lazy_specification.rb +71 -0
  59. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/lockfile_parser.rb +108 -0
  60. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/remote_specification.rb +59 -0
  61. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/resolver.rb +455 -0
  62. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/rubygems_ext.rb +203 -0
  63. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/runtime.rb +148 -0
  64. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/settings.rb +117 -0
  65. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/setup.rb +15 -0
  66. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/shared_helpers.rb +151 -0
  67. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/source.rb +662 -0
  68. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/spec_set.rb +134 -0
  69. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/templates/Executable +16 -0
  70. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/templates/Gemfile +4 -0
  71. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/templates/newgem/Gemfile.tt +4 -0
  72. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/templates/newgem/Rakefile.tt +2 -0
  73. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/templates/newgem/bin/newgem.tt +3 -0
  74. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/templates/newgem/gitignore.tt +3 -0
  75. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/templates/newgem/lib/newgem/version.rb.tt +7 -0
  76. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/templates/newgem/lib/newgem.rb.tt +7 -0
  77. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/templates/newgem/newgem.gemspec.tt +21 -0
  78. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/ui.rb +60 -0
  79. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/vendor/thor/actions/create_file.rb +105 -0
  80. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/vendor/thor/actions/directory.rb +93 -0
  81. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/vendor/thor/actions/empty_directory.rb +134 -0
  82. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/vendor/thor/actions/file_manipulation.rb +229 -0
  83. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/vendor/thor/actions/inject_into_file.rb +104 -0
  84. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/vendor/thor/actions.rb +297 -0
  85. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/vendor/thor/base.rb +556 -0
  86. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/vendor/thor/core_ext/file_binary_read.rb +9 -0
  87. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/vendor/thor/core_ext/hash_with_indifferent_access.rb +75 -0
  88. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/vendor/thor/core_ext/ordered_hash.rb +100 -0
  89. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/vendor/thor/error.rb +30 -0
  90. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/vendor/thor/invocation.rb +168 -0
  91. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/vendor/thor/parser/argument.rb +67 -0
  92. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/vendor/thor/parser/arguments.rb +161 -0
  93. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/vendor/thor/parser/option.rb +120 -0
  94. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/vendor/thor/parser/options.rb +174 -0
  95. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/vendor/thor/parser.rb +4 -0
  96. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/vendor/thor/shell/basic.rb +275 -0
  97. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/vendor/thor/shell/color.rb +108 -0
  98. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/vendor/thor/shell/html.rb +121 -0
  99. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/vendor/thor/shell.rb +88 -0
  100. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/vendor/thor/task.rb +114 -0
  101. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/vendor/thor/util.rb +229 -0
  102. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/vendor/thor/version.rb +3 -0
  103. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/vendor/thor.rb +319 -0
  104. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/version.rb +6 -0
  105. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler/vlad.rb +9 -0
  106. data/vendor/ruby/1.8/gems/bundler-1.0.3/lib/bundler.rb +284 -0
  107. data/vendor/ruby/1.8/gems/bundler-1.0.3/man/bundle-config.ronn +90 -0
  108. data/vendor/ruby/1.8/gems/bundler-1.0.3/man/bundle-exec.ronn +98 -0
  109. data/vendor/ruby/1.8/gems/bundler-1.0.3/man/bundle-install.ronn +310 -0
  110. data/vendor/ruby/1.8/gems/bundler-1.0.3/man/bundle-package.ronn +59 -0
  111. data/vendor/ruby/1.8/gems/bundler-1.0.3/man/bundle-update.ronn +176 -0
  112. data/vendor/ruby/1.8/gems/bundler-1.0.3/man/bundle.ronn +77 -0
  113. data/vendor/ruby/1.8/gems/bundler-1.0.3/man/gemfile.5.ronn +273 -0
  114. data/vendor/ruby/1.8/gems/bundler-1.0.3/man/index.txt +6 -0
  115. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/cache/gems_spec.rb +205 -0
  116. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/cache/git_spec.rb +9 -0
  117. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/cache/path_spec.rb +27 -0
  118. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/cache/platform_spec.rb +57 -0
  119. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/install/deploy_spec.rb +178 -0
  120. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/install/deprecated_spec.rb +43 -0
  121. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/install/gems/c_ext_spec.rb +48 -0
  122. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/install/gems/env_spec.rb +107 -0
  123. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/install/gems/flex_spec.rb +272 -0
  124. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/install/gems/groups_spec.rb +228 -0
  125. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/install/gems/packed_spec.rb +72 -0
  126. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/install/gems/platform_spec.rb +195 -0
  127. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/install/gems/resolving_spec.rb +72 -0
  128. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/install/gems/simple_case_spec.rb +742 -0
  129. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/install/gems/sudo_spec.rb +77 -0
  130. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/install/gems/win32_spec.rb +26 -0
  131. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/install/gemspec_spec.rb +96 -0
  132. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/install/git_spec.rb +553 -0
  133. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/install/invalid_spec.rb +17 -0
  134. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/install/path_spec.rb +329 -0
  135. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/install/upgrade_spec.rb +26 -0
  136. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/lock/flex_spec.rb +650 -0
  137. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/lock/git_spec.rb +35 -0
  138. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/other/check_spec.rb +221 -0
  139. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/other/config_spec.rb +40 -0
  140. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/other/console_spec.rb +54 -0
  141. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/other/exec_spec.rb +241 -0
  142. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/other/ext_spec.rb +16 -0
  143. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/other/gem_helper_spec.rb +116 -0
  144. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/other/help_spec.rb +36 -0
  145. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/other/init_spec.rb +40 -0
  146. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/other/newgem_spec.rb +24 -0
  147. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/other/open_spec.rb +35 -0
  148. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/other/show_spec.rb +82 -0
  149. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/pack/gems_spec.rb +22 -0
  150. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/quality_spec.rb +55 -0
  151. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/resolver/basic_spec.rb +20 -0
  152. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/resolver/platform_spec.rb +57 -0
  153. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/runtime/environment_rb_spec.rb +162 -0
  154. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/runtime/executable_spec.rb +110 -0
  155. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/runtime/load_spec.rb +102 -0
  156. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/runtime/platform_spec.rb +90 -0
  157. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/runtime/require_spec.rb +231 -0
  158. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/runtime/setup_spec.rb +412 -0
  159. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/runtime/with_clean_env_spec.rb +15 -0
  160. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/spec_helper.rb +82 -0
  161. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/support/builders.rb +566 -0
  162. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/support/helpers.rb +243 -0
  163. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/support/indexes.rb +113 -0
  164. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/support/matchers.rb +89 -0
  165. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/support/path.rb +71 -0
  166. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/support/platforms.rb +49 -0
  167. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/support/ruby_ext.rb +19 -0
  168. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/support/rubygems_ext.rb +30 -0
  169. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/support/rubygems_hax/rubygems_plugin.rb +9 -0
  170. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/support/sudo.rb +21 -0
  171. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/update/gems_spec.rb +86 -0
  172. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/update/git_spec.rb +159 -0
  173. data/vendor/ruby/1.8/gems/bundler-1.0.3/spec/update/source_spec.rb +50 -0
  174. data/vendor/ruby/1.8/gems/diff-lcs-1.1.2/ChangeLog +46 -0
  175. data/vendor/ruby/1.8/gems/diff-lcs-1.1.2/Install +6 -0
  176. data/vendor/ruby/1.8/gems/diff-lcs-1.1.2/README +76 -0
  177. data/vendor/ruby/1.8/gems/diff-lcs-1.1.2/Rakefile +116 -0
  178. data/vendor/ruby/1.8/gems/diff-lcs-1.1.2/bin/htmldiff +112 -0
  179. data/vendor/ruby/1.8/gems/diff-lcs-1.1.2/bin/ldiff +45 -0
  180. data/vendor/ruby/1.8/gems/diff-lcs-1.1.2/lib/diff/lcs/array.rb +21 -0
  181. data/vendor/ruby/1.8/gems/diff-lcs-1.1.2/lib/diff/lcs/block.rb +51 -0
  182. data/vendor/ruby/1.8/gems/diff-lcs-1.1.2/lib/diff/lcs/callbacks.rb +322 -0
  183. data/vendor/ruby/1.8/gems/diff-lcs-1.1.2/lib/diff/lcs/change.rb +169 -0
  184. data/vendor/ruby/1.8/gems/diff-lcs-1.1.2/lib/diff/lcs/hunk.rb +257 -0
  185. data/vendor/ruby/1.8/gems/diff-lcs-1.1.2/lib/diff/lcs/ldiff.rb +226 -0
  186. data/vendor/ruby/1.8/gems/diff-lcs-1.1.2/lib/diff/lcs/string.rb +19 -0
  187. data/vendor/ruby/1.8/gems/diff-lcs-1.1.2/lib/diff/lcs.rb +1105 -0
  188. data/vendor/ruby/1.8/gems/diff-lcs-1.1.2/tests/00test.rb +626 -0
  189. data/vendor/ruby/1.8/gems/gemcutter-0.6.1/MIT-LICENSE +22 -0
  190. data/vendor/ruby/1.8/gems/gemcutter-0.6.1/Rakefile +51 -0
  191. data/vendor/ruby/1.8/gems/gemcutter-0.6.1/lib/rubygems/commands/migrate_command.rb +14 -0
  192. data/vendor/ruby/1.8/gems/gemcutter-0.6.1/lib/rubygems/commands/tumble_command.rb +13 -0
  193. data/vendor/ruby/1.8/gems/gemcutter-0.6.1/lib/rubygems/commands/webhook_command.rb +117 -0
  194. data/vendor/ruby/1.8/gems/gemcutter-0.6.1/lib/rubygems/commands/yank_command.rb +72 -0
  195. data/vendor/ruby/1.8/gems/gemcutter-0.6.1/lib/rubygems_plugin.rb +7 -0
  196. data/vendor/ruby/1.8/gems/gemcutter-0.6.1/test/helper.rb +42 -0
  197. data/vendor/ruby/1.8/gems/gemcutter-0.6.1/test/webhook_command_test.rb +241 -0
  198. data/vendor/ruby/1.8/gems/gemcutter-0.6.1/test/yank_command_test.rb +85 -0
  199. data/vendor/ruby/1.8/gems/git-1.2.5/README +240 -0
  200. data/vendor/ruby/1.8/gems/git-1.2.5/lib/git/author.rb +14 -0
  201. data/vendor/ruby/1.8/gems/git-1.2.5/lib/git/base.rb +479 -0
  202. data/vendor/ruby/1.8/gems/git-1.2.5/lib/git/branch.rb +104 -0
  203. data/vendor/ruby/1.8/gems/git-1.2.5/lib/git/branches.rb +48 -0
  204. data/vendor/ruby/1.8/gems/git-1.2.5/lib/git/diff.rb +146 -0
  205. data/vendor/ruby/1.8/gems/git-1.2.5/lib/git/index.rb +5 -0
  206. data/vendor/ruby/1.8/gems/git-1.2.5/lib/git/lib.rb +719 -0
  207. data/vendor/ruby/1.8/gems/git-1.2.5/lib/git/log.rb +117 -0
  208. data/vendor/ruby/1.8/gems/git-1.2.5/lib/git/object.rb +273 -0
  209. data/vendor/ruby/1.8/gems/git-1.2.5/lib/git/path.rb +27 -0
  210. data/vendor/ruby/1.8/gems/git-1.2.5/lib/git/remote.rb +40 -0
  211. data/vendor/ruby/1.8/gems/git-1.2.5/lib/git/repository.rb +4 -0
  212. data/vendor/ruby/1.8/gems/git-1.2.5/lib/git/stash.rb +27 -0
  213. data/vendor/ruby/1.8/gems/git-1.2.5/lib/git/stashes.rb +44 -0
  214. data/vendor/ruby/1.8/gems/git-1.2.5/lib/git/status.rb +110 -0
  215. data/vendor/ruby/1.8/gems/git-1.2.5/lib/git/working_directory.rb +4 -0
  216. data/vendor/ruby/1.8/gems/git-1.2.5/lib/git.rb +156 -0
  217. data/vendor/ruby/1.8/gems/jeweler-1.4.0/.gitignore +10 -0
  218. data/vendor/ruby/1.8/gems/jeweler-1.4.0/ChangeLog.markdown +141 -0
  219. data/vendor/ruby/1.8/gems/jeweler-1.4.0/LICENSE +20 -0
  220. data/vendor/ruby/1.8/gems/jeweler-1.4.0/README.markdown +208 -0
  221. data/vendor/ruby/1.8/gems/jeweler-1.4.0/Rakefile +93 -0
  222. data/vendor/ruby/1.8/gems/jeweler-1.4.0/VERSION.yml +5 -0
  223. data/vendor/ruby/1.8/gems/jeweler-1.4.0/bin/jeweler +5 -0
  224. data/vendor/ruby/1.8/gems/jeweler-1.4.0/features/generator/cucumber.feature +83 -0
  225. data/vendor/ruby/1.8/gems/jeweler-1.4.0/features/generator/directory_layout.feature +76 -0
  226. data/vendor/ruby/1.8/gems/jeweler-1.4.0/features/generator/dotdocument.feature +14 -0
  227. data/vendor/ruby/1.8/gems/jeweler-1.4.0/features/generator/env_options.feature +9 -0
  228. data/vendor/ruby/1.8/gems/jeweler-1.4.0/features/generator/git.feature +94 -0
  229. data/vendor/ruby/1.8/gems/jeweler-1.4.0/features/generator/license.feature +11 -0
  230. data/vendor/ruby/1.8/gems/jeweler-1.4.0/features/generator/rakefile.feature +151 -0
  231. data/vendor/ruby/1.8/gems/jeweler-1.4.0/features/generator/readme.feature +12 -0
  232. data/vendor/ruby/1.8/gems/jeweler-1.4.0/features/generator/test.feature +48 -0
  233. data/vendor/ruby/1.8/gems/jeweler-1.4.0/features/generator/test_helper.feature +56 -0
  234. data/vendor/ruby/1.8/gems/jeweler-1.4.0/features/placeholder.feature +5 -0
  235. data/vendor/ruby/1.8/gems/jeweler-1.4.0/features/step_definitions/debug_steps.rb +6 -0
  236. data/vendor/ruby/1.8/gems/jeweler-1.4.0/features/step_definitions/filesystem_steps.rb +68 -0
  237. data/vendor/ruby/1.8/gems/jeweler-1.4.0/features/step_definitions/generator_steps.rb +291 -0
  238. data/vendor/ruby/1.8/gems/jeweler-1.4.0/features/step_definitions/task_steps.rb +6 -0
  239. data/vendor/ruby/1.8/gems/jeweler-1.4.0/features/support/env.rb +29 -0
  240. data/vendor/ruby/1.8/gems/jeweler-1.4.0/features/tasks/build_gem.feature +9 -0
  241. data/vendor/ruby/1.8/gems/jeweler-1.4.0/features/tasks/version.feature +31 -0
  242. data/vendor/ruby/1.8/gems/jeweler-1.4.0/features/tasks/version_bumping.feature +49 -0
  243. data/vendor/ruby/1.8/gems/jeweler-1.4.0/jeweler.gemspec +264 -0
  244. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/commands/build_gem.rb +36 -0
  245. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/commands/check_dependencies.rb +52 -0
  246. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/commands/install_gem.rb +30 -0
  247. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/commands/release_to_gemcutter.rb +27 -0
  248. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/commands/release_to_git.rb +57 -0
  249. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/commands/release_to_github.rb +66 -0
  250. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/commands/release_to_rubyforge.rb +52 -0
  251. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/commands/setup_rubyforge.rb +63 -0
  252. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/commands/validate_gemspec.rb +30 -0
  253. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/commands/version/base.rb +41 -0
  254. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/commands/version/bump_major.rb +13 -0
  255. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/commands/version/bump_minor.rb +12 -0
  256. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/commands/version/bump_patch.rb +14 -0
  257. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/commands/version/write.rb +12 -0
  258. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/commands/write_gemspec.rb +41 -0
  259. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/commands.rb +22 -0
  260. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/errors.rb +20 -0
  261. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/gemcutter_tasks.rb +36 -0
  262. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/gemspec_helper.rb +92 -0
  263. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/generator/application.rb +52 -0
  264. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/generator/bacon_mixin.rb +43 -0
  265. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/generator/github_mixin.rb +29 -0
  266. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/generator/micronaut_mixin.rb +41 -0
  267. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/generator/minitest_mixin.rb +42 -0
  268. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/generator/options.rb +159 -0
  269. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/generator/rdoc_mixin.rb +9 -0
  270. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/generator/riot_mixin.rb +42 -0
  271. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/generator/rspec_mixin.rb +42 -0
  272. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/generator/shoulda_mixin.rb +42 -0
  273. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/generator/testspec_mixin.rb +42 -0
  274. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/generator/testunit_mixin.rb +39 -0
  275. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/generator/yard_mixin.rb +14 -0
  276. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/generator.rb +270 -0
  277. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/rubyforge_tasks.rb +118 -0
  278. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/specification.rb +94 -0
  279. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/tasks.rb +178 -0
  280. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/templates/.document +5 -0
  281. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/templates/.gitignore +21 -0
  282. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/templates/LICENSE +20 -0
  283. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/templates/README.rdoc +17 -0
  284. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/templates/Rakefile +6 -0
  285. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/templates/bacon/flunking.rb +7 -0
  286. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/templates/bacon/helper.rb +8 -0
  287. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/templates/features/default.feature +9 -0
  288. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/templates/features/support/env.rb +8 -0
  289. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/templates/jeweler_tasks.erb +29 -0
  290. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/templates/micronaut/flunking.rb +7 -0
  291. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/templates/micronaut/helper.rb +17 -0
  292. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/templates/minitest/flunking.rb +7 -0
  293. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/templates/minitest/helper.rb +11 -0
  294. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/templates/other_tasks.erb +117 -0
  295. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/templates/riot/flunking.rb +11 -0
  296. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/templates/riot/helper.rb +3 -0
  297. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/templates/rspec/flunking.rb +7 -0
  298. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/templates/rspec/helper.rb +10 -0
  299. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/templates/rspec/spec.opts +1 -0
  300. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/templates/shoulda/flunking.rb +7 -0
  301. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/templates/shoulda/helper.rb +10 -0
  302. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/templates/testspec/flunking.rb +7 -0
  303. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/templates/testspec/helper.rb +7 -0
  304. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/templates/testunit/flunking.rb +7 -0
  305. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/templates/testunit/helper.rb +9 -0
  306. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler/version_helper.rb +137 -0
  307. data/vendor/ruby/1.8/gems/jeweler-1.4.0/lib/jeweler.rb +175 -0
  308. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/fixtures/bar/VERSION.yml +4 -0
  309. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/fixtures/bar/bin/foo_the_ultimate_bin +1 -0
  310. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/fixtures/bar/hey_include_me_in_gemspec +0 -0
  311. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/fixtures/bar/lib/foo_the_ultimate_lib.rb +1 -0
  312. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/fixtures/existing-project-with-version-constant/.document +5 -0
  313. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/fixtures/existing-project-with-version-constant/.gitignore +5 -0
  314. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/fixtures/existing-project-with-version-constant/LICENSE +20 -0
  315. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/fixtures/existing-project-with-version-constant/README.rdoc +7 -0
  316. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/fixtures/existing-project-with-version-constant/Rakefile +83 -0
  317. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/fixtures/existing-project-with-version-constant/existing-project-with-version.gemspec +29 -0
  318. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/fixtures/existing-project-with-version-constant/lib/existing_project_with_version.rb +0 -0
  319. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/fixtures/existing-project-with-version-constant/test/existing_project_with_version_test.rb +7 -0
  320. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/fixtures/existing-project-with-version-constant/test/test_helper.rb +10 -0
  321. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/fixtures/existing-project-with-version-plaintext/.document +5 -0
  322. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/fixtures/existing-project-with-version-plaintext/.gitignore +5 -0
  323. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/fixtures/existing-project-with-version-plaintext/LICENSE +20 -0
  324. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/fixtures/existing-project-with-version-plaintext/README.rdoc +7 -0
  325. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/fixtures/existing-project-with-version-plaintext/Rakefile +82 -0
  326. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/fixtures/existing-project-with-version-plaintext/VERSION +1 -0
  327. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/fixtures/existing-project-with-version-plaintext/existing-project-with-version.gemspec +29 -0
  328. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/fixtures/existing-project-with-version-plaintext/lib/existing_project_with_version.rb +0 -0
  329. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/fixtures/existing-project-with-version-plaintext/test/existing_project_with_version_test.rb +7 -0
  330. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/fixtures/existing-project-with-version-plaintext/test/test_helper.rb +10 -0
  331. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/fixtures/existing-project-with-version-yaml/.document +5 -0
  332. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/fixtures/existing-project-with-version-yaml/.gitignore +5 -0
  333. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/fixtures/existing-project-with-version-yaml/LICENSE +20 -0
  334. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/fixtures/existing-project-with-version-yaml/README.rdoc +7 -0
  335. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/fixtures/existing-project-with-version-yaml/Rakefile +82 -0
  336. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/fixtures/existing-project-with-version-yaml/VERSION.yml +4 -0
  337. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/fixtures/existing-project-with-version-yaml/bin/foo_the_ultimate_bin +0 -0
  338. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/fixtures/existing-project-with-version-yaml/existing-project-with-version.gemspec +29 -0
  339. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/fixtures/existing-project-with-version-yaml/lib/existing_project_with_version.rb +0 -0
  340. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/fixtures/existing-project-with-version-yaml/test/existing_project_with_version_test.rb +7 -0
  341. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/fixtures/existing-project-with-version-yaml/test/test_helper.rb +10 -0
  342. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/geminstaller.yml +12 -0
  343. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/jeweler/commands/test_build_gem.rb +103 -0
  344. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/jeweler/commands/test_install_gem.rb +35 -0
  345. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/jeweler/commands/test_release_to_gemcutter.rb +39 -0
  346. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/jeweler/commands/test_release_to_git.rb +201 -0
  347. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/jeweler/commands/test_release_to_github.rb +323 -0
  348. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/jeweler/commands/test_release_to_rubyforge.rb +153 -0
  349. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/jeweler/commands/test_setup_rubyforge.rb +178 -0
  350. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/jeweler/commands/test_validate_gemspec.rb +27 -0
  351. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/jeweler/commands/test_write_gemspec.rb +101 -0
  352. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/jeweler/commands/version/test_base.rb +32 -0
  353. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/jeweler/commands/version/test_bump_major.rb +22 -0
  354. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/jeweler/commands/version/test_bump_minor.rb +19 -0
  355. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/jeweler/commands/version/test_bump_patch.rb +20 -0
  356. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/jeweler/commands/version/test_write.rb +22 -0
  357. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/jeweler/generator/test_application.rb +112 -0
  358. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/jeweler/generator/test_options.rb +231 -0
  359. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/jeweler/test_gemspec_helper.rb +44 -0
  360. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/jeweler/test_generator.rb +122 -0
  361. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/jeweler/test_generator_initialization.rb +164 -0
  362. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/jeweler/test_generator_mixins.rb +23 -0
  363. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/jeweler/test_specification.rb +231 -0
  364. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/jeweler/test_tasks.rb +50 -0
  365. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/jeweler/test_version_helper.rb +214 -0
  366. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/shoulda_macros/jeweler_macros.rb +35 -0
  367. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/test_helper.rb +180 -0
  368. data/vendor/ruby/1.8/gems/jeweler-1.4.0/test/test_jeweler.rb +187 -0
  369. data/vendor/ruby/1.8/gems/json_pure-1.4.6/CHANGES +179 -0
  370. data/vendor/ruby/1.8/gems/json_pure-1.4.6/COPYING +58 -0
  371. data/vendor/ruby/1.8/gems/json_pure-1.4.6/GPL +340 -0
  372. data/vendor/ruby/1.8/gems/json_pure-1.4.6/README +356 -0
  373. data/vendor/ruby/1.8/gems/json_pure-1.4.6/Rakefile +292 -0
  374. data/vendor/ruby/1.8/gems/json_pure-1.4.6/TODO +1 -0
  375. data/vendor/ruby/1.8/gems/json_pure-1.4.6/VERSION +1 -0
  376. data/vendor/ruby/1.8/gems/json_pure-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkComparison.log +52 -0
  377. data/vendor/ruby/1.8/gems/json_pure-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_fast-autocorrelation.dat +1000 -0
  378. data/vendor/ruby/1.8/gems/json_pure-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_fast.dat +1001 -0
  379. data/vendor/ruby/1.8/gems/json_pure-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_pretty-autocorrelation.dat +900 -0
  380. data/vendor/ruby/1.8/gems/json_pure-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_pretty.dat +901 -0
  381. data/vendor/ruby/1.8/gems/json_pure-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_safe-autocorrelation.dat +1000 -0
  382. data/vendor/ruby/1.8/gems/json_pure-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_safe.dat +1001 -0
  383. data/vendor/ruby/1.8/gems/json_pure-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt.log +261 -0
  384. data/vendor/ruby/1.8/gems/json_pure-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_fast-autocorrelation.dat +1000 -0
  385. data/vendor/ruby/1.8/gems/json_pure-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_fast.dat +1001 -0
  386. data/vendor/ruby/1.8/gems/json_pure-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_pretty-autocorrelation.dat +1000 -0
  387. data/vendor/ruby/1.8/gems/json_pure-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_pretty.dat +1001 -0
  388. data/vendor/ruby/1.8/gems/json_pure-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_safe-autocorrelation.dat +1000 -0
  389. data/vendor/ruby/1.8/gems/json_pure-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_safe.dat +1001 -0
  390. data/vendor/ruby/1.8/gems/json_pure-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure.log +262 -0
  391. data/vendor/ruby/1.8/gems/json_pure-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails#generator-autocorrelation.dat +1000 -0
  392. data/vendor/ruby/1.8/gems/json_pure-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails#generator.dat +1001 -0
  393. data/vendor/ruby/1.8/gems/json_pure-1.4.6/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails.log +82 -0
  394. data/vendor/ruby/1.8/gems/json_pure-1.4.6/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkComparison.log +34 -0
  395. data/vendor/ruby/1.8/gems/json_pure-1.4.6/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt#parser-autocorrelation.dat +900 -0
  396. data/vendor/ruby/1.8/gems/json_pure-1.4.6/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt#parser.dat +901 -0
  397. data/vendor/ruby/1.8/gems/json_pure-1.4.6/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt.log +81 -0
  398. data/vendor/ruby/1.8/gems/json_pure-1.4.6/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure#parser-autocorrelation.dat +1000 -0
  399. data/vendor/ruby/1.8/gems/json_pure-1.4.6/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure#parser.dat +1001 -0
  400. data/vendor/ruby/1.8/gems/json_pure-1.4.6/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure.log +82 -0
  401. data/vendor/ruby/1.8/gems/json_pure-1.4.6/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails#parser-autocorrelation.dat +1000 -0
  402. data/vendor/ruby/1.8/gems/json_pure-1.4.6/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails#parser.dat +1001 -0
  403. data/vendor/ruby/1.8/gems/json_pure-1.4.6/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails.log +82 -0
  404. data/vendor/ruby/1.8/gems/json_pure-1.4.6/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML#parser-autocorrelation.dat +1000 -0
  405. data/vendor/ruby/1.8/gems/json_pure-1.4.6/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML#parser.dat +1001 -0
  406. data/vendor/ruby/1.8/gems/json_pure-1.4.6/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML.log +82 -0
  407. data/vendor/ruby/1.8/gems/json_pure-1.4.6/benchmarks/generator2_benchmark.rb +222 -0
  408. data/vendor/ruby/1.8/gems/json_pure-1.4.6/benchmarks/generator_benchmark.rb +224 -0
  409. data/vendor/ruby/1.8/gems/json_pure-1.4.6/benchmarks/ohai.json +1216 -0
  410. data/vendor/ruby/1.8/gems/json_pure-1.4.6/benchmarks/ohai.ruby +1 -0
  411. data/vendor/ruby/1.8/gems/json_pure-1.4.6/benchmarks/parser2_benchmark.rb +251 -0
  412. data/vendor/ruby/1.8/gems/json_pure-1.4.6/benchmarks/parser_benchmark.rb +259 -0
  413. data/vendor/ruby/1.8/gems/json_pure-1.4.6/bin/edit_json.rb +9 -0
  414. data/vendor/ruby/1.8/gems/json_pure-1.4.6/bin/prettify_json.rb +75 -0
  415. data/vendor/ruby/1.8/gems/json_pure-1.4.6/data/example.json +1 -0
  416. data/vendor/ruby/1.8/gems/json_pure-1.4.6/data/index.html +38 -0
  417. data/vendor/ruby/1.8/gems/json_pure-1.4.6/data/prototype.js +4184 -0
  418. data/vendor/ruby/1.8/gems/json_pure-1.4.6/ext/json/ext/generator/extconf.rb +20 -0
  419. data/vendor/ruby/1.8/gems/json_pure-1.4.6/ext/json/ext/generator/generator.c +1417 -0
  420. data/vendor/ruby/1.8/gems/json_pure-1.4.6/ext/json/ext/generator/generator.h +197 -0
  421. data/vendor/ruby/1.8/gems/json_pure-1.4.6/ext/json/ext/parser/extconf.rb +15 -0
  422. data/vendor/ruby/1.8/gems/json_pure-1.4.6/ext/json/ext/parser/parser.c +1935 -0
  423. data/vendor/ruby/1.8/gems/json_pure-1.4.6/ext/json/ext/parser/parser.h +71 -0
  424. data/vendor/ruby/1.8/gems/json_pure-1.4.6/ext/json/ext/parser/parser.rl +792 -0
  425. data/vendor/ruby/1.8/gems/json_pure-1.4.6/install.rb +26 -0
  426. data/vendor/ruby/1.8/gems/json_pure-1.4.6/lib/json/Array.xpm +21 -0
  427. data/vendor/ruby/1.8/gems/json_pure-1.4.6/lib/json/FalseClass.xpm +21 -0
  428. data/vendor/ruby/1.8/gems/json_pure-1.4.6/lib/json/Hash.xpm +21 -0
  429. data/vendor/ruby/1.8/gems/json_pure-1.4.6/lib/json/Key.xpm +73 -0
  430. data/vendor/ruby/1.8/gems/json_pure-1.4.6/lib/json/NilClass.xpm +21 -0
  431. data/vendor/ruby/1.8/gems/json_pure-1.4.6/lib/json/Numeric.xpm +28 -0
  432. data/vendor/ruby/1.8/gems/json_pure-1.4.6/lib/json/String.xpm +96 -0
  433. data/vendor/ruby/1.8/gems/json_pure-1.4.6/lib/json/TrueClass.xpm +21 -0
  434. data/vendor/ruby/1.8/gems/json_pure-1.4.6/lib/json/add/core.rb +148 -0
  435. data/vendor/ruby/1.8/gems/json_pure-1.4.6/lib/json/add/rails.rb +58 -0
  436. data/vendor/ruby/1.8/gems/json_pure-1.4.6/lib/json/common.rb +391 -0
  437. data/vendor/ruby/1.8/gems/json_pure-1.4.6/lib/json/editor.rb +1371 -0
  438. data/vendor/ruby/1.8/gems/json_pure-1.4.6/lib/json/ext.rb +15 -0
  439. data/vendor/ruby/1.8/gems/json_pure-1.4.6/lib/json/json.xpm +1499 -0
  440. data/vendor/ruby/1.8/gems/json_pure-1.4.6/lib/json/pure/generator.rb +439 -0
  441. data/vendor/ruby/1.8/gems/json_pure-1.4.6/lib/json/pure/parser.rb +309 -0
  442. data/vendor/ruby/1.8/gems/json_pure-1.4.6/lib/json/pure.rb +77 -0
  443. data/vendor/ruby/1.8/gems/json_pure-1.4.6/lib/json/version.rb +8 -0
  444. data/vendor/ruby/1.8/gems/json_pure-1.4.6/lib/json.rb +10 -0
  445. data/vendor/ruby/1.8/gems/json_pure-1.4.6/tests/fixtures/fail1.json +1 -0
  446. data/vendor/ruby/1.8/gems/json_pure-1.4.6/tests/fixtures/fail10.json +1 -0
  447. data/vendor/ruby/1.8/gems/json_pure-1.4.6/tests/fixtures/fail11.json +1 -0
  448. data/vendor/ruby/1.8/gems/json_pure-1.4.6/tests/fixtures/fail12.json +1 -0
  449. data/vendor/ruby/1.8/gems/json_pure-1.4.6/tests/fixtures/fail13.json +1 -0
  450. data/vendor/ruby/1.8/gems/json_pure-1.4.6/tests/fixtures/fail14.json +1 -0
  451. data/vendor/ruby/1.8/gems/json_pure-1.4.6/tests/fixtures/fail18.json +1 -0
  452. data/vendor/ruby/1.8/gems/json_pure-1.4.6/tests/fixtures/fail19.json +1 -0
  453. data/vendor/ruby/1.8/gems/json_pure-1.4.6/tests/fixtures/fail2.json +1 -0
  454. data/vendor/ruby/1.8/gems/json_pure-1.4.6/tests/fixtures/fail20.json +1 -0
  455. data/vendor/ruby/1.8/gems/json_pure-1.4.6/tests/fixtures/fail21.json +1 -0
  456. data/vendor/ruby/1.8/gems/json_pure-1.4.6/tests/fixtures/fail22.json +1 -0
  457. data/vendor/ruby/1.8/gems/json_pure-1.4.6/tests/fixtures/fail23.json +1 -0
  458. data/vendor/ruby/1.8/gems/json_pure-1.4.6/tests/fixtures/fail24.json +1 -0
  459. data/vendor/ruby/1.8/gems/json_pure-1.4.6/tests/fixtures/fail25.json +1 -0
  460. data/vendor/ruby/1.8/gems/json_pure-1.4.6/tests/fixtures/fail27.json +2 -0
  461. data/vendor/ruby/1.8/gems/json_pure-1.4.6/tests/fixtures/fail28.json +2 -0
  462. data/vendor/ruby/1.8/gems/json_pure-1.4.6/tests/fixtures/fail3.json +1 -0
  463. data/vendor/ruby/1.8/gems/json_pure-1.4.6/tests/fixtures/fail4.json +1 -0
  464. data/vendor/ruby/1.8/gems/json_pure-1.4.6/tests/fixtures/fail5.json +1 -0
  465. data/vendor/ruby/1.8/gems/json_pure-1.4.6/tests/fixtures/fail6.json +1 -0
  466. data/vendor/ruby/1.8/gems/json_pure-1.4.6/tests/fixtures/fail7.json +1 -0
  467. data/vendor/ruby/1.8/gems/json_pure-1.4.6/tests/fixtures/fail8.json +1 -0
  468. data/vendor/ruby/1.8/gems/json_pure-1.4.6/tests/fixtures/fail9.json +1 -0
  469. data/vendor/ruby/1.8/gems/json_pure-1.4.6/tests/fixtures/pass1.json +56 -0
  470. data/vendor/ruby/1.8/gems/json_pure-1.4.6/tests/fixtures/pass15.json +1 -0
  471. data/vendor/ruby/1.8/gems/json_pure-1.4.6/tests/fixtures/pass16.json +1 -0
  472. data/vendor/ruby/1.8/gems/json_pure-1.4.6/tests/fixtures/pass17.json +1 -0
  473. data/vendor/ruby/1.8/gems/json_pure-1.4.6/tests/fixtures/pass2.json +1 -0
  474. data/vendor/ruby/1.8/gems/json_pure-1.4.6/tests/fixtures/pass26.json +1 -0
  475. data/vendor/ruby/1.8/gems/json_pure-1.4.6/tests/fixtures/pass3.json +6 -0
  476. data/vendor/ruby/1.8/gems/json_pure-1.4.6/tests/test_json.rb +394 -0
  477. data/vendor/ruby/1.8/gems/json_pure-1.4.6/tests/test_json_addition.rb +162 -0
  478. data/vendor/ruby/1.8/gems/json_pure-1.4.6/tests/test_json_encoding.rb +68 -0
  479. data/vendor/ruby/1.8/gems/json_pure-1.4.6/tests/test_json_fixtures.rb +34 -0
  480. data/vendor/ruby/1.8/gems/json_pure-1.4.6/tests/test_json_generate.rb +181 -0
  481. data/vendor/ruby/1.8/gems/json_pure-1.4.6/tests/test_json_rails.rb +144 -0
  482. data/vendor/ruby/1.8/gems/json_pure-1.4.6/tests/test_json_unicode.rb +76 -0
  483. data/vendor/ruby/1.8/gems/json_pure-1.4.6/tools/fuzz.rb +139 -0
  484. data/vendor/ruby/1.8/gems/json_pure-1.4.6/tools/server.rb +61 -0
  485. data/vendor/ruby/1.8/gems/mime-types-1.16/History.txt +107 -0
  486. data/vendor/ruby/1.8/gems/mime-types-1.16/Install.txt +17 -0
  487. data/vendor/ruby/1.8/gems/mime-types-1.16/Licence.txt +15 -0
  488. data/vendor/ruby/1.8/gems/mime-types-1.16/Manifest.txt +12 -0
  489. data/vendor/ruby/1.8/gems/mime-types-1.16/README.txt +28 -0
  490. data/vendor/ruby/1.8/gems/mime-types-1.16/Rakefile +316 -0
  491. data/vendor/ruby/1.8/gems/mime-types-1.16/lib/mime/types.rb +751 -0
  492. data/vendor/ruby/1.8/gems/mime-types-1.16/lib/mime/types.rb.data +1324 -0
  493. data/vendor/ruby/1.8/gems/mime-types-1.16/mime-types.gemspec +43 -0
  494. data/vendor/ruby/1.8/gems/mime-types-1.16/setup.rb +1585 -0
  495. data/vendor/ruby/1.8/gems/mime-types-1.16/test/test_mime_type.rb +356 -0
  496. data/vendor/ruby/1.8/gems/mime-types-1.16/test/test_mime_types.rb +122 -0
  497. data/vendor/ruby/1.8/gems/rest-client-1.6.1/README.rdoc +269 -0
  498. data/vendor/ruby/1.8/gems/rest-client-1.6.1/Rakefile +69 -0
  499. data/vendor/ruby/1.8/gems/rest-client-1.6.1/VERSION +1 -0
  500. data/vendor/ruby/1.8/gems/rest-client-1.6.1/bin/restclient +87 -0
  501. data/vendor/ruby/1.8/gems/rest-client-1.6.1/history.md +94 -0
  502. data/vendor/ruby/1.8/gems/rest-client-1.6.1/lib/rest-client.rb +2 -0
  503. data/vendor/ruby/1.8/gems/rest-client-1.6.1/lib/rest_client.rb +2 -0
  504. data/vendor/ruby/1.8/gems/rest-client-1.6.1/lib/restclient/abstract_response.rb +102 -0
  505. data/vendor/ruby/1.8/gems/rest-client-1.6.1/lib/restclient/exceptions.rb +181 -0
  506. data/vendor/ruby/1.8/gems/rest-client-1.6.1/lib/restclient/net_http_ext.rb +21 -0
  507. data/vendor/ruby/1.8/gems/rest-client-1.6.1/lib/restclient/payload.rb +220 -0
  508. data/vendor/ruby/1.8/gems/rest-client-1.6.1/lib/restclient/raw_response.rb +34 -0
  509. data/vendor/ruby/1.8/gems/rest-client-1.6.1/lib/restclient/request.rb +300 -0
  510. data/vendor/ruby/1.8/gems/rest-client-1.6.1/lib/restclient/resource.rb +152 -0
  511. data/vendor/ruby/1.8/gems/rest-client-1.6.1/lib/restclient/response.rb +24 -0
  512. data/vendor/ruby/1.8/gems/rest-client-1.6.1/lib/restclient.rb +165 -0
  513. data/vendor/ruby/1.8/gems/rest-client-1.6.1/spec/abstract_response_spec.rb +67 -0
  514. data/vendor/ruby/1.8/gems/rest-client-1.6.1/spec/base.rb +16 -0
  515. data/vendor/ruby/1.8/gems/rest-client-1.6.1/spec/exceptions_spec.rb +79 -0
  516. data/vendor/ruby/1.8/gems/rest-client-1.6.1/spec/integration/certs/equifax.crt +19 -0
  517. data/vendor/ruby/1.8/gems/rest-client-1.6.1/spec/integration/certs/verisign.crt +14 -0
  518. data/vendor/ruby/1.8/gems/rest-client-1.6.1/spec/integration/request_spec.rb +25 -0
  519. data/vendor/ruby/1.8/gems/rest-client-1.6.1/spec/integration_spec.rb +38 -0
  520. data/vendor/ruby/1.8/gems/rest-client-1.6.1/spec/master_shake.jpg +0 -0
  521. data/vendor/ruby/1.8/gems/rest-client-1.6.1/spec/payload_spec.rb +219 -0
  522. data/vendor/ruby/1.8/gems/rest-client-1.6.1/spec/raw_response_spec.rb +17 -0
  523. data/vendor/ruby/1.8/gems/rest-client-1.6.1/spec/request2_spec.rb +17 -0
  524. data/vendor/ruby/1.8/gems/rest-client-1.6.1/spec/request_spec.rb +529 -0
  525. data/vendor/ruby/1.8/gems/rest-client-1.6.1/spec/resource_spec.rb +124 -0
  526. data/vendor/ruby/1.8/gems/rest-client-1.6.1/spec/response_spec.rb +157 -0
  527. data/vendor/ruby/1.8/gems/rest-client-1.6.1/spec/restclient_spec.rb +68 -0
  528. data/vendor/ruby/1.8/gems/rspec-2.0.0/.document +2 -0
  529. data/vendor/ruby/1.8/gems/rspec-2.0.0/.gitignore +7 -0
  530. data/vendor/ruby/1.8/gems/rspec-2.0.0/Gemfile +6 -0
  531. data/vendor/ruby/1.8/gems/rspec-2.0.0/License.txt +22 -0
  532. data/vendor/ruby/1.8/gems/rspec-2.0.0/README.markdown +30 -0
  533. data/vendor/ruby/1.8/gems/rspec-2.0.0/Rakefile +16 -0
  534. data/vendor/ruby/1.8/gems/rspec-2.0.0/lib/rspec/version.rb +5 -0
  535. data/vendor/ruby/1.8/gems/rspec-2.0.0/lib/rspec.rb +4 -0
  536. data/vendor/ruby/1.8/gems/rspec-2.0.0/rspec.gemspec +29 -0
  537. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/.document +5 -0
  538. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/.gitignore +11 -0
  539. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/.treasure_map.rb +23 -0
  540. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/Gemfile +26 -0
  541. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/History.markdown +63 -0
  542. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/License.txt +22 -0
  543. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/README.markdown +88 -0
  544. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/Rakefile +72 -0
  545. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/Upgrade.markdown +235 -0
  546. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/autotest/discover.rb +2 -0
  547. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/bin/rspec +2 -0
  548. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/cucumber.yml +2 -0
  549. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/features/README.markdown +19 -0
  550. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/features/command_line/configure.feature +20 -0
  551. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/features/command_line/example_name_option.feature +86 -0
  552. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/features/command_line/exit_status.feature +52 -0
  553. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/features/command_line/line_number_appended_to_path.feature +104 -0
  554. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/features/command_line/line_number_option.feature +43 -0
  555. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/features/command_line/rake_task.feature +68 -0
  556. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/features/configuration/custom_settings.feature +84 -0
  557. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/features/configuration/fail_fast.feature +77 -0
  558. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/features/configuration/read_options_from_file.feature +74 -0
  559. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/features/example_groups/basic_structure.feature +54 -0
  560. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/features/example_groups/shared_example_group.feature +177 -0
  561. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/features/filtering/exclusion_filters.feature +115 -0
  562. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/features/filtering/inclusion_filters.feature +83 -0
  563. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/features/filtering/run_all_when_everything_filtered.feature +46 -0
  564. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/features/formatters/custom_formatter.feature +32 -0
  565. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/features/hooks/around_hooks.feature +313 -0
  566. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/features/hooks/before_and_after_hooks.feature +432 -0
  567. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/features/hooks/halt.feature +26 -0
  568. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/features/metadata/described_class.feature +14 -0
  569. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/features/mock_framework_integration/use_flexmock.feature +23 -0
  570. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/features/mock_framework_integration/use_mocha.feature +23 -0
  571. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/features/mock_framework_integration/use_rr.feature +23 -0
  572. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/features/mock_framework_integration/use_rspec.feature +23 -0
  573. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/features/pending/pending_examples.feature +97 -0
  574. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/features/spec_files/arbitrary_file_suffix.feature +13 -0
  575. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/features/subject/attribute_of_subject.feature +44 -0
  576. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/features/subject/explicit_subject.feature +67 -0
  577. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/features/subject/implicit_subject.feature +31 -0
  578. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/features/support/env.rb +1 -0
  579. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/autotest/rspec2.rb +66 -0
  580. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/autorun.rb +2 -0
  581. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/backward_compatibility.rb +29 -0
  582. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/command_line.rb +34 -0
  583. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/command_line_configuration.rb +62 -0
  584. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/configuration.rb +373 -0
  585. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/configuration_options.rb +99 -0
  586. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/deprecation.rb +45 -0
  587. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/drb_command_line.rb +29 -0
  588. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/errors.rb +14 -0
  589. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/example.rb +144 -0
  590. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/example_group.rb +312 -0
  591. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/extensions/instance_eval_with_args.rb +39 -0
  592. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/extensions/kernel.rb +5 -0
  593. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/extensions/module_eval_with_args.rb +34 -0
  594. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/extensions/object.rb +15 -0
  595. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/extensions.rb +4 -0
  596. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/formatters/base_formatter.rb +167 -0
  597. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/formatters/base_text_formatter.rb +151 -0
  598. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/formatters/documentation_formatter.rb +71 -0
  599. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/formatters/helpers.rb +28 -0
  600. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/formatters/html_formatter.rb +351 -0
  601. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/formatters/progress_formatter.rb +32 -0
  602. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/formatters/snippet_extractor.rb +52 -0
  603. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/formatters/text_mate_formatter.rb +18 -0
  604. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/hooks.rb +134 -0
  605. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/let.rb +101 -0
  606. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/load_path.rb +3 -0
  607. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/metadata.rb +183 -0
  608. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/mocking/with_absolutely_nothing.rb +11 -0
  609. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/mocking/with_flexmock.rb +25 -0
  610. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/mocking/with_mocha.rb +21 -0
  611. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/mocking/with_rr.rb +25 -0
  612. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/mocking/with_rspec.rb +21 -0
  613. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/option_parser.rb +105 -0
  614. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/pending.rb +19 -0
  615. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/rake_task.rb +174 -0
  616. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/reporter.rb +78 -0
  617. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/ruby_project.rb +44 -0
  618. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/runner.rb +61 -0
  619. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/shared_example_group.rb +52 -0
  620. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/subject.rb +171 -0
  621. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/version.rb +7 -0
  622. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core/world.rb +97 -0
  623. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/core.rb +80 -0
  624. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/monkey/spork/test_framework/rspec.rb +7 -0
  625. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/lib/rspec/monkey.rb +1 -0
  626. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/rspec-core.gemspec +45 -0
  627. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/script/console +8 -0
  628. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/autotest/failed_results_re_spec.rb +20 -0
  629. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/autotest/rspec_spec.rb +123 -0
  630. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core/command_line_configuration_spec.rb +26 -0
  631. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core/command_line_spec.rb +123 -0
  632. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core/command_line_spec_output.txt +0 -0
  633. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core/configuration_options_spec.rb +305 -0
  634. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core/configuration_spec.rb +579 -0
  635. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core/deprecations_spec.rb +29 -0
  636. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core/drb_command_line_spec.rb +159 -0
  637. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core/example_group_spec.rb +778 -0
  638. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core/example_spec.rb +167 -0
  639. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core/formatters/base_formatter_spec.rb +36 -0
  640. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core/formatters/base_text_formatter_spec.rb +160 -0
  641. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core/formatters/documentation_formatter_spec.rb +66 -0
  642. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core/formatters/helpers_spec.rb +46 -0
  643. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core/formatters/html_formatted-1.8.6.html +280 -0
  644. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core/formatters/html_formatted-1.8.7-jruby.html +285 -0
  645. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core/formatters/html_formatted-1.8.7.html +283 -0
  646. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core/formatters/html_formatted-1.9.1.html +283 -0
  647. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core/formatters/html_formatted-1.9.2.html +283 -0
  648. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core/formatters/html_formatter_spec.rb +81 -0
  649. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core/formatters/progress_formatter_spec.rb +31 -0
  650. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core/formatters/snippet_extractor_spec.rb +18 -0
  651. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core/formatters/text_mate_formatted-1.8.6.html +280 -0
  652. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core/formatters/text_mate_formatted-1.8.7-jruby.html +280 -0
  653. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core/formatters/text_mate_formatted-1.8.7.html +280 -0
  654. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core/formatters/text_mate_formatted-1.9.1.html +280 -0
  655. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core/formatters/text_mate_formatted-1.9.2.html +280 -0
  656. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core/formatters/text_mate_formatter_spec.rb +70 -0
  657. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core/hooks_filtering_spec.rb +124 -0
  658. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core/hooks_spec.rb +57 -0
  659. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core/kernel_extensions_spec.rb +9 -0
  660. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core/let_spec.rb +42 -0
  661. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core/metadata_spec.rb +305 -0
  662. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core/option_parser_spec.rb +39 -0
  663. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core/pending_example_spec.rb +85 -0
  664. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core/rake_task_spec.rb +148 -0
  665. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core/reporter_spec.rb +70 -0
  666. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core/resources/a_bar.rb +0 -0
  667. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core/resources/a_foo.rb +0 -0
  668. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core/resources/a_spec.rb +1 -0
  669. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core/resources/custom_example_group_runner.rb +14 -0
  670. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core/resources/formatter_specs.rb +36 -0
  671. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core/resources/utf8_encoded.rb +8 -0
  672. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core/ruby_project_spec.rb +24 -0
  673. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core/runner_spec.rb +47 -0
  674. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core/shared_example_group_spec.rb +152 -0
  675. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core/subject_spec.rb +63 -0
  676. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core/world_spec.rb +163 -0
  677. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/rspec/core_spec.rb +31 -0
  678. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/ruby_forker.rb +13 -0
  679. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/spec_helper.rb +84 -0
  680. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/spec/support/matchers.rb +44 -0
  681. data/vendor/ruby/1.8/gems/rspec-core-2.0.0/specs.watchr +58 -0
  682. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/.document +5 -0
  683. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/.gitignore +10 -0
  684. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/Gemfile +20 -0
  685. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/History.markdown +37 -0
  686. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/License.txt +22 -0
  687. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/README.markdown +23 -0
  688. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/Rakefile +70 -0
  689. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/Upgrade.markdown +53 -0
  690. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/cucumber.yml +3 -0
  691. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/features/README.markdown +18 -0
  692. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/features/expectations/attribute_of_subject.feature +19 -0
  693. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/features/expectations/customized_message.feature +54 -0
  694. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/features/expectations/diffing.feature +85 -0
  695. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/features/expectations/implicit_docstrings.feature +52 -0
  696. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/features/matchers/access_running_example.feature +53 -0
  697. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/features/matchers/define_diffable_matcher.feature +27 -0
  698. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/features/matchers/define_matcher.feature +311 -0
  699. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/features/matchers/define_matcher_outside_rspec.feature +38 -0
  700. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/features/matchers/define_matcher_with_fluent_interface.feature +24 -0
  701. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/features/matchers/equality.feature +142 -0
  702. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/features/matchers/expect_change.feature +65 -0
  703. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/features/matchers/expect_error.feature +44 -0
  704. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/features/matchers/have.feature +103 -0
  705. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/features/matchers/include.feature +136 -0
  706. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/features/matchers/operators.feature +280 -0
  707. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/features/matchers/predicates.feature +128 -0
  708. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/features/matchers/respond_to.feature +78 -0
  709. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/features/step_definitions/additional_cli_steps.rb +13 -0
  710. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/features/support/env.rb +1 -0
  711. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/features/test_frameworks/test_unit.feature +29 -0
  712. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/expectations/backward_compatibility.rb +16 -0
  713. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/expectations/differ.rb +62 -0
  714. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/expectations/errors.rb +12 -0
  715. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/expectations/extensions/array.rb +7 -0
  716. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/expectations/extensions/kernel.rb +52 -0
  717. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/expectations/extensions/rspec/core/example_group.rb +19 -0
  718. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/expectations/extensions.rb +3 -0
  719. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/expectations/fail_with.rb +51 -0
  720. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/expectations/handler.rb +50 -0
  721. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/expectations/version.rb +7 -0
  722. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/expectations.rb +38 -0
  723. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/matchers/be.rb +222 -0
  724. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/matchers/be_close.rb +32 -0
  725. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/matchers/be_instance_of.rb +26 -0
  726. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/matchers/be_kind_of.rb +26 -0
  727. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/matchers/change.rb +184 -0
  728. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/matchers/compatibility.rb +14 -0
  729. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/matchers/dsl.rb +21 -0
  730. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/matchers/eq.rb +50 -0
  731. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/matchers/eql.rb +45 -0
  732. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/matchers/equal.rb +53 -0
  733. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/matchers/errors.rb +5 -0
  734. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/matchers/exist.rb +16 -0
  735. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/matchers/extensions/instance_exec.rb +31 -0
  736. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/matchers/generated_descriptions.rb +36 -0
  737. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/matchers/has.rb +35 -0
  738. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/matchers/have.rb +151 -0
  739. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/matchers/include.rb +51 -0
  740. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/matchers/match.rb +21 -0
  741. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/matchers/match_array.rb +71 -0
  742. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/matchers/matcher.rb +161 -0
  743. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/matchers/method_missing.rb +9 -0
  744. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/matchers/operator_matcher.rb +78 -0
  745. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/matchers/pretty.rb +37 -0
  746. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/matchers/raise_error.rb +130 -0
  747. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/matchers/respond_to.rb +85 -0
  748. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/matchers/satisfy.rb +51 -0
  749. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/matchers/throw_symbol.rb +104 -0
  750. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec/matchers.rb +198 -0
  751. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/lib/rspec-expectations.rb +1 -0
  752. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/rspec-expectations.gemspec +31 -0
  753. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/spec/rspec/expectations/differ_spec.rb +96 -0
  754. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/spec/rspec/expectations/extensions/kernel_spec.rb +45 -0
  755. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/spec/rspec/expectations/fail_with_spec.rb +70 -0
  756. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/spec/rspec/expectations/handler_spec.rb +206 -0
  757. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/spec/rspec/matchers/be_close_spec.rb +50 -0
  758. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/spec/rspec/matchers/be_instance_of_spec.rb +36 -0
  759. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/spec/rspec/matchers/be_kind_of_spec.rb +33 -0
  760. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/spec/rspec/matchers/be_spec.rb +452 -0
  761. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/spec/rspec/matchers/change_spec.rb +409 -0
  762. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/spec/rspec/matchers/compatibility_spec.rb +28 -0
  763. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/spec/rspec/matchers/description_generation_spec.rb +160 -0
  764. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/spec/rspec/matchers/dsl_spec.rb +25 -0
  765. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/spec/rspec/matchers/eq_spec.rb +38 -0
  766. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/spec/rspec/matchers/eql_spec.rb +37 -0
  767. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/spec/rspec/matchers/equal_spec.rb +57 -0
  768. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/spec/rspec/matchers/exist_spec.rb +65 -0
  769. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/spec/rspec/matchers/has_spec.rb +81 -0
  770. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/spec/rspec/matchers/have_spec.rb +401 -0
  771. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/spec/rspec/matchers/include_spec.rb +341 -0
  772. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/spec/rspec/matchers/match_array_spec.rb +111 -0
  773. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/spec/rspec/matchers/match_spec.rb +57 -0
  774. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/spec/rspec/matchers/matcher_spec.rb +366 -0
  775. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/spec/rspec/matchers/matchers_spec.rb +51 -0
  776. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/spec/rspec/matchers/operator_matcher_spec.rb +189 -0
  777. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/spec/rspec/matchers/raise_error_spec.rb +339 -0
  778. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/spec/rspec/matchers/respond_to_spec.rb +292 -0
  779. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/spec/rspec/matchers/satisfy_spec.rb +40 -0
  780. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/spec/rspec/matchers/throw_symbol_spec.rb +96 -0
  781. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/spec/spec_helper.rb +53 -0
  782. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/spec/suite.rb +1 -0
  783. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/spec/support/classes.rb +45 -0
  784. data/vendor/ruby/1.8/gems/rspec-expectations-2.0.0/specs.watchr +57 -0
  785. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/.autotest +7 -0
  786. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/.document +5 -0
  787. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/.gitignore +10 -0
  788. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/Gemfile +17 -0
  789. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/History.markdown +26 -0
  790. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/License.txt +22 -0
  791. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/README.markdown +45 -0
  792. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/Rakefile +70 -0
  793. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/autotest/discover.rb +1 -0
  794. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/cucumber.yml +2 -0
  795. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/features/README.markdown +30 -0
  796. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/features/message_expectations/block_local_expectations.feature.pending +55 -0
  797. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/features/message_expectations/expect_message.feature +94 -0
  798. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/features/message_expectations/warn_when_expectation_is_set_on_nil.feature +50 -0
  799. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/features/outside_rspec/configuration.feature +82 -0
  800. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/features/stubs/simple_return_value.feature +55 -0
  801. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/features/stubs/stub_chain.feature +44 -0
  802. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/features/stubs/stub_implementation.feature +26 -0
  803. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/features/support/env.rb +2 -0
  804. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/lib/rspec/mocks/argument_expectation.rb +48 -0
  805. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/lib/rspec/mocks/argument_matchers.rb +233 -0
  806. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/lib/rspec/mocks/error_generator.rb +97 -0
  807. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/lib/rspec/mocks/errors.rb +10 -0
  808. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/lib/rspec/mocks/extensions/instance_exec.rb +31 -0
  809. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/lib/rspec/mocks/extensions/object.rb +3 -0
  810. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/lib/rspec/mocks/framework.rb +17 -0
  811. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/lib/rspec/mocks/message_expectation.rb +341 -0
  812. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/lib/rspec/mocks/method_double.rb +165 -0
  813. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/lib/rspec/mocks/methods.rb +100 -0
  814. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/lib/rspec/mocks/mock.rb +79 -0
  815. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/lib/rspec/mocks/order_group.rb +29 -0
  816. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/lib/rspec/mocks/proxy.rb +157 -0
  817. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/lib/rspec/mocks/serialization.rb +24 -0
  818. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/lib/rspec/mocks/space.rb +28 -0
  819. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/lib/rspec/mocks/spec_methods.rb +53 -0
  820. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/lib/rspec/mocks/version.rb +7 -0
  821. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/lib/rspec/mocks.rb +196 -0
  822. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/lib/spec/mocks.rb +2 -0
  823. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/rspec-mocks.gemspec +28 -0
  824. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/spec/rspec/mocks/and_yield_spec.rb +114 -0
  825. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/spec/rspec/mocks/any_number_of_times_spec.rb +36 -0
  826. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/spec/rspec/mocks/argument_expectation_spec.rb +23 -0
  827. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/spec/rspec/mocks/at_least_spec.rb +97 -0
  828. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/spec/rspec/mocks/at_most_spec.rb +93 -0
  829. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/spec/rspec/mocks/block_return_value_spec.rb +45 -0
  830. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/spec/rspec/mocks/bug_report_10260_spec.rb +8 -0
  831. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/spec/rspec/mocks/bug_report_10263_spec.rb +27 -0
  832. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/spec/rspec/mocks/bug_report_11545_spec.rb +32 -0
  833. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/spec/rspec/mocks/bug_report_15719_spec.rb +29 -0
  834. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/spec/rspec/mocks/bug_report_496_spec.rb +17 -0
  835. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/spec/rspec/mocks/bug_report_600_spec.rb +22 -0
  836. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/spec/rspec/mocks/bug_report_7611_spec.rb +18 -0
  837. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/spec/rspec/mocks/bug_report_7805_spec.rb +22 -0
  838. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/spec/rspec/mocks/bug_report_8165_spec.rb +31 -0
  839. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/spec/rspec/mocks/bug_report_8302_spec.rb +26 -0
  840. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/spec/rspec/mocks/bug_report_830_spec.rb +21 -0
  841. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/spec/rspec/mocks/bug_report_957_spec.rb +22 -0
  842. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/spec/rspec/mocks/double_spec.rb +12 -0
  843. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/spec/rspec/mocks/failing_argument_matchers_spec.rb +96 -0
  844. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/spec/rspec/mocks/hash_including_matcher_spec.rb +90 -0
  845. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/spec/rspec/mocks/hash_not_including_matcher_spec.rb +67 -0
  846. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/spec/rspec/mocks/mock_ordering_spec.rb +94 -0
  847. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/spec/rspec/mocks/mock_space_spec.rb +54 -0
  848. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/spec/rspec/mocks/mock_spec.rb +661 -0
  849. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/spec/rspec/mocks/multiple_return_value_spec.rb +133 -0
  850. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/spec/rspec/mocks/nil_expectation_warning_spec.rb +63 -0
  851. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/spec/rspec/mocks/null_object_mock_spec.rb +73 -0
  852. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/spec/rspec/mocks/once_counts_spec.rb +53 -0
  853. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/spec/rspec/mocks/options_hash_spec.rb +35 -0
  854. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/spec/rspec/mocks/partial_mock_spec.rb +155 -0
  855. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/spec/rspec/mocks/partial_mock_using_mocks_directly_spec.rb +94 -0
  856. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/spec/rspec/mocks/passing_argument_matchers_spec.rb +145 -0
  857. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/spec/rspec/mocks/precise_counts_spec.rb +52 -0
  858. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/spec/rspec/mocks/record_messages_spec.rb +26 -0
  859. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/spec/rspec/mocks/serialization_spec.rb +69 -0
  860. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/spec/rspec/mocks/stash_spec.rb +27 -0
  861. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/spec/rspec/mocks/stub_chain_spec.rb +114 -0
  862. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/spec/rspec/mocks/stub_implementation_spec.rb +68 -0
  863. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/spec/rspec/mocks/stub_spec.rb +232 -0
  864. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/spec/rspec/mocks/stubbed_message_expectations_spec.rb +26 -0
  865. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/spec/rspec/mocks/twice_counts_spec.rb +67 -0
  866. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/spec/rspec/mocks_spec.rb +51 -0
  867. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/spec/spec_helper.rb +52 -0
  868. data/vendor/ruby/1.8/gems/rspec-mocks-2.0.0/specs.watchr +57 -0
  869. data/vendor/ruby/1.8/gems/rubyforge-2.0.4/History.txt +128 -0
  870. data/vendor/ruby/1.8/gems/rubyforge-2.0.4/Manifest.txt +9 -0
  871. data/vendor/ruby/1.8/gems/rubyforge-2.0.4/README.txt +55 -0
  872. data/vendor/ruby/1.8/gems/rubyforge-2.0.4/Rakefile +40 -0
  873. data/vendor/ruby/1.8/gems/rubyforge-2.0.4/bin/rubyforge +222 -0
  874. data/vendor/ruby/1.8/gems/rubyforge-2.0.4/lib/rubyforge/client.rb +124 -0
  875. data/vendor/ruby/1.8/gems/rubyforge-2.0.4/lib/rubyforge.rb +389 -0
  876. data/vendor/ruby/1.8/gems/rubyforge-2.0.4/test/test_rubyforge.rb +329 -0
  877. data/vendor/ruby/1.8/gems/rubyforge-2.0.4/test/test_rubyforge_client.rb +57 -0
  878. data/vendor/ruby/1.8/specifications/bundler-1.0.3.gemspec +37 -0
  879. data/vendor/ruby/1.8/specifications/diff-lcs-1.1.2.gemspec +34 -0
  880. data/vendor/ruby/1.8/specifications/gemcutter-0.6.1.gemspec +56 -0
  881. data/vendor/ruby/1.8/specifications/git-1.2.5.gemspec +30 -0
  882. data/vendor/ruby/1.8/specifications/jeweler-1.4.0.gemspec +66 -0
  883. data/vendor/ruby/1.8/specifications/json_pure-1.4.6.gemspec +33 -0
  884. data/vendor/ruby/1.8/specifications/mime-types-1.16.gemspec +44 -0
  885. data/vendor/ruby/1.8/specifications/rest-client-1.6.1.gemspec +36 -0
  886. data/vendor/ruby/1.8/specifications/rspec-2.0.0.gemspec +39 -0
  887. data/vendor/ruby/1.8/specifications/rspec-core-2.0.0.gemspec +66 -0
  888. data/vendor/ruby/1.8/specifications/rspec-expectations-2.0.0.gemspec +46 -0
  889. data/vendor/ruby/1.8/specifications/rspec-mocks-2.0.0.gemspec +37 -0
  890. data/vendor/ruby/1.8/specifications/rubyforge-2.0.4.gemspec +43 -0
  891. metadata +956 -0
@@ -0,0 +1,1105 @@
1
+ #! /usr/env/bin ruby
2
+ #--
3
+ # Copyright 2004 Austin Ziegler <diff-lcs@halostatue.ca>
4
+ # adapted from:
5
+ # Algorithm::Diff (Perl) by Ned Konz <perl@bike-nomad.com>
6
+ # Smalltalk by Mario I. Wolczko <mario@wolczko.com>
7
+ # implements McIlroy-Hunt diff algorithm
8
+ #
9
+ # This program is free software. It may be redistributed and/or modified
10
+ # under the terms of the GPL version 2 (or later), the Perl Artistic
11
+ # licence, or the Ruby licence.
12
+ #
13
+ # $Id: lcs.rb,v 1.9 2004/10/17 20:31:10 austin Exp $
14
+ #++
15
+
16
+ module Diff
17
+ # = Diff::LCS 1.1.2
18
+ # Computes "intelligent" differences between two sequenced Enumerables.
19
+ # This is an implementation of the McIlroy-Hunt "diff" algorithm for
20
+ # Enumerable objects that include Diffable.
21
+ #
22
+ # Based on Mario I. Wolczko's <mario@wolczko.com> Smalltalk version
23
+ # (1.2, 1993) and Ned Konz's <perl@bike-nomad.com> Perl version
24
+ # (Algorithm::Diff).
25
+ #
26
+ # == Synopsis
27
+ # require 'diff/lcs'
28
+ #
29
+ # seq1 = %w(a b c e h j l m n p)
30
+ # seq2 = %w(b c d e f j k l m r s t)
31
+ #
32
+ # lcs = Diff::LCS.LCS(seq1, seq2)
33
+ # diffs = Diff::LCS.diff(seq1, seq2)
34
+ # sdiff = Diff::LCS.sdiff(seq1, seq2)
35
+ # seq = Diff::LCS.traverse_sequences(seq1, seq2, callback_obj)
36
+ # bal = Diff::LCS.traverse_balanced(seq1, seq2, callback_obj)
37
+ # seq2 == Diff::LCS.patch(seq1, diffs)
38
+ # seq2 == Diff::LCS.patch!(seq1, diffs)
39
+ # seq1 == Diff::LCS.unpatch(seq2, diffs)
40
+ # seq1 == Diff::LCS.unpatch!(seq2, diffs)
41
+ # seq2 == Diff::LCS.patch(seq1, sdiff)
42
+ # seq2 == Diff::LCS.patch!(seq1, sdiff)
43
+ # seq1 == Diff::LCS.unpatch(seq2, sdiff)
44
+ # seq1 == Diff::LCS.unpatch!(seq2, sdiff)
45
+ #
46
+ # Alternatively, objects can be extended with Diff::LCS:
47
+ #
48
+ # seq1.extend(Diff::LCS)
49
+ # lcs = seq1.lcs(seq2)
50
+ # diffs = seq1.diff(seq2)
51
+ # sdiff = seq1.sdiff(seq2)
52
+ # seq = seq1.traverse_sequences(seq2, callback_obj)
53
+ # bal = seq1.traverse_balanced(seq2, callback_obj)
54
+ # seq2 == seq1.patch(diffs)
55
+ # seq2 == seq1.patch!(diffs)
56
+ # seq1 == seq2.unpatch(diffs)
57
+ # seq1 == seq2.unpatch!(diffs)
58
+ # seq2 == seq1.patch(sdiff)
59
+ # seq2 == seq1.patch!(sdiff)
60
+ # seq1 == seq2.unpatch(sdiff)
61
+ # seq1 == seq2.unpatch!(sdiff)
62
+ #
63
+ # Default extensions are provided for Array and String objects through
64
+ # the use of 'diff/lcs/array' and 'diff/lcs/string'.
65
+ #
66
+ # == Introduction (by Mark-Jason Dominus)
67
+ #
68
+ # <em>The following text is from the Perl documentation. The only
69
+ # changes have been to make the text appear better in Rdoc</em>.
70
+ #
71
+ # I once read an article written by the authors of +diff+; they said
72
+ # that they hard worked very hard on the algorithm until they found the
73
+ # right one.
74
+ #
75
+ # I think what they ended up using (and I hope someone will correct me,
76
+ # because I am not very confident about this) was the `longest common
77
+ # subsequence' method. In the LCS problem, you have two sequences of
78
+ # items:
79
+ #
80
+ # a b c d f g h j q z
81
+ # a b c d e f g i j k r x y z
82
+ #
83
+ # and you want to find the longest sequence of items that is present in
84
+ # both original sequences in the same order. That is, you want to find a
85
+ # new sequence *S* which can be obtained from the first sequence by
86
+ # deleting some items, and from the second sequence by deleting other
87
+ # items. You also want *S* to be as long as possible. In this case *S*
88
+ # is:
89
+ #
90
+ # a b c d f g j z
91
+ #
92
+ # From there it's only a small step to get diff-like output:
93
+ #
94
+ # e h i k q r x y
95
+ # + - + + - + + +
96
+ #
97
+ # This module solves the LCS problem. It also includes a canned function
98
+ # to generate +diff+-like output.
99
+ #
100
+ # It might seem from the example above that the LCS of two sequences is
101
+ # always pretty obvious, but that's not always the case, especially when
102
+ # the two sequences have many repeated elements. For example, consider
103
+ #
104
+ # a x b y c z p d q
105
+ # a b c a x b y c z
106
+ #
107
+ # A naive approach might start by matching up the +a+ and +b+ that
108
+ # appear at the beginning of each sequence, like this:
109
+ #
110
+ # a x b y c z p d q
111
+ # a b c a b y c z
112
+ #
113
+ # This finds the common subsequence +a b c z+. But actually, the LCS is
114
+ # +a x b y c z+:
115
+ #
116
+ # a x b y c z p d q
117
+ # a b c a x b y c z
118
+ #
119
+ # == Author
120
+ # This version is by Austin Ziegler <diff-lcs@halostatue.ca>.
121
+ #
122
+ # It is based on the Perl Algorithm::Diff by Ned Konz
123
+ # <perl@bike-nomad.com>, copyright &copy; 2000 - 2002 and the Smalltalk
124
+ # diff version by Mario I. Wolczko <mario@wolczko.com>, copyright &copy;
125
+ # 1993. Documentation includes work by Mark-Jason Dominus.
126
+ #
127
+ # == Licence
128
+ # Copyright &copy; 2004 Austin Ziegler
129
+ # This program is free software; you can redistribute it and/or modify it
130
+ # under the same terms as Ruby, or alternatively under the Perl Artistic
131
+ # licence.
132
+ #
133
+ # == Credits
134
+ # Much of the documentation is taken directly from the Perl
135
+ # Algorithm::Diff implementation and was written originally by Mark-Jason
136
+ # Dominus <mjd-perl-diff@plover.com> and later by Ned Konz. The basic Ruby
137
+ # implementation was re-ported from the Smalltalk implementation, available
138
+ # at ftp://st.cs.uiuc.edu/pub/Smalltalk/MANCHESTER/manchester/4.0/diff.st
139
+ #
140
+ # #sdiff and #traverse_balanced were written for the Perl version by Mike
141
+ # Schilli <m@perlmeister.com>.
142
+ #
143
+ # "The algorithm is described in <em>A Fast Algorithm for Computing Longest
144
+ # Common Subsequences</em>, CACM, vol.20, no.5, pp.350-353, May 1977, with
145
+ # a few minor improvements to improve the speed."
146
+ module LCS
147
+ VERSION = '1.1.2'
148
+ end
149
+ end
150
+
151
+ require 'diff/lcs/callbacks'
152
+
153
+ module Diff::LCS
154
+ # Returns an Array containing the longest common subsequence(s) between
155
+ # +self+ and +other+. See Diff::LCS#LCS.
156
+ #
157
+ # lcs = seq1.lcs(seq2)
158
+ def lcs(other, &block) #:yields self[ii] if there are matched subsequences:
159
+ Diff::LCS.LCS(self, other, &block)
160
+ end
161
+
162
+ # Returns the difference set between +self+ and +other+. See
163
+ # Diff::LCS#diff.
164
+ def diff(other, callbacks = nil, &block)
165
+ Diff::LCS::diff(self, other, callbacks, &block)
166
+ end
167
+
168
+ # Returns the balanced ("side-by-side") difference set between +self+ and
169
+ # +other+. See Diff::LCS#sdiff.
170
+ def sdiff(other, callbacks = nil, &block)
171
+ Diff::LCS::sdiff(self, other, callbacks, &block)
172
+ end
173
+
174
+ # Traverses the discovered longest common subsequences between +self+ and
175
+ # +other+. See Diff::LCS#traverse_sequences.
176
+ def traverse_sequences(other, callbacks = nil, &block)
177
+ traverse_sequences(self, other, callbacks || Diff::LCS::YieldingCallbacks,
178
+ &block)
179
+ end
180
+
181
+ # Traverses the discovered longest common subsequences between +self+ and
182
+ # +other+ using the alternate, balanced algorithm. See
183
+ # Diff::LCS#traverse_balanced.
184
+ def traverse_balanced(other, callbacks = nil, &block)
185
+ traverse_balanced(self, other, callbacks || Diff::LCS::YieldingCallbacks,
186
+ &block)
187
+ end
188
+
189
+ # Attempts to patch a copy of +self+ with the provided +patchset+. See
190
+ # Diff::LCS#patch.
191
+ def patch(patchset)
192
+ Diff::LCS::patch(self.dup, patchset)
193
+ end
194
+
195
+ # Attempts to unpatch a copy of +self+ with the provided +patchset+.
196
+ # See Diff::LCS#patch.
197
+ def unpatch(patchset)
198
+ Diff::LCS::unpatch(self.dup, patchset)
199
+ end
200
+
201
+ # Attempts to patch +self+ with the provided +patchset+. See
202
+ # Diff::LCS#patch!. Does no autodiscovery.
203
+ def patch!(patchset)
204
+ Diff::LCS::patch!(self, patchset)
205
+ end
206
+
207
+ # Attempts to unpatch +self+ with the provided +patchset+. See
208
+ # Diff::LCS#unpatch. Does no autodiscovery.
209
+ def unpatch!(patchset)
210
+ Diff::LCS::unpatch!(self, patchset)
211
+ end
212
+ end
213
+
214
+ module Diff::LCS
215
+ class << self
216
+ # Given two sequenced Enumerables, LCS returns an Array containing their
217
+ # longest common subsequences.
218
+ #
219
+ # lcs = Diff::LCS.LCS(seq1, seq2)
220
+ #
221
+ # This array whose contents is such that:
222
+ #
223
+ # lcs.each_with_index do |ee, ii|
224
+ # assert(ee.nil? || (seq1[ii] == seq2[ee]))
225
+ # end
226
+ #
227
+ # If a block is provided, the matching subsequences will be yielded from
228
+ # +seq1+ in turn and may be modified before they are placed into the
229
+ # returned Array of subsequences.
230
+ def LCS(seq1, seq2, &block) #:yields seq1[ii] for each matched:
231
+ matches = Diff::LCS.__lcs(seq1, seq2)
232
+ ret = []
233
+ matches.each_with_index do |ee, ii|
234
+ unless matches[ii].nil?
235
+ if block_given?
236
+ ret << (yield seq1[ii])
237
+ else
238
+ ret << seq1[ii]
239
+ end
240
+ end
241
+ end
242
+ ret
243
+ end
244
+
245
+ # Diff::LCS.diff computes the smallest set of additions and deletions
246
+ # necessary to turn the first sequence into the second, and returns a
247
+ # description of these changes.
248
+ #
249
+ # See Diff::LCS::DiffCallbacks for the default behaviour. An alternate
250
+ # behaviour may be implemented with Diff::LCS::ContextDiffCallbacks.
251
+ # If a Class argument is provided for +callbacks+, #diff will attempt
252
+ # to initialise it. If the +callbacks+ object (possibly initialised)
253
+ # responds to #finish, it will be called.
254
+ def diff(seq1, seq2, callbacks = nil, &block) # :yields diff changes:
255
+ callbacks ||= Diff::LCS::DiffCallbacks
256
+ if callbacks.kind_of?(Class)
257
+ cb = callbacks.new rescue callbacks
258
+ callbacks = cb
259
+ end
260
+ traverse_sequences(seq1, seq2, callbacks)
261
+ callbacks.finish if callbacks.respond_to?(:finish)
262
+
263
+ if block_given?
264
+ res = callbacks.diffs.map do |hunk|
265
+ if hunk.kind_of?(Array)
266
+ hunk = hunk.map { |block| yield block }
267
+ else
268
+ yield hunk
269
+ end
270
+ end
271
+ res
272
+ else
273
+ callbacks.diffs
274
+ end
275
+ end
276
+
277
+ # Diff::LCS.sdiff computes all necessary components to show two sequences
278
+ # and their minimized differences side by side, just like the Unix
279
+ # utility <em>sdiff</em> does:
280
+ #
281
+ # old < -
282
+ # same same
283
+ # before | after
284
+ # - > new
285
+ #
286
+ # See Diff::LCS::SDiffCallbacks for the default behaviour. An alternate
287
+ # behaviour may be implemented with Diff::LCS::ContextDiffCallbacks. If
288
+ # a Class argument is provided for +callbacks+, #diff will attempt to
289
+ # initialise it. If the +callbacks+ object (possibly initialised)
290
+ # responds to #finish, it will be called.
291
+ def sdiff(seq1, seq2, callbacks = nil, &block) #:yields diff changes:
292
+ callbacks ||= Diff::LCS::SDiffCallbacks
293
+ if callbacks.kind_of?(Class)
294
+ cb = callbacks.new rescue callbacks
295
+ callbacks = cb
296
+ end
297
+ traverse_balanced(seq1, seq2, callbacks)
298
+ callbacks.finish if callbacks.respond_to?(:finish)
299
+
300
+ if block_given?
301
+ res = callbacks.diffs.map do |hunk|
302
+ if hunk.kind_of?(Array)
303
+ hunk = hunk.map { |block| yield block }
304
+ else
305
+ yield hunk
306
+ end
307
+ end
308
+ res
309
+ else
310
+ callbacks.diffs
311
+ end
312
+ end
313
+
314
+ # Diff::LCS.traverse_sequences is the most general facility provided by this
315
+ # module; +diff+ and +LCS+ are implemented as calls to it.
316
+ #
317
+ # The arguments to #traverse_sequences are the two sequences to
318
+ # traverse, and a callback object, like this:
319
+ #
320
+ # traverse_sequences(seq1, seq2, Diff::LCS::ContextDiffCallbacks.new)
321
+ #
322
+ # #diff is implemented with #traverse_sequences.
323
+ #
324
+ # == Callback Methods
325
+ # Optional callback methods are <em>emphasized</em>.
326
+ #
327
+ # callbacks#match:: Called when +a+ and +b+ are pointing
328
+ # to common elements in +A+ and +B+.
329
+ # callbacks#discard_a:: Called when +a+ is pointing to an
330
+ # element not in +B+.
331
+ # callbacks#discard_b:: Called when +b+ is pointing to an
332
+ # element not in +A+.
333
+ # <em>callbacks#finished_a</em>:: Called when +a+ has reached the end of
334
+ # sequence +A+.
335
+ # <em>callbacks#finished_b</em>:: Called when +b+ has reached the end of
336
+ # sequence +B+.
337
+ #
338
+ # == Algorithm
339
+ # a---+
340
+ # v
341
+ # A = a b c e h j l m n p
342
+ # B = b c d e f j k l m r s t
343
+ # ^
344
+ # b---+
345
+ #
346
+ # If there are two arrows (+a+ and +b+) pointing to elements of
347
+ # sequences +A+ and +B+, the arrows will initially point to the first
348
+ # elements of their respective sequences. #traverse_sequences will
349
+ # advance the arrows through the sequences one element at a time,
350
+ # calling a method on the user-specified callback object before each
351
+ # advance. It will advance the arrows in such a way that if there are
352
+ # elements <tt>A[ii]</tt> and <tt>B[jj]</tt> which are both equal and
353
+ # part of the longest common subsequence, there will be some moment
354
+ # during the execution of #traverse_sequences when arrow +a+ is pointing
355
+ # to <tt>A[ii]</tt> and arrow +b+ is pointing to <tt>B[jj]</tt>. When
356
+ # this happens, #traverse_sequences will call <tt>callbacks#match</tt>
357
+ # and then it will advance both arrows.
358
+ #
359
+ # Otherwise, one of the arrows is pointing to an element of its sequence
360
+ # that is not part of the longest common subsequence.
361
+ # #traverse_sequences will advance that arrow and will call
362
+ # <tt>callbacks#discard_a</tt> or <tt>callbacks#discard_b</tt>, depending
363
+ # on which arrow it advanced. If both arrows point to elements that are
364
+ # not part of the longest common subsequence, then #traverse_sequences
365
+ # will advance one of them and call the appropriate callback, but it is
366
+ # not specified which it will call.
367
+ #
368
+ # The methods for <tt>callbacks#match</tt>, <tt>callbacks#discard_a</tt>,
369
+ # and <tt>callbacks#discard_b</tt> are invoked with an event comprising
370
+ # the action ("=", "+", or "-", respectively), the indicies +ii+ and
371
+ # +jj+, and the elements <tt>A[ii]</tt> and <tt>B[jj]</tt>. Return
372
+ # values are discarded by #traverse_sequences.
373
+ #
374
+ # === End of Sequences
375
+ # If arrow +a+ reaches the end of its sequence before arrow +b+ does,
376
+ # #traverse_sequence try to call <tt>callbacks#finished_a</tt> with the
377
+ # last index and element of +A+ (<tt>A[-1]</tt>) and the current index
378
+ # and element of +B+ (<tt>B[jj]</tt>). If <tt>callbacks#finished_a</tt>
379
+ # does not exist, then <tt>callbacks#discard_b</tt> will be called on
380
+ # each element of +B+ until the end of the sequence is reached (the call
381
+ # will be done with <tt>A[-1]</tt> and <tt>B[jj]</tt> for each element).
382
+ #
383
+ # If +b+ reaches the end of +B+ before +a+ reaches the end of +A+,
384
+ # <tt>callbacks#finished_b</tt> will be called with the current index
385
+ # and element of +A+ (<tt>A[ii]</tt>) and the last index and element of
386
+ # +B+ (<tt>A[-1]</tt>). Again, if <tt>callbacks#finished_b</tt> does not
387
+ # exist on the callback object, then <tt>callbacks#discard_a</tt> will
388
+ # be called on each element of +A+ until the end of the sequence is
389
+ # reached (<tt>A[ii]</tt> and <tt>B[-1]</tt>).
390
+ #
391
+ # There is a chance that one additional <tt>callbacks#discard_a</tt> or
392
+ # <tt>callbacks#discard_b</tt> will be called after the end of the
393
+ # sequence is reached, if +a+ has not yet reached the end of +A+ or +b+
394
+ # has not yet reached the end of +B+.
395
+ def traverse_sequences(seq1, seq2, callbacks = Diff::LCS::SequenceCallbacks, &block) #:yields change events:
396
+ matches = Diff::LCS.__lcs(seq1, seq2)
397
+
398
+ run_finished_a = run_finished_b = false
399
+ string = seq1.kind_of?(String)
400
+
401
+ a_size = seq1.size
402
+ b_size = seq2.size
403
+ ai = bj = 0
404
+
405
+ (0 .. matches.size).each do |ii|
406
+ b_line = matches[ii]
407
+
408
+ ax = string ? seq1[ii, 1] : seq1[ii]
409
+ bx = string ? seq2[bj, 1] : seq2[bj]
410
+
411
+ if b_line.nil?
412
+ unless ax.nil?
413
+ event = Diff::LCS::ContextChange.new('-', ii, ax, bj, bx)
414
+ event = yield event if block_given?
415
+ callbacks.discard_a(event)
416
+ end
417
+ else
418
+ loop do
419
+ break unless bj < b_line
420
+ bx = string ? seq2[bj, 1] : seq2[bj]
421
+ event = Diff::LCS::ContextChange.new('+', ii, ax, bj, bx)
422
+ event = yield event if block_given?
423
+ callbacks.discard_b(event)
424
+ bj += 1
425
+ end
426
+ bx = string ? seq2[bj, 1] : seq2[bj]
427
+ event = Diff::LCS::ContextChange.new('=', ii, ax, bj, bx)
428
+ event = yield event if block_given?
429
+ callbacks.match(event)
430
+ bj += 1
431
+ end
432
+ ai = ii
433
+ end
434
+ ai += 1
435
+
436
+ # The last entry (if any) processed was a match. +ai+ and +bj+ point
437
+ # just past the last matching lines in their sequences.
438
+ while (ai < a_size) or (bj < b_size)
439
+ # last A?
440
+ if ai == a_size and bj < b_size
441
+ if callbacks.respond_to?(:finished_a) and not run_finished_a
442
+ ax = string ? seq1[-1, 1] : seq1[-1]
443
+ bx = string ? seq2[bj, 1] : seq2[bj]
444
+ event = Diff::LCS::ContextChange.new('>', (a_size - 1), ax, bj, bx)
445
+ event = yield event if block_given?
446
+ callbacks.finished_a(event)
447
+ run_finished_a = true
448
+ else
449
+ ax = string ? seq1[ai, 1] : seq1[ai]
450
+ loop do
451
+ bx = string ? seq2[bj, 1] : seq2[bj]
452
+ event = Diff::LCS::ContextChange.new('+', ai, ax, bj, bx)
453
+ event = yield event if block_given?
454
+ callbacks.discard_b(event)
455
+ bj += 1
456
+ break unless bj < b_size
457
+ end
458
+ end
459
+ end
460
+
461
+ # last B?
462
+ if bj == b_size and ai < a_size
463
+ if callbacks.respond_to?(:finished_b) and not run_finished_b
464
+ ax = string ? seq1[ai, 1] : seq1[ai]
465
+ bx = string ? seq2[-1, 1] : seq2[-1]
466
+ event = Diff::LCS::ContextChange.new('<', ai, ax, (b_size - 1), bx)
467
+ event = yield event if block_given?
468
+ callbacks.finished_b(event)
469
+ run_finished_b = true
470
+ else
471
+ bx = string ? seq2[bj, 1] : seq2[bj]
472
+ loop do
473
+ ax = string ? seq1[ai, 1] : seq1[ai]
474
+ event = Diff::LCS::ContextChange.new('-', ai, ax, bj, bx)
475
+ event = yield event if block_given?
476
+ callbacks.discard_a(event)
477
+ ai += 1
478
+ break unless bj < b_size
479
+ end
480
+ end
481
+ end
482
+
483
+ if ai < a_size
484
+ ax = string ? seq1[ai, 1] : seq1[ai]
485
+ bx = string ? seq2[bj, 1] : seq2[bj]
486
+ event = Diff::LCS::ContextChange.new('-', ai, ax, bj, bx)
487
+ event = yield event if block_given?
488
+ callbacks.discard_a(event)
489
+ ai += 1
490
+ end
491
+
492
+ if bj < b_size
493
+ ax = string ? seq1[ai, 1] : seq1[ai]
494
+ bx = string ? seq2[bj, 1] : seq2[bj]
495
+ event = Diff::LCS::ContextChange.new('+', ai, ax, bj, bx)
496
+ event = yield event if block_given?
497
+ callbacks.discard_b(event)
498
+ bj += 1
499
+ end
500
+ end
501
+ end
502
+
503
+ # #traverse_balanced is an alternative to #traverse_sequences. It
504
+ # uses a different algorithm to iterate through the entries in the
505
+ # computed longest common subsequence. Instead of viewing the changes as
506
+ # insertions or deletions from one of the sequences, #traverse_balanced
507
+ # will report <em>changes</em> between the sequences. To represent a
508
+ #
509
+ # The arguments to #traverse_balanced are the two sequences to traverse
510
+ # and a callback object, like this:
511
+ #
512
+ # traverse_balanced(seq1, seq2, Diff::LCS::ContextDiffCallbacks.new)
513
+ #
514
+ # #sdiff is implemented with #traverse_balanced.
515
+ #
516
+ # == Callback Methods
517
+ # Optional callback methods are <em>emphasized</em>.
518
+ #
519
+ # callbacks#match:: Called when +a+ and +b+ are pointing
520
+ # to common elements in +A+ and +B+.
521
+ # callbacks#discard_a:: Called when +a+ is pointing to an
522
+ # element not in +B+.
523
+ # callbacks#discard_b:: Called when +b+ is pointing to an
524
+ # element not in +A+.
525
+ # <em>callbacks#change</em>:: Called when +a+ and +b+ are pointing
526
+ # to the same relative position, but
527
+ # <tt>A[a]</tt> and <tt>B[b]</tt> are
528
+ # not the same; a <em>change</em> has
529
+ # occurred.
530
+ #
531
+ # #traverse_balanced might be a bit slower than #traverse_sequences,
532
+ # noticable only while processing huge amounts of data.
533
+ #
534
+ # The +sdiff+ function of this module is implemented as call to
535
+ # #traverse_balanced.
536
+ #
537
+ # == Algorithm
538
+ # a---+
539
+ # v
540
+ # A = a b c e h j l m n p
541
+ # B = b c d e f j k l m r s t
542
+ # ^
543
+ # b---+
544
+ #
545
+ # === Matches
546
+ # If there are two arrows (+a+ and +b+) pointing to elements of
547
+ # sequences +A+ and +B+, the arrows will initially point to the first
548
+ # elements of their respective sequences. #traverse_sequences will
549
+ # advance the arrows through the sequences one element at a time,
550
+ # calling a method on the user-specified callback object before each
551
+ # advance. It will advance the arrows in such a way that if there are
552
+ # elements <tt>A[ii]</tt> and <tt>B[jj]</tt> which are both equal and
553
+ # part of the longest common subsequence, there will be some moment
554
+ # during the execution of #traverse_sequences when arrow +a+ is pointing
555
+ # to <tt>A[ii]</tt> and arrow +b+ is pointing to <tt>B[jj]</tt>. When
556
+ # this happens, #traverse_sequences will call <tt>callbacks#match</tt>
557
+ # and then it will advance both arrows.
558
+ #
559
+ # === Discards
560
+ # Otherwise, one of the arrows is pointing to an element of its sequence
561
+ # that is not part of the longest common subsequence.
562
+ # #traverse_sequences will advance that arrow and will call
563
+ # <tt>callbacks#discard_a</tt> or <tt>callbacks#discard_b</tt>,
564
+ # depending on which arrow it advanced.
565
+ #
566
+ # === Changes
567
+ # If both +a+ and +b+ point to elements that are not part of the longest
568
+ # common subsequence, then #traverse_sequences will try to call
569
+ # <tt>callbacks#change</tt> and advance both arrows. If
570
+ # <tt>callbacks#change</tt> is not implemented, then
571
+ # <tt>callbacks#discard_a</tt> and <tt>callbacks#discard_b</tt> will be
572
+ # called in turn.
573
+ #
574
+ # The methods for <tt>callbacks#match</tt>, <tt>callbacks#discard_a</tt>,
575
+ # <tt>callbacks#discard_b</tt>, and <tt>callbacks#change</tt> are
576
+ # invoked with an event comprising the action ("=", "+", "-", or "!",
577
+ # respectively), the indicies +ii+ and +jj+, and the elements
578
+ # <tt>A[ii]</tt> and <tt>B[jj]</tt>. Return values are discarded by
579
+ # #traverse_balanced.
580
+ #
581
+ # === Context
582
+ # Note that +ii+ and +jj+ may not be the same index position, even if
583
+ # +a+ and +b+ are considered to be pointing to matching or changed
584
+ # elements.
585
+ def traverse_balanced(seq1, seq2, callbacks = Diff::LCS::BalancedCallbacks)
586
+ matches = Diff::LCS.__lcs(seq1, seq2)
587
+ a_size = seq1.size
588
+ b_size = seq2.size
589
+ ai = bj = mb = 0
590
+ ma = -1
591
+ string = seq1.kind_of?(String)
592
+
593
+ # Process all the lines in the match vector.
594
+ loop do
595
+ # Find next match indices +ma+ and +mb+
596
+ loop do
597
+ ma += 1
598
+ break unless ma < matches.size and matches[ma].nil?
599
+ end
600
+
601
+ break if ma >= matches.size # end of matches?
602
+ mb = matches[ma]
603
+
604
+ # Change(seq2)
605
+ while (ai < ma) or (bj < mb)
606
+ ax = string ? seq1[ai, 1] : seq1[ai]
607
+ bx = string ? seq2[bj, 1] : seq2[bj]
608
+
609
+ case [(ai < ma), (bj < mb)]
610
+ when [true, true]
611
+ if callbacks.respond_to?(:change)
612
+ event = Diff::LCS::ContextChange.new('!', ai, ax, bj, bx)
613
+ event = yield event if block_given?
614
+ callbacks.change(event)
615
+ ai += 1
616
+ bj += 1
617
+ else
618
+ event = Diff::LCS::ContextChange.new('-', ai, ax, bj, bx)
619
+ event = yield event if block_given?
620
+ callbacks.discard_a(event)
621
+ ai += 1
622
+ ax = string ? seq1[ai, 1] : seq1[ai]
623
+ event = Diff::LCS::ContextChange.new('+', ai, ax, bj, bx)
624
+ event = yield event if block_given?
625
+ callbacks.discard_b(event)
626
+ bj += 1
627
+ end
628
+ when [true, false]
629
+ event = Diff::LCS::ContextChange.new('-', ai, ax, bj, bx)
630
+ event = yield event if block_given?
631
+ callbacks.discard_a(event)
632
+ ai += 1
633
+ when [false, true]
634
+ event = Diff::LCS::ContextChange.new('+', ai, ax, bj, bx)
635
+ event = yield event if block_given?
636
+ callbacks.discard_b(event)
637
+ bj += 1
638
+ end
639
+ end
640
+
641
+ # Match
642
+ ax = string ? seq1[ai, 1] : seq1[ai]
643
+ bx = string ? seq2[bj, 1] : seq2[bj]
644
+ event = Diff::LCS::ContextChange.new('=', ai, ax, bj, bx)
645
+ event = yield event if block_given?
646
+ callbacks.match(event)
647
+ ai += 1
648
+ bj += 1
649
+ end
650
+
651
+ while (ai < a_size) or (bj < b_size)
652
+ ax = string ? seq1[ai, 1] : seq1[ai]
653
+ bx = string ? seq2[bj, 1] : seq2[bj]
654
+
655
+ case [(ai < a_size), (bj < b_size)]
656
+ when [true, true]
657
+ if callbacks.respond_to?(:change)
658
+ event = Diff::LCS::ContextChange.new('!', ai, ax, bj, bx)
659
+ event = yield event if block_given?
660
+ callbacks.change(event)
661
+ ai += 1
662
+ bj += 1
663
+ else
664
+ event = Diff::LCS::ContextChange.new('-', ai, ax, bj, bx)
665
+ event = yield event if block_given?
666
+ callbacks.discard_a(event)
667
+ ai += 1
668
+ ax = string ? seq1[ai, 1] : seq1[ai]
669
+ event = Diff::LCS::ContextChange.new('+', ai, ax, bj, bx)
670
+ event = yield event if block_given?
671
+ callbacks.discard_b(event)
672
+ bj += 1
673
+ end
674
+ when [true, false]
675
+ event = Diff::LCS::ContextChange.new('-', ai, ax, bj, bx)
676
+ event = yield event if block_given?
677
+ callbacks.discard_a(event)
678
+ ai += 1
679
+ when [false, true]
680
+ event = Diff::LCS::ContextChange.new('+', ai, ax, bj, bx)
681
+ event = yield event if block_given?
682
+ callbacks.discard_b(event)
683
+ bj += 1
684
+ end
685
+ end
686
+ end
687
+
688
+ PATCH_MAP = { #:nodoc:
689
+ :patch => { '+' => '+', '-' => '-', '!' => '!', '=' => '=' },
690
+ :unpatch => { '+' => '-', '-' => '+', '!' => '!', '=' => '=' }
691
+ }
692
+
693
+ # Given a patchset, convert the current version to the new
694
+ # version. If +direction+ is not specified (must be
695
+ # <tt>:patch</tt> or <tt>:unpatch</tt>), then discovery of the
696
+ # direction of the patch will be attempted.
697
+ def patch(src, patchset, direction = nil)
698
+ string = src.kind_of?(String)
699
+ # Start with a new empty type of the source's class
700
+ res = src.class.new
701
+
702
+ # Normalize the patchset.
703
+ patchset = __normalize_patchset(patchset)
704
+
705
+ direction ||= Diff::LCS.__diff_direction(src, patchset)
706
+ direction ||= :patch
707
+
708
+ ai = bj = 0
709
+
710
+ patchset.each do |change|
711
+ # Both Change and ContextChange support #action
712
+ action = PATCH_MAP[direction][change.action]
713
+
714
+ case change
715
+ when Diff::LCS::ContextChange
716
+ case direction
717
+ when :patch
718
+ el = change.new_element
719
+ op = change.old_position
720
+ np = change.new_position
721
+ when :unpatch
722
+ el = change.old_element
723
+ op = change.new_position
724
+ np = change.old_position
725
+ end
726
+
727
+ case action
728
+ when '-' # Remove details from the old string
729
+ while ai < op
730
+ res << (string ? src[ai, 1] : src[ai])
731
+ ai += 1
732
+ bj += 1
733
+ end
734
+ ai += 1
735
+ when '+'
736
+ while bj < np
737
+ res << (string ? src[ai, 1] : src[ai])
738
+ ai += 1
739
+ bj += 1
740
+ end
741
+
742
+ res << el
743
+ bj += 1
744
+ when '='
745
+ # This only appears in sdiff output with the SDiff callback.
746
+ # Therefore, we only need to worry about dealing with a single
747
+ # element.
748
+ res << el
749
+
750
+ ai += 1
751
+ bj += 1
752
+ when '!'
753
+ while ai < op
754
+ res << (string ? src[ai, 1] : src[ai])
755
+ ai += 1
756
+ bj += 1
757
+ end
758
+
759
+ bj += 1
760
+ ai += 1
761
+
762
+ res << el
763
+ end
764
+ when Diff::LCS::Change
765
+ case action
766
+ when '-'
767
+ while ai < change.position
768
+ res << (string ? src[ai, 1] : src[ai])
769
+ ai += 1
770
+ bj += 1
771
+ end
772
+ ai += 1
773
+ when '+'
774
+ while bj < change.position
775
+ res << (string ? src[ai, 1] : src[ai])
776
+ ai += 1
777
+ bj += 1
778
+ end
779
+
780
+ bj += 1
781
+
782
+ res << change.element
783
+ end
784
+ end
785
+ end
786
+
787
+ while ai < src.size
788
+ res << (string ? src[ai, 1] : src[ai])
789
+ ai += 1
790
+ bj += 1
791
+ end
792
+
793
+ res
794
+ end
795
+
796
+ # Given a set of patchset, convert the current version to the prior
797
+ # version. Does no auto-discovery.
798
+ def unpatch!(src, patchset)
799
+ Diff::LCS.patch(src, patchset, :unpatch)
800
+ end
801
+
802
+ # Given a set of patchset, convert the current version to the next
803
+ # version. Does no auto-discovery.
804
+ def patch!(src, patchset)
805
+ Diff::LCS.patch(src, patchset, :patch)
806
+ end
807
+
808
+ # private
809
+ # Compute the longest common subsequence between the sequenced Enumerables
810
+ # +a+ and +b+. The result is an array whose contents is such that
811
+ #
812
+ # result = Diff::LCS.__lcs(a, b)
813
+ # result.each_with_index do |e, ii|
814
+ # assert_equal(a[ii], b[e]) unless e.nil?
815
+ # end
816
+ def __lcs(a, b)
817
+ a_start = b_start = 0
818
+ a_finish = a.size - 1
819
+ b_finish = b.size - 1
820
+ vector = []
821
+
822
+ # Prune off any common elements at the beginning...
823
+ while (a_start <= a_finish) and
824
+ (b_start <= b_finish) and
825
+ (a[a_start] == b[b_start])
826
+ vector[a_start] = b_start
827
+ a_start += 1
828
+ b_start += 1
829
+ end
830
+
831
+ # Now the end...
832
+ while (a_start <= a_finish) and
833
+ (b_start <= b_finish) and
834
+ (a[a_finish] == b[b_finish])
835
+ vector[a_finish] = b_finish
836
+ a_finish -= 1
837
+ b_finish -= 1
838
+ end
839
+
840
+ # Now, compute the equivalence classes of positions of elements.
841
+ b_matches = Diff::LCS.__position_hash(b, b_start .. b_finish)
842
+
843
+ thresh = []
844
+ links = []
845
+
846
+ (a_start .. a_finish).each do |ii|
847
+ ai = a.kind_of?(String) ? a[ii, 1] : a[ii]
848
+ bm = b_matches[ai]
849
+ kk = nil
850
+ bm.reverse_each do |jj|
851
+ if kk and (thresh[kk] > jj) and (thresh[kk - 1] < jj)
852
+ thresh[kk] = jj
853
+ else
854
+ kk = Diff::LCS.__replace_next_larger(thresh, jj, kk)
855
+ end
856
+ links[kk] = [ (kk > 0) ? links[kk - 1] : nil, ii, jj ] unless kk.nil?
857
+ end
858
+ end
859
+
860
+ unless thresh.empty?
861
+ link = links[thresh.size - 1]
862
+ while not link.nil?
863
+ vector[link[1]] = link[2]
864
+ link = link[0]
865
+ end
866
+ end
867
+
868
+ vector
869
+ end
870
+
871
+ # Find the place at which +value+ would normally be inserted into the
872
+ # Enumerable. If that place is already occupied by +value+, do nothing
873
+ # and return +nil+. If the place does not exist (i.e., it is off the end
874
+ # of the Enumerable), add it to the end. Otherwise, replace the element
875
+ # at that point with +value+. It is assumed that the Enumerable's values
876
+ # are numeric.
877
+ #
878
+ # This operation preserves the sort order.
879
+ def __replace_next_larger(enum, value, last_index = nil)
880
+ # Off the end?
881
+ if enum.empty? or (value > enum[-1])
882
+ enum << value
883
+ return enum.size - 1
884
+ end
885
+
886
+ # Binary search for the insertion point
887
+ last_index ||= enum.size
888
+ first_index = 0
889
+ while (first_index <= last_index)
890
+ ii = (first_index + last_index) >> 1
891
+
892
+ found = enum[ii]
893
+
894
+ if value == found
895
+ return nil
896
+ elsif value > found
897
+ first_index = ii + 1
898
+ else
899
+ last_index = ii - 1
900
+ end
901
+ end
902
+
903
+ # The insertion point is in first_index; overwrite the next larger
904
+ # value.
905
+ enum[first_index] = value
906
+ return first_index
907
+ end
908
+
909
+ # If +vector+ maps the matching elements of another collection onto this
910
+ # Enumerable, compute the inverse +vector+ that maps this Enumerable
911
+ # onto the collection. (Currently unused.)
912
+ def __inverse_vector(a, vector)
913
+ inverse = a.dup
914
+ (0 ... vector.size).each do |ii|
915
+ inverse[vector[ii]] = ii unless vector[ii].nil?
916
+ end
917
+ inverse
918
+ end
919
+
920
+ # Returns a hash mapping each element of an Enumerable to the set of
921
+ # positions it occupies in the Enumerable, optionally restricted to the
922
+ # elements specified in the range of indexes specified by +interval+.
923
+ def __position_hash(enum, interval = 0 .. -1)
924
+ hash = Hash.new { |hh, kk| hh[kk] = [] }
925
+ interval.each do |ii|
926
+ kk = enum.kind_of?(String) ? enum[ii, 1] : enum[ii]
927
+ hash[kk] << ii
928
+ end
929
+ hash
930
+ end
931
+
932
+ # Examine the patchset and the source to see in which direction the
933
+ # patch should be applied.
934
+ #
935
+ # WARNING: By default, this examines the whole patch, so this could take
936
+ # some time. This also works better with Diff::LCS::ContextChange or
937
+ # Diff::LCS::Change as its source, as an array will cause the creation
938
+ # of one of the above.
939
+ def __diff_direction(src, patchset, limit = nil)
940
+ count = left = left_miss = right = right_miss = 0
941
+ string = src.kind_of?(String)
942
+
943
+ patchset.each do |change|
944
+ count += 1
945
+
946
+ case change
947
+ when Diff::LCS::Change
948
+ # With a simplistic change, we can't tell the difference between
949
+ # the left and right on '!' actions, so we ignore those. On '='
950
+ # actions, if there's a miss, we miss both left and right.
951
+ element = string ? src[change.position, 1] : src[change.position]
952
+
953
+ case change.action
954
+ when '-'
955
+ if element == change.element
956
+ left += 1
957
+ else
958
+ left_miss += 1
959
+ end
960
+ when '+'
961
+ if element == change.element
962
+ right += 1
963
+ else
964
+ right_miss += 1
965
+ end
966
+ when '='
967
+ if element != change.element
968
+ left_miss += 1
969
+ right_miss += 1
970
+ end
971
+ end
972
+ when Diff::LCS::ContextChange
973
+ case change.action
974
+ when '-' # Remove details from the old string
975
+ element = string ? src[change.old_position, 1] : src[change.old_position]
976
+ if element == change.old_element
977
+ left += 1
978
+ else
979
+ left_miss += 1
980
+ end
981
+ when '+'
982
+ element = string ? src[change.new_position, 1] : src[change.new_position]
983
+ if element == change.new_element
984
+ right += 1
985
+ else
986
+ right_miss += 1
987
+ end
988
+ when '='
989
+ le = string ? src[change.old_position, 1] : src[change.old_position]
990
+ re = string ? src[change.new_position, 1] : src[change.new_position]
991
+
992
+ left_miss += 1 if le != change.old_element
993
+ right_miss += 1 if re != change.new_element
994
+ when '!'
995
+ element = string ? src[change.old_position, 1] : src[change.old_position]
996
+ if element == change.old_element
997
+ left += 1
998
+ else
999
+ element = string ? src[change.new_position, 1] : src[change.new_position]
1000
+ if element == change.new_element
1001
+ right += 1
1002
+ else
1003
+ left_miss += 1
1004
+ right_miss += 1
1005
+ end
1006
+ end
1007
+ end
1008
+ end
1009
+
1010
+ break if not limit.nil? and count > limit
1011
+ end
1012
+
1013
+ no_left = (left == 0) and (left_miss >= 0)
1014
+ no_right = (right == 0) and (right_miss >= 0)
1015
+
1016
+ case [no_left, no_right]
1017
+ when [false, true]
1018
+ return :patch
1019
+ when [true, false]
1020
+ return :unpatch
1021
+ else
1022
+ raise "The provided patchset does not appear to apply to the provided value as either source or destination value."
1023
+ end
1024
+ end
1025
+
1026
+ # Normalize the patchset. A patchset is always a sequence of changes, but
1027
+ # how those changes are represented may vary, depending on how they were
1028
+ # generated. In all cases we support, we also support the array
1029
+ # representation of the changes. The formats are:
1030
+ #
1031
+ # [ # patchset <- Diff::LCS.diff(a, b)
1032
+ # [ # one or more hunks
1033
+ # Diff::LCS::Change # one or more changes
1034
+ # ] ]
1035
+ #
1036
+ # [ # patchset, equivalent to the above
1037
+ # [ # one or more hunks
1038
+ # [ action, line, value ] # one or more changes
1039
+ # ] ]
1040
+ #
1041
+ # [ # patchset <- Diff::LCS.diff(a, b, Diff::LCS::ContextDiffCallbacks)
1042
+ # # OR <- Diff::LCS.sdiff(a, b, Diff::LCS::ContextDiffCallbacks)
1043
+ # [ # one or more hunks
1044
+ # Diff::LCS::ContextChange # one or more changes
1045
+ # ] ]
1046
+ #
1047
+ # [ # patchset, equivalent to the above
1048
+ # [ # one or more hunks
1049
+ # [ action, [ old line, old value ], [ new line, new value ] ]
1050
+ # # one or more changes
1051
+ # ] ]
1052
+ #
1053
+ # [ # patchset <- Diff::LCS.sdiff(a, b)
1054
+ # # OR <- Diff::LCS.diff(a, b, Diff::LCS::SDiffCallbacks)
1055
+ # Diff::LCS::ContextChange # one or more changes
1056
+ # ]
1057
+ #
1058
+ # [ # patchset, equivalent to the above
1059
+ # [ action, [ old line, old value ], [ new line, new value ] ]
1060
+ # # one or more changes
1061
+ # ]
1062
+ #
1063
+ # The result of this will be either of the following.
1064
+ #
1065
+ # [ # patchset
1066
+ # Diff::LCS::ContextChange # one or more changes
1067
+ # ]
1068
+ #
1069
+ # [ # patchset
1070
+ # Diff::LCS::Change # one or more changes
1071
+ # ]
1072
+ #
1073
+ # If either of the above is provided, it will be returned as such.
1074
+ #
1075
+ def __normalize_patchset(patchset)
1076
+ patchset.map do |hunk|
1077
+ case hunk
1078
+ when Diff::LCS::ContextChange, Diff::LCS::Change
1079
+ hunk
1080
+ when Array
1081
+ if (not hunk[0].kind_of?(Array)) and hunk[1].kind_of?(Array) and hunk[2].kind_of?(Array)
1082
+ Diff::LCS::ContextChange.from_a(hunk)
1083
+ else
1084
+ hunk.map do |change|
1085
+ case change
1086
+ when Diff::LCS::ContextChange, Diff::LCS::Change
1087
+ change
1088
+ when Array
1089
+ # change[1] will ONLY be an array in a ContextChange#to_a call.
1090
+ # In Change#to_a, it represents the line (singular).
1091
+ if change[1].kind_of?(Array)
1092
+ Diff::LCS::ContextChange.from_a(change)
1093
+ else
1094
+ Diff::LCS::Change.from_a(change)
1095
+ end
1096
+ end
1097
+ end
1098
+ end
1099
+ else
1100
+ raise ArgumentError, "Cannot normalise a hunk of class #{hunk.class}."
1101
+ end
1102
+ end.flatten
1103
+ end
1104
+ end
1105
+ end