cybrid_api_bank_ruby 0.113.109 → 0.113.114
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +5 -5
- data/cybrid_api_bank_ruby.gemspec +1 -1
- data/docs/PostExternalBankAccountBankModel.md +1 -1
- data/lib/cybrid_api_bank_ruby/api/accounts_bank_api.rb +1 -1
- data/lib/cybrid_api_bank_ruby/api/assets_bank_api.rb +1 -1
- data/lib/cybrid_api_bank_ruby/api/banks_bank_api.rb +1 -1
- data/lib/cybrid_api_bank_ruby/api/customers_bank_api.rb +1 -1
- data/lib/cybrid_api_bank_ruby/api/deposit_addresses_bank_api.rb +1 -1
- data/lib/cybrid_api_bank_ruby/api/deposit_bank_accounts_bank_api.rb +1 -1
- data/lib/cybrid_api_bank_ruby/api/external_bank_accounts_bank_api.rb +1 -1
- data/lib/cybrid_api_bank_ruby/api/external_wallets_bank_api.rb +1 -1
- data/lib/cybrid_api_bank_ruby/api/identity_verifications_bank_api.rb +1 -1
- data/lib/cybrid_api_bank_ruby/api/prices_bank_api.rb +1 -1
- data/lib/cybrid_api_bank_ruby/api/quotes_bank_api.rb +1 -1
- data/lib/cybrid_api_bank_ruby/api/symbols_bank_api.rb +1 -1
- data/lib/cybrid_api_bank_ruby/api/trades_bank_api.rb +1 -1
- data/lib/cybrid_api_bank_ruby/api/transfers_bank_api.rb +1 -1
- data/lib/cybrid_api_bank_ruby/api/workflows_bank_api.rb +1 -1
- data/lib/cybrid_api_bank_ruby/api_client.rb +1 -1
- data/lib/cybrid_api_bank_ruby/api_error.rb +1 -1
- data/lib/cybrid_api_bank_ruby/configuration.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/account_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/account_list_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/account_state_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/account_type_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/asset_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/asset_list_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/asset_types_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/bank_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/bank_feature_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/bank_list_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/bank_type_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/customer_address_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/customer_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/customer_list_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/customer_name_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/customer_state_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/customer_type_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/deposit_address_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/deposit_address_format_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/deposit_address_list_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/deposit_address_state_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/deposit_bank_account_account_details_inner_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/deposit_bank_account_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/deposit_bank_account_counterparty_address_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/deposit_bank_account_list_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/deposit_bank_account_routing_details_inner_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/deposit_bank_account_routing_number_type_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/deposit_bank_account_state_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/error_response_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/external_bank_account_balances_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/external_bank_account_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/external_bank_account_kind_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/external_bank_account_list_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/external_bank_account_pii_inner_addresses_inner_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/external_bank_account_pii_inner_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/external_bank_account_state_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/external_wallet_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/external_wallet_environment_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/external_wallet_list_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/external_wallet_state_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/identity_verification_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/identity_verification_list_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/identity_verification_method_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/identity_verification_outcome_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/identity_verification_persona_state_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/identity_verification_state_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/identity_verification_type_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/identity_verification_with_details_all_of_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/identity_verification_with_details_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/patch_bank_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/patch_customer_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/patch_external_bank_account_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_account_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_bank_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_customer_address_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_customer_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_customer_name_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_deposit_address_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_deposit_bank_account_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_external_bank_account_bank_model.rb +2 -2
- data/lib/cybrid_api_bank_ruby/models/post_external_bank_account_counterparty_address_bank_model.rb +2 -2
- data/lib/cybrid_api_bank_ruby/models/post_external_bank_account_counterparty_bank_account_bank_model.rb +2 -2
- data/lib/cybrid_api_bank_ruby/models/post_external_bank_account_counterparty_name_bank_model.rb +2 -2
- data/lib/cybrid_api_bank_ruby/models/post_external_wallet_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_identification_number_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_identity_verification_address_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_identity_verification_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_identity_verification_name_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_quote_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_trade_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_transfer_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/post_workflow_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/quote_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/quote_list_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/quote_side_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/quote_type_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/symbol_price_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/trade_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/trade_list_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/trade_side_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/trade_state_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/trade_type_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/transfer_account_type_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/transfer_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/transfer_destination_account_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/transfer_list_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/transfer_side_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/transfer_source_account_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/transfer_state_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/transfer_type_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/verification_check_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/verification_check_state_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/verification_check_type_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/workflow_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/workflow_state_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/workflow_type_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/workflow_with_details_all_of_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/workflow_with_details_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/models/workflows_list_bank_model.rb +1 -1
- data/lib/cybrid_api_bank_ruby/version.rb +2 -2
- data/lib/cybrid_api_bank_ruby.rb +1 -1
- data/spec/api/accounts_bank_api_spec.rb +1 -1
- data/spec/api/assets_bank_api_spec.rb +1 -1
- data/spec/api/banks_bank_api_spec.rb +1 -1
- data/spec/api/customers_bank_api_spec.rb +1 -1
- data/spec/api/deposit_addresses_bank_api_spec.rb +1 -1
- data/spec/api/deposit_bank_accounts_bank_api_spec.rb +1 -1
- data/spec/api/external_bank_accounts_bank_api_spec.rb +1 -1
- data/spec/api/external_wallets_bank_api_spec.rb +1 -1
- data/spec/api/identity_verifications_bank_api_spec.rb +1 -1
- data/spec/api/prices_bank_api_spec.rb +1 -1
- data/spec/api/quotes_bank_api_spec.rb +1 -1
- data/spec/api/symbols_bank_api_spec.rb +1 -1
- data/spec/api/trades_bank_api_spec.rb +1 -1
- data/spec/api/transfers_bank_api_spec.rb +1 -1
- data/spec/api/workflows_bank_api_spec.rb +1 -1
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +1 -1
- data/spec/models/account_bank_model_spec.rb +1 -1
- data/spec/models/account_list_bank_model_spec.rb +1 -1
- data/spec/models/account_state_bank_model_spec.rb +1 -1
- data/spec/models/account_type_bank_model_spec.rb +1 -1
- data/spec/models/asset_bank_model_spec.rb +1 -1
- data/spec/models/asset_list_bank_model_spec.rb +1 -1
- data/spec/models/asset_types_bank_model_spec.rb +1 -1
- data/spec/models/bank_bank_model_spec.rb +1 -1
- data/spec/models/bank_feature_bank_model_spec.rb +1 -1
- data/spec/models/bank_list_bank_model_spec.rb +1 -1
- data/spec/models/bank_type_bank_model_spec.rb +1 -1
- data/spec/models/customer_address_bank_model_spec.rb +1 -1
- data/spec/models/customer_bank_model_spec.rb +1 -1
- data/spec/models/customer_list_bank_model_spec.rb +1 -1
- data/spec/models/customer_name_bank_model_spec.rb +1 -1
- data/spec/models/customer_state_bank_model_spec.rb +1 -1
- data/spec/models/customer_type_bank_model_spec.rb +1 -1
- data/spec/models/deposit_address_bank_model_spec.rb +1 -1
- data/spec/models/deposit_address_format_bank_model_spec.rb +1 -1
- data/spec/models/deposit_address_list_bank_model_spec.rb +1 -1
- data/spec/models/deposit_address_state_bank_model_spec.rb +1 -1
- data/spec/models/deposit_bank_account_account_details_inner_bank_model_spec.rb +1 -1
- data/spec/models/deposit_bank_account_bank_model_spec.rb +1 -1
- data/spec/models/deposit_bank_account_counterparty_address_bank_model_spec.rb +1 -1
- data/spec/models/deposit_bank_account_list_bank_model_spec.rb +1 -1
- data/spec/models/deposit_bank_account_routing_details_inner_bank_model_spec.rb +1 -1
- data/spec/models/deposit_bank_account_routing_number_type_bank_model_spec.rb +1 -1
- data/spec/models/deposit_bank_account_state_bank_model_spec.rb +1 -1
- data/spec/models/error_response_bank_model_spec.rb +1 -1
- data/spec/models/external_bank_account_balances_bank_model_spec.rb +1 -1
- data/spec/models/external_bank_account_bank_model_spec.rb +1 -1
- data/spec/models/external_bank_account_kind_bank_model_spec.rb +1 -1
- data/spec/models/external_bank_account_list_bank_model_spec.rb +1 -1
- data/spec/models/external_bank_account_pii_inner_addresses_inner_bank_model_spec.rb +1 -1
- data/spec/models/external_bank_account_pii_inner_bank_model_spec.rb +1 -1
- data/spec/models/external_bank_account_state_bank_model_spec.rb +1 -1
- data/spec/models/external_wallet_bank_model_spec.rb +1 -1
- data/spec/models/external_wallet_environment_bank_model_spec.rb +1 -1
- data/spec/models/external_wallet_list_bank_model_spec.rb +1 -1
- data/spec/models/external_wallet_state_bank_model_spec.rb +1 -1
- data/spec/models/identity_verification_bank_model_spec.rb +1 -1
- data/spec/models/identity_verification_list_bank_model_spec.rb +1 -1
- data/spec/models/identity_verification_method_bank_model_spec.rb +1 -1
- data/spec/models/identity_verification_outcome_bank_model_spec.rb +1 -1
- data/spec/models/identity_verification_persona_state_bank_model_spec.rb +1 -1
- data/spec/models/identity_verification_state_bank_model_spec.rb +1 -1
- data/spec/models/identity_verification_type_bank_model_spec.rb +1 -1
- data/spec/models/identity_verification_with_details_all_of_bank_model_spec.rb +1 -1
- data/spec/models/identity_verification_with_details_bank_model_spec.rb +1 -1
- data/spec/models/patch_bank_bank_model_spec.rb +1 -1
- data/spec/models/patch_customer_bank_model_spec.rb +1 -1
- data/spec/models/patch_external_bank_account_bank_model_spec.rb +1 -1
- data/spec/models/post_account_bank_model_spec.rb +1 -1
- data/spec/models/post_bank_bank_model_spec.rb +1 -1
- data/spec/models/post_customer_address_bank_model_spec.rb +1 -1
- data/spec/models/post_customer_bank_model_spec.rb +1 -1
- data/spec/models/post_customer_name_bank_model_spec.rb +1 -1
- data/spec/models/post_deposit_address_bank_model_spec.rb +1 -1
- data/spec/models/post_deposit_bank_account_bank_model_spec.rb +1 -1
- data/spec/models/post_external_bank_account_bank_model_spec.rb +1 -1
- data/spec/models/post_external_bank_account_counterparty_address_bank_model_spec.rb +1 -1
- data/spec/models/post_external_bank_account_counterparty_bank_account_bank_model_spec.rb +1 -1
- data/spec/models/post_external_bank_account_counterparty_name_bank_model_spec.rb +1 -1
- data/spec/models/post_external_wallet_bank_model_spec.rb +1 -1
- data/spec/models/post_identification_number_bank_model_spec.rb +1 -1
- data/spec/models/post_identity_verification_address_bank_model_spec.rb +1 -1
- data/spec/models/post_identity_verification_bank_model_spec.rb +1 -1
- data/spec/models/post_identity_verification_name_bank_model_spec.rb +1 -1
- data/spec/models/post_quote_bank_model_spec.rb +1 -1
- data/spec/models/post_trade_bank_model_spec.rb +1 -1
- data/spec/models/post_transfer_bank_model_spec.rb +1 -1
- data/spec/models/post_workflow_bank_model_spec.rb +1 -1
- data/spec/models/quote_bank_model_spec.rb +1 -1
- data/spec/models/quote_list_bank_model_spec.rb +1 -1
- data/spec/models/quote_side_bank_model_spec.rb +1 -1
- data/spec/models/quote_type_bank_model_spec.rb +1 -1
- data/spec/models/symbol_price_bank_model_spec.rb +1 -1
- data/spec/models/trade_bank_model_spec.rb +1 -1
- data/spec/models/trade_list_bank_model_spec.rb +1 -1
- data/spec/models/trade_side_bank_model_spec.rb +1 -1
- data/spec/models/trade_state_bank_model_spec.rb +1 -1
- data/spec/models/trade_type_bank_model_spec.rb +1 -1
- data/spec/models/transfer_account_type_bank_model_spec.rb +1 -1
- data/spec/models/transfer_bank_model_spec.rb +1 -1
- data/spec/models/transfer_destination_account_bank_model_spec.rb +1 -1
- data/spec/models/transfer_list_bank_model_spec.rb +1 -1
- data/spec/models/transfer_side_bank_model_spec.rb +1 -1
- data/spec/models/transfer_source_account_bank_model_spec.rb +1 -1
- data/spec/models/transfer_state_bank_model_spec.rb +1 -1
- data/spec/models/transfer_type_bank_model_spec.rb +1 -1
- data/spec/models/verification_check_bank_model_spec.rb +1 -1
- data/spec/models/verification_check_state_bank_model_spec.rb +1 -1
- data/spec/models/verification_check_type_bank_model_spec.rb +1 -1
- data/spec/models/workflow_bank_model_spec.rb +1 -1
- data/spec/models/workflow_state_bank_model_spec.rb +1 -1
- data/spec/models/workflow_type_bank_model_spec.rb +1 -1
- data/spec/models/workflow_with_details_all_of_bank_model_spec.rb +1 -1
- data/spec/models/workflow_with_details_bank_model_spec.rb +1 -1
- data/spec/models/workflows_list_bank_model_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- data/vendor/bundle/ruby/3.2.0/cache/diff-lcs-1.5.1.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/byebug-11.1.3/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/ffi-1.16.3/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/jaro_winkler-1.5.6/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/psych-5.1.2/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/racc-1.7.3/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/extensions/x86_64-linux/3.2.0/stringio-3.1.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/Contributing.md +2 -0
- data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/History.md +86 -55
- data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/License.md +6 -4
- data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/Rakefile +36 -27
- data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/bin/htmldiff +4 -4
- data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/lib/diff/lcs/array.rb +1 -1
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.1/lib/diff/lcs/backports.rb +9 -0
- data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/lib/diff/lcs/block.rb +4 -4
- data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/lib/diff/lcs/callbacks.rb +9 -7
- data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/lib/diff/lcs/change.rb +19 -19
- data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/lib/diff/lcs/htmldiff.rb +24 -16
- data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/lib/diff/lcs/hunk.rb +35 -30
- data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/lib/diff/lcs/internals.rb +17 -17
- data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/lib/diff/lcs/ldiff.rb +37 -35
- data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/lib/diff/lcs.rb +57 -55
- data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/lib/diff-lcs.rb +1 -1
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.1/spec/change_spec.rb +89 -0
- data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/spec/diff_spec.rb +14 -14
- data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/spec/hunk_spec.rb +19 -19
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.1/spec/issues_spec.rb +160 -0
- data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/spec/lcs_spec.rb +11 -11
- data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/spec/ldiff_spec.rb +13 -11
- data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/spec/patch_spec.rb +84 -84
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.1/spec/sdiff_spec.rb +216 -0
- data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/spec/spec_helper.rb +76 -74
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.1/spec/traverse_balanced_spec.rb +312 -0
- data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/spec/traverse_sequences_spec.rb +31 -31
- data/vendor/bundle/ruby/3.2.0/specifications/{diff-lcs-1.5.0.gemspec → diff-lcs-1.5.1.gemspec} +7 -7
- metadata +63 -63
- data/vendor/bundle/ruby/3.2.0/cache/diff-lcs-1.5.0.gem +0 -0
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/lib/diff/lcs/backports.rb +0 -9
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/spec/change_spec.rb +0 -89
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/spec/issues_spec.rb +0 -154
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/spec/sdiff_spec.rb +0 -214
- data/vendor/bundle/ruby/3.2.0/gems/diff-lcs-1.5.0/spec/traverse_balanced_spec.rb +0 -310
- /data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/.rspec +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/Code-of-Conduct.md +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/Manifest.txt +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/README.rdoc +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/bin/ldiff +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/docs/COPYING.txt +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/docs/artistic.txt +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/lib/diff/lcs/string.rb +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/spec/fixtures/aX +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/spec/fixtures/bXaX +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/spec/fixtures/ds1.csv +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/spec/fixtures/ds2.csv +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/spec/fixtures/ldiff/output.diff +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/spec/fixtures/ldiff/output.diff-c +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/spec/fixtures/ldiff/output.diff-e +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/spec/fixtures/ldiff/output.diff-f +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/spec/fixtures/ldiff/output.diff-u +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/spec/fixtures/ldiff/output.diff.chef +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/spec/fixtures/ldiff/output.diff.chef-c +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/spec/fixtures/ldiff/output.diff.chef-e +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/spec/fixtures/ldiff/output.diff.chef-f +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/spec/fixtures/ldiff/output.diff.chef-u +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/spec/fixtures/ldiff/output.diff.chef2 +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/spec/fixtures/ldiff/output.diff.chef2-c +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/spec/fixtures/ldiff/output.diff.chef2-d +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/spec/fixtures/ldiff/output.diff.chef2-e +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/spec/fixtures/ldiff/output.diff.chef2-f +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/spec/fixtures/ldiff/output.diff.chef2-u +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/spec/fixtures/new-chef +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/spec/fixtures/new-chef2 +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/spec/fixtures/old-chef +0 -0
- /data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/spec/fixtures/old-chef2 +0 -0
data/vendor/bundle/ruby/3.2.0/gems/{diff-lcs-1.5.0 → diff-lcs-1.5.1}/lib/diff/lcs/internals.rb
RENAMED
@@ -13,7 +13,7 @@ class << Diff::LCS
|
|
13
13
|
|
14
14
|
if block
|
15
15
|
callbacks.diffs.map do |hunk|
|
16
|
-
if hunk.
|
16
|
+
if hunk.is_a? Array
|
17
17
|
hunk.map { |hunk_block| block[hunk_block] }
|
18
18
|
else
|
19
19
|
block[hunk]
|
@@ -45,14 +45,14 @@ class << Diff::LCS::Internals
|
|
45
45
|
vector = []
|
46
46
|
|
47
47
|
# Collect any common elements at the beginning...
|
48
|
-
while (a_start <= a_finish)
|
48
|
+
while (a_start <= a_finish) && (b_start <= b_finish) && (a[a_start] == b[b_start])
|
49
49
|
vector[a_start] = b_start
|
50
50
|
a_start += 1
|
51
51
|
b_start += 1
|
52
52
|
end
|
53
53
|
|
54
54
|
# Now the end...
|
55
|
-
while (a_start <= a_finish)
|
55
|
+
while (a_start <= a_finish) && (b_start <= b_finish) && (a[a_finish] == b[b_finish])
|
56
56
|
vector[a_finish] = b_finish
|
57
57
|
a_finish -= 1
|
58
58
|
b_finish -= 1
|
@@ -63,8 +63,8 @@ class << Diff::LCS::Internals
|
|
63
63
|
b_matches = position_hash(b, b_start..b_finish)
|
64
64
|
|
65
65
|
thresh = []
|
66
|
-
links
|
67
|
-
string = a.
|
66
|
+
links = []
|
67
|
+
string = a.is_a?(String)
|
68
68
|
|
69
69
|
(a_start..a_finish).each do |i|
|
70
70
|
ai = string ? a[i, 1] : a[i]
|
@@ -75,7 +75,7 @@ class << Diff::LCS::Internals
|
|
75
75
|
# it may have an optimization purpose
|
76
76
|
# An attempt to remove it: https://github.com/halostatue/diff-lcs/pull/72
|
77
77
|
# Why it is reintroduced: https://github.com/halostatue/diff-lcs/issues/78
|
78
|
-
if k
|
78
|
+
if k && (thresh[k] > j) && (thresh[k - 1] < j)
|
79
79
|
thresh[k] = j
|
80
80
|
else
|
81
81
|
k = replace_next_larger(thresh, j, k)
|
@@ -100,7 +100,7 @@ class << Diff::LCS::Internals
|
|
100
100
|
# the object form of same) and detection of whether the patchset represents
|
101
101
|
# changes to be made.
|
102
102
|
def analyze_patchset(patchset, depth = 0)
|
103
|
-
fail
|
103
|
+
fail "Patchset too complex" if depth > 1
|
104
104
|
|
105
105
|
has_changes = false
|
106
106
|
new_patchset = []
|
@@ -145,7 +145,7 @@ class << Diff::LCS::Internals
|
|
145
145
|
# Diff::LCS::Change as its source, as an array will cause the creation
|
146
146
|
# of one of the above.
|
147
147
|
def intuit_diff_direction(src, patchset, limit = nil)
|
148
|
-
string = src.
|
148
|
+
string = src.is_a?(String)
|
149
149
|
count = left_match = left_miss = right_match = right_miss = 0
|
150
150
|
|
151
151
|
patchset.each do |change|
|
@@ -157,22 +157,22 @@ class << Diff::LCS::Internals
|
|
157
157
|
re = string ? src[change.new_position, 1] : src[change.new_position]
|
158
158
|
|
159
159
|
case change.action
|
160
|
-
when
|
160
|
+
when "-" # Remove details from the old string
|
161
161
|
if le == change.old_element
|
162
162
|
left_match += 1
|
163
163
|
else
|
164
164
|
left_miss += 1
|
165
165
|
end
|
166
|
-
when
|
166
|
+
when "+"
|
167
167
|
if re == change.new_element
|
168
168
|
right_match += 1
|
169
169
|
else
|
170
170
|
right_miss += 1
|
171
171
|
end
|
172
|
-
when
|
172
|
+
when "="
|
173
173
|
left_miss += 1 if le != change.old_element
|
174
174
|
right_miss += 1 if re != change.new_element
|
175
|
-
when
|
175
|
+
when "!"
|
176
176
|
if le == change.old_element
|
177
177
|
left_match += 1
|
178
178
|
elsif re == change.new_element
|
@@ -189,19 +189,19 @@ class << Diff::LCS::Internals
|
|
189
189
|
element = string ? src[change.position, 1] : src[change.position]
|
190
190
|
|
191
191
|
case change.action
|
192
|
-
when
|
192
|
+
when "-"
|
193
193
|
if element == change.element
|
194
194
|
left_match += 1
|
195
195
|
else
|
196
196
|
left_miss += 1
|
197
197
|
end
|
198
|
-
when
|
198
|
+
when "+"
|
199
199
|
if element == change.element
|
200
200
|
right_match += 1
|
201
201
|
else
|
202
202
|
right_miss += 1
|
203
203
|
end
|
204
|
-
when
|
204
|
+
when "="
|
205
205
|
if element != change.element
|
206
206
|
left_miss += 1
|
207
207
|
right_miss += 1
|
@@ -251,7 +251,7 @@ enumerable as either source or destination value."
|
|
251
251
|
# This operation preserves the sort order.
|
252
252
|
def replace_next_larger(enum, value, last_index = nil)
|
253
253
|
# Off the end?
|
254
|
-
if enum.empty?
|
254
|
+
if enum.empty? || (value > enum[-1])
|
255
255
|
enum << value
|
256
256
|
return enum.size - 1
|
257
257
|
end
|
@@ -296,7 +296,7 @@ enumerable as either source or destination value."
|
|
296
296
|
# positions it occupies in the Enumerable, optionally restricted to the
|
297
297
|
# elements specified in the range of indexes specified by +interval+.
|
298
298
|
def position_hash(enum, interval)
|
299
|
-
string = enum.
|
299
|
+
string = enum.is_a?(String)
|
300
300
|
hash = Hash.new { |h, k| h[k] = [] }
|
301
301
|
interval.each do |i|
|
302
302
|
k = string ? enum[i, 1] : enum[i]
|
@@ -1,10 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
5
|
-
require
|
3
|
+
require "optparse"
|
4
|
+
require "ostruct"
|
5
|
+
require "diff/lcs/hunk"
|
6
6
|
|
7
|
-
module Diff::LCS::Ldiff
|
7
|
+
module Diff::LCS::Ldiff # :nodoc:
|
8
|
+
# standard:disable Layout/HeredocIndentation
|
8
9
|
BANNER = <<-COPYRIGHT
|
9
10
|
ldiff #{Diff::LCS::VERSION}
|
10
11
|
Copyright 2004-2019 Austin Ziegler
|
@@ -16,60 +17,61 @@ ldiff #{Diff::LCS::VERSION}
|
|
16
17
|
the terms of the GPL version 2 (or later), the Perl Artistic licence, or the
|
17
18
|
MIT licence.
|
18
19
|
COPYRIGHT
|
20
|
+
# standard:enable Layout/HeredocIndentation
|
19
21
|
end
|
20
22
|
|
21
23
|
class << Diff::LCS::Ldiff
|
22
|
-
attr_reader :format, :lines
|
23
|
-
attr_reader :file_old, :file_new
|
24
|
-
attr_reader :data_old, :data_new
|
24
|
+
attr_reader :format, :lines # :nodoc:
|
25
|
+
attr_reader :file_old, :file_new # :nodoc:
|
26
|
+
attr_reader :data_old, :data_new # :nodoc:
|
25
27
|
|
26
|
-
def run(args, _input = $stdin, output = $stdout, error = $stderr)
|
28
|
+
def run(args, _input = $stdin, output = $stdout, error = $stderr) # :nodoc:
|
27
29
|
@binary = nil
|
28
30
|
|
29
31
|
args.options do |o|
|
30
32
|
o.banner = "Usage: #{File.basename($0)} [options] oldfile newfile"
|
31
|
-
o.separator
|
33
|
+
o.separator ""
|
32
34
|
o.on(
|
33
|
-
|
34
|
-
|
35
|
+
"-c", "-C", "--context [LINES]", Integer,
|
36
|
+
"Displays a context diff with LINES lines", "of context. Default 3 lines."
|
35
37
|
) do |ctx|
|
36
38
|
@format = :context
|
37
|
-
@lines
|
39
|
+
@lines = ctx || 3
|
38
40
|
end
|
39
41
|
o.on(
|
40
|
-
|
41
|
-
|
42
|
+
"-u", "-U", "--unified [LINES]", Integer,
|
43
|
+
"Displays a unified diff with LINES lines", "of context. Default 3 lines."
|
42
44
|
) do |ctx|
|
43
45
|
@format = :unified
|
44
|
-
@lines
|
46
|
+
@lines = ctx || 3
|
45
47
|
end
|
46
|
-
o.on(
|
48
|
+
o.on("-e", "Creates an 'ed' script to change", "oldfile to newfile.") do |_ctx|
|
47
49
|
@format = :ed
|
48
50
|
end
|
49
|
-
o.on(
|
51
|
+
o.on("-f", "Creates an 'ed' script to change", "oldfile to newfile in reverse order.") do |_ctx|
|
50
52
|
@format = :reverse_ed
|
51
53
|
end
|
52
54
|
o.on(
|
53
|
-
|
54
|
-
|
55
|
+
"-a", "--text",
|
56
|
+
"Treat the files as text and compare them", "line-by-line, even if they do not seem", "to be text."
|
55
57
|
) do |_txt|
|
56
58
|
@binary = false
|
57
59
|
end
|
58
|
-
o.on(
|
60
|
+
o.on("--binary", "Treats the files as binary.") do |_bin|
|
59
61
|
@binary = true
|
60
62
|
end
|
61
|
-
o.on(
|
63
|
+
o.on("-q", "--brief", "Report only whether or not the files", "differ, not the details.") do |_ctx|
|
62
64
|
@format = :report
|
63
65
|
end
|
64
|
-
o.on_tail(
|
66
|
+
o.on_tail("--help", "Shows this text.") do
|
65
67
|
error << o
|
66
68
|
return 0
|
67
69
|
end
|
68
|
-
o.on_tail(
|
70
|
+
o.on_tail("--version", "Shows the version of Diff::LCS.") do
|
69
71
|
error << Diff::LCS::Ldiff::BANNER
|
70
72
|
return 0
|
71
73
|
end
|
72
|
-
o.on_tail
|
74
|
+
o.on_tail ""
|
73
75
|
o.on_tail 'By default, runs produces an "old-style" diff, with output like UNIX diff.'
|
74
76
|
o.parse!
|
75
77
|
end
|
@@ -81,25 +83,25 @@ class << Diff::LCS::Ldiff
|
|
81
83
|
|
82
84
|
# Defaults are for old-style diff
|
83
85
|
@format ||= :old
|
84
|
-
@lines
|
86
|
+
@lines ||= 0
|
85
87
|
|
86
88
|
file_old, file_new = *ARGV
|
87
89
|
|
88
90
|
case @format
|
89
91
|
when :context
|
90
|
-
char_old =
|
91
|
-
char_new =
|
92
|
+
char_old = "*" * 3
|
93
|
+
char_new = "-" * 3
|
92
94
|
when :unified
|
93
|
-
char_old =
|
94
|
-
char_new =
|
95
|
+
char_old = "-" * 3
|
96
|
+
char_new = "+" * 3
|
95
97
|
end
|
96
98
|
|
97
99
|
# After we've read up to a certain point in each file, the number of
|
98
100
|
# items we've read from each file will differ by FLD (could be 0).
|
99
101
|
file_length_difference = 0
|
100
102
|
|
101
|
-
data_old =
|
102
|
-
data_new =
|
103
|
+
data_old = File.read(file_old)
|
104
|
+
data_new = File.read(file_new)
|
103
105
|
|
104
106
|
# Test binary status
|
105
107
|
if @binary.nil?
|
@@ -128,10 +130,10 @@ class << Diff::LCS::Ldiff
|
|
128
130
|
return 1
|
129
131
|
end
|
130
132
|
|
131
|
-
if (@format == :unified)
|
132
|
-
ft = File.stat(file_old).mtime.localtime.strftime(
|
133
|
+
if (@format == :unified) || (@format == :context)
|
134
|
+
ft = File.stat(file_old).mtime.localtime.strftime("%Y-%m-%d %H:%M:%S.000000000 %z")
|
133
135
|
output << "#{char_old} #{file_old}\t#{ft}\n"
|
134
|
-
ft = File.stat(file_new).mtime.localtime.strftime(
|
136
|
+
ft = File.stat(file_new).mtime.localtime.strftime("%Y-%m-%d %H:%M:%S.000000000 %z")
|
135
137
|
output << "#{char_new} #{file_new}\t#{ft}\n"
|
136
138
|
end
|
137
139
|
|
@@ -150,7 +152,7 @@ class << Diff::LCS::Ldiff
|
|
150
152
|
file_length_difference = hunk.file_length_difference
|
151
153
|
|
152
154
|
next unless oldhunk
|
153
|
-
next if @lines.positive?
|
155
|
+
next if @lines.positive? && hunk.merge(oldhunk)
|
154
156
|
|
155
157
|
output << oldhunk.diff(@format)
|
156
158
|
output << "\n" if @format == :unified
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
module Diff; end unless defined? Diff
|
3
|
+
module Diff; end unless defined? Diff
|
4
4
|
|
5
5
|
# == How Diff Works (by Mark-Jason Dominus)
|
6
6
|
#
|
@@ -49,13 +49,13 @@ module Diff; end unless defined? Diff # rubocop:disable Style/Documentation
|
|
49
49
|
# a x b y c z p d q
|
50
50
|
# a b c a x b y c z
|
51
51
|
module Diff::LCS
|
52
|
-
VERSION =
|
52
|
+
VERSION = "1.5.1"
|
53
53
|
end
|
54
54
|
|
55
|
-
require
|
56
|
-
require
|
55
|
+
require "diff/lcs/callbacks"
|
56
|
+
require "diff/lcs/internals"
|
57
57
|
|
58
|
-
module Diff::LCS
|
58
|
+
module Diff::LCS
|
59
59
|
# Returns an Array containing the longest common subsequence(s) between
|
60
60
|
# +self+ and +other+. See Diff::LCS#lcs.
|
61
61
|
#
|
@@ -67,7 +67,7 @@ module Diff::LCS # rubocop:disable Style/Documentation
|
|
67
67
|
# identically for key purposes. That is:
|
68
68
|
#
|
69
69
|
# O.new('a').eql?(O.new('a')) == true
|
70
|
-
def lcs(other, &block)
|
70
|
+
def lcs(other, &block) # :yields: self[i] if there are matched subsequences
|
71
71
|
Diff::LCS.lcs(self, other, &block)
|
72
72
|
end
|
73
73
|
|
@@ -101,7 +101,7 @@ module Diff::LCS # rubocop:disable Style/Documentation
|
|
101
101
|
def patch(patchset)
|
102
102
|
Diff::LCS.patch(self, patchset)
|
103
103
|
end
|
104
|
-
|
104
|
+
alias_method :unpatch, :patch
|
105
105
|
|
106
106
|
# Attempts to patch +self+ with the provided +patchset+. A new sequence based
|
107
107
|
# on +self+ and the +patchset+ will be created. See Diff::LCS#patch. Does no
|
@@ -141,11 +141,11 @@ module Diff::LCS # rubocop:disable Style/Documentation
|
|
141
141
|
end
|
142
142
|
|
143
143
|
class << Diff::LCS
|
144
|
-
def lcs(seq1, seq2, &block)
|
144
|
+
def lcs(seq1, seq2, &block) # :yields: seq1[i] for each matched
|
145
145
|
matches = Diff::LCS::Internals.lcs(seq1, seq2)
|
146
146
|
ret = []
|
147
|
-
string = seq1.
|
148
|
-
matches.
|
147
|
+
string = seq1.is_a? String
|
148
|
+
matches.each_index do |i|
|
149
149
|
next if matches[i].nil?
|
150
150
|
|
151
151
|
v = string ? seq1[i, 1] : seq1[i]
|
@@ -154,7 +154,7 @@ class << Diff::LCS
|
|
154
154
|
end
|
155
155
|
ret
|
156
156
|
end
|
157
|
-
|
157
|
+
alias_method :LCS, :lcs
|
158
158
|
|
159
159
|
# #diff computes the smallest set of additions and deletions necessary to
|
160
160
|
# turn the first sequence into the second, and returns a description of these
|
@@ -165,7 +165,7 @@ class << Diff::LCS
|
|
165
165
|
# Class argument is provided for +callbacks+, #diff will attempt to
|
166
166
|
# initialise it. If the +callbacks+ object (possibly initialised) responds to
|
167
167
|
# #finish, it will be called.
|
168
|
-
def diff(seq1, seq2, callbacks = nil, &block) # :yields diff changes
|
168
|
+
def diff(seq1, seq2, callbacks = nil, &block) # :yields: diff changes
|
169
169
|
diff_traversal(:diff, seq1, seq2, callbacks || Diff::LCS::DiffCallbacks, &block)
|
170
170
|
end
|
171
171
|
|
@@ -197,7 +197,7 @@ class << Diff::LCS
|
|
197
197
|
# # insert
|
198
198
|
# end
|
199
199
|
# end
|
200
|
-
def sdiff(seq1, seq2, callbacks = nil, &block)
|
200
|
+
def sdiff(seq1, seq2, callbacks = nil, &block) # :yields: diff changes
|
201
201
|
diff_traversal(:sdiff, seq1, seq2, callbacks || Diff::LCS::SDiffCallbacks, &block)
|
202
202
|
end
|
203
203
|
|
@@ -282,12 +282,12 @@ class << Diff::LCS
|
|
282
282
|
# <tt>callbacks#discard_b</tt> will be called after the end of the sequence
|
283
283
|
# is reached, if +a+ has not yet reached the end of +A+ or +b+ has not yet
|
284
284
|
# reached the end of +B+.
|
285
|
-
def traverse_sequences(seq1, seq2, callbacks = Diff::LCS::SequenceCallbacks)
|
285
|
+
def traverse_sequences(seq1, seq2, callbacks = Diff::LCS::SequenceCallbacks) # :yields: change events
|
286
286
|
callbacks ||= Diff::LCS::SequenceCallbacks
|
287
287
|
matches = Diff::LCS::Internals.lcs(seq1, seq2)
|
288
288
|
|
289
289
|
run_finished_a = run_finished_b = false
|
290
|
-
string = seq1.
|
290
|
+
string = seq1.is_a?(String)
|
291
291
|
|
292
292
|
a_size = seq1.size
|
293
293
|
b_size = seq2.size
|
@@ -299,7 +299,7 @@ class << Diff::LCS
|
|
299
299
|
ax = string ? seq1[ai, 1] : seq1[ai]
|
300
300
|
bx = string ? seq2[bj, 1] : seq2[bj]
|
301
301
|
|
302
|
-
event = Diff::LCS::ContextChange.new(
|
302
|
+
event = Diff::LCS::ContextChange.new("-", ai, ax, bj, bx)
|
303
303
|
event = yield event if block_given?
|
304
304
|
callbacks.discard_a(event)
|
305
305
|
end
|
@@ -310,13 +310,13 @@ class << Diff::LCS
|
|
310
310
|
break unless bj < b_line
|
311
311
|
|
312
312
|
bx = string ? seq2[bj, 1] : seq2[bj]
|
313
|
-
event = Diff::LCS::ContextChange.new(
|
313
|
+
event = Diff::LCS::ContextChange.new("+", ai, ax, bj, bx)
|
314
314
|
event = yield event if block_given?
|
315
315
|
callbacks.discard_b(event)
|
316
316
|
bj += 1
|
317
317
|
end
|
318
318
|
bx = string ? seq2[bj, 1] : seq2[bj]
|
319
|
-
event = Diff::LCS::ContextChange.new(
|
319
|
+
event = Diff::LCS::ContextChange.new("=", ai, ax, bj, bx)
|
320
320
|
event = yield event if block_given?
|
321
321
|
callbacks.match(event)
|
322
322
|
bj += 1
|
@@ -326,13 +326,13 @@ class << Diff::LCS
|
|
326
326
|
|
327
327
|
# The last entry (if any) processed was a match. +ai+ and +bj+ point just
|
328
328
|
# past the last matching lines in their sequences.
|
329
|
-
while (ai < a_size)
|
329
|
+
while (ai < a_size) || (bj < b_size)
|
330
330
|
# last A?
|
331
|
-
if ai == a_size
|
332
|
-
if callbacks.respond_to?(:finished_a)
|
331
|
+
if ai == a_size && bj < b_size
|
332
|
+
if callbacks.respond_to?(:finished_a) && !run_finished_a
|
333
333
|
ax = string ? seq1[-1, 1] : seq1[-1]
|
334
334
|
bx = string ? seq2[bj, 1] : seq2[bj]
|
335
|
-
event = Diff::LCS::ContextChange.new(
|
335
|
+
event = Diff::LCS::ContextChange.new(">", (a_size - 1), ax, bj, bx)
|
336
336
|
event = yield event if block_given?
|
337
337
|
callbacks.finished_a(event)
|
338
338
|
run_finished_a = true
|
@@ -340,7 +340,7 @@ class << Diff::LCS
|
|
340
340
|
ax = string ? seq1[ai, 1] : seq1[ai]
|
341
341
|
loop do
|
342
342
|
bx = string ? seq2[bj, 1] : seq2[bj]
|
343
|
-
event = Diff::LCS::ContextChange.new(
|
343
|
+
event = Diff::LCS::ContextChange.new("+", ai, ax, bj, bx)
|
344
344
|
event = yield event if block_given?
|
345
345
|
callbacks.discard_b(event)
|
346
346
|
bj += 1
|
@@ -350,11 +350,11 @@ class << Diff::LCS
|
|
350
350
|
end
|
351
351
|
|
352
352
|
# last B?
|
353
|
-
if bj == b_size
|
354
|
-
if callbacks.respond_to?(:finished_b)
|
353
|
+
if bj == b_size && ai < a_size
|
354
|
+
if callbacks.respond_to?(:finished_b) && !run_finished_b
|
355
355
|
ax = string ? seq1[ai, 1] : seq1[ai]
|
356
356
|
bx = string ? seq2[-1, 1] : seq2[-1]
|
357
|
-
event = Diff::LCS::ContextChange.new(
|
357
|
+
event = Diff::LCS::ContextChange.new("<", ai, ax, (b_size - 1), bx)
|
358
358
|
event = yield event if block_given?
|
359
359
|
callbacks.finished_b(event)
|
360
360
|
run_finished_b = true
|
@@ -362,7 +362,7 @@ class << Diff::LCS
|
|
362
362
|
bx = string ? seq2[bj, 1] : seq2[bj]
|
363
363
|
loop do
|
364
364
|
ax = string ? seq1[ai, 1] : seq1[ai]
|
365
|
-
event = Diff::LCS::ContextChange.new(
|
365
|
+
event = Diff::LCS::ContextChange.new("-", ai, ax, bj, bx)
|
366
366
|
event = yield event if block_given?
|
367
367
|
callbacks.discard_a(event)
|
368
368
|
ai += 1
|
@@ -374,7 +374,7 @@ class << Diff::LCS
|
|
374
374
|
if ai < a_size
|
375
375
|
ax = string ? seq1[ai, 1] : seq1[ai]
|
376
376
|
bx = string ? seq2[bj, 1] : seq2[bj]
|
377
|
-
event = Diff::LCS::ContextChange.new(
|
377
|
+
event = Diff::LCS::ContextChange.new("-", ai, ax, bj, bx)
|
378
378
|
event = yield event if block_given?
|
379
379
|
callbacks.discard_a(event)
|
380
380
|
ai += 1
|
@@ -383,7 +383,7 @@ class << Diff::LCS
|
|
383
383
|
if bj < b_size
|
384
384
|
ax = string ? seq1[ai, 1] : seq1[ai]
|
385
385
|
bx = string ? seq2[bj, 1] : seq2[bj]
|
386
|
-
event = Diff::LCS::ContextChange.new(
|
386
|
+
event = Diff::LCS::ContextChange.new("+", ai, ax, bj, bx)
|
387
387
|
event = yield event if block_given?
|
388
388
|
callbacks.discard_b(event)
|
389
389
|
bj += 1
|
@@ -478,14 +478,14 @@ class << Diff::LCS
|
|
478
478
|
b_size = seq2.size
|
479
479
|
ai = bj = mb = 0
|
480
480
|
ma = -1
|
481
|
-
string = seq1.
|
481
|
+
string = seq1.is_a?(String)
|
482
482
|
|
483
483
|
# Process all the lines in the match vector.
|
484
484
|
loop do
|
485
485
|
# Find next match indices +ma+ and +mb+
|
486
486
|
loop do
|
487
487
|
ma += 1
|
488
|
-
break unless ma < matches.size
|
488
|
+
break unless ma < matches.size && matches[ma].nil?
|
489
489
|
end
|
490
490
|
|
491
491
|
break if ma >= matches.size # end of matches?
|
@@ -493,36 +493,36 @@ class << Diff::LCS
|
|
493
493
|
mb = matches[ma]
|
494
494
|
|
495
495
|
# Change(seq2)
|
496
|
-
while (ai < ma)
|
496
|
+
while (ai < ma) || (bj < mb)
|
497
497
|
ax = string ? seq1[ai, 1] : seq1[ai]
|
498
498
|
bx = string ? seq2[bj, 1] : seq2[bj]
|
499
499
|
|
500
500
|
case [(ai < ma), (bj < mb)]
|
501
501
|
when [true, true]
|
502
502
|
if callbacks.respond_to?(:change)
|
503
|
-
event = Diff::LCS::ContextChange.new(
|
503
|
+
event = Diff::LCS::ContextChange.new("!", ai, ax, bj, bx)
|
504
504
|
event = yield event if block_given?
|
505
505
|
callbacks.change(event)
|
506
506
|
ai += 1
|
507
507
|
else
|
508
|
-
event = Diff::LCS::ContextChange.new(
|
508
|
+
event = Diff::LCS::ContextChange.new("-", ai, ax, bj, bx)
|
509
509
|
event = yield event if block_given?
|
510
510
|
callbacks.discard_a(event)
|
511
511
|
ai += 1
|
512
512
|
ax = string ? seq1[ai, 1] : seq1[ai]
|
513
|
-
event = Diff::LCS::ContextChange.new(
|
513
|
+
event = Diff::LCS::ContextChange.new("+", ai, ax, bj, bx)
|
514
514
|
event = yield event if block_given?
|
515
515
|
callbacks.discard_b(event)
|
516
516
|
end
|
517
517
|
|
518
518
|
bj += 1
|
519
519
|
when [true, false]
|
520
|
-
event = Diff::LCS::ContextChange.new(
|
520
|
+
event = Diff::LCS::ContextChange.new("-", ai, ax, bj, bx)
|
521
521
|
event = yield event if block_given?
|
522
522
|
callbacks.discard_a(event)
|
523
523
|
ai += 1
|
524
524
|
when [false, true]
|
525
|
-
event = Diff::LCS::ContextChange.new(
|
525
|
+
event = Diff::LCS::ContextChange.new("+", ai, ax, bj, bx)
|
526
526
|
event = yield event if block_given?
|
527
527
|
callbacks.discard_b(event)
|
528
528
|
bj += 1
|
@@ -532,43 +532,43 @@ class << Diff::LCS
|
|
532
532
|
# Match
|
533
533
|
ax = string ? seq1[ai, 1] : seq1[ai]
|
534
534
|
bx = string ? seq2[bj, 1] : seq2[bj]
|
535
|
-
event = Diff::LCS::ContextChange.new(
|
535
|
+
event = Diff::LCS::ContextChange.new("=", ai, ax, bj, bx)
|
536
536
|
event = yield event if block_given?
|
537
537
|
callbacks.match(event)
|
538
538
|
ai += 1
|
539
539
|
bj += 1
|
540
540
|
end
|
541
541
|
|
542
|
-
while (ai < a_size)
|
542
|
+
while (ai < a_size) || (bj < b_size)
|
543
543
|
ax = string ? seq1[ai, 1] : seq1[ai]
|
544
544
|
bx = string ? seq2[bj, 1] : seq2[bj]
|
545
545
|
|
546
546
|
case [(ai < a_size), (bj < b_size)]
|
547
547
|
when [true, true]
|
548
548
|
if callbacks.respond_to?(:change)
|
549
|
-
event = Diff::LCS::ContextChange.new(
|
549
|
+
event = Diff::LCS::ContextChange.new("!", ai, ax, bj, bx)
|
550
550
|
event = yield event if block_given?
|
551
551
|
callbacks.change(event)
|
552
552
|
ai += 1
|
553
553
|
else
|
554
|
-
event = Diff::LCS::ContextChange.new(
|
554
|
+
event = Diff::LCS::ContextChange.new("-", ai, ax, bj, bx)
|
555
555
|
event = yield event if block_given?
|
556
556
|
callbacks.discard_a(event)
|
557
557
|
ai += 1
|
558
558
|
ax = string ? seq1[ai, 1] : seq1[ai]
|
559
|
-
event = Diff::LCS::ContextChange.new(
|
559
|
+
event = Diff::LCS::ContextChange.new("+", ai, ax, bj, bx)
|
560
560
|
event = yield event if block_given?
|
561
561
|
callbacks.discard_b(event)
|
562
562
|
end
|
563
563
|
|
564
564
|
bj += 1
|
565
565
|
when [true, false]
|
566
|
-
event = Diff::LCS::ContextChange.new(
|
566
|
+
event = Diff::LCS::ContextChange.new("-", ai, ax, bj, bx)
|
567
567
|
event = yield event if block_given?
|
568
568
|
callbacks.discard_a(event)
|
569
569
|
ai += 1
|
570
570
|
when [false, true]
|
571
|
-
event = Diff::LCS::ContextChange.new(
|
571
|
+
event = Diff::LCS::ContextChange.new("+", ai, ax, bj, bx)
|
572
572
|
event = yield event if block_given?
|
573
573
|
callbacks.discard_b(event)
|
574
574
|
bj += 1
|
@@ -576,10 +576,12 @@ class << Diff::LCS
|
|
576
576
|
end
|
577
577
|
end
|
578
578
|
|
579
|
-
|
580
|
-
|
581
|
-
:
|
579
|
+
# standard:disable Style/HashSyntax
|
580
|
+
PATCH_MAP = { # :nodoc:
|
581
|
+
:patch => {"+" => "+", "-" => "-", "!" => "!", "=" => "="}.freeze,
|
582
|
+
:unpatch => {"+" => "-", "-" => "+", "!" => "!", "=" => "="}.freeze
|
582
583
|
}.freeze
|
584
|
+
# standard:enable Style/HashSyntax
|
583
585
|
|
584
586
|
# Applies a +patchset+ to the sequence +src+ according to the +direction+
|
585
587
|
# (<tt>:patch</tt> or <tt>:unpatch</tt>), producing a new sequence.
|
@@ -627,7 +629,7 @@ class << Diff::LCS
|
|
627
629
|
|
628
630
|
return src.respond_to?(:dup) ? src.dup : src unless has_changes
|
629
631
|
|
630
|
-
string = src.
|
632
|
+
string = src.is_a?(String)
|
631
633
|
# Start with a new empty type of the source's class
|
632
634
|
res = src.class.new
|
633
635
|
|
@@ -655,14 +657,14 @@ class << Diff::LCS
|
|
655
657
|
end
|
656
658
|
|
657
659
|
case action
|
658
|
-
when
|
660
|
+
when "-" # Remove details from the old string
|
659
661
|
while ai < op
|
660
662
|
res << (string ? src[ai, 1] : src[ai])
|
661
663
|
ai += 1
|
662
664
|
bj += 1
|
663
665
|
end
|
664
666
|
ai += 1
|
665
|
-
when
|
667
|
+
when "+"
|
666
668
|
while bj < np
|
667
669
|
res << (string ? src[ai, 1] : src[ai])
|
668
670
|
ai += 1
|
@@ -671,7 +673,7 @@ class << Diff::LCS
|
|
671
673
|
|
672
674
|
res << el
|
673
675
|
bj += 1
|
674
|
-
when
|
676
|
+
when "="
|
675
677
|
# This only appears in sdiff output with the SDiff callback.
|
676
678
|
# Therefore, we only need to worry about dealing with a single
|
677
679
|
# element.
|
@@ -679,7 +681,7 @@ class << Diff::LCS
|
|
679
681
|
|
680
682
|
ai += 1
|
681
683
|
bj += 1
|
682
|
-
when
|
684
|
+
when "!"
|
683
685
|
while ai < op
|
684
686
|
res << (string ? src[ai, 1] : src[ai])
|
685
687
|
ai += 1
|
@@ -693,14 +695,14 @@ class << Diff::LCS
|
|
693
695
|
end
|
694
696
|
when Diff::LCS::Change
|
695
697
|
case action
|
696
|
-
when
|
698
|
+
when "-"
|
697
699
|
while ai < change.position
|
698
700
|
res << (string ? src[ai, 1] : src[ai])
|
699
701
|
ai += 1
|
700
702
|
bj += 1
|
701
703
|
end
|
702
704
|
ai += 1
|
703
|
-
when
|
705
|
+
when "+"
|
704
706
|
while bj < change.position
|
705
707
|
res << (string ? src[ai, 1] : src[ai])
|
706
708
|
ai += 1
|
@@ -736,4 +738,4 @@ class << Diff::LCS
|
|
736
738
|
end
|
737
739
|
end
|
738
740
|
|
739
|
-
require
|
741
|
+
require "diff/lcs/backports"
|