cloudsmith-api 0.51.37 → 0.52.79

Sign up to get free protection for your applications and to get access to all the features.
Files changed (405) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +3 -3
  3. data/README.md +12 -5
  4. data/build.json +1 -1
  5. data/docs/AlpinePackageUpload.md +63 -0
  6. data/docs/ConanPackageUpload.md +1 -0
  7. data/docs/EntitlementsCreate.md +1 -1
  8. data/docs/EntitlementsPartialUpdate.md +1 -1
  9. data/docs/EntitlementsRefresh.md +1 -1
  10. data/docs/EntitlmentTokenMetric.md +9 -0
  11. data/docs/MavenPackageUpload.md +1 -0
  12. data/docs/MetricsApi.md +83 -0
  13. data/docs/Package.md +2 -0
  14. data/docs/PackageCopy.md +2 -0
  15. data/docs/PackageMove.md +2 -0
  16. data/docs/PackagesApi.md +107 -41
  17. data/docs/PackagesCopy.md +1 -1
  18. data/docs/PackagesMove.md +0 -1
  19. data/docs/PackagesTag.md +10 -0
  20. data/docs/PackagesUploadAlpine.md +1 -0
  21. data/docs/PackagesUploadCargo.md +1 -0
  22. data/docs/PackagesUploadCocoapods.md +1 -0
  23. data/docs/PackagesUploadComposer.md +1 -0
  24. data/docs/PackagesUploadConan.md +3 -0
  25. data/docs/PackagesUploadCran.md +1 -0
  26. data/docs/PackagesUploadDart.md +1 -0
  27. data/docs/PackagesUploadDeb.md +3 -0
  28. data/docs/PackagesUploadDocker.md +1 -0
  29. data/docs/PackagesUploadGo.md +1 -0
  30. data/docs/PackagesUploadHelm.md +1 -0
  31. data/docs/PackagesUploadLuarocks.md +1 -0
  32. data/docs/PackagesUploadMaven.md +1 -0
  33. data/docs/PackagesUploadNpm.md +1 -0
  34. data/docs/PackagesUploadNuget.md +1 -0
  35. data/docs/PackagesUploadPython.md +1 -0
  36. data/docs/PackagesUploadRaw.md +1 -0
  37. data/docs/PackagesUploadRpm.md +1 -0
  38. data/docs/PackagesUploadRuby.md +1 -0
  39. data/docs/PackagesUploadTerraform.md +1 -0
  40. data/docs/PackagesUploadVagrant.md +1 -0
  41. data/docs/PackagesValidateuploadAlpine.md +1 -0
  42. data/docs/PackagesValidateuploadCargo.md +1 -0
  43. data/docs/PackagesValidateuploadCocoapods.md +1 -0
  44. data/docs/PackagesValidateuploadComposer.md +1 -0
  45. data/docs/PackagesValidateuploadConan.md +3 -0
  46. data/docs/PackagesValidateuploadCran.md +1 -0
  47. data/docs/PackagesValidateuploadDart.md +1 -0
  48. data/docs/PackagesValidateuploadDeb.md +3 -0
  49. data/docs/PackagesValidateuploadDocker.md +1 -0
  50. data/docs/PackagesValidateuploadGo.md +1 -0
  51. data/docs/PackagesValidateuploadHelm.md +1 -0
  52. data/docs/PackagesValidateuploadLuarocks.md +1 -0
  53. data/docs/PackagesValidateuploadMaven.md +1 -0
  54. data/docs/PackagesValidateuploadNpm.md +1 -0
  55. data/docs/PackagesValidateuploadNuget.md +1 -0
  56. data/docs/PackagesValidateuploadPython.md +1 -0
  57. data/docs/PackagesValidateuploadRaw.md +1 -0
  58. data/docs/PackagesValidateuploadRpm.md +1 -0
  59. data/docs/PackagesValidateuploadRuby.md +1 -0
  60. data/docs/PackagesValidateuploadTerraform.md +1 -0
  61. data/docs/PackagesValidateuploadVagrant.md +1 -0
  62. data/docs/RawPackageUpload.md +1 -0
  63. data/docs/ReposCreate.md +4 -7
  64. data/docs/ReposPartialUpdate.md +3 -7
  65. data/docs/Repository.md +11 -10
  66. data/docs/RepositoryToken.md +4 -3
  67. data/docs/RepositoryTokenRefresh.md +4 -3
  68. data/docs/RepositoryTokenSyncTokens.md +4 -3
  69. data/docs/RepositoryWebhook.md +1 -0
  70. data/docs/StorageRegion.md +9 -0
  71. data/docs/StorageregionsApi.md +122 -0
  72. data/docs/VagrantPackageUpload.md +1 -0
  73. data/docs/WebhooksCreate.md +1 -0
  74. data/docs/WebhooksPartialUpdate.md +1 -0
  75. data/lib/cloudsmith-api.rb +6 -1
  76. data/lib/cloudsmith-api/api/metrics_api.rb +95 -0
  77. data/lib/cloudsmith-api/api/packages_api.rb +119 -56
  78. data/lib/cloudsmith-api/api/storageregions_api.rb +119 -0
  79. data/lib/cloudsmith-api/models/alpine_package_upload.rb +743 -0
  80. data/lib/cloudsmith-api/models/conan_package_upload.rb +11 -1
  81. data/lib/cloudsmith-api/models/entitlements_create.rb +1 -1
  82. data/lib/cloudsmith-api/models/entitlements_partial_update.rb +1 -1
  83. data/lib/cloudsmith-api/models/entitlements_refresh.rb +1 -1
  84. data/lib/cloudsmith-api/models/entitlment_token_metric.rb +209 -0
  85. data/lib/cloudsmith-api/models/maven_package_upload.rb +11 -1
  86. data/lib/cloudsmith-api/models/package.rb +21 -1
  87. data/lib/cloudsmith-api/models/package_copy.rb +21 -1
  88. data/lib/cloudsmith-api/models/package_move.rb +21 -1
  89. data/lib/cloudsmith-api/models/packages_copy.rb +1 -1
  90. data/lib/cloudsmith-api/models/packages_move.rb +4 -14
  91. data/lib/cloudsmith-api/models/packages_tag.rb +211 -0
  92. data/lib/cloudsmith-api/models/packages_upload_alpine.rb +14 -4
  93. data/lib/cloudsmith-api/models/packages_upload_cargo.rb +14 -4
  94. data/lib/cloudsmith-api/models/packages_upload_cocoapods.rb +14 -4
  95. data/lib/cloudsmith-api/models/packages_upload_composer.rb +14 -4
  96. data/lib/cloudsmith-api/models/packages_upload_conan.rb +34 -4
  97. data/lib/cloudsmith-api/models/packages_upload_cran.rb +14 -4
  98. data/lib/cloudsmith-api/models/packages_upload_dart.rb +14 -4
  99. data/lib/cloudsmith-api/models/packages_upload_deb.rb +34 -4
  100. data/lib/cloudsmith-api/models/packages_upload_docker.rb +14 -4
  101. data/lib/cloudsmith-api/models/packages_upload_go.rb +14 -4
  102. data/lib/cloudsmith-api/models/packages_upload_helm.rb +14 -4
  103. data/lib/cloudsmith-api/models/packages_upload_luarocks.rb +14 -4
  104. data/lib/cloudsmith-api/models/packages_upload_maven.rb +11 -1
  105. data/lib/cloudsmith-api/models/packages_upload_npm.rb +14 -4
  106. data/lib/cloudsmith-api/models/packages_upload_nuget.rb +14 -4
  107. data/lib/cloudsmith-api/models/packages_upload_python.rb +14 -4
  108. data/lib/cloudsmith-api/models/packages_upload_raw.rb +11 -1
  109. data/lib/cloudsmith-api/models/packages_upload_rpm.rb +14 -4
  110. data/lib/cloudsmith-api/models/packages_upload_ruby.rb +14 -4
  111. data/lib/cloudsmith-api/models/packages_upload_terraform.rb +14 -4
  112. data/lib/cloudsmith-api/models/packages_upload_vagrant.rb +11 -1
  113. data/lib/cloudsmith-api/models/packages_validateupload_alpine.rb +14 -4
  114. data/lib/cloudsmith-api/models/packages_validateupload_cargo.rb +14 -4
  115. data/lib/cloudsmith-api/models/packages_validateupload_cocoapods.rb +14 -4
  116. data/lib/cloudsmith-api/models/packages_validateupload_composer.rb +14 -4
  117. data/lib/cloudsmith-api/models/packages_validateupload_conan.rb +34 -4
  118. data/lib/cloudsmith-api/models/packages_validateupload_cran.rb +14 -4
  119. data/lib/cloudsmith-api/models/packages_validateupload_dart.rb +14 -4
  120. data/lib/cloudsmith-api/models/packages_validateupload_deb.rb +34 -4
  121. data/lib/cloudsmith-api/models/packages_validateupload_docker.rb +14 -4
  122. data/lib/cloudsmith-api/models/packages_validateupload_go.rb +14 -4
  123. data/lib/cloudsmith-api/models/packages_validateupload_helm.rb +14 -4
  124. data/lib/cloudsmith-api/models/packages_validateupload_luarocks.rb +14 -4
  125. data/lib/cloudsmith-api/models/packages_validateupload_maven.rb +11 -1
  126. data/lib/cloudsmith-api/models/packages_validateupload_npm.rb +14 -4
  127. data/lib/cloudsmith-api/models/packages_validateupload_nuget.rb +14 -4
  128. data/lib/cloudsmith-api/models/packages_validateupload_python.rb +14 -4
  129. data/lib/cloudsmith-api/models/packages_validateupload_raw.rb +11 -1
  130. data/lib/cloudsmith-api/models/packages_validateupload_rpm.rb +14 -4
  131. data/lib/cloudsmith-api/models/packages_validateupload_ruby.rb +14 -4
  132. data/lib/cloudsmith-api/models/packages_validateupload_terraform.rb +14 -4
  133. data/lib/cloudsmith-api/models/packages_validateupload_vagrant.rb +11 -1
  134. data/lib/cloudsmith-api/models/raw_package_upload.rb +11 -1
  135. data/lib/cloudsmith-api/models/repos_create.rb +17 -57
  136. data/lib/cloudsmith-api/models/repos_partial_update.rb +4 -44
  137. data/lib/cloudsmith-api/models/repository.rb +24 -24
  138. data/lib/cloudsmith-api/models/repository_token.rb +14 -4
  139. data/lib/cloudsmith-api/models/repository_token_refresh.rb +14 -4
  140. data/lib/cloudsmith-api/models/repository_token_sync_tokens.rb +14 -4
  141. data/lib/cloudsmith-api/models/repository_webhook.rb +11 -1
  142. data/lib/cloudsmith-api/models/{packages_resync.rb → storage_region.rb} +29 -9
  143. data/lib/cloudsmith-api/models/vagrant_package_upload.rb +11 -1
  144. data/lib/cloudsmith-api/models/webhooks_create.rb +11 -1
  145. data/lib/cloudsmith-api/models/webhooks_partial_update.rb +11 -1
  146. data/lib/cloudsmith-api/version.rb +1 -1
  147. data/spec/api/metrics_api_spec.rb +53 -0
  148. data/spec/api/packages_api_spec.rb +32 -18
  149. data/spec/api/storageregions_api_spec.rb +58 -0
  150. data/spec/models/alpine_package_upload_spec.rb +372 -0
  151. data/spec/models/conan_package_upload_spec.rb +6 -0
  152. data/spec/models/entitlment_token_metric_spec.rb +48 -0
  153. data/spec/models/maven_package_upload_spec.rb +6 -0
  154. data/spec/models/package_copy_spec.rb +12 -0
  155. data/spec/models/package_move_spec.rb +12 -0
  156. data/spec/models/package_spec.rb +12 -0
  157. data/spec/models/packages_move_spec.rb +0 -6
  158. data/spec/models/packages_tag_spec.rb +54 -0
  159. data/spec/models/packages_upload_alpine_spec.rb +6 -0
  160. data/spec/models/packages_upload_cargo_spec.rb +6 -0
  161. data/spec/models/packages_upload_cocoapods_spec.rb +6 -0
  162. data/spec/models/packages_upload_composer_spec.rb +6 -0
  163. data/spec/models/packages_upload_conan_spec.rb +18 -0
  164. data/spec/models/packages_upload_cran_spec.rb +6 -0
  165. data/spec/models/packages_upload_dart_spec.rb +6 -0
  166. data/spec/models/packages_upload_deb_spec.rb +18 -0
  167. data/spec/models/packages_upload_docker_spec.rb +6 -0
  168. data/spec/models/packages_upload_go_spec.rb +6 -0
  169. data/spec/models/packages_upload_helm_spec.rb +6 -0
  170. data/spec/models/packages_upload_luarocks_spec.rb +6 -0
  171. data/spec/models/packages_upload_maven_spec.rb +6 -0
  172. data/spec/models/packages_upload_npm_spec.rb +6 -0
  173. data/spec/models/packages_upload_nuget_spec.rb +6 -0
  174. data/spec/models/packages_upload_python_spec.rb +6 -0
  175. data/spec/models/packages_upload_raw_spec.rb +6 -0
  176. data/spec/models/packages_upload_rpm_spec.rb +6 -0
  177. data/spec/models/packages_upload_ruby_spec.rb +6 -0
  178. data/spec/models/packages_upload_terraform_spec.rb +6 -0
  179. data/spec/models/packages_upload_vagrant_spec.rb +6 -0
  180. data/spec/models/packages_validateupload_alpine_spec.rb +6 -0
  181. data/spec/models/packages_validateupload_cargo_spec.rb +6 -0
  182. data/spec/models/packages_validateupload_cocoapods_spec.rb +6 -0
  183. data/spec/models/packages_validateupload_composer_spec.rb +6 -0
  184. data/spec/models/packages_validateupload_conan_spec.rb +18 -0
  185. data/spec/models/packages_validateupload_cran_spec.rb +6 -0
  186. data/spec/models/packages_validateupload_dart_spec.rb +6 -0
  187. data/spec/models/packages_validateupload_deb_spec.rb +18 -0
  188. data/spec/models/packages_validateupload_docker_spec.rb +6 -0
  189. data/spec/models/packages_validateupload_go_spec.rb +6 -0
  190. data/spec/models/packages_validateupload_helm_spec.rb +6 -0
  191. data/spec/models/packages_validateupload_luarocks_spec.rb +6 -0
  192. data/spec/models/packages_validateupload_maven_spec.rb +6 -0
  193. data/spec/models/packages_validateupload_npm_spec.rb +6 -0
  194. data/spec/models/packages_validateupload_nuget_spec.rb +6 -0
  195. data/spec/models/packages_validateupload_python_spec.rb +6 -0
  196. data/spec/models/packages_validateupload_raw_spec.rb +6 -0
  197. data/spec/models/packages_validateupload_rpm_spec.rb +6 -0
  198. data/spec/models/packages_validateupload_ruby_spec.rb +6 -0
  199. data/spec/models/packages_validateupload_terraform_spec.rb +6 -0
  200. data/spec/models/packages_validateupload_vagrant_spec.rb +6 -0
  201. data/spec/models/raw_package_upload_spec.rb +6 -0
  202. data/spec/models/repos_create_spec.rb +3 -21
  203. data/spec/models/repos_partial_update_spec.rb +0 -24
  204. data/spec/models/repository_spec.rb +6 -0
  205. data/spec/models/repository_token_refresh_spec.rb +6 -0
  206. data/spec/models/repository_token_spec.rb +6 -0
  207. data/spec/models/repository_token_sync_tokens_spec.rb +6 -0
  208. data/spec/models/repository_webhook_spec.rb +6 -0
  209. data/spec/models/{packages_resync_spec.rb → storage_region_spec.rb} +13 -7
  210. data/spec/models/vagrant_package_upload_spec.rb +6 -0
  211. data/spec/models/webhooks_create_spec.rb +6 -0
  212. data/spec/models/webhooks_partial_update_spec.rb +6 -0
  213. data/vendor/bundle/ruby/2.6.0/cache/diff-lcs-1.4.4.gem +0 -0
  214. data/vendor/bundle/ruby/2.6.0/cache/json-2.3.1.gem +0 -0
  215. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/autotest-fsevent-0.2.17/gem_make.out +1 -1
  216. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/ffi-1.13.1/gem_make.out +2 -2
  217. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/{json-2.3.0 → json-2.3.1}/gem.build_complete +0 -0
  218. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/{json-2.3.0 → json-2.3.1}/gem_make.out +5 -5
  219. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/json-2.3.1/json/ext/generator.so +0 -0
  220. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/json-2.3.1/json/ext/parser.so +0 -0
  221. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/{json-2.3.0 → json-2.3.1}/mkmf.log +0 -0
  222. data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/.rspec +0 -0
  223. data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/Code-of-Conduct.md +0 -0
  224. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/Contributing.md +118 -0
  225. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/History.md +319 -0
  226. data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/License.md +0 -0
  227. data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/Manifest.txt +8 -0
  228. data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/README.rdoc +10 -10
  229. data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/Rakefile +39 -22
  230. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/autotest/discover.rb +3 -0
  231. data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/bin/htmldiff +7 -4
  232. data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/bin/ldiff +4 -1
  233. data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/docs/COPYING.txt +0 -0
  234. data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/docs/artistic.txt +0 -0
  235. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/lib/diff-lcs.rb +3 -0
  236. data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/lib/diff/lcs.rb +184 -170
  237. data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/lib/diff/lcs/array.rb +1 -1
  238. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/lib/diff/lcs/backports.rb +9 -0
  239. data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/lib/diff/lcs/block.rb +1 -1
  240. data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/lib/diff/lcs/callbacks.rb +15 -12
  241. data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/lib/diff/lcs/change.rb +30 -37
  242. data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/lib/diff/lcs/htmldiff.rb +17 -16
  243. data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/lib/diff/lcs/hunk.rb +156 -74
  244. data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/lib/diff/lcs/internals.rb +36 -39
  245. data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/lib/diff/lcs/ldiff.rb +46 -42
  246. data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/lib/diff/lcs/string.rb +1 -1
  247. data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/spec/change_spec.rb +31 -7
  248. data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3/spec/ldiff_spec.rb → diff-lcs-1.4.4/spec/diff_spec.rb} +15 -11
  249. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/spec/fixtures/aX +1 -0
  250. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/spec/fixtures/bXaX +1 -0
  251. data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/spec/fixtures/ds1.csv +0 -0
  252. data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/spec/fixtures/ds2.csv +0 -0
  253. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/spec/fixtures/ldiff/output.diff +4 -0
  254. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/spec/fixtures/ldiff/output.diff-c +7 -0
  255. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/spec/fixtures/ldiff/output.diff-e +3 -0
  256. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/spec/fixtures/ldiff/output.diff-f +3 -0
  257. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/spec/fixtures/ldiff/output.diff-u +5 -0
  258. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/spec/hunk_spec.rb +83 -0
  259. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/spec/issues_spec.rb +154 -0
  260. data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/spec/lcs_spec.rb +10 -10
  261. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/spec/ldiff_spec.rb +87 -0
  262. data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/spec/patch_spec.rb +93 -99
  263. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/spec/sdiff_spec.rb +214 -0
  264. data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/spec/spec_helper.rb +118 -64
  265. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/spec/traverse_balanced_spec.rb +310 -0
  266. data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/spec/traverse_sequences_spec.rb +28 -28
  267. data/vendor/bundle/ruby/2.6.0/gems/ffi-1.13.1/ext/ffi_c/Makefile +3 -3
  268. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/.gitignore +0 -0
  269. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/.travis.yml +2 -0
  270. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/CHANGES.md +33 -0
  271. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/Gemfile +0 -0
  272. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/README-json-jruby.md +0 -0
  273. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/README.md +16 -0
  274. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/Rakefile +8 -87
  275. data/vendor/bundle/ruby/2.6.0/gems/json-2.3.1/VERSION +1 -0
  276. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/diagrams/.keep +0 -0
  277. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/ext/json/ext/fbuffer/fbuffer.h +0 -0
  278. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/ext/json/ext/generator/.sitearchdir.-.json.-.ext.time +0 -0
  279. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/ext/json/ext/generator/depend +0 -0
  280. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/ext/json/ext/generator/extconf.rb +0 -0
  281. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/ext/json/ext/generator/generator.c +71 -1
  282. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/ext/json/ext/generator/generator.h +0 -0
  283. data/vendor/bundle/ruby/2.6.0/gems/json-2.3.1/ext/json/ext/generator/generator.so +0 -0
  284. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/ext/json/ext/parser/.sitearchdir.-.json.-.ext.time +0 -0
  285. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/ext/json/ext/parser/depend +0 -0
  286. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/ext/json/ext/parser/extconf.rb +0 -0
  287. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/ext/json/ext/parser/parser.c +71 -70
  288. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/ext/json/ext/parser/parser.h +0 -0
  289. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/ext/json/ext/parser/parser.rl +1 -0
  290. data/vendor/bundle/ruby/2.6.0/gems/json-2.3.1/ext/json/ext/parser/parser.so +0 -0
  291. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/ext/json/extconf.rb +0 -0
  292. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/install.rb +0 -0
  293. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/java/src/json/ext/ByteListTranscoder.java +0 -0
  294. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/java/src/json/ext/Generator.java +0 -0
  295. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/java/src/json/ext/GeneratorMethods.java +0 -0
  296. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/java/src/json/ext/GeneratorService.java +0 -0
  297. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/java/src/json/ext/GeneratorState.java +0 -0
  298. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/java/src/json/ext/OptionsReader.java +0 -0
  299. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/java/src/json/ext/Parser.java +0 -0
  300. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/java/src/json/ext/Parser.rl +0 -0
  301. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/java/src/json/ext/ParserService.java +0 -0
  302. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/java/src/json/ext/RuntimeInfo.java +0 -0
  303. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/java/src/json/ext/StringDecoder.java +0 -0
  304. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/java/src/json/ext/StringEncoder.java +0 -0
  305. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/java/src/json/ext/Utils.java +0 -0
  306. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/json-java.gemspec +3 -3
  307. data/vendor/bundle/ruby/2.6.0/gems/json-2.3.1/json.gemspec +139 -0
  308. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/json_pure.gemspec +8 -13
  309. data/vendor/bundle/ruby/2.6.0/gems/json-2.3.1/lib/json.rb +412 -0
  310. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/lib/json/add/bigdecimal.rb +0 -0
  311. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/lib/json/add/complex.rb +0 -0
  312. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/lib/json/add/core.rb +0 -0
  313. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/lib/json/add/date.rb +0 -0
  314. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/lib/json/add/date_time.rb +0 -0
  315. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/lib/json/add/exception.rb +0 -0
  316. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/lib/json/add/ostruct.rb +0 -0
  317. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/lib/json/add/range.rb +0 -0
  318. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/lib/json/add/rational.rb +0 -0
  319. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/lib/json/add/regexp.rb +0 -0
  320. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/lib/json/add/set.rb +0 -0
  321. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/lib/json/add/struct.rb +0 -0
  322. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/lib/json/add/symbol.rb +0 -0
  323. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/lib/json/add/time.rb +0 -0
  324. data/vendor/bundle/ruby/2.6.0/gems/json-2.3.1/lib/json/common.rb +691 -0
  325. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/lib/json/ext.rb +0 -0
  326. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/lib/json/ext/.keep +0 -0
  327. data/vendor/bundle/ruby/2.6.0/gems/json-2.3.1/lib/json/ext/generator.so +0 -0
  328. data/vendor/bundle/ruby/2.6.0/gems/json-2.3.1/lib/json/ext/parser.so +0 -0
  329. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/lib/json/generic_object.rb +0 -0
  330. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/lib/json/pure.rb +0 -0
  331. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/lib/json/pure/generator.rb +1 -1
  332. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/lib/json/pure/parser.rb +2 -2
  333. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/lib/json/version.rb +1 -1
  334. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/references/rfc7159.txt +0 -0
  335. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/fail10.json +0 -0
  336. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/fail11.json +0 -0
  337. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/fail12.json +0 -0
  338. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/fail13.json +0 -0
  339. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/fail14.json +0 -0
  340. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/fail18.json +0 -0
  341. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/fail19.json +0 -0
  342. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/fail2.json +0 -0
  343. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/fail20.json +0 -0
  344. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/fail21.json +0 -0
  345. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/fail22.json +0 -0
  346. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/fail23.json +0 -0
  347. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/fail24.json +0 -0
  348. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/fail25.json +0 -0
  349. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/fail27.json +0 -0
  350. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/fail28.json +0 -0
  351. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/fail3.json +0 -0
  352. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/fail4.json +0 -0
  353. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/fail5.json +0 -0
  354. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/fail6.json +0 -0
  355. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/fail7.json +0 -0
  356. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/fail8.json +0 -0
  357. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/fail9.json +0 -0
  358. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/obsolete_fail1.json +0 -0
  359. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/pass1.json +0 -0
  360. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/pass15.json +0 -0
  361. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/pass16.json +0 -0
  362. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/pass17.json +0 -0
  363. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/pass2.json +0 -0
  364. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/pass26.json +0 -0
  365. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/pass3.json +0 -0
  366. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/json_addition_test.rb +0 -0
  367. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/json_common_interface_test.rb +0 -0
  368. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/json_encoding_test.rb +0 -0
  369. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/json_ext_parser_test.rb +0 -0
  370. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/json_fixtures_test.rb +6 -1
  371. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/json_generator_test.rb +0 -0
  372. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/json_generic_object_test.rb +0 -0
  373. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/json_parser_test.rb +0 -0
  374. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/json_string_matching_test.rb +0 -0
  375. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/test_helper.rb +0 -0
  376. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tools/diff.sh +0 -0
  377. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tools/fuzz.rb +0 -0
  378. data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tools/server.rb +0 -0
  379. data/vendor/bundle/ruby/2.6.0/specifications/{diff-lcs-1.3.gemspec → diff-lcs-1.4.4.gemspec} +11 -13
  380. data/vendor/bundle/ruby/2.6.0/specifications/{json-2.3.0.gemspec → json-2.3.1.gemspec} +0 -0
  381. data/vendor/bundle/ruby/2.6.0/specifications/sys-uname-1.2.1.gemspec +1 -1
  382. metadata +277 -250
  383. data/docs/PackagesResync.md +0 -8
  384. data/vendor/bundle/ruby/2.6.0/cache/diff-lcs-1.3.gem +0 -0
  385. data/vendor/bundle/ruby/2.6.0/cache/json-2.3.0.gem +0 -0
  386. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/json-2.3.0/json/ext/generator.so +0 -0
  387. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/json-2.3.0/json/ext/parser.so +0 -0
  388. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/Contributing.md +0 -83
  389. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/History.md +0 -220
  390. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/autotest/discover.rb +0 -1
  391. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/lib/diff-lcs.rb +0 -3
  392. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/spec/diff_spec.rb +0 -47
  393. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/spec/hunk_spec.rb +0 -72
  394. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/spec/issues_spec.rb +0 -49
  395. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/spec/sdiff_spec.rb +0 -214
  396. data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/spec/traverse_balanced_spec.rb +0 -310
  397. data/vendor/bundle/ruby/2.6.0/gems/json-2.3.0/LICENSE +0 -56
  398. data/vendor/bundle/ruby/2.6.0/gems/json-2.3.0/VERSION +0 -1
  399. data/vendor/bundle/ruby/2.6.0/gems/json-2.3.0/ext/json/ext/generator/generator.so +0 -0
  400. data/vendor/bundle/ruby/2.6.0/gems/json-2.3.0/ext/json/ext/parser/parser.so +0 -0
  401. data/vendor/bundle/ruby/2.6.0/gems/json-2.3.0/json.gemspec +0 -0
  402. data/vendor/bundle/ruby/2.6.0/gems/json-2.3.0/lib/json.rb +0 -63
  403. data/vendor/bundle/ruby/2.6.0/gems/json-2.3.0/lib/json/common.rb +0 -456
  404. data/vendor/bundle/ruby/2.6.0/gems/json-2.3.0/lib/json/ext/generator.so +0 -0
  405. data/vendor/bundle/ruby/2.6.0/gems/json-2.3.0/lib/json/ext/parser.so +0 -0
@@ -0,0 +1,214 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe 'Diff::LCS.sdiff' do
6
+ include Diff::LCS::SpecHelper::Matchers
7
+
8
+ shared_examples 'compare sequences correctly' do
9
+ it 'compares s1 -> s2 correctly' do
10
+ expect(Diff::LCS.sdiff(s1, s2)).to eq(context_diff(result))
11
+ end
12
+
13
+ it 'compares s2 -> s1 correctly' do
14
+ expect(Diff::LCS.sdiff(s2, s1)).to eq(context_diff(reverse_sdiff(result)))
15
+ end
16
+ end
17
+
18
+ describe 'using seq1 & seq2' do
19
+ let(:s1) { seq1 }
20
+ let(:s2) { seq2 }
21
+ let(:result) { correct_forward_sdiff }
22
+
23
+ it_has_behavior 'compare sequences correctly'
24
+ end
25
+
26
+ describe 'using %w(abc def yyy xxx ghi jkl) & %w(abc dxf xxx ghi jkl)' do
27
+ let(:s1) { %w(abc def yyy xxx ghi jkl) }
28
+ let(:s2) { %w(abc dxf xxx ghi jkl) }
29
+ let(:result) {
30
+ [
31
+ ['=', [0, 'abc'], [0, 'abc']],
32
+ ['!', [1, 'def'], [1, 'dxf']],
33
+ ['-', [2, 'yyy'], [2, nil]],
34
+ ['=', [3, 'xxx'], [2, 'xxx']],
35
+ ['=', [4, 'ghi'], [3, 'ghi']],
36
+ ['=', [5, 'jkl'], [4, 'jkl']]
37
+ ]
38
+ }
39
+
40
+ it_has_behavior 'compare sequences correctly'
41
+ end
42
+
43
+ describe 'using %w(a b c d e) & %w(a e)' do
44
+ let(:s1) { %w(a b c d e) }
45
+ let(:s2) { %w(a e) }
46
+ let(:result) {
47
+ [
48
+ ['=', [0, 'a'], [0, 'a']],
49
+ ['-', [1, 'b'], [1, nil]],
50
+ ['-', [2, 'c'], [1, nil]],
51
+ ['-', [3, 'd'], [1, nil]],
52
+ ['=', [4, 'e'], [1, 'e']]
53
+ ]
54
+ }
55
+
56
+ it_has_behavior 'compare sequences correctly'
57
+ end
58
+
59
+ describe 'using %w(a e) & %w(a b c d e)' do
60
+ let(:s1) { %w(a e) }
61
+ let(:s2) { %w(a b c d e) }
62
+ let(:result) {
63
+ [
64
+ ['=', [0, 'a'], [0, 'a']],
65
+ ['+', [1, nil], [1, 'b']],
66
+ ['+', [1, nil], [2, 'c']],
67
+ ['+', [1, nil], [3, 'd']],
68
+ ['=', [1, 'e'], [4, 'e']]
69
+ ]
70
+ }
71
+
72
+ it_has_behavior 'compare sequences correctly'
73
+ end
74
+
75
+ describe 'using %w(v x a e) & %w(w y a b c d e)' do
76
+ let(:s1) { %w(v x a e) }
77
+ let(:s2) { %w(w y a b c d e) }
78
+ let(:result) {
79
+ [
80
+ ['!', [0, 'v'], [0, 'w']],
81
+ ['!', [1, 'x'], [1, 'y']],
82
+ ['=', [2, 'a'], [2, 'a']],
83
+ ['+', [3, nil], [3, 'b']],
84
+ ['+', [3, nil], [4, 'c']],
85
+ ['+', [3, nil], [5, 'd']],
86
+ ['=', [3, 'e'], [6, 'e']]
87
+ ]
88
+ }
89
+
90
+ it_has_behavior 'compare sequences correctly'
91
+ end
92
+
93
+ describe 'using %w(x a e) & %w(a b c d e)' do
94
+ let(:s1) { %w(x a e) }
95
+ let(:s2) { %w(a b c d e) }
96
+ let(:result) {
97
+ [
98
+ ['-', [0, 'x'], [0, nil]],
99
+ ['=', [1, 'a'], [0, 'a']],
100
+ ['+', [2, nil], [1, 'b']],
101
+ ['+', [2, nil], [2, 'c']],
102
+ ['+', [2, nil], [3, 'd']],
103
+ ['=', [2, 'e'], [4, 'e']]
104
+ ]
105
+ }
106
+
107
+ it_has_behavior 'compare sequences correctly'
108
+ end
109
+
110
+ describe 'using %w(a e) & %w(x a b c d e)' do
111
+ let(:s1) { %w(a e) }
112
+ let(:s2) { %w(x a b c d e) }
113
+ let(:result) {
114
+ [
115
+ ['+', [0, nil], [0, 'x']],
116
+ ['=', [0, 'a'], [1, 'a']],
117
+ ['+', [1, nil], [2, 'b']],
118
+ ['+', [1, nil], [3, 'c']],
119
+ ['+', [1, nil], [4, 'd']],
120
+ ['=', [1, 'e'], [5, 'e']]
121
+ ]
122
+ }
123
+
124
+ it_has_behavior 'compare sequences correctly'
125
+ end
126
+
127
+ describe 'using %w(a e v) & %w(x a b c d e w x)' do
128
+ let(:s1) { %w(a e v) }
129
+ let(:s2) { %w(x a b c d e w x) }
130
+ let(:result) {
131
+ [
132
+ ['+', [0, nil], [0, 'x']],
133
+ ['=', [0, 'a'], [1, 'a']],
134
+ ['+', [1, nil], [2, 'b']],
135
+ ['+', [1, nil], [3, 'c']],
136
+ ['+', [1, nil], [4, 'd']],
137
+ ['=', [1, 'e'], [5, 'e']],
138
+ ['!', [2, 'v'], [6, 'w']],
139
+ ['+', [3, nil], [7, 'x']]
140
+ ]
141
+ }
142
+
143
+ it_has_behavior 'compare sequences correctly'
144
+ end
145
+
146
+ describe 'using %w() & %w(a b c)' do
147
+ let(:s1) { %w() }
148
+ let(:s2) { %w(a b c) }
149
+ let(:result) {
150
+ [
151
+ ['+', [0, nil], [0, 'a']],
152
+ ['+', [0, nil], [1, 'b']],
153
+ ['+', [0, nil], [2, 'c']]
154
+ ]
155
+ }
156
+
157
+ it_has_behavior 'compare sequences correctly'
158
+ end
159
+
160
+ describe 'using %w(a b c) & %w(1)' do
161
+ let(:s1) { %w(a b c) }
162
+ let(:s2) { %w(1) }
163
+ let(:result) {
164
+ [
165
+ ['!', [0, 'a'], [0, '1']],
166
+ ['-', [1, 'b'], [1, nil]],
167
+ ['-', [2, 'c'], [1, nil]]
168
+ ]
169
+ }
170
+
171
+ it_has_behavior 'compare sequences correctly'
172
+ end
173
+
174
+ describe 'using %w(a b c) & %w(c)' do
175
+ let(:s1) { %w(a b c) }
176
+ let(:s2) { %w(c) }
177
+ let(:result) {
178
+ [
179
+ ['-', [0, 'a'], [0, nil]],
180
+ ['-', [1, 'b'], [0, nil]],
181
+ ['=', [2, 'c'], [0, 'c']]
182
+ ]
183
+ }
184
+
185
+ it_has_behavior 'compare sequences correctly'
186
+ end
187
+
188
+ describe 'using %w(abcd efgh ijkl mnop) & []' do
189
+ let(:s1) { %w(abcd efgh ijkl mnop) }
190
+ let(:s2) { [] }
191
+ let(:result) {
192
+ [
193
+ ['-', [0, 'abcd'], [0, nil]],
194
+ ['-', [1, 'efgh'], [0, nil]],
195
+ ['-', [2, 'ijkl'], [0, nil]],
196
+ ['-', [3, 'mnop'], [0, nil]]
197
+ ]
198
+ }
199
+
200
+ it_has_behavior 'compare sequences correctly'
201
+ end
202
+
203
+ describe 'using [[1,2]] & []' do
204
+ let(:s1) { [[1, 2]] }
205
+ let(:s2) { [] }
206
+ let(:result) {
207
+ [
208
+ ['-', [0, [1, 2]], [0, nil]]
209
+ ]
210
+ }
211
+
212
+ it_has_behavior 'compare sequences correctly'
213
+ end
214
+ end
@@ -1,23 +1,21 @@
1
- # -*- ruby encoding: utf-8 -*-
1
+ # frozen_string_literal: true
2
2
 
3
3
  require 'rubygems'
4
4
  require 'pathname'
5
- require 'psych'
6
5
 
7
- if ENV['COVERALLS']
8
- require 'coveralls'
9
- Coveralls.wear!
10
- elsif ENV['COVERAGE']
6
+ require 'psych' if RUBY_VERSION >= '1.9'
7
+
8
+ if ENV['COVERAGE']
11
9
  require 'simplecov'
12
10
 
13
- def require_do(resource, &block)
11
+ def require_do(resource)
14
12
  require resource
15
- block.call
13
+ yield if block_given?
16
14
  rescue LoadError
17
15
  nil
18
16
  end
19
17
 
20
- formatters = [ SimpleCov::Formatter::HTMLFormatter ]
18
+ formatters = [SimpleCov::Formatter::HTMLFormatter]
21
19
 
22
20
  require_do('simplecov-rcov') {
23
21
  formatters << SimpleCov::Formatter::RcovFormatter
@@ -40,15 +38,48 @@ parent = path.parent
40
38
 
41
39
  $:.unshift parent.join('lib')
42
40
 
41
+ module CaptureSubprocessIO
42
+ def _synchronize
43
+ yield
44
+ end
45
+
46
+ def capture_subprocess_io
47
+ _synchronize { _capture_subprocess_io { yield } }
48
+ end
49
+
50
+ def _capture_subprocess_io
51
+ require 'tempfile'
52
+
53
+ captured_stdout, captured_stderr = Tempfile.new('out'), Tempfile.new('err')
54
+
55
+ orig_stdout, orig_stderr = $stdout.dup, $stderr.dup
56
+ $stdout.reopen captured_stdout
57
+ $stderr.reopen captured_stderr
58
+
59
+ yield
60
+
61
+ $stdout.rewind
62
+ $stderr.rewind
63
+
64
+ [captured_stdout.read, captured_stderr.read]
65
+ ensure
66
+ captured_stdout.unlink
67
+ captured_stderr.unlink
68
+ $stdout.reopen orig_stdout
69
+ $stderr.reopen orig_stderr
70
+ end
71
+ private :_capture_subprocess_io
72
+ end
73
+
43
74
  require 'diff-lcs'
44
75
 
45
76
  module Diff::LCS::SpecHelper
46
77
  def hello
47
- "hello"
78
+ 'hello'
48
79
  end
49
80
 
50
81
  def hello_ary
51
- %W(h e l l o)
82
+ %w(h e l l o)
52
83
  end
53
84
 
54
85
  def seq1
@@ -77,50 +108,69 @@ module Diff::LCS::SpecHelper
77
108
 
78
109
  def correct_forward_diff
79
110
  [
80
- [ [ '-', 0, 'a' ] ],
81
- [ [ '+', 2, 'd' ] ],
82
- [ [ '-', 4, 'h' ],
83
- [ '+', 4, 'f' ] ],
84
- [ [ '+', 6, 'k' ] ],
85
- [ [ '-', 8, 'n' ],
86
- [ '-', 9, 'p' ],
87
- [ '+', 9, 'r' ],
88
- [ '+', 10, 's' ],
89
- [ '+', 11, 't' ] ]
111
+ [
112
+ ['-', 0, 'a']
113
+ ],
114
+ [
115
+ ['+', 2, 'd']
116
+ ],
117
+ [
118
+ ['-', 4, 'h'],
119
+ ['+', 4, 'f']
120
+ ],
121
+ [
122
+ ['+', 6, 'k']
123
+ ],
124
+ [
125
+ ['-', 8, 'n'],
126
+ ['-', 9, 'p'],
127
+ ['+', 9, 'r'],
128
+ ['+', 10, 's'],
129
+ ['+', 11, 't']
130
+ ]
90
131
  ]
91
132
  end
92
133
 
93
134
  def correct_backward_diff
94
135
  [
95
- [ [ '+', 0, 'a' ] ],
96
- [ [ '-', 2, 'd' ] ],
97
- [ [ '-', 4, 'f' ],
98
- [ '+', 4, 'h' ] ],
99
- [ [ '-', 6, 'k' ] ],
100
136
  [
101
- [ '-', 9, 'r' ],
102
- [ '-', 10, 's' ],
103
- [ '+', 8, 'n' ],
104
- [ '-', 11, 't' ],
105
- [ '+', 9, 'p' ] ]
137
+ ['+', 0, 'a']
138
+ ],
139
+ [
140
+ ['-', 2, 'd']
141
+ ],
142
+ [
143
+ ['-', 4, 'f'],
144
+ ['+', 4, 'h']
145
+ ],
146
+ [
147
+ ['-', 6, 'k']
148
+ ],
149
+ [
150
+ ['-', 9, 'r'],
151
+ ['-', 10, 's'],
152
+ ['+', 8, 'n'],
153
+ ['-', 11, 't'],
154
+ ['+', 9, 'p']
155
+ ]
106
156
  ]
107
157
  end
108
158
 
109
159
  def correct_forward_sdiff
110
160
  [
111
- [ '-', [ 0, 'a' ], [ 0, nil ] ],
112
- [ '=', [ 1, 'b' ], [ 0, 'b' ] ],
113
- [ '=', [ 2, 'c' ], [ 1, 'c' ] ],
114
- [ '+', [ 3, nil ], [ 2, 'd' ] ],
115
- [ '=', [ 3, 'e' ], [ 3, 'e' ] ],
116
- [ '!', [ 4, 'h' ], [ 4, 'f' ] ],
117
- [ '=', [ 5, 'j' ], [ 5, 'j' ] ],
118
- [ '+', [ 6, nil ], [ 6, 'k' ] ],
119
- [ '=', [ 6, 'l' ], [ 7, 'l' ] ],
120
- [ '=', [ 7, 'm' ], [ 8, 'm' ] ],
121
- [ '!', [ 8, 'n' ], [ 9, 'r' ] ],
122
- [ '!', [ 9, 'p' ], [ 10, 's' ] ],
123
- [ '+', [ 10, nil ], [ 11, 't' ] ]
161
+ ['-', [0, 'a'], [0, nil]],
162
+ ['=', [1, 'b'], [0, 'b']],
163
+ ['=', [2, 'c'], [1, 'c']],
164
+ ['+', [3, nil], [2, 'd']],
165
+ ['=', [3, 'e'], [3, 'e']],
166
+ ['!', [4, 'h'], [4, 'f']],
167
+ ['=', [5, 'j'], [5, 'j']],
168
+ ['+', [6, nil], [6, 'k']],
169
+ ['=', [6, 'l'], [7, 'l']],
170
+ ['=', [7, 'm'], [8, 'm']],
171
+ ['!', [8, 'n'], [9, 'r']],
172
+ ['!', [9, 'p'], [10, 's']],
173
+ ['+', [10, nil], [11, 't']]
124
174
  ]
125
175
  end
126
176
 
@@ -144,13 +194,13 @@ module Diff::LCS::SpecHelper
144
194
  end
145
195
 
146
196
  def format_diffs(diffs)
147
- diffs.map do |e|
197
+ diffs.map { |e|
148
198
  if e.kind_of?(Array)
149
- e.map { |f| f.to_a.join }.join(", ")
199
+ e.map { |f| f.to_a.join }.join(', ')
150
200
  else
151
201
  e.to_a.join
152
202
  end
153
- end.join("\n")
203
+ }.join("\n")
154
204
  end
155
205
 
156
206
  def map_diffs(diffs, klass = Diff::LCS::ContextChange)
@@ -171,8 +221,8 @@ module Diff::LCS::SpecHelper
171
221
 
172
222
  def balanced_reverse(change_result)
173
223
  new_result = []
174
- change_result.each { |line|
175
- line = [ line[0], line[2], line[1] ]
224
+ change_result.each do |line|
225
+ line = [line[0], line[2], line[1]]
176
226
  case line[0]
177
227
  when '<'
178
228
  line[0] = '>'
@@ -180,21 +230,21 @@ module Diff::LCS::SpecHelper
180
230
  line[0] = '<'
181
231
  end
182
232
  new_result << line
183
- }
184
- new_result.sort_by { |line| [ line[1], line[2] ] }
233
+ end
234
+ new_result.sort_by { |line| [line[1], line[2]] }
185
235
  end
186
236
 
187
237
  def map_to_no_change(change_result)
188
238
  new_result = []
189
- change_result.each { |line|
239
+ change_result.each do |line|
190
240
  case line[0]
191
241
  when '!'
192
- new_result << [ '<', line[1], line[2] ]
193
- new_result << [ '>', line[1] + 1, line[2] ]
242
+ new_result << ['<', line[1], line[2]]
243
+ new_result << ['>', line[1] + 1, line[2]]
194
244
  else
195
245
  new_result << line
196
246
  end
197
- }
247
+ end
198
248
  new_result
199
249
  end
200
250
 
@@ -231,14 +281,18 @@ module Diff::LCS::SpecHelper
231
281
  end
232
282
 
233
283
  def finished_a(event)
234
- @done_a << [event.old_element, event.old_position,
235
- event.new_element, event.new_position]
284
+ @done_a << [
285
+ event.old_element, event.old_position,
286
+ event.new_element, event.new_position
287
+ ]
236
288
  end
237
289
 
238
290
  def finished_b(event)
239
- p "called #finished_b"
240
- @done_b << [event.old_element, event.old_position,
241
- event.new_element, event.new_position]
291
+ p 'called #finished_b'
292
+ @done_b << [
293
+ event.old_element, event.old_position,
294
+ event.new_element, event.new_position
295
+ ]
242
296
  end
243
297
  end
244
298
  callbacks.reset
@@ -264,19 +318,19 @@ module Diff::LCS::SpecHelper
264
318
  end
265
319
 
266
320
  def match(event)
267
- @result << [ "=", event.old_position, event.new_position ]
321
+ @result << ['=', event.old_position, event.new_position]
268
322
  end
269
323
 
270
324
  def discard_a(event)
271
- @result << [ "<", event.old_position, event.new_position ]
325
+ @result << ['<', event.old_position, event.new_position]
272
326
  end
273
327
 
274
328
  def discard_b(event)
275
- @result << [ ">", event.old_position, event.new_position ]
329
+ @result << ['>', event.old_position, event.new_position]
276
330
  end
277
331
 
278
332
  def change(event)
279
- @result << [ "!", event.old_position, event.new_position ]
333
+ @result << ['!', event.old_position, event.new_position]
280
334
  end
281
335
  end
282
336
  cb.reset