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.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/README.md +12 -5
- data/build.json +1 -1
- data/docs/AlpinePackageUpload.md +63 -0
- data/docs/ConanPackageUpload.md +1 -0
- data/docs/EntitlementsCreate.md +1 -1
- data/docs/EntitlementsPartialUpdate.md +1 -1
- data/docs/EntitlementsRefresh.md +1 -1
- data/docs/EntitlmentTokenMetric.md +9 -0
- data/docs/MavenPackageUpload.md +1 -0
- data/docs/MetricsApi.md +83 -0
- data/docs/Package.md +2 -0
- data/docs/PackageCopy.md +2 -0
- data/docs/PackageMove.md +2 -0
- data/docs/PackagesApi.md +107 -41
- data/docs/PackagesCopy.md +1 -1
- data/docs/PackagesMove.md +0 -1
- data/docs/PackagesTag.md +10 -0
- data/docs/PackagesUploadAlpine.md +1 -0
- data/docs/PackagesUploadCargo.md +1 -0
- data/docs/PackagesUploadCocoapods.md +1 -0
- data/docs/PackagesUploadComposer.md +1 -0
- data/docs/PackagesUploadConan.md +3 -0
- data/docs/PackagesUploadCran.md +1 -0
- data/docs/PackagesUploadDart.md +1 -0
- data/docs/PackagesUploadDeb.md +3 -0
- data/docs/PackagesUploadDocker.md +1 -0
- data/docs/PackagesUploadGo.md +1 -0
- data/docs/PackagesUploadHelm.md +1 -0
- data/docs/PackagesUploadLuarocks.md +1 -0
- data/docs/PackagesUploadMaven.md +1 -0
- data/docs/PackagesUploadNpm.md +1 -0
- data/docs/PackagesUploadNuget.md +1 -0
- data/docs/PackagesUploadPython.md +1 -0
- data/docs/PackagesUploadRaw.md +1 -0
- data/docs/PackagesUploadRpm.md +1 -0
- data/docs/PackagesUploadRuby.md +1 -0
- data/docs/PackagesUploadTerraform.md +1 -0
- data/docs/PackagesUploadVagrant.md +1 -0
- data/docs/PackagesValidateuploadAlpine.md +1 -0
- data/docs/PackagesValidateuploadCargo.md +1 -0
- data/docs/PackagesValidateuploadCocoapods.md +1 -0
- data/docs/PackagesValidateuploadComposer.md +1 -0
- data/docs/PackagesValidateuploadConan.md +3 -0
- data/docs/PackagesValidateuploadCran.md +1 -0
- data/docs/PackagesValidateuploadDart.md +1 -0
- data/docs/PackagesValidateuploadDeb.md +3 -0
- data/docs/PackagesValidateuploadDocker.md +1 -0
- data/docs/PackagesValidateuploadGo.md +1 -0
- data/docs/PackagesValidateuploadHelm.md +1 -0
- data/docs/PackagesValidateuploadLuarocks.md +1 -0
- data/docs/PackagesValidateuploadMaven.md +1 -0
- data/docs/PackagesValidateuploadNpm.md +1 -0
- data/docs/PackagesValidateuploadNuget.md +1 -0
- data/docs/PackagesValidateuploadPython.md +1 -0
- data/docs/PackagesValidateuploadRaw.md +1 -0
- data/docs/PackagesValidateuploadRpm.md +1 -0
- data/docs/PackagesValidateuploadRuby.md +1 -0
- data/docs/PackagesValidateuploadTerraform.md +1 -0
- data/docs/PackagesValidateuploadVagrant.md +1 -0
- data/docs/RawPackageUpload.md +1 -0
- data/docs/ReposCreate.md +4 -7
- data/docs/ReposPartialUpdate.md +3 -7
- data/docs/Repository.md +11 -10
- data/docs/RepositoryToken.md +4 -3
- data/docs/RepositoryTokenRefresh.md +4 -3
- data/docs/RepositoryTokenSyncTokens.md +4 -3
- data/docs/RepositoryWebhook.md +1 -0
- data/docs/StorageRegion.md +9 -0
- data/docs/StorageregionsApi.md +122 -0
- data/docs/VagrantPackageUpload.md +1 -0
- data/docs/WebhooksCreate.md +1 -0
- data/docs/WebhooksPartialUpdate.md +1 -0
- data/lib/cloudsmith-api.rb +6 -1
- data/lib/cloudsmith-api/api/metrics_api.rb +95 -0
- data/lib/cloudsmith-api/api/packages_api.rb +119 -56
- data/lib/cloudsmith-api/api/storageregions_api.rb +119 -0
- data/lib/cloudsmith-api/models/alpine_package_upload.rb +743 -0
- data/lib/cloudsmith-api/models/conan_package_upload.rb +11 -1
- data/lib/cloudsmith-api/models/entitlements_create.rb +1 -1
- data/lib/cloudsmith-api/models/entitlements_partial_update.rb +1 -1
- data/lib/cloudsmith-api/models/entitlements_refresh.rb +1 -1
- data/lib/cloudsmith-api/models/entitlment_token_metric.rb +209 -0
- data/lib/cloudsmith-api/models/maven_package_upload.rb +11 -1
- data/lib/cloudsmith-api/models/package.rb +21 -1
- data/lib/cloudsmith-api/models/package_copy.rb +21 -1
- data/lib/cloudsmith-api/models/package_move.rb +21 -1
- data/lib/cloudsmith-api/models/packages_copy.rb +1 -1
- data/lib/cloudsmith-api/models/packages_move.rb +4 -14
- data/lib/cloudsmith-api/models/packages_tag.rb +211 -0
- data/lib/cloudsmith-api/models/packages_upload_alpine.rb +14 -4
- data/lib/cloudsmith-api/models/packages_upload_cargo.rb +14 -4
- data/lib/cloudsmith-api/models/packages_upload_cocoapods.rb +14 -4
- data/lib/cloudsmith-api/models/packages_upload_composer.rb +14 -4
- data/lib/cloudsmith-api/models/packages_upload_conan.rb +34 -4
- data/lib/cloudsmith-api/models/packages_upload_cran.rb +14 -4
- data/lib/cloudsmith-api/models/packages_upload_dart.rb +14 -4
- data/lib/cloudsmith-api/models/packages_upload_deb.rb +34 -4
- data/lib/cloudsmith-api/models/packages_upload_docker.rb +14 -4
- data/lib/cloudsmith-api/models/packages_upload_go.rb +14 -4
- data/lib/cloudsmith-api/models/packages_upload_helm.rb +14 -4
- data/lib/cloudsmith-api/models/packages_upload_luarocks.rb +14 -4
- data/lib/cloudsmith-api/models/packages_upload_maven.rb +11 -1
- data/lib/cloudsmith-api/models/packages_upload_npm.rb +14 -4
- data/lib/cloudsmith-api/models/packages_upload_nuget.rb +14 -4
- data/lib/cloudsmith-api/models/packages_upload_python.rb +14 -4
- data/lib/cloudsmith-api/models/packages_upload_raw.rb +11 -1
- data/lib/cloudsmith-api/models/packages_upload_rpm.rb +14 -4
- data/lib/cloudsmith-api/models/packages_upload_ruby.rb +14 -4
- data/lib/cloudsmith-api/models/packages_upload_terraform.rb +14 -4
- data/lib/cloudsmith-api/models/packages_upload_vagrant.rb +11 -1
- data/lib/cloudsmith-api/models/packages_validateupload_alpine.rb +14 -4
- data/lib/cloudsmith-api/models/packages_validateupload_cargo.rb +14 -4
- data/lib/cloudsmith-api/models/packages_validateupload_cocoapods.rb +14 -4
- data/lib/cloudsmith-api/models/packages_validateupload_composer.rb +14 -4
- data/lib/cloudsmith-api/models/packages_validateupload_conan.rb +34 -4
- data/lib/cloudsmith-api/models/packages_validateupload_cran.rb +14 -4
- data/lib/cloudsmith-api/models/packages_validateupload_dart.rb +14 -4
- data/lib/cloudsmith-api/models/packages_validateupload_deb.rb +34 -4
- data/lib/cloudsmith-api/models/packages_validateupload_docker.rb +14 -4
- data/lib/cloudsmith-api/models/packages_validateupload_go.rb +14 -4
- data/lib/cloudsmith-api/models/packages_validateupload_helm.rb +14 -4
- data/lib/cloudsmith-api/models/packages_validateupload_luarocks.rb +14 -4
- data/lib/cloudsmith-api/models/packages_validateupload_maven.rb +11 -1
- data/lib/cloudsmith-api/models/packages_validateupload_npm.rb +14 -4
- data/lib/cloudsmith-api/models/packages_validateupload_nuget.rb +14 -4
- data/lib/cloudsmith-api/models/packages_validateupload_python.rb +14 -4
- data/lib/cloudsmith-api/models/packages_validateupload_raw.rb +11 -1
- data/lib/cloudsmith-api/models/packages_validateupload_rpm.rb +14 -4
- data/lib/cloudsmith-api/models/packages_validateupload_ruby.rb +14 -4
- data/lib/cloudsmith-api/models/packages_validateupload_terraform.rb +14 -4
- data/lib/cloudsmith-api/models/packages_validateupload_vagrant.rb +11 -1
- data/lib/cloudsmith-api/models/raw_package_upload.rb +11 -1
- data/lib/cloudsmith-api/models/repos_create.rb +17 -57
- data/lib/cloudsmith-api/models/repos_partial_update.rb +4 -44
- data/lib/cloudsmith-api/models/repository.rb +24 -24
- data/lib/cloudsmith-api/models/repository_token.rb +14 -4
- data/lib/cloudsmith-api/models/repository_token_refresh.rb +14 -4
- data/lib/cloudsmith-api/models/repository_token_sync_tokens.rb +14 -4
- data/lib/cloudsmith-api/models/repository_webhook.rb +11 -1
- data/lib/cloudsmith-api/models/{packages_resync.rb → storage_region.rb} +29 -9
- data/lib/cloudsmith-api/models/vagrant_package_upload.rb +11 -1
- data/lib/cloudsmith-api/models/webhooks_create.rb +11 -1
- data/lib/cloudsmith-api/models/webhooks_partial_update.rb +11 -1
- data/lib/cloudsmith-api/version.rb +1 -1
- data/spec/api/metrics_api_spec.rb +53 -0
- data/spec/api/packages_api_spec.rb +32 -18
- data/spec/api/storageregions_api_spec.rb +58 -0
- data/spec/models/alpine_package_upload_spec.rb +372 -0
- data/spec/models/conan_package_upload_spec.rb +6 -0
- data/spec/models/entitlment_token_metric_spec.rb +48 -0
- data/spec/models/maven_package_upload_spec.rb +6 -0
- data/spec/models/package_copy_spec.rb +12 -0
- data/spec/models/package_move_spec.rb +12 -0
- data/spec/models/package_spec.rb +12 -0
- data/spec/models/packages_move_spec.rb +0 -6
- data/spec/models/packages_tag_spec.rb +54 -0
- data/spec/models/packages_upload_alpine_spec.rb +6 -0
- data/spec/models/packages_upload_cargo_spec.rb +6 -0
- data/spec/models/packages_upload_cocoapods_spec.rb +6 -0
- data/spec/models/packages_upload_composer_spec.rb +6 -0
- data/spec/models/packages_upload_conan_spec.rb +18 -0
- data/spec/models/packages_upload_cran_spec.rb +6 -0
- data/spec/models/packages_upload_dart_spec.rb +6 -0
- data/spec/models/packages_upload_deb_spec.rb +18 -0
- data/spec/models/packages_upload_docker_spec.rb +6 -0
- data/spec/models/packages_upload_go_spec.rb +6 -0
- data/spec/models/packages_upload_helm_spec.rb +6 -0
- data/spec/models/packages_upload_luarocks_spec.rb +6 -0
- data/spec/models/packages_upload_maven_spec.rb +6 -0
- data/spec/models/packages_upload_npm_spec.rb +6 -0
- data/spec/models/packages_upload_nuget_spec.rb +6 -0
- data/spec/models/packages_upload_python_spec.rb +6 -0
- data/spec/models/packages_upload_raw_spec.rb +6 -0
- data/spec/models/packages_upload_rpm_spec.rb +6 -0
- data/spec/models/packages_upload_ruby_spec.rb +6 -0
- data/spec/models/packages_upload_terraform_spec.rb +6 -0
- data/spec/models/packages_upload_vagrant_spec.rb +6 -0
- data/spec/models/packages_validateupload_alpine_spec.rb +6 -0
- data/spec/models/packages_validateupload_cargo_spec.rb +6 -0
- data/spec/models/packages_validateupload_cocoapods_spec.rb +6 -0
- data/spec/models/packages_validateupload_composer_spec.rb +6 -0
- data/spec/models/packages_validateupload_conan_spec.rb +18 -0
- data/spec/models/packages_validateupload_cran_spec.rb +6 -0
- data/spec/models/packages_validateupload_dart_spec.rb +6 -0
- data/spec/models/packages_validateupload_deb_spec.rb +18 -0
- data/spec/models/packages_validateupload_docker_spec.rb +6 -0
- data/spec/models/packages_validateupload_go_spec.rb +6 -0
- data/spec/models/packages_validateupload_helm_spec.rb +6 -0
- data/spec/models/packages_validateupload_luarocks_spec.rb +6 -0
- data/spec/models/packages_validateupload_maven_spec.rb +6 -0
- data/spec/models/packages_validateupload_npm_spec.rb +6 -0
- data/spec/models/packages_validateupload_nuget_spec.rb +6 -0
- data/spec/models/packages_validateupload_python_spec.rb +6 -0
- data/spec/models/packages_validateupload_raw_spec.rb +6 -0
- data/spec/models/packages_validateupload_rpm_spec.rb +6 -0
- data/spec/models/packages_validateupload_ruby_spec.rb +6 -0
- data/spec/models/packages_validateupload_terraform_spec.rb +6 -0
- data/spec/models/packages_validateupload_vagrant_spec.rb +6 -0
- data/spec/models/raw_package_upload_spec.rb +6 -0
- data/spec/models/repos_create_spec.rb +3 -21
- data/spec/models/repos_partial_update_spec.rb +0 -24
- data/spec/models/repository_spec.rb +6 -0
- data/spec/models/repository_token_refresh_spec.rb +6 -0
- data/spec/models/repository_token_spec.rb +6 -0
- data/spec/models/repository_token_sync_tokens_spec.rb +6 -0
- data/spec/models/repository_webhook_spec.rb +6 -0
- data/spec/models/{packages_resync_spec.rb → storage_region_spec.rb} +13 -7
- data/spec/models/vagrant_package_upload_spec.rb +6 -0
- data/spec/models/webhooks_create_spec.rb +6 -0
- data/spec/models/webhooks_partial_update_spec.rb +6 -0
- data/vendor/bundle/ruby/2.6.0/cache/diff-lcs-1.4.4.gem +0 -0
- data/vendor/bundle/ruby/2.6.0/cache/json-2.3.1.gem +0 -0
- data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/autotest-fsevent-0.2.17/gem_make.out +1 -1
- data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/ffi-1.13.1/gem_make.out +2 -2
- 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
- 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
- data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/json-2.3.1/json/ext/generator.so +0 -0
- data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/json-2.3.1/json/ext/parser.so +0 -0
- 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
- data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/.rspec +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/Code-of-Conduct.md +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/Contributing.md +118 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/History.md +319 -0
- data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/License.md +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/Manifest.txt +8 -0
- data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/README.rdoc +10 -10
- data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/Rakefile +39 -22
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/autotest/discover.rb +3 -0
- data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/bin/htmldiff +7 -4
- data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/bin/ldiff +4 -1
- data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/docs/COPYING.txt +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/docs/artistic.txt +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/lib/diff-lcs.rb +3 -0
- data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/lib/diff/lcs.rb +184 -170
- data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/lib/diff/lcs/array.rb +1 -1
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/lib/diff/lcs/backports.rb +9 -0
- data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/lib/diff/lcs/block.rb +1 -1
- data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/lib/diff/lcs/callbacks.rb +15 -12
- data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/lib/diff/lcs/change.rb +30 -37
- data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/lib/diff/lcs/htmldiff.rb +17 -16
- data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/lib/diff/lcs/hunk.rb +156 -74
- data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/lib/diff/lcs/internals.rb +36 -39
- data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/lib/diff/lcs/ldiff.rb +46 -42
- data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/lib/diff/lcs/string.rb +1 -1
- data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/spec/change_spec.rb +31 -7
- 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
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/spec/fixtures/aX +1 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/spec/fixtures/bXaX +1 -0
- data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/spec/fixtures/ds1.csv +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/spec/fixtures/ds2.csv +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/spec/fixtures/ldiff/output.diff +4 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/spec/fixtures/ldiff/output.diff-c +7 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/spec/fixtures/ldiff/output.diff-e +3 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/spec/fixtures/ldiff/output.diff-f +3 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/spec/fixtures/ldiff/output.diff-u +5 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/spec/hunk_spec.rb +83 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/spec/issues_spec.rb +154 -0
- data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/spec/lcs_spec.rb +10 -10
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/spec/ldiff_spec.rb +87 -0
- data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/spec/patch_spec.rb +93 -99
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/spec/sdiff_spec.rb +214 -0
- data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/spec/spec_helper.rb +118 -64
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.4.4/spec/traverse_balanced_spec.rb +310 -0
- data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/spec/traverse_sequences_spec.rb +28 -28
- data/vendor/bundle/ruby/2.6.0/gems/ffi-1.13.1/ext/ffi_c/Makefile +3 -3
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/.gitignore +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/.travis.yml +2 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/CHANGES.md +33 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/Gemfile +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/README-json-jruby.md +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/README.md +16 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/Rakefile +8 -87
- data/vendor/bundle/ruby/2.6.0/gems/json-2.3.1/VERSION +1 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/diagrams/.keep +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/ext/json/ext/fbuffer/fbuffer.h +0 -0
- 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
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/ext/json/ext/generator/depend +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/ext/json/ext/generator/extconf.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/ext/json/ext/generator/generator.c +71 -1
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/ext/json/ext/generator/generator.h +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/json-2.3.1/ext/json/ext/generator/generator.so +0 -0
- 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
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/ext/json/ext/parser/depend +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/ext/json/ext/parser/extconf.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/ext/json/ext/parser/parser.c +71 -70
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/ext/json/ext/parser/parser.h +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/ext/json/ext/parser/parser.rl +1 -0
- data/vendor/bundle/ruby/2.6.0/gems/json-2.3.1/ext/json/ext/parser/parser.so +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/ext/json/extconf.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/install.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/java/src/json/ext/ByteListTranscoder.java +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/java/src/json/ext/Generator.java +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/java/src/json/ext/GeneratorMethods.java +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/java/src/json/ext/GeneratorService.java +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/java/src/json/ext/GeneratorState.java +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/java/src/json/ext/OptionsReader.java +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/java/src/json/ext/Parser.java +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/java/src/json/ext/Parser.rl +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/java/src/json/ext/ParserService.java +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/java/src/json/ext/RuntimeInfo.java +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/java/src/json/ext/StringDecoder.java +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/java/src/json/ext/StringEncoder.java +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/java/src/json/ext/Utils.java +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/json-java.gemspec +3 -3
- data/vendor/bundle/ruby/2.6.0/gems/json-2.3.1/json.gemspec +139 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/json_pure.gemspec +8 -13
- data/vendor/bundle/ruby/2.6.0/gems/json-2.3.1/lib/json.rb +412 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/lib/json/add/bigdecimal.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/lib/json/add/complex.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/lib/json/add/core.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/lib/json/add/date.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/lib/json/add/date_time.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/lib/json/add/exception.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/lib/json/add/ostruct.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/lib/json/add/range.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/lib/json/add/rational.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/lib/json/add/regexp.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/lib/json/add/set.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/lib/json/add/struct.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/lib/json/add/symbol.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/lib/json/add/time.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/json-2.3.1/lib/json/common.rb +691 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/lib/json/ext.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/lib/json/ext/.keep +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/json-2.3.1/lib/json/ext/generator.so +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/json-2.3.1/lib/json/ext/parser.so +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/lib/json/generic_object.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/lib/json/pure.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/lib/json/pure/generator.rb +1 -1
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/lib/json/pure/parser.rb +2 -2
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/lib/json/version.rb +1 -1
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/references/rfc7159.txt +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/fail10.json +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/fail11.json +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/fail12.json +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/fail13.json +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/fail14.json +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/fail18.json +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/fail19.json +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/fail2.json +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/fail20.json +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/fail21.json +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/fail22.json +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/fail23.json +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/fail24.json +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/fail25.json +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/fail27.json +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/fail28.json +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/fail3.json +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/fail4.json +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/fail5.json +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/fail6.json +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/fail7.json +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/fail8.json +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/fail9.json +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/obsolete_fail1.json +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/pass1.json +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/pass15.json +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/pass16.json +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/pass17.json +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/pass2.json +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/pass26.json +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/fixtures/pass3.json +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/json_addition_test.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/json_common_interface_test.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/json_encoding_test.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/json_ext_parser_test.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/json_fixtures_test.rb +6 -1
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/json_generator_test.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/json_generic_object_test.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/json_parser_test.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/json_string_matching_test.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tests/test_helper.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tools/diff.sh +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tools/fuzz.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/{json-2.3.0 → json-2.3.1}/tools/server.rb +0 -0
- data/vendor/bundle/ruby/2.6.0/specifications/{diff-lcs-1.3.gemspec → diff-lcs-1.4.4.gemspec} +11 -13
- data/vendor/bundle/ruby/2.6.0/specifications/{json-2.3.0.gemspec → json-2.3.1.gemspec} +0 -0
- data/vendor/bundle/ruby/2.6.0/specifications/sys-uname-1.2.1.gemspec +1 -1
- metadata +277 -250
- data/docs/PackagesResync.md +0 -8
- data/vendor/bundle/ruby/2.6.0/cache/diff-lcs-1.3.gem +0 -0
- data/vendor/bundle/ruby/2.6.0/cache/json-2.3.0.gem +0 -0
- data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/json-2.3.0/json/ext/generator.so +0 -0
- data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/json-2.3.0/json/ext/parser.so +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/Contributing.md +0 -83
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/History.md +0 -220
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/autotest/discover.rb +0 -1
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/lib/diff-lcs.rb +0 -3
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/spec/diff_spec.rb +0 -47
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/spec/hunk_spec.rb +0 -72
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/spec/issues_spec.rb +0 -49
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/spec/sdiff_spec.rb +0 -214
- data/vendor/bundle/ruby/2.6.0/gems/diff-lcs-1.3/spec/traverse_balanced_spec.rb +0 -310
- data/vendor/bundle/ruby/2.6.0/gems/json-2.3.0/LICENSE +0 -56
- data/vendor/bundle/ruby/2.6.0/gems/json-2.3.0/VERSION +0 -1
- data/vendor/bundle/ruby/2.6.0/gems/json-2.3.0/ext/json/ext/generator/generator.so +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/json-2.3.0/ext/json/ext/parser/parser.so +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/json-2.3.0/json.gemspec +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/json-2.3.0/lib/json.rb +0 -63
- data/vendor/bundle/ruby/2.6.0/gems/json-2.3.0/lib/json/common.rb +0 -456
- data/vendor/bundle/ruby/2.6.0/gems/json-2.3.0/lib/json/ext/generator.so +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/json-2.3.0/lib/json/ext/parser.so +0 -0
data/vendor/bundle/ruby/2.6.0/gems/{diff-lcs-1.3 → diff-lcs-1.4.4}/lib/diff/lcs/internals.rb
RENAMED
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
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 (
|
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 (
|
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
|
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] = [
|
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
|
-
|
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
|
-
#
|
98
|
-
#
|
99
|
-
#
|
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
|
-
|
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
|
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
|
126
|
+
new_patchset.concat(hunk)
|
129
127
|
end
|
130
128
|
else
|
131
|
-
|
129
|
+
fail ArgumentError, "Cannot normalise a hunk of class #{hunk.class}."
|
132
130
|
end
|
133
131
|
end
|
134
132
|
|
135
|
-
[
|
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
|
-
|
178
|
-
|
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
|
208
|
+
break if !limit.nil? && (count > limit)
|
213
209
|
end
|
214
210
|
|
215
|
-
no_left =
|
216
|
-
no_right =
|
211
|
+
no_left = left_match.zero? && left_miss.positive?
|
212
|
+
no_right = right_match.zero? && right_miss.positive?
|
217
213
|
|
218
|
-
case [
|
219
|
-
when [
|
214
|
+
case [no_left, no_right]
|
215
|
+
when [false, true]
|
220
216
|
:patch
|
221
|
-
when [
|
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
|
-
|
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
|
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
|
-
|
268
|
-
|
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
|
-
|
275
|
+
first_index
|
279
276
|
end
|
280
277
|
private :replace_next_larger
|
281
278
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
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-
|
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,
|
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(
|
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(
|
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 |
|
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 |
|
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(
|
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 |
|
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 |
|
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
|
-
|
93
|
-
|
94
|
-
data_new = IO.read(file_new)
|
101
|
+
data_old = IO.read(file_old)
|
102
|
+
data_new = IO.read(file_new)
|
95
103
|
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
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
|
-
|
105
|
-
|
106
|
-
|
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
|
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
|
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
|
153
|
+
next if @lines.positive? and hunk.merge(oldhunk)
|
152
154
|
|
153
|
-
output << oldhunk.diff(@format)
|
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
|
-
|
162
|
+
last = oldhunk.diff(@format, true)
|
163
|
+
last << "\n" if last.respond_to?(:end_with?) && !last.end_with?("\n")
|
160
164
|
|
161
|
-
|
162
|
-
|
163
|
-
|
165
|
+
output << last
|
166
|
+
|
167
|
+
output.reverse_each { |e| real_output << e.diff(:ed_finish) } if @format == :ed
|
164
168
|
|
165
|
-
|
169
|
+
1
|
166
170
|
end
|
167
171
|
end
|
@@ -1,9 +1,9 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'spec_helper'
|
4
4
|
|
5
5
|
describe Diff::LCS::Change do
|
6
|
-
describe
|
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
|
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
|
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
|
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
|
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
|
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
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'spec_helper'
|
4
4
|
|
5
|
-
describe
|
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
|
-
[
|
22
|
-
[
|
23
|
-
[
|
24
|
-
[
|
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
|
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
|
41
|
-
expect(Diff::LCS.diff(hello, hello)).to
|
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
|
45
|
-
expect(Diff::LCS.diff(hello_ary, hello_ary)).to
|
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
|