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
@@ -1,4 +1,4 @@
1
- # -*- ruby encoding: utf-8 -*-
1
+ # frozen_string_literal: true
2
2
 
3
3
  class << Diff::LCS
4
4
  def diff_traversal(method, seq1, seq2, callbacks, &block)
@@ -45,8 +45,7 @@ class << Diff::LCS::Internals
45
45
  vector = []
46
46
 
47
47
  # Prune off any common elements at the beginning...
48
- while ((a_start <= a_finish) and (b_start <= b_finish) and
49
- (a[a_start] == b[b_start]))
48
+ while (a_start <= a_finish) and (b_start <= b_finish) and (a[a_start] == b[b_start])
50
49
  vector[a_start] = b_start
51
50
  a_start += 1
52
51
  b_start += 1
@@ -54,8 +53,7 @@ class << Diff::LCS::Internals
54
53
  b_start = a_start
55
54
 
56
55
  # Now the end...
57
- while ((a_start <= a_finish) and (b_start <= b_finish) and
58
- (a[a_finish] == b[b_finish]))
56
+ while (a_start <= a_finish) and (b_start <= b_finish) and (a[a_finish] == b[b_finish])
59
57
  vector[a_finish] = b_finish
60
58
  a_finish -= 1
61
59
  b_finish -= 1
@@ -68,7 +66,7 @@ class << Diff::LCS::Internals
68
66
  links = []
69
67
  string = a.kind_of?(String)
70
68
 
71
- (a_start .. a_finish).each do |i|
69
+ (a_start..a_finish).each do |i|
72
70
  ai = string ? a[i, 1] : a[i]
73
71
  bm = b_matches[ai]
74
72
  k = nil
@@ -78,13 +76,13 @@ class << Diff::LCS::Internals
78
76
  else
79
77
  k = replace_next_larger(thresh, j, k)
80
78
  end
81
- links[k] = [ (k > 0) ? links[k - 1] : nil, i, j ] unless k.nil?
79
+ links[k] = [k.positive? ? links[k - 1] : nil, i, j] unless k.nil?
82
80
  end
83
81
  end
84
82
 
85
83
  unless thresh.empty?
86
84
  link = links[thresh.size - 1]
87
- while not link.nil?
85
+ until link.nil?
88
86
  vector[link[1]] = link[2]
89
87
  link = link[0]
90
88
  end
@@ -93,14 +91,15 @@ class << Diff::LCS::Internals
93
91
  vector
94
92
  end
95
93
 
96
- # This method will analyze the provided patchset to provide a
97
- # single-pass normalization (conversion of the array form of
98
- # Diff::LCS::Change objects to the object form of same) and detection of
99
- # whether the patchset represents changes to be made.
94
+ # This method will analyze the provided patchset to provide a single-pass
95
+ # normalization (conversion of the array form of Diff::LCS::Change objects to
96
+ # the object form of same) and detection of whether the patchset represents
97
+ # changes to be made.
100
98
  def analyze_patchset(patchset, depth = 0)
101
- raise "Patchset too complex" if depth > 1
99
+ fail 'Patchset too complex' if depth > 1
102
100
 
103
101
  has_changes = false
102
+ new_patchset = []
104
103
 
105
104
  # Format:
106
105
  # [ # patchset
@@ -110,29 +109,28 @@ class << Diff::LCS::Internals
110
109
  # ]
111
110
  # ]
112
111
 
113
- patchset = patchset.map do |hunk|
112
+ patchset.each do |hunk|
114
113
  case hunk
115
114
  when Diff::LCS::Change
116
115
  has_changes ||= !hunk.unchanged?
117
- hunk
116
+ new_patchset << hunk
118
117
  when Array
119
- # Detect if the 'hunk' is actually an array-format
120
- # Change object.
118
+ # Detect if the 'hunk' is actually an array-format change object.
121
119
  if Diff::LCS::Change.valid_action? hunk[0]
122
120
  hunk = Diff::LCS::Change.from_a(hunk)
123
121
  has_changes ||= !hunk.unchanged?
124
- hunk
122
+ new_patchset << hunk
125
123
  else
126
124
  with_changes, hunk = analyze_patchset(hunk, depth + 1)
127
125
  has_changes ||= with_changes
128
- hunk.flatten
126
+ new_patchset.concat(hunk)
129
127
  end
130
128
  else
131
- raise ArgumentError, "Cannot normalise a hunk of class #{hunk.class}."
129
+ fail ArgumentError, "Cannot normalise a hunk of class #{hunk.class}."
132
130
  end
133
131
  end
134
132
 
135
- [ has_changes, patchset.flatten(1) ]
133
+ [has_changes, new_patchset]
136
134
  end
137
135
 
138
136
  # Examine the patchset and the source to see in which direction the
@@ -173,13 +171,11 @@ class << Diff::LCS::Internals
173
171
  when '!'
174
172
  if le == change.old_element
175
173
  left_match += 1
174
+ elsif re == change.new_element
175
+ right_match += 1
176
176
  else
177
- if re == change.new_element
178
- right_match += 1
179
- else
180
- left_miss += 1
181
- right_miss += 1
182
- end
177
+ left_miss += 1
178
+ right_miss += 1
183
179
  end
184
180
  end
185
181
  when Diff::LCS::Change
@@ -209,16 +205,16 @@ class << Diff::LCS::Internals
209
205
  end
210
206
  end
211
207
 
212
- break if (not limit.nil?) && (count > limit)
208
+ break if !limit.nil? && (count > limit)
213
209
  end
214
210
 
215
- no_left = (left_match == 0) && (left_miss > 0)
216
- no_right = (right_match == 0) && (right_miss > 0)
211
+ no_left = left_match.zero? && left_miss.positive?
212
+ no_right = right_match.zero? && right_miss.positive?
217
213
 
218
- case [ no_left, no_right ]
219
- when [ false, true ]
214
+ case [no_left, no_right]
215
+ when [false, true]
220
216
  :patch
221
- when [ true, false ]
217
+ when [true, false]
222
218
  :unpatch
223
219
  else
224
220
  case left_match <=> right_match
@@ -235,7 +231,8 @@ class << Diff::LCS::Internals
235
231
  :patch
236
232
  end
237
233
  else
238
- raise "The provided patchset does not appear to apply to the provided enumerable as either source or destination value."
234
+ fail "The provided patchset does not appear to apply to the provided \
235
+ enumerable as either source or destination value."
239
236
  end
240
237
  end
241
238
  end
@@ -258,14 +255,14 @@ class << Diff::LCS::Internals
258
255
  # Binary search for the insertion point
259
256
  last_index ||= enum.size
260
257
  first_index = 0
261
- while (first_index <= last_index)
258
+ while first_index <= last_index
262
259
  i = (first_index + last_index) >> 1
263
260
 
264
261
  found = enum[i]
265
262
 
266
- if value == found
267
- return nil
268
- elsif value > found
263
+ return nil if value == found
264
+
265
+ if value > found
269
266
  first_index = i + 1
270
267
  else
271
268
  last_index = i - 1
@@ -275,7 +272,7 @@ class << Diff::LCS::Internals
275
272
  # The insertion point is in first_index; overwrite the next larger
276
273
  # value.
277
274
  enum[first_index] = value
278
- return first_index
275
+ first_index
279
276
  end
280
277
  private :replace_next_larger
281
278
 
@@ -1,4 +1,4 @@
1
- # -*- ruby encoding: utf-8 -*-
1
+ # frozen_string_literal: true
2
2
 
3
3
  require 'optparse'
4
4
  require 'ostruct'
@@ -7,7 +7,7 @@ require 'diff/lcs/hunk'
7
7
  module Diff::LCS::Ldiff #:nodoc:
8
8
  BANNER = <<-COPYRIGHT
9
9
  ldiff #{Diff::LCS::VERSION}
10
- Copyright 2004-2014 Austin Ziegler
10
+ Copyright 2004-2019 Austin Ziegler
11
11
 
12
12
  Part of Diff::LCS.
13
13
  https://github.com/halostatue/diff-lcs
@@ -15,7 +15,7 @@ ldiff #{Diff::LCS::VERSION}
15
15
  This program is free software. It may be redistributed and/or modified under
16
16
  the terms of the GPL version 2 (or later), the Perl Artistic licence, or the
17
17
  MIT licence.
18
- COPYRIGHT
18
+ COPYRIGHT
19
19
  end
20
20
 
21
21
  class << Diff::LCS::Ldiff
@@ -23,33 +23,42 @@ class << Diff::LCS::Ldiff
23
23
  attr_reader :file_old, :file_new #:nodoc:
24
24
  attr_reader :data_old, :data_new #:nodoc:
25
25
 
26
- def run(args, input = $stdin, output = $stdout, error = $stderr) #:nodoc:
26
+ def run(args, _input = $stdin, output = $stdout, error = $stderr) #:nodoc:
27
27
  @binary = nil
28
28
 
29
29
  args.options do |o|
30
30
  o.banner = "Usage: #{File.basename($0)} [options] oldfile newfile"
31
- o.separator ""
32
- o.on('-c', '-C', '--context [LINES]', Numeric, 'Displays a context diff with LINES lines', 'of context. Default 3 lines.') do |ctx|
31
+ o.separator ''
32
+ o.on(
33
+ '-c', '-C', '--context [LINES]', Integer,
34
+ 'Displays a context diff with LINES lines', 'of context. Default 3 lines.'
35
+ ) do |ctx|
33
36
  @format = :context
34
37
  @lines = ctx || 3
35
38
  end
36
- o.on('-u', '-U', '--unified [LINES]', Numeric, 'Displays a unified diff with LINES lines', 'of context. Default 3 lines.') do |ctx|
39
+ o.on(
40
+ '-u', '-U', '--unified [LINES]', Integer,
41
+ 'Displays a unified diff with LINES lines', 'of context. Default 3 lines.'
42
+ ) do |ctx|
37
43
  @format = :unified
38
44
  @lines = ctx || 3
39
45
  end
40
- o.on('-e', 'Creates an \'ed\' script to change', 'oldfile to newfile.') do |ctx|
46
+ o.on('-e', 'Creates an \'ed\' script to change', 'oldfile to newfile.') do |_ctx|
41
47
  @format = :ed
42
48
  end
43
- o.on('-f', 'Creates an \'ed\' script to change', 'oldfile to newfile in reverse order.') do |ctx|
49
+ o.on('-f', 'Creates an \'ed\' script to change', 'oldfile to newfile in reverse order.') do |_ctx|
44
50
  @format = :reverse_ed
45
51
  end
46
- o.on('-a', '--text', 'Treat the files as text and compare them', 'line-by-line, even if they do not seem', 'to be text.') do |txt|
52
+ o.on(
53
+ '-a', '--text',
54
+ 'Treat the files as text and compare them', 'line-by-line, even if they do not seem', 'to be text.'
55
+ ) do |_txt|
47
56
  @binary = false
48
57
  end
49
- o.on('--binary', 'Treats the files as binary.') do |bin|
58
+ o.on('--binary', 'Treats the files as binary.') do |_bin|
50
59
  @binary = true
51
60
  end
52
- o.on('-q', '--brief', 'Report only whether or not the files', 'differ, not the details.') do |ctx|
61
+ o.on('-q', '--brief', 'Report only whether or not the files', 'differ, not the details.') do |_ctx|
53
62
  @format = :report
54
63
  end
55
64
  o.on_tail('--help', 'Shows this text.') do
@@ -60,7 +69,7 @@ class << Diff::LCS::Ldiff
60
69
  error << Diff::LCS::Ldiff::BANNER
61
70
  return 0
62
71
  end
63
- o.on_tail ""
72
+ o.on_tail ''
64
73
  o.on_tail 'By default, runs produces an "old-style" diff, with output like UNIX diff.'
65
74
  o.parse!
66
75
  end
@@ -89,25 +98,19 @@ class << Diff::LCS::Ldiff
89
98
  # items we've read from each file will differ by FLD (could be 0).
90
99
  file_length_difference = 0
91
100
 
92
- if @binary.nil? or @binary
93
- data_old = IO.read(file_old)
94
- data_new = IO.read(file_new)
101
+ data_old = IO.read(file_old)
102
+ data_new = IO.read(file_new)
95
103
 
96
- # Test binary status
97
- if @binary.nil?
98
- old_txt = data_old[0, 4096].scan(/\0/).empty?
99
- new_txt = data_new[0, 4096].scan(/\0/).empty?
100
- @binary = (not old_txt) or (not new_txt)
101
- old_txt = new_txt = nil
102
- end
104
+ # Test binary status
105
+ if @binary.nil?
106
+ old_txt = data_old[0, 4096].scan(/\0/).empty?
107
+ new_txt = data_new[0, 4096].scan(/\0/).empty?
108
+ @binary = !old_txt || !new_txt
109
+ end
103
110
 
104
- unless @binary
105
- data_old = data_old.split($/).map { |e| e.chomp }
106
- data_new = data_new.split($/).map { |e| e.chomp }
107
- end
108
- else
109
- data_old = IO.readlines(file_old).map { |e| e.chomp }
110
- data_new = IO.readlines(file_new).map { |e| e.chomp }
111
+ unless @binary
112
+ data_old = data_old.lines.to_a
113
+ data_new = data_new.lines.to_a
111
114
  end
112
115
 
113
116
  # diff yields lots of pieces, each of which is basically a Block object
@@ -126,9 +129,9 @@ class << Diff::LCS::Ldiff
126
129
  end
127
130
 
128
131
  if (@format == :unified) or (@format == :context)
129
- ft = File.stat(file_old).mtime.localtime.strftime('%Y-%m-%d %H:%M:%S.%N %z')
132
+ ft = File.stat(file_old).mtime.localtime.strftime('%Y-%m-%d %H:%M:%S.000000000 %z')
130
133
  output << "#{char_old} #{file_old}\t#{ft}\n"
131
- ft = File.stat(file_new).mtime.localtime.strftime('%Y-%m-%d %H:%M:%S.%N %z')
134
+ ft = File.stat(file_new).mtime.localtime.strftime('%Y-%m-%d %H:%M:%S.000000000 %z')
132
135
  output << "#{char_new} #{file_new}\t#{ft}\n"
133
136
  end
134
137
 
@@ -142,26 +145,27 @@ class << Diff::LCS::Ldiff
142
145
  end
143
146
 
144
147
  diffs.each do |piece|
145
- begin
146
- hunk = Diff::LCS::Hunk.new(data_old, data_new, piece, @lines,
147
- file_length_difference)
148
+ begin # rubocop:disable Style/RedundantBegin
149
+ hunk = Diff::LCS::Hunk.new(data_old, data_new, piece, @lines, file_length_difference)
148
150
  file_length_difference = hunk.file_length_difference
149
151
 
150
152
  next unless oldhunk
151
- next if (@lines > 0) and hunk.merge(oldhunk)
153
+ next if @lines.positive? and hunk.merge(oldhunk)
152
154
 
153
- output << oldhunk.diff(@format) << "\n"
155
+ output << oldhunk.diff(@format)
156
+ output << "\n" if @format == :unified
154
157
  ensure
155
158
  oldhunk = hunk
156
159
  end
157
160
  end
158
161
 
159
- output << oldhunk.diff(@format) << "\n"
162
+ last = oldhunk.diff(@format, true)
163
+ last << "\n" if last.respond_to?(:end_with?) && !last.end_with?("\n")
160
164
 
161
- if @format == :ed
162
- output.reverse_each { |e| real_output << e.diff(:ed_finish) }
163
- end
165
+ output << last
166
+
167
+ output.reverse_each { |e| real_output << e.diff(:ed_finish) } if @format == :ed
164
168
 
165
- return 1
169
+ 1
166
170
  end
167
171
  end
@@ -1,4 +1,4 @@
1
- # -*- ruby encoding: utf-8 -*-
1
+ # frozen_string_literal: true
2
2
 
3
3
  class String
4
4
  include Diff::LCS
@@ -1,9 +1,9 @@
1
- # -*- ruby encoding: utf-8 -*-
1
+ # frozen_string_literal: true
2
2
 
3
3
  require 'spec_helper'
4
4
 
5
5
  describe Diff::LCS::Change do
6
- describe "an add" do
6
+ describe 'an add' do
7
7
  subject { described_class.new('+', 0, 'element') }
8
8
  it { should_not be_deleting }
9
9
  it { should be_adding }
@@ -13,7 +13,7 @@ describe Diff::LCS::Change do
13
13
  it { should_not be_finished_b }
14
14
  end
15
15
 
16
- describe "a delete" do
16
+ describe 'a delete' do
17
17
  subject { described_class.new('-', 0, 'element') }
18
18
  it { should be_deleting }
19
19
  it { should_not be_adding }
@@ -23,7 +23,7 @@ describe Diff::LCS::Change do
23
23
  it { should_not be_finished_b }
24
24
  end
25
25
 
26
- describe "an unchanged" do
26
+ describe 'an unchanged' do
27
27
  subject { described_class.new('=', 0, 'element') }
28
28
  it { should_not be_deleting }
29
29
  it { should_not be_adding }
@@ -33,7 +33,7 @@ describe Diff::LCS::Change do
33
33
  it { should_not be_finished_b }
34
34
  end
35
35
 
36
- describe "a changed" do
36
+ describe 'a changed' do
37
37
  subject { described_class.new('!', 0, 'element') }
38
38
  it { should_not be_deleting }
39
39
  it { should_not be_adding }
@@ -43,7 +43,7 @@ describe Diff::LCS::Change do
43
43
  it { should_not be_finished_b }
44
44
  end
45
45
 
46
- describe "a finished_a" do
46
+ describe 'a finished_a' do
47
47
  subject { described_class.new('>', 0, 'element') }
48
48
  it { should_not be_deleting }
49
49
  it { should_not be_adding }
@@ -53,7 +53,7 @@ describe Diff::LCS::Change do
53
53
  it { should_not be_finished_b }
54
54
  end
55
55
 
56
- describe "a finished_b" do
56
+ describe 'a finished_b' do
57
57
  subject { described_class.new('<', 0, 'element') }
58
58
  it { should_not be_deleting }
59
59
  it { should_not be_adding }
@@ -62,4 +62,28 @@ describe Diff::LCS::Change do
62
62
  it { should_not be_finished_a }
63
63
  it { should be_finished_b }
64
64
  end
65
+
66
+ describe 'as array' do
67
+ it 'should be converted' do
68
+ action, position, element = described_class.new('!', 0, 'element')
69
+ expect(action).to eq '!'
70
+ expect(position).to eq 0
71
+ expect(element).to eq 'element'
72
+ end
73
+ end
74
+ end
75
+
76
+ describe Diff::LCS::ContextChange do
77
+ describe 'as array' do
78
+ it 'should be converted' do
79
+ action, (old_position, old_element), (new_position, new_element) =
80
+ described_class.new('!', 1, 'old_element', 2, 'new_element')
81
+
82
+ expect(action).to eq '!'
83
+ expect(old_position).to eq 1
84
+ expect(old_element).to eq 'old_element'
85
+ expect(new_position).to eq 2
86
+ expect(new_element).to eq 'new_element'
87
+ end
88
+ end
65
89
  end
@@ -1,8 +1,8 @@
1
- # -*- ruby encoding: utf-8 -*-
1
+ # frozen_string_literal: true
2
2
 
3
3
  require 'spec_helper'
4
4
 
5
- describe "Diff::LCS.diff" do
5
+ describe Diff::LCS, '.diff' do
6
6
  include Diff::LCS::SpecHelper::Matchers
7
7
 
8
8
  it 'correctly diffs seq1 to seq2' do
@@ -18,16 +18,20 @@ describe "Diff::LCS.diff" do
18
18
  it 'correctly diffs against an empty sequence' do
19
19
  diff = Diff::LCS.diff(word_sequence, [])
20
20
  correct_diff = [
21
- [ [ '-', 0, 'abcd' ],
22
- [ '-', 1, 'efgh' ],
23
- [ '-', 2, 'ijkl' ],
24
- [ '-', 3, 'mnopqrstuvwxyz' ] ]
21
+ [
22
+ ['-', 0, 'abcd'],
23
+ ['-', 1, 'efgh'],
24
+ ['-', 2, 'ijkl'],
25
+ ['-', 3, 'mnopqrstuvwxyz']
26
+ ]
25
27
  ]
26
28
 
27
29
  expect(change_diff(correct_diff)).to eq(diff)
28
30
 
29
31
  diff = Diff::LCS.diff([], word_sequence)
30
- correct_diff.each { |hunk| hunk.each { |change| change[0] = '+' } }
32
+ correct_diff.each do |hunk|
33
+ hunk.each do |change| change[0] = '+' end
34
+ end
31
35
  expect(change_diff(correct_diff)).to eq(diff)
32
36
  end
33
37
 
@@ -37,11 +41,11 @@ describe "Diff::LCS.diff" do
37
41
  expect(Diff::LCS.patch(left, Diff::LCS.diff(left, right))).to eq(right)
38
42
  end
39
43
 
40
- it "returns an empty diff with (hello, hello)" do
41
- expect(Diff::LCS.diff(hello, hello)).to eq([])
44
+ it 'returns an empty diff with (hello, hello)' do
45
+ expect(Diff::LCS.diff(hello, hello)).to be_empty
42
46
  end
43
47
 
44
- it "returns an empty diff with (hello_ary, hello_ary)" do
45
- expect(Diff::LCS.diff(hello_ary, hello_ary)).to eq([])
48
+ it 'returns an empty diff with (hello_ary, hello_ary)' do
49
+ expect(Diff::LCS.diff(hello_ary, hello_ary)).to be_empty
46
50
  end
47
51
  end