elasticsearch-api 7.17.11 → 9.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +17 -163
- data/elasticsearch-api.gemspec +19 -33
- data/lib/elasticsearch/api/actions/async_search/delete.rb +63 -0
- data/lib/elasticsearch/api/actions/async_search/get.rb +71 -0
- data/lib/elasticsearch/api/actions/async_search/status.rb +66 -0
- data/lib/elasticsearch/api/actions/async_search/submit.rb +113 -0
- data/lib/elasticsearch/api/actions/bulk.rb +135 -49
- data/lib/elasticsearch/api/actions/cat/aliases.rb +41 -31
- data/lib/elasticsearch/api/actions/cat/allocation.rb +40 -33
- data/lib/elasticsearch/api/actions/cat/component_templates.rb +82 -0
- data/lib/elasticsearch/api/actions/cat/count.rb +38 -27
- data/lib/elasticsearch/api/actions/cat/fielddata.rb +36 -29
- data/lib/elasticsearch/api/actions/cat/health.rb +36 -29
- data/lib/elasticsearch/api/actions/cat/help.rb +16 -18
- data/lib/elasticsearch/api/actions/cat/indices.rb +51 -43
- data/lib/elasticsearch/api/actions/cat/master.rb +31 -28
- data/lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb +77 -0
- data/lib/elasticsearch/api/actions/cat/ml_datafeeds.rb +84 -0
- data/lib/elasticsearch/api/actions/cat/ml_jobs.rb +85 -0
- data/lib/elasticsearch/api/actions/cat/ml_trained_models.rb +80 -0
- data/lib/elasticsearch/api/actions/cat/nodeattrs.rb +31 -28
- data/lib/elasticsearch/api/actions/cat/nodes.rb +32 -37
- data/lib/elasticsearch/api/actions/cat/pending_tasks.rb +33 -31
- data/lib/elasticsearch/api/actions/cat/plugins.rb +31 -29
- data/lib/elasticsearch/api/actions/cat/recovery.rb +41 -36
- data/lib/elasticsearch/api/actions/cat/repositories.rb +31 -28
- data/lib/elasticsearch/api/actions/cat/segments.rb +42 -28
- data/lib/elasticsearch/api/actions/cat/shards.rb +40 -35
- data/lib/elasticsearch/api/actions/cat/snapshots.rb +40 -32
- data/lib/elasticsearch/api/actions/cat/tasks.rb +38 -34
- data/lib/elasticsearch/api/actions/cat/templates.rb +40 -30
- data/lib/elasticsearch/api/actions/cat/thread_pool.rb +42 -34
- data/lib/elasticsearch/api/actions/cat/transforms.rb +80 -0
- data/lib/elasticsearch/api/actions/clear_scroll.rb +28 -14
- data/lib/elasticsearch/api/actions/close_point_in_time.rb +19 -8
- data/lib/elasticsearch/api/actions/cluster/allocation_explain.rb +24 -20
- data/lib/elasticsearch/api/actions/cluster/delete_component_template.rb +26 -19
- data/lib/elasticsearch/api/actions/cluster/delete_voting_config_exclusions.rb +23 -16
- data/lib/elasticsearch/api/actions/cluster/exists_component_template.rb +29 -20
- data/lib/elasticsearch/api/actions/cluster/get_component_template.rb +30 -20
- data/lib/elasticsearch/api/actions/cluster/get_settings.rb +22 -22
- data/lib/elasticsearch/api/actions/cluster/health.rb +40 -38
- data/lib/elasticsearch/api/actions/cluster/info.rb +61 -0
- data/lib/elasticsearch/api/actions/cluster/pending_tasks.rb +23 -19
- data/lib/elasticsearch/api/actions/cluster/post_voting_config_exclusions.rb +38 -20
- data/lib/elasticsearch/api/actions/cluster/put_component_template.rb +42 -22
- data/lib/elasticsearch/api/actions/cluster/put_settings.rb +31 -20
- data/lib/elasticsearch/api/actions/cluster/remote_info.rb +16 -7
- data/lib/elasticsearch/api/actions/cluster/reroute.rb +32 -27
- data/lib/elasticsearch/api/actions/cluster/state.rb +43 -32
- data/lib/elasticsearch/api/actions/cluster/stats.rb +27 -20
- data/lib/elasticsearch/api/actions/connector/check_in.rb +65 -0
- data/lib/elasticsearch/api/actions/connector/delete.rb +70 -0
- data/lib/elasticsearch/api/actions/connector/get.rb +66 -0
- data/lib/elasticsearch/api/actions/connector/list.rb +62 -0
- data/lib/elasticsearch/api/actions/connector/post.rb +58 -0
- data/lib/elasticsearch/api/actions/connector/put.rb +67 -0
- data/lib/elasticsearch/api/actions/connector/sync_job_cancel.rb +69 -0
- data/lib/elasticsearch/api/actions/connector/sync_job_check_in.rb +70 -0
- data/lib/elasticsearch/api/actions/connector/sync_job_claim.rb +76 -0
- data/lib/elasticsearch/api/actions/connector/sync_job_delete.rb +69 -0
- data/lib/elasticsearch/api/actions/connector/sync_job_error.rb +73 -0
- data/lib/elasticsearch/api/actions/connector/sync_job_get.rb +67 -0
- data/lib/elasticsearch/api/actions/connector/sync_job_list.rb +60 -0
- data/lib/elasticsearch/api/actions/connector/sync_job_post.rb +58 -0
- data/lib/elasticsearch/api/actions/connector/sync_job_update_stats.rb +75 -0
- data/lib/elasticsearch/api/actions/connector/update_active_filtering.rb +65 -0
- data/lib/elasticsearch/api/actions/connector/update_api_key_id.rb +70 -0
- data/lib/elasticsearch/api/actions/connector/update_configuration.rb +67 -0
- data/lib/elasticsearch/api/actions/connector/update_error.rb +69 -0
- data/lib/elasticsearch/api/actions/connector/update_features.rb +76 -0
- data/lib/elasticsearch/api/actions/connector/update_filtering.rb +69 -0
- data/lib/elasticsearch/api/actions/connector/update_filtering_validation.rb +67 -0
- data/lib/elasticsearch/api/actions/connector/update_index_name.rb +67 -0
- data/lib/elasticsearch/api/actions/connector/update_name.rb +66 -0
- data/lib/elasticsearch/api/actions/connector/update_native.rb +66 -0
- data/lib/elasticsearch/api/actions/connector/update_pipeline.rb +67 -0
- data/lib/elasticsearch/api/actions/connector/update_scheduling.rb +66 -0
- data/lib/elasticsearch/api/actions/connector/update_service_type.rb +66 -0
- data/lib/elasticsearch/api/actions/connector/update_status.rb +66 -0
- data/lib/elasticsearch/api/actions/count.rb +63 -57
- data/lib/elasticsearch/api/actions/create.rb +117 -25
- data/lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb +64 -0
- data/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb +69 -0
- data/lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb +65 -0
- data/lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb +64 -0
- data/lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb +72 -0
- data/lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb +67 -0
- data/lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb +69 -0
- data/lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb +67 -0
- data/lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb +68 -0
- data/lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb +66 -0
- data/lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb +66 -0
- data/lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb +55 -0
- data/lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb +66 -0
- data/lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb +25 -20
- data/lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb +26 -20
- data/lib/elasticsearch/api/actions/dangling_indices/list_dangling_indices.rb +17 -7
- data/lib/elasticsearch/api/actions/delete.rb +66 -45
- data/lib/elasticsearch/api/actions/delete_by_query.rb +133 -88
- data/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb +25 -17
- data/lib/elasticsearch/api/actions/delete_script.rb +28 -19
- data/lib/elasticsearch/api/actions/enrich/delete_policy.rb +62 -0
- data/lib/elasticsearch/api/actions/enrich/execute_policy.rb +63 -0
- data/lib/elasticsearch/api/actions/enrich/get_policy.rb +65 -0
- data/lib/elasticsearch/api/actions/enrich/put_policy.rb +64 -0
- data/lib/elasticsearch/api/actions/enrich/stats.rb +52 -0
- data/lib/elasticsearch/api/actions/eql/delete.rb +64 -0
- data/lib/elasticsearch/api/actions/eql/get.rb +65 -0
- data/lib/elasticsearch/api/actions/eql/get_status.rb +61 -0
- data/lib/elasticsearch/api/actions/eql/search.rb +73 -0
- data/lib/elasticsearch/api/actions/esql/async_query.rb +70 -0
- data/lib/elasticsearch/api/actions/esql/async_query_delete.rb +67 -0
- data/lib/elasticsearch/api/actions/esql/async_query_get.rb +72 -0
- data/lib/elasticsearch/api/actions/esql/async_query_stop.rb +66 -0
- data/lib/elasticsearch/api/actions/esql/query.rb +61 -0
- data/lib/elasticsearch/api/actions/exists.rb +58 -51
- data/lib/elasticsearch/api/actions/exists_source.rb +42 -47
- data/lib/elasticsearch/api/actions/explain.rb +50 -54
- data/lib/elasticsearch/api/actions/features/get_features.rb +23 -16
- data/lib/elasticsearch/api/actions/features/reset_features.rb +26 -8
- data/lib/elasticsearch/api/actions/field_caps.rb +40 -28
- data/lib/elasticsearch/api/actions/fleet/global_checkpoints.rb +70 -0
- data/lib/elasticsearch/api/actions/fleet/msearch.rb +110 -0
- data/lib/elasticsearch/api/actions/fleet/search.rb +119 -0
- data/lib/elasticsearch/api/actions/get.rb +94 -49
- data/lib/elasticsearch/api/actions/get_script.rb +25 -17
- data/lib/elasticsearch/api/actions/get_script_context.rb +15 -7
- data/lib/elasticsearch/api/actions/get_script_languages.rb +15 -7
- data/lib/elasticsearch/api/actions/get_source.rb +44 -46
- data/lib/elasticsearch/api/actions/graph/explore.rb +75 -0
- data/lib/elasticsearch/api/actions/health_report.rb +75 -0
- data/lib/elasticsearch/api/actions/index.rb +138 -53
- data/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb +63 -0
- data/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb +67 -0
- data/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb +64 -0
- data/lib/elasticsearch/api/actions/index_lifecycle_management/get_status.rb +51 -0
- data/lib/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers.rb +66 -0
- data/lib/elasticsearch/api/actions/index_lifecycle_management/move_to_step.rb +71 -0
- data/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb +65 -0
- data/lib/elasticsearch/api/actions/index_lifecycle_management/remove_policy.rb +62 -0
- data/lib/elasticsearch/api/actions/index_lifecycle_management/retry.rb +63 -0
- data/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb +55 -0
- data/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb +56 -0
- data/lib/elasticsearch/api/actions/indices/add_block.rb +40 -26
- data/lib/elasticsearch/api/actions/indices/analyze.rb +31 -19
- data/lib/elasticsearch/api/actions/indices/cancel_migrate_reindex.rb +65 -0
- data/lib/elasticsearch/api/actions/indices/clear_cache.rb +41 -31
- data/lib/elasticsearch/api/actions/indices/clone.rb +59 -23
- data/lib/elasticsearch/api/actions/indices/close.rb +47 -27
- data/lib/elasticsearch/api/actions/indices/create.rb +43 -24
- data/lib/elasticsearch/api/actions/indices/create_data_stream.rb +68 -0
- data/lib/elasticsearch/api/actions/indices/create_from.rb +71 -0
- data/lib/elasticsearch/api/actions/indices/data_streams_stats.rb +67 -0
- data/lib/elasticsearch/api/actions/indices/delete.rb +45 -26
- data/lib/elasticsearch/api/actions/indices/delete_alias.rb +29 -22
- data/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb +64 -0
- data/lib/elasticsearch/api/actions/indices/delete_data_stream.rb +63 -0
- data/lib/elasticsearch/api/actions/indices/delete_index_template.rb +26 -23
- data/lib/elasticsearch/api/actions/indices/delete_template.rb +31 -20
- data/lib/elasticsearch/api/actions/indices/disk_usage.rb +39 -25
- data/lib/elasticsearch/api/actions/indices/downsample.rb +76 -0
- data/lib/elasticsearch/api/actions/indices/exists.rb +32 -30
- data/lib/elasticsearch/api/actions/indices/exists_alias.rb +34 -28
- data/lib/elasticsearch/api/actions/indices/exists_index_template.rb +26 -25
- data/lib/elasticsearch/api/actions/indices/exists_template.rb +30 -24
- data/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb +63 -0
- data/lib/elasticsearch/api/actions/indices/field_usage_stats.rb +34 -23
- data/lib/elasticsearch/api/actions/indices/flush.rb +42 -26
- data/lib/elasticsearch/api/actions/indices/forcemerge.rb +64 -25
- data/lib/elasticsearch/api/actions/indices/get.rb +36 -31
- data/lib/elasticsearch/api/actions/indices/get_alias.rb +39 -27
- data/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb +68 -0
- data/lib/elasticsearch/api/actions/indices/get_data_lifecycle_stats.rb +51 -0
- data/lib/elasticsearch/api/actions/indices/get_data_stream.rb +69 -0
- data/lib/elasticsearch/api/actions/indices/get_field_mapping.rb +42 -44
- data/lib/elasticsearch/api/actions/indices/get_index_template.rb +27 -22
- data/lib/elasticsearch/api/actions/indices/get_mapping.rb +36 -41
- data/lib/elasticsearch/api/actions/indices/get_migrate_reindex_status.rb +65 -0
- data/lib/elasticsearch/api/actions/indices/get_settings.rb +45 -33
- data/lib/elasticsearch/api/actions/indices/get_template.rb +30 -24
- data/lib/elasticsearch/api/actions/indices/migrate_reindex.rb +60 -0
- data/lib/elasticsearch/api/actions/indices/migrate_to_data_stream.rb +72 -0
- data/lib/elasticsearch/api/actions/indices/modify_data_stream.rb +54 -0
- data/lib/elasticsearch/api/actions/indices/open.rb +54 -27
- data/lib/elasticsearch/api/actions/indices/promote_data_stream.rb +69 -0
- data/lib/elasticsearch/api/actions/indices/put_alias.rb +32 -23
- data/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb +72 -0
- data/lib/elasticsearch/api/actions/indices/put_index_template.rb +45 -21
- data/lib/elasticsearch/api/actions/indices/put_mapping.rb +54 -44
- data/lib/elasticsearch/api/actions/indices/put_settings.rb +58 -31
- data/lib/elasticsearch/api/actions/indices/put_template.rb +43 -24
- data/lib/elasticsearch/api/actions/indices/recovery.rb +42 -20
- data/lib/elasticsearch/api/actions/indices/refresh.rb +40 -22
- data/lib/elasticsearch/api/actions/indices/reload_search_analyzers.rb +74 -0
- data/lib/elasticsearch/api/actions/indices/resolve_cluster.rb +115 -0
- data/lib/elasticsearch/api/actions/indices/resolve_index.rb +32 -17
- data/lib/elasticsearch/api/actions/indices/rollover.rb +60 -29
- data/lib/elasticsearch/api/actions/indices/segments.rb +33 -24
- data/lib/elasticsearch/api/actions/indices/shard_stores.rb +37 -24
- data/lib/elasticsearch/api/actions/indices/shrink.rb +51 -25
- data/lib/elasticsearch/api/actions/indices/simulate_index_template.rb +25 -21
- data/lib/elasticsearch/api/actions/indices/simulate_template.rb +28 -22
- data/lib/elasticsearch/api/actions/indices/split.rb +52 -25
- data/lib/elasticsearch/api/actions/indices/stats.rb +53 -58
- data/lib/elasticsearch/api/actions/indices/update_aliases.rb +21 -19
- data/lib/elasticsearch/api/actions/indices/validate_query.rb +46 -53
- data/lib/elasticsearch/api/actions/inference/chat_completion_unified.rb +63 -0
- data/lib/elasticsearch/api/actions/inference/completion.rb +62 -0
- data/lib/elasticsearch/api/actions/inference/delete.rb +69 -0
- data/lib/elasticsearch/api/actions/inference/get.rb +67 -0
- data/lib/elasticsearch/api/actions/inference/inference.rb +73 -0
- data/lib/elasticsearch/api/actions/inference/put.rb +77 -0
- data/lib/elasticsearch/api/actions/inference/put_alibabacloud.rb +75 -0
- data/lib/elasticsearch/api/actions/inference/put_amazonbedrock.rb +70 -0
- data/lib/elasticsearch/api/actions/inference/put_anthropic.rb +76 -0
- data/lib/elasticsearch/api/actions/inference/put_azureaistudio.rb +75 -0
- data/lib/elasticsearch/api/actions/inference/put_azureopenai.rb +80 -0
- data/lib/elasticsearch/api/actions/inference/put_cohere.rb +75 -0
- data/lib/elasticsearch/api/actions/inference/put_elasticsearch.rb +71 -0
- data/lib/elasticsearch/api/actions/inference/put_elser.rb +67 -0
- data/lib/elasticsearch/api/actions/inference/put_googleaistudio.rb +75 -0
- data/lib/elasticsearch/api/actions/inference/put_googlevertexai.rb +75 -0
- data/lib/elasticsearch/api/actions/inference/put_hugging_face.rb +86 -0
- data/lib/elasticsearch/api/actions/inference/put_jinaai.rb +77 -0
- data/lib/elasticsearch/api/actions/inference/put_mistral.rb +76 -0
- data/lib/elasticsearch/api/actions/inference/put_openai.rb +76 -0
- data/lib/elasticsearch/api/actions/inference/put_voyageai.rb +71 -0
- data/lib/elasticsearch/api/actions/inference/put_watsonx.rb +78 -0
- data/lib/elasticsearch/api/actions/inference/rerank.rb +62 -0
- data/lib/elasticsearch/api/actions/inference/sparse_embedding.rb +62 -0
- data/lib/elasticsearch/api/actions/inference/stream_completion.rb +65 -0
- data/lib/elasticsearch/api/actions/inference/text_embedding.rb +62 -0
- data/lib/elasticsearch/api/actions/inference/update.rb +73 -0
- data/lib/elasticsearch/api/actions/info.rb +15 -7
- data/lib/elasticsearch/api/actions/ingest/delete_geoip_database.rb +64 -0
- data/lib/elasticsearch/api/actions/ingest/delete_ip_location_database.rb +66 -0
- data/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb +27 -19
- data/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb +15 -7
- data/lib/elasticsearch/api/actions/ingest/get_geoip_database.rb +65 -0
- data/lib/elasticsearch/api/actions/ingest/get_ip_location_database.rb +67 -0
- data/lib/elasticsearch/api/actions/ingest/get_pipeline.rb +28 -19
- data/lib/elasticsearch/api/actions/ingest/processor_grok.rb +17 -7
- data/lib/elasticsearch/api/actions/ingest/put_geoip_database.rb +66 -0
- data/lib/elasticsearch/api/actions/ingest/put_ip_location_database.rb +68 -0
- data/lib/elasticsearch/api/actions/ingest/put_pipeline.rb +25 -21
- data/lib/elasticsearch/api/actions/ingest/simulate.rb +27 -19
- data/lib/elasticsearch/api/actions/license/delete.rb +54 -0
- data/lib/elasticsearch/api/actions/license/get.rb +54 -0
- data/lib/elasticsearch/api/actions/{shutdown/get_node.rb → license/get_basic_status.rb} +15 -15
- data/lib/elasticsearch/api/actions/{shutdown/delete_node.rb → license/get_trial_status.rb} +16 -14
- data/lib/elasticsearch/api/actions/license/post.rb +60 -0
- data/lib/elasticsearch/api/actions/license/post_start_basic.rb +58 -0
- data/lib/elasticsearch/api/actions/license/post_start_trial.rb +57 -0
- data/lib/elasticsearch/api/actions/logstash/delete_pipeline.rb +62 -0
- data/lib/elasticsearch/api/actions/logstash/get_pipeline.rb +63 -0
- data/lib/elasticsearch/api/actions/logstash/put_pipeline.rb +64 -0
- data/lib/elasticsearch/api/actions/machine_learning/clear_trained_model_deployment_cache.rb +64 -0
- data/lib/elasticsearch/api/actions/machine_learning/close_job.rb +70 -0
- data/lib/elasticsearch/api/actions/machine_learning/delete_calendar.rb +61 -0
- data/lib/elasticsearch/api/actions/machine_learning/delete_calendar_event.rb +65 -0
- data/lib/elasticsearch/api/actions/machine_learning/delete_calendar_job.rb +65 -0
- data/lib/elasticsearch/api/actions/machine_learning/delete_data_frame_analytics.rb +62 -0
- data/lib/elasticsearch/api/actions/machine_learning/delete_datafeed.rb +65 -0
- data/lib/elasticsearch/api/actions/machine_learning/delete_expired_data.rb +75 -0
- data/lib/elasticsearch/api/actions/machine_learning/delete_filter.rb +62 -0
- data/lib/elasticsearch/api/actions/machine_learning/delete_forecast.rb +80 -0
- data/lib/elasticsearch/api/actions/machine_learning/delete_job.rb +73 -0
- data/lib/elasticsearch/api/actions/machine_learning/delete_model_snapshot.rb +67 -0
- data/lib/elasticsearch/api/actions/machine_learning/delete_trained_model.rb +63 -0
- data/lib/elasticsearch/api/actions/machine_learning/delete_trained_model_alias.rb +67 -0
- data/lib/elasticsearch/api/actions/machine_learning/estimate_model_memory.rb +56 -0
- data/lib/elasticsearch/api/actions/machine_learning/evaluate_data_frame.rb +57 -0
- data/lib/elasticsearch/api/actions/machine_learning/explain_data_frame_analytics.rb +76 -0
- data/lib/elasticsearch/api/actions/machine_learning/flush_job.rb +79 -0
- data/lib/elasticsearch/api/actions/machine_learning/forecast.rb +77 -0
- data/lib/elasticsearch/api/actions/machine_learning/get_buckets.rb +86 -0
- data/lib/elasticsearch/api/actions/machine_learning/get_calendar_events.rb +65 -0
- data/lib/elasticsearch/api/actions/machine_learning/get_calendars.rb +70 -0
- data/lib/elasticsearch/api/actions/machine_learning/get_categories.rb +80 -0
- data/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics.rb +81 -0
- data/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics_stats.rb +76 -0
- data/lib/elasticsearch/api/actions/machine_learning/get_datafeed_stats.rb +78 -0
- data/lib/elasticsearch/api/actions/machine_learning/get_datafeeds.rb +80 -0
- data/lib/elasticsearch/api/actions/machine_learning/get_filters.rb +65 -0
- data/lib/elasticsearch/api/actions/machine_learning/get_influencers.rb +83 -0
- data/lib/elasticsearch/api/actions/machine_learning/get_job_stats.rb +73 -0
- data/lib/elasticsearch/api/actions/machine_learning/get_jobs.rb +79 -0
- data/lib/elasticsearch/api/actions/machine_learning/get_memory_stats.rb +69 -0
- data/lib/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats.rb +73 -0
- data/lib/elasticsearch/api/actions/machine_learning/get_model_snapshots.rb +82 -0
- data/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb +105 -0
- data/lib/elasticsearch/api/actions/machine_learning/get_records.rb +86 -0
- data/lib/elasticsearch/api/actions/machine_learning/get_trained_models.rb +82 -0
- data/lib/elasticsearch/api/actions/machine_learning/get_trained_models_stats.rb +73 -0
- data/lib/elasticsearch/api/actions/machine_learning/infer_trained_model.rb +63 -0
- data/lib/elasticsearch/api/actions/machine_learning/info.rb +57 -0
- data/lib/elasticsearch/api/actions/machine_learning/open_job.rb +68 -0
- data/lib/elasticsearch/api/actions/machine_learning/post_calendar_events.rb +62 -0
- data/lib/elasticsearch/api/actions/machine_learning/post_data.rb +66 -0
- data/lib/elasticsearch/api/actions/machine_learning/preview_data_frame_analytics.rb +69 -0
- data/lib/elasticsearch/api/actions/machine_learning/preview_datafeed.rb +81 -0
- data/lib/elasticsearch/api/actions/machine_learning/put_calendar.rb +61 -0
- data/lib/elasticsearch/api/actions/machine_learning/put_calendar_job.rb +64 -0
- data/lib/elasticsearch/api/actions/machine_learning/put_data_frame_analytics.rb +69 -0
- data/lib/elasticsearch/api/actions/machine_learning/put_datafeed.rb +80 -0
- data/lib/elasticsearch/api/actions/machine_learning/put_filter.rb +64 -0
- data/lib/elasticsearch/api/actions/machine_learning/put_job.rb +75 -0
- data/lib/elasticsearch/api/actions/machine_learning/put_trained_model.rb +68 -0
- data/lib/elasticsearch/api/actions/machine_learning/put_trained_model_alias.rb +83 -0
- data/lib/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part.rb +67 -0
- data/lib/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary.rb +64 -0
- data/lib/elasticsearch/api/actions/machine_learning/reset_job.rb +69 -0
- data/lib/elasticsearch/api/actions/machine_learning/revert_model_snapshot.rb +80 -0
- data/lib/elasticsearch/api/actions/machine_learning/set_upgrade_mode.rb +66 -0
- data/lib/elasticsearch/api/actions/machine_learning/start_data_frame_analytics.rb +75 -0
- data/lib/elasticsearch/api/actions/machine_learning/start_datafeed.rb +87 -0
- data/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb +83 -0
- data/lib/elasticsearch/api/actions/machine_learning/stop_data_frame_analytics.rb +76 -0
- data/lib/elasticsearch/api/actions/machine_learning/stop_datafeed.rb +74 -0
- data/lib/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment.rb +66 -0
- data/lib/elasticsearch/api/actions/machine_learning/update_data_frame_analytics.rb +64 -0
- data/lib/elasticsearch/api/actions/machine_learning/update_datafeed.rb +79 -0
- data/lib/elasticsearch/api/actions/machine_learning/update_filter.rb +63 -0
- data/lib/elasticsearch/api/actions/machine_learning/update_job.rb +63 -0
- data/lib/elasticsearch/api/actions/machine_learning/update_model_snapshot.rb +67 -0
- data/lib/elasticsearch/api/actions/machine_learning/update_trained_model_deployment.rb +67 -0
- data/lib/elasticsearch/api/actions/machine_learning/upgrade_job_snapshot.rb +76 -0
- data/lib/elasticsearch/api/actions/mget.rb +49 -44
- data/lib/elasticsearch/api/actions/migration/deprecations.rb +65 -0
- data/lib/elasticsearch/api/actions/migration/get_feature_upgrade_status.rb +54 -0
- data/lib/elasticsearch/api/actions/migration/post_feature_upgrade.rb +54 -0
- data/lib/elasticsearch/api/actions/msearch.rb +68 -57
- data/lib/elasticsearch/api/actions/msearch_template.rb +49 -44
- data/lib/elasticsearch/api/actions/mtermvectors.rb +47 -58
- data/lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb +27 -10
- data/lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb +23 -8
- data/lib/elasticsearch/api/actions/nodes/hot_threads.rb +33 -35
- data/lib/elasticsearch/api/actions/nodes/info.rb +28 -23
- data/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb +31 -19
- data/lib/elasticsearch/api/actions/nodes/stats.rb +39 -40
- data/lib/elasticsearch/api/actions/nodes/usage.rb +28 -21
- data/lib/elasticsearch/api/actions/open_point_in_time.rb +59 -25
- data/lib/elasticsearch/api/actions/ping.rb +16 -12
- data/lib/elasticsearch/api/actions/put_script.rb +33 -23
- data/lib/elasticsearch/api/actions/query_rules/delete_rule.rb +66 -0
- data/lib/elasticsearch/api/actions/query_rules/delete_ruleset.rb +70 -0
- data/lib/elasticsearch/api/actions/query_rules/get_rule.rb +65 -0
- data/lib/elasticsearch/api/actions/query_rules/get_ruleset.rb +61 -0
- data/lib/elasticsearch/api/actions/query_rules/list_rulesets.rb +53 -0
- data/lib/elasticsearch/api/actions/query_rules/put_rule.rb +71 -0
- data/lib/elasticsearch/api/actions/query_rules/put_ruleset.rb +68 -0
- data/lib/elasticsearch/api/actions/query_rules/test.rb +63 -0
- data/lib/elasticsearch/api/actions/rank_eval.rb +30 -25
- data/lib/elasticsearch/api/actions/reindex.rb +165 -33
- data/lib/elasticsearch/api/actions/reindex_rethrottle.rb +31 -17
- data/lib/elasticsearch/api/actions/render_search_template.rb +25 -11
- data/lib/elasticsearch/api/actions/scripts_painless_execute.rb +21 -9
- data/lib/elasticsearch/api/actions/scroll.rb +29 -26
- data/lib/elasticsearch/api/actions/search.rb +148 -116
- data/lib/elasticsearch/api/actions/search_application/delete.rb +65 -0
- data/lib/elasticsearch/api/actions/search_application/delete_behavioral_analytics.rb +65 -0
- data/lib/elasticsearch/api/actions/search_application/get.rb +64 -0
- data/lib/elasticsearch/api/actions/search_application/get_behavioral_analytics.rb +66 -0
- data/lib/elasticsearch/api/actions/search_application/list.rb +58 -0
- data/lib/elasticsearch/api/actions/search_application/post_behavioral_analytics_event.rb +71 -0
- data/lib/elasticsearch/api/actions/search_application/put.rb +67 -0
- data/lib/elasticsearch/api/actions/search_application/put_behavioral_analytics.rb +64 -0
- data/lib/elasticsearch/api/actions/search_application/render_query.rb +69 -0
- data/lib/elasticsearch/api/actions/search_application/search.rb +73 -0
- data/lib/elasticsearch/api/actions/search_mvt.rb +167 -35
- data/lib/elasticsearch/api/actions/search_shards.rb +43 -28
- data/lib/elasticsearch/api/actions/search_template.rb +46 -54
- data/lib/elasticsearch/api/actions/searchable_snapshots/cache_stats.rb +68 -0
- data/lib/elasticsearch/api/actions/searchable_snapshots/clear_cache.rb +71 -0
- data/lib/elasticsearch/api/actions/searchable_snapshots/mount.rb +74 -0
- data/lib/elasticsearch/api/actions/searchable_snapshots/stats.rb +63 -0
- data/lib/elasticsearch/api/actions/security/activate_user_profile.rb +62 -0
- data/lib/elasticsearch/api/actions/security/authenticate.rb +54 -0
- data/lib/elasticsearch/api/actions/security/bulk_delete_role.rb +56 -0
- data/lib/elasticsearch/api/actions/security/bulk_put_role.rb +56 -0
- data/lib/elasticsearch/api/actions/security/bulk_update_api_keys.rb +62 -0
- data/lib/elasticsearch/api/actions/security/change_password.rb +68 -0
- data/lib/elasticsearch/api/actions/security/clear_api_key_cache.rb +64 -0
- data/lib/elasticsearch/api/actions/security/clear_cached_privileges.rb +64 -0
- data/lib/elasticsearch/api/actions/security/clear_cached_realms.rb +69 -0
- data/lib/elasticsearch/api/actions/security/clear_cached_roles.rb +63 -0
- data/lib/elasticsearch/api/actions/security/clear_cached_service_tokens.rb +75 -0
- data/lib/elasticsearch/api/actions/security/create_api_key.rb +62 -0
- data/lib/elasticsearch/api/actions/security/create_cross_cluster_api_key.rb +62 -0
- data/lib/elasticsearch/api/actions/security/create_service_token.rb +78 -0
- data/lib/elasticsearch/api/actions/security/delegate_pki.rb +60 -0
- data/lib/elasticsearch/api/actions/security/delete_privileges.rb +69 -0
- data/lib/elasticsearch/api/actions/security/delete_role.rb +64 -0
- data/lib/elasticsearch/api/actions/security/delete_role_mapping.rb +65 -0
- data/lib/elasticsearch/api/actions/security/delete_service_token.rb +70 -0
- data/lib/elasticsearch/api/actions/security/delete_user.rb +62 -0
- data/lib/elasticsearch/api/actions/security/disable_user.rb +64 -0
- data/lib/elasticsearch/api/actions/security/disable_user_profile.rb +69 -0
- data/lib/elasticsearch/api/actions/security/enable_user.rb +63 -0
- data/lib/elasticsearch/api/actions/security/enable_user_profile.rb +70 -0
- data/lib/elasticsearch/api/actions/security/enroll_kibana.rb +53 -0
- data/lib/elasticsearch/api/actions/security/enroll_node.rb +53 -0
- data/lib/elasticsearch/api/actions/security/get_api_key.rb +70 -0
- data/lib/elasticsearch/api/actions/security/get_builtin_privileges.rb +51 -0
- data/lib/elasticsearch/api/actions/security/get_privileges.rb +73 -0
- data/lib/elasticsearch/api/actions/security/get_role.rb +75 -0
- data/lib/elasticsearch/api/actions/security/get_role_mapping.rb +65 -0
- data/lib/elasticsearch/api/actions/security/get_service_accounts.rb +72 -0
- data/lib/elasticsearch/api/actions/security/get_service_credentials.rb +68 -0
- data/lib/elasticsearch/api/actions/security/get_settings.rb +57 -0
- data/lib/elasticsearch/api/actions/security/get_token.rb +62 -0
- data/lib/elasticsearch/api/actions/security/get_user.rb +72 -0
- data/lib/elasticsearch/api/actions/security/get_user_privileges.rb +57 -0
- data/lib/elasticsearch/api/actions/security/get_user_profile.rb +68 -0
- data/lib/elasticsearch/api/actions/security/grant_api_key.rb +68 -0
- data/lib/elasticsearch/api/actions/security/has_privileges.rb +68 -0
- data/lib/elasticsearch/api/actions/security/has_privileges_user_profile.rb +56 -0
- data/lib/elasticsearch/api/actions/security/invalidate_api_key.rb +63 -0
- data/lib/elasticsearch/api/actions/security/invalidate_token.rb +62 -0
- data/lib/elasticsearch/api/actions/security/oidc_authenticate.rb +56 -0
- data/lib/elasticsearch/api/actions/security/oidc_logout.rb +57 -0
- data/lib/elasticsearch/api/actions/security/oidc_prepare_authentication.rb +57 -0
- data/lib/elasticsearch/api/actions/security/put_privileges.rb +66 -0
- data/lib/elasticsearch/api/actions/security/put_role.rb +66 -0
- data/lib/elasticsearch/api/actions/security/put_role_mapping.rb +81 -0
- data/lib/elasticsearch/api/actions/security/put_user.rb +69 -0
- data/lib/elasticsearch/api/actions/security/query_api_keys.rb +67 -0
- data/lib/elasticsearch/api/actions/security/query_role.rb +61 -0
- data/lib/elasticsearch/api/actions/security/query_user.rb +61 -0
- data/lib/elasticsearch/api/actions/security/saml_authenticate.rb +62 -0
- data/lib/elasticsearch/api/actions/security/saml_complete_logout.rb +61 -0
- data/lib/elasticsearch/api/actions/security/saml_invalidate.rb +60 -0
- data/lib/elasticsearch/api/actions/security/saml_logout.rb +58 -0
- data/lib/elasticsearch/api/actions/security/saml_prepare_authentication.rb +63 -0
- data/lib/elasticsearch/api/actions/security/saml_service_provider_metadata.rb +63 -0
- data/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb +65 -0
- data/lib/elasticsearch/api/actions/security/update_api_key.rb +74 -0
- data/lib/elasticsearch/api/actions/security/update_cross_cluster_api_key.rb +72 -0
- data/lib/elasticsearch/api/actions/security/update_settings.rb +61 -0
- data/lib/elasticsearch/api/actions/security/update_user_profile_data.rb +79 -0
- data/lib/elasticsearch/api/actions/simulate/ingest.rb +85 -0
- data/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb +28 -19
- data/lib/elasticsearch/api/actions/snapshot/clone.rb +28 -20
- data/lib/elasticsearch/api/actions/snapshot/create.rb +30 -21
- data/lib/elasticsearch/api/actions/snapshot/create_repository.rb +36 -22
- data/lib/elasticsearch/api/actions/snapshot/delete.rb +31 -19
- data/lib/elasticsearch/api/actions/snapshot/delete_repository.rb +35 -20
- data/lib/elasticsearch/api/actions/snapshot/get.rb +58 -41
- data/lib/elasticsearch/api/actions/snapshot/get_repository.rb +33 -21
- data/lib/elasticsearch/api/actions/snapshot/repository_analyze.rb +113 -37
- data/lib/elasticsearch/api/actions/snapshot/restore.rb +40 -21
- data/lib/elasticsearch/api/actions/snapshot/status.rb +48 -23
- data/lib/elasticsearch/api/actions/snapshot/verify_repository.rb +28 -19
- data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/delete_lifecycle.rb +66 -0
- data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_lifecycle.rb +66 -0
- data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_retention.rb +56 -0
- data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_lifecycle.rb +67 -0
- data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_stats.rb +53 -0
- data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_status.rb +56 -0
- data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb +70 -0
- data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb +58 -0
- data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb +62 -0
- data/lib/elasticsearch/api/actions/{shutdown/put_node.rb → sql/clear_cursor.rb} +18 -15
- data/lib/elasticsearch/api/actions/sql/delete_async.rb +65 -0
- data/lib/elasticsearch/api/actions/sql/get_async.rb +71 -0
- data/lib/elasticsearch/api/actions/sql/get_async_status.rb +61 -0
- data/lib/elasticsearch/api/actions/sql/query.rb +57 -0
- data/lib/elasticsearch/api/actions/sql/translate.rb +55 -0
- data/lib/elasticsearch/api/actions/ssl/certificates.rb +60 -0
- data/lib/elasticsearch/api/actions/synonyms/delete_synonym.rb +72 -0
- data/lib/elasticsearch/api/actions/synonyms/delete_synonym_rule.rb +65 -0
- data/lib/elasticsearch/api/actions/synonyms/get_synonym.rb +62 -0
- data/lib/elasticsearch/api/actions/synonyms/get_synonym_rule.rb +65 -0
- data/lib/elasticsearch/api/actions/synonyms/get_synonyms_sets.rb +53 -0
- data/lib/elasticsearch/api/actions/synonyms/put_synonym.rb +66 -0
- data/lib/elasticsearch/api/actions/synonyms/put_synonym_rule.rb +69 -0
- data/lib/elasticsearch/api/actions/tasks/cancel.rb +34 -24
- data/lib/elasticsearch/api/actions/tasks/get.rb +30 -19
- data/lib/elasticsearch/api/actions/tasks/list.rb +80 -28
- data/lib/elasticsearch/api/actions/terms_enum.rb +68 -0
- data/lib/elasticsearch/api/actions/termvectors.rb +69 -59
- data/lib/elasticsearch/api/actions/text_structure/find_field_structure.rb +127 -0
- data/lib/elasticsearch/api/actions/text_structure/find_message_structure.rb +126 -0
- data/lib/elasticsearch/api/actions/text_structure/find_structure.rb +149 -0
- data/lib/elasticsearch/api/actions/text_structure/test_grok_pattern.rb +58 -0
- data/lib/elasticsearch/api/actions/transform/delete_transform.rb +65 -0
- data/lib/elasticsearch/api/actions/transform/get_node_stats.rb +55 -0
- data/lib/elasticsearch/api/actions/transform/get_transform.rb +77 -0
- data/lib/elasticsearch/api/actions/transform/get_transform_stats.rb +73 -0
- data/lib/elasticsearch/api/actions/transform/preview_transform.rb +75 -0
- data/lib/elasticsearch/api/actions/transform/put_transform.rb +86 -0
- data/lib/elasticsearch/api/actions/transform/reset_transform.rb +66 -0
- data/lib/elasticsearch/api/actions/transform/schedule_now_transform.rb +66 -0
- data/lib/elasticsearch/api/actions/transform/start_transform.rb +75 -0
- data/lib/elasticsearch/api/actions/transform/stop_transform.rb +74 -0
- data/lib/elasticsearch/api/actions/transform/update_transform.rb +73 -0
- data/lib/elasticsearch/api/actions/transform/upgrade_transforms.rb +64 -0
- data/lib/elasticsearch/api/actions/update.rb +61 -54
- data/lib/elasticsearch/api/actions/update_by_query.rb +144 -92
- data/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb +25 -17
- data/lib/elasticsearch/api/actions/watcher/ack_watch.rb +74 -0
- data/lib/elasticsearch/api/actions/watcher/activate_watch.rb +61 -0
- data/lib/elasticsearch/api/actions/watcher/deactivate_watch.rb +61 -0
- data/lib/elasticsearch/api/actions/watcher/delete_watch.rb +73 -0
- data/lib/elasticsearch/api/actions/watcher/execute_watch.rb +73 -0
- data/lib/elasticsearch/api/actions/watcher/get_settings.rb +54 -0
- data/lib/elasticsearch/api/actions/watcher/get_watch.rb +60 -0
- data/lib/elasticsearch/api/actions/watcher/put_watch.rb +74 -0
- data/lib/elasticsearch/api/actions/watcher/query_watches.rb +58 -0
- data/lib/elasticsearch/api/actions/watcher/start.rb +52 -0
- data/lib/elasticsearch/api/actions/watcher/stats.rb +65 -0
- data/lib/elasticsearch/api/actions/watcher/stop.rb +54 -0
- data/lib/elasticsearch/api/actions/watcher/update_settings.rb +63 -0
- data/lib/elasticsearch/api/actions/xpack/info.rb +59 -0
- data/lib/elasticsearch/api/actions/xpack/usage.rb +55 -0
- data/lib/elasticsearch/api/response.rb +48 -0
- data/lib/elasticsearch/api/utils.rb +34 -143
- data/lib/elasticsearch/api/version.rb +2 -1
- data/lib/elasticsearch/api.rb +81 -47
- metadata +389 -434
- data/Gemfile +0 -43
- data/Rakefile +0 -124
- data/lib/elasticsearch/api/actions/cat/params_registry.rb +0 -60
- data/lib/elasticsearch/api/actions/cluster/params_registry.rb +0 -60
- data/lib/elasticsearch/api/actions/dangling_indices/params_registry.rb +0 -60
- data/lib/elasticsearch/api/actions/features/params_registry.rb +0 -60
- data/lib/elasticsearch/api/actions/indices/exists_type.rb +0 -71
- data/lib/elasticsearch/api/actions/indices/flush_synced.rb +0 -71
- data/lib/elasticsearch/api/actions/indices/get_upgrade.rb +0 -67
- data/lib/elasticsearch/api/actions/indices/params_registry.rb +0 -60
- data/lib/elasticsearch/api/actions/indices/upgrade.rb +0 -71
- data/lib/elasticsearch/api/actions/ingest/params_registry.rb +0 -60
- data/lib/elasticsearch/api/actions/nodes/params_registry.rb +0 -60
- data/lib/elasticsearch/api/actions/params_registry.rb +0 -58
- data/lib/elasticsearch/api/actions/shutdown/params_registry.rb +0 -60
- data/lib/elasticsearch/api/actions/snapshot/params_registry.rb +0 -60
- data/lib/elasticsearch/api/actions/tasks/params_registry.rb +0 -60
- data/lib/elasticsearch/api/namespace/cat.rb +0 -36
- data/lib/elasticsearch/api/namespace/cluster.rb +0 -37
- data/lib/elasticsearch/api/namespace/common.rb +0 -44
- data/lib/elasticsearch/api/namespace/dangling_indices.rb +0 -35
- data/lib/elasticsearch/api/namespace/features.rb +0 -36
- data/lib/elasticsearch/api/namespace/indices.rb +0 -37
- data/lib/elasticsearch/api/namespace/ingest.rb +0 -37
- data/lib/elasticsearch/api/namespace/nodes.rb +0 -37
- data/lib/elasticsearch/api/namespace/remote.rb +0 -37
- data/lib/elasticsearch/api/namespace/security.rb +0 -36
- data/lib/elasticsearch/api/namespace/shutdown.rb +0 -37
- data/lib/elasticsearch/api/namespace/snapshot.rb +0 -37
- data/lib/elasticsearch/api/namespace/tasks.rb +0 -37
- data/spec/elasticsearch/api/actions/bulk_spec.rb +0 -139
- data/spec/elasticsearch/api/actions/cat/aliases_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/cat/allocation_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/cat/count_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/cat/fielddata_spec.rb +0 -52
- data/spec/elasticsearch/api/actions/cat/health_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/cat/help_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/cat/indices_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/cat/master_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/cat/nodeattrs_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/cat/nodes_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/cat/pending_tasks_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/cat/plugins_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/cat/recovery_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/cat/repositories_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/cat/segments_spec.rb +0 -49
- data/spec/elasticsearch/api/actions/cat/shards_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/cat/snapshot_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/cat/tasks_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/cat/templates_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/cat/thread_pool_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/clear_scroll_spec.rb +0 -52
- data/spec/elasticsearch/api/actions/close_point_in_time_spec.rb +0 -34
- data/spec/elasticsearch/api/actions/cluster/allocation_explain_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/cluster/get_settings_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/cluster/health_spec.rb +0 -69
- data/spec/elasticsearch/api/actions/cluster/pending_tasks_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/cluster/put_settings_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/cluster/remote_info_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/cluster/reroute_spec.rb +0 -52
- data/spec/elasticsearch/api/actions/cluster/state_spec.rb +0 -52
- data/spec/elasticsearch/api/actions/cluster/stats_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/count_spec.rb +0 -66
- data/spec/elasticsearch/api/actions/create_document_spec.rb +0 -86
- data/spec/elasticsearch/api/actions/dangling_indices/delete_dangling_indices_spec.rb +0 -48
- data/spec/elasticsearch/api/actions/dangling_indices/import_dangling_indices_spec.rb +0 -48
- data/spec/elasticsearch/api/actions/dangling_indices/list_dangling_indices_spec.rb +0 -36
- data/spec/elasticsearch/api/actions/delete_by_query_spec.rb +0 -80
- data/spec/elasticsearch/api/actions/delete_document_spec.rb +0 -112
- data/spec/elasticsearch/api/actions/delete_script_spec.rb +0 -37
- data/spec/elasticsearch/api/actions/exists_document_spec.rb +0 -127
- data/spec/elasticsearch/api/actions/explain_document_spec.rb +0 -99
- data/spec/elasticsearch/api/actions/features/get_features_spec.rb +0 -34
- data/spec/elasticsearch/api/actions/features/reset_features_spec.rb +0 -34
- data/spec/elasticsearch/api/actions/field_caps_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/get_document_source_spec.rb +0 -101
- data/spec/elasticsearch/api/actions/get_document_spec.rb +0 -124
- data/spec/elasticsearch/api/actions/get_script_spec.rb +0 -50
- data/spec/elasticsearch/api/actions/hashie_spec.rb +0 -89
- data/spec/elasticsearch/api/actions/index_document_spec.rb +0 -137
- data/spec/elasticsearch/api/actions/indices/add_block_spec.rb +0 -63
- data/spec/elasticsearch/api/actions/indices/analyze_spec.rb +0 -68
- data/spec/elasticsearch/api/actions/indices/clear_cache_spec.rb +0 -80
- data/spec/elasticsearch/api/actions/indices/clone_spec.rb +0 -122
- data/spec/elasticsearch/api/actions/indices/close_spec.rb +0 -85
- data/spec/elasticsearch/api/actions/indices/create_spec.rb +0 -85
- data/spec/elasticsearch/api/actions/indices/delete_alias_spec.rb +0 -83
- data/spec/elasticsearch/api/actions/indices/delete_spec.rb +0 -108
- data/spec/elasticsearch/api/actions/indices/delete_template_spec.rb +0 -86
- data/spec/elasticsearch/api/actions/indices/disk_usage_spec.rb +0 -48
- data/spec/elasticsearch/api/actions/indices/exists_alias_spec.rb +0 -108
- data/spec/elasticsearch/api/actions/indices/exists_spec.rb +0 -108
- data/spec/elasticsearch/api/actions/indices/exists_template_spec.rb +0 -93
- data/spec/elasticsearch/api/actions/indices/exists_type_spec.rb +0 -108
- data/spec/elasticsearch/api/actions/indices/field_usage_stats_spec.rb +0 -46
- data/spec/elasticsearch/api/actions/indices/flush_spec.rb +0 -91
- data/spec/elasticsearch/api/actions/indices/flush_synced_spec.rb +0 -90
- data/spec/elasticsearch/api/actions/indices/forcemerge_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/indices/get_alias_spec.rb +0 -61
- data/spec/elasticsearch/api/actions/indices/get_field_mapping_spec.rb +0 -61
- data/spec/elasticsearch/api/actions/indices/get_mapping_spec.rb +0 -83
- data/spec/elasticsearch/api/actions/indices/get_settings_spec.rb +0 -72
- data/spec/elasticsearch/api/actions/indices/get_spec.rb +0 -54
- data/spec/elasticsearch/api/actions/indices/open_spec.rb +0 -65
- data/spec/elasticsearch/api/actions/indices/put_alias_spec.rb +0 -89
- data/spec/elasticsearch/api/actions/indices/put_mapping_spec.rb +0 -102
- data/spec/elasticsearch/api/actions/indices/put_settings_spec.rb +0 -108
- data/spec/elasticsearch/api/actions/indices/put_template_spec.rb +0 -107
- data/spec/elasticsearch/api/actions/indices/recovery_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/indices/refresh_spec.rb +0 -91
- data/spec/elasticsearch/api/actions/indices/rollover_spec.rb +0 -58
- data/spec/elasticsearch/api/actions/indices/segments_spec.rb +0 -91
- data/spec/elasticsearch/api/actions/indices/shard_stores_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/indices/shrink_spec.rb +0 -42
- data/spec/elasticsearch/api/actions/indices/split_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/indices/stats_spec.rb +0 -124
- data/spec/elasticsearch/api/actions/indices/update_aliases_spec.rb +0 -67
- data/spec/elasticsearch/api/actions/indices/upgrade_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/indices/validate_query_spec.rb +0 -122
- data/spec/elasticsearch/api/actions/info_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/ingest/delete_pipeline_spec.rb +0 -60
- data/spec/elasticsearch/api/actions/ingest/geo_ip_stats_spec.rb +0 -34
- data/spec/elasticsearch/api/actions/ingest/get_pipeline_spec.rb +0 -50
- data/spec/elasticsearch/api/actions/ingest/put_pipeline_spec.rb +0 -60
- data/spec/elasticsearch/api/actions/ingest/simulate_spec.rb +0 -49
- data/spec/elasticsearch/api/actions/json_builders_spec.rb +0 -84
- data/spec/elasticsearch/api/actions/mget_spec.rb +0 -102
- data/spec/elasticsearch/api/actions/msearch_spec.rb +0 -151
- data/spec/elasticsearch/api/actions/msearch_template_spec.rb +0 -93
- data/spec/elasticsearch/api/actions/mtermvectors_spec.rb +0 -46
- data/spec/elasticsearch/api/actions/nodes/clear_repositories_metering_archive_spec.rb +0 -51
- data/spec/elasticsearch/api/actions/nodes/get_repositories_metering_info_spec.rb +0 -44
- data/spec/elasticsearch/api/actions/nodes/hot_threads_spec.rb +0 -61
- data/spec/elasticsearch/api/actions/nodes/info_spec.rb +0 -102
- data/spec/elasticsearch/api/actions/nodes/reload_secure_settings_spec.rb +0 -84
- data/spec/elasticsearch/api/actions/nodes/stats_spec.rb +0 -76
- data/spec/elasticsearch/api/actions/open_point_in_time_spec.rb +0 -34
- data/spec/elasticsearch/api/actions/ping_spec.rb +0 -76
- data/spec/elasticsearch/api/actions/put_script_spec.rb +0 -56
- data/spec/elasticsearch/api/actions/reindex_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/render_search_template_spec.rb +0 -52
- data/spec/elasticsearch/api/actions/scroll_spec.rb +0 -52
- data/spec/elasticsearch/api/actions/search_mvt_spec.rb +0 -52
- data/spec/elasticsearch/api/actions/search_shards_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/search_spec.rb +0 -134
- data/spec/elasticsearch/api/actions/search_template_spec.rb +0 -34
- data/spec/elasticsearch/api/actions/shutdown/delete_node_spec.rb +0 -44
- data/spec/elasticsearch/api/actions/shutdown/get_node_spec.rb +0 -46
- data/spec/elasticsearch/api/actions/shutdown/put_node_spec.rb +0 -50
- data/spec/elasticsearch/api/actions/snapshot/clone_spec.rb +0 -67
- data/spec/elasticsearch/api/actions/snapshot/create_repository_spec.rb +0 -51
- data/spec/elasticsearch/api/actions/snapshot/create_spec.rb +0 -51
- data/spec/elasticsearch/api/actions/snapshot/delete_repository_spec.rb +0 -50
- data/spec/elasticsearch/api/actions/snapshot/delete_spec.rb +0 -51
- data/spec/elasticsearch/api/actions/snapshot/get_repository_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/snapshot/get_spec.rb +0 -51
- data/spec/elasticsearch/api/actions/snapshot/repository_analize_spec.rb +0 -48
- data/spec/elasticsearch/api/actions/snapshot/restore_spec.rb +0 -51
- data/spec/elasticsearch/api/actions/snapshot/status_spec.rb +0 -50
- data/spec/elasticsearch/api/actions/snapshot/verify_repository_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/tasks/cancel_spec.rb +0 -50
- data/spec/elasticsearch/api/actions/tasks/get_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/tasks/list_spec.rb +0 -39
- data/spec/elasticsearch/api/actions/termvectors_spec.rb +0 -66
- data/spec/elasticsearch/api/actions/update_by_query_spec.rb +0 -35
- data/spec/elasticsearch/api/actions/update_document_spec.rb +0 -122
- data/spec/elasticsearch/api/api_spec.rb +0 -43
- data/spec/elasticsearch/api/client_spec.rb +0 -46
- data/spec/elasticsearch/api/rest_api_yaml_spec.rb +0 -159
- data/spec/elasticsearch/api/utils_spec.rb +0 -418
- data/spec/rest_yaml_tests_helper.rb +0 -135
- data/spec/skipped_tests.yml +0 -29
- data/spec/spec_helper.rb +0 -82
- data/utils/Gemfile +0 -28
- data/utils/README.md +0 -46
- data/utils/Thorfile +0 -6
- data/utils/thor/.rubocop.yml +0 -4
- data/utils/thor/generate_source.rb +0 -307
- data/utils/thor/generator/endpoint_specifics.rb +0 -187
- data/utils/thor/generator/files_helper.rb +0 -78
- data/utils/thor/lister.rb +0 -57
- data/utils/thor/templates/_documentation_top.erb +0 -58
- data/utils/thor/templates/_method_setup.erb +0 -53
- data/utils/thor/templates/_params_registry.erb +0 -31
- data/utils/thor/templates/_perform_request.erb +0 -56
- data/utils/thor/templates/method.erb +0 -73
- data/utils/thor/templates/test.erb +0 -43
- data/utils/thor/templates/test_helper.rb +0 -83
- /data/{LICENSE → LICENSE.txt} +0 -0
| @@ -1,418 +0,0 @@ | |
| 1 | 
            -
            # Licensed to Elasticsearch B.V. under one or more contributor
         | 
| 2 | 
            -
            # license agreements. See the NOTICE file distributed with
         | 
| 3 | 
            -
            # this work for additional information regarding copyright
         | 
| 4 | 
            -
            # ownership. Elasticsearch B.V. licenses this file to you under
         | 
| 5 | 
            -
            # the Apache License, Version 2.0 (the "License"); you may
         | 
| 6 | 
            -
            # not use this file except in compliance with the License.
         | 
| 7 | 
            -
            # You may obtain a copy of the License at
         | 
| 8 | 
            -
            #
         | 
| 9 | 
            -
            #   http://www.apache.org/licenses/LICENSE-2.0
         | 
| 10 | 
            -
            #
         | 
| 11 | 
            -
            # Unless required by applicable law or agreed to in writing,
         | 
| 12 | 
            -
            # software distributed under the License is distributed on an
         | 
| 13 | 
            -
            # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
         | 
| 14 | 
            -
            # KIND, either express or implied.  See the License for the
         | 
| 15 | 
            -
            # specific language governing permissions and limitations
         | 
| 16 | 
            -
            # under the License.
         | 
| 17 | 
            -
             | 
| 18 | 
            -
            require 'spec_helper'
         | 
| 19 | 
            -
             | 
| 20 | 
            -
            describe Elasticsearch::API::Utils do
         | 
| 21 | 
            -
             | 
| 22 | 
            -
              let(:utils) do
         | 
| 23 | 
            -
                Class.new { include Elasticsearch::API::Utils }.new
         | 
| 24 | 
            -
              end
         | 
| 25 | 
            -
             | 
| 26 | 
            -
              describe '#__escape' do
         | 
| 27 | 
            -
             | 
| 28 | 
            -
                it 'encodes Unicode characters' do
         | 
| 29 | 
            -
                  expect(utils.__escape('中文')).to eq('%E4%B8%AD%E6%96%87')
         | 
| 30 | 
            -
                end
         | 
| 31 | 
            -
             | 
| 32 | 
            -
                it 'encodes special characters' do
         | 
| 33 | 
            -
                  expect(utils.__escape('foo bar')).to eq('foo%20bar')
         | 
| 34 | 
            -
                  expect(utils.__escape('foo/bar')).to eq('foo%2Fbar')
         | 
| 35 | 
            -
                  expect(utils.__escape('foo^bar')).to eq('foo%5Ebar')
         | 
| 36 | 
            -
                end
         | 
| 37 | 
            -
             | 
| 38 | 
            -
                it 'does not encode asterisks' do
         | 
| 39 | 
            -
                  expect(utils.__escape('*')).to eq('*')
         | 
| 40 | 
            -
                end
         | 
| 41 | 
            -
              end
         | 
| 42 | 
            -
             | 
| 43 | 
            -
              describe '#__listify' do
         | 
| 44 | 
            -
             | 
| 45 | 
            -
                it 'creates a list from a single value' do
         | 
| 46 | 
            -
                  expect(utils.__listify('foo')).to eq('foo')
         | 
| 47 | 
            -
                end
         | 
| 48 | 
            -
             | 
| 49 | 
            -
                it 'creates a list from an array' do
         | 
| 50 | 
            -
                  expect(utils.__listify(['foo', 'bar'])).to eq('foo,bar')
         | 
| 51 | 
            -
                end
         | 
| 52 | 
            -
             | 
| 53 | 
            -
                it 'creates a list from multiple arguments' do
         | 
| 54 | 
            -
                  expect(utils.__listify('foo', 'bar')).to eq('foo,bar')
         | 
| 55 | 
            -
                end
         | 
| 56 | 
            -
             | 
| 57 | 
            -
                it 'ignores nil values' do
         | 
| 58 | 
            -
                  expect(utils.__listify(['foo', nil, 'bar'])).to eq('foo,bar')
         | 
| 59 | 
            -
                end
         | 
| 60 | 
            -
             | 
| 61 | 
            -
                it 'ignores special characters' do
         | 
| 62 | 
            -
                  expect(utils.__listify(['foo', 'bar^bam'])).to eq('foo,bar%5Ebam')
         | 
| 63 | 
            -
                end
         | 
| 64 | 
            -
             | 
| 65 | 
            -
                context 'when the escape option is set to false' do
         | 
| 66 | 
            -
             | 
| 67 | 
            -
                  it 'does not escape the characters' do
         | 
| 68 | 
            -
                    expect(utils.__listify(['foo', 'bar^bam'], escape: false)).to eq('foo,bar^bam')
         | 
| 69 | 
            -
                  end
         | 
| 70 | 
            -
                end
         | 
| 71 | 
            -
              end
         | 
| 72 | 
            -
             | 
| 73 | 
            -
              describe '#__pathify' do
         | 
| 74 | 
            -
             | 
| 75 | 
            -
                it 'creates a path from a single value' do
         | 
| 76 | 
            -
                  expect(utils.__pathify('foo')).to eq('foo')
         | 
| 77 | 
            -
                end
         | 
| 78 | 
            -
             | 
| 79 | 
            -
                it 'creates a path from an array' do
         | 
| 80 | 
            -
                  expect(utils.__pathify(['foo', 'bar'])).to eq('foo/bar')
         | 
| 81 | 
            -
                end
         | 
| 82 | 
            -
             | 
| 83 | 
            -
                it 'ignores nil values' do
         | 
| 84 | 
            -
                  expect(utils.__pathify(['foo', nil, 'bar'])).to eq('foo/bar')
         | 
| 85 | 
            -
                end
         | 
| 86 | 
            -
             | 
| 87 | 
            -
                it 'ignores empty string values' do
         | 
| 88 | 
            -
                  expect(utils.__pathify(['foo', '', 'bar'])).to eq('foo/bar')
         | 
| 89 | 
            -
                end
         | 
| 90 | 
            -
              end
         | 
| 91 | 
            -
             | 
| 92 | 
            -
              describe '#__bulkify' do
         | 
| 93 | 
            -
             | 
| 94 | 
            -
                context 'when the input is an array of hashes' do
         | 
| 95 | 
            -
             | 
| 96 | 
            -
                  let(:result) do
         | 
| 97 | 
            -
                    utils.__bulkify [
         | 
| 98 | 
            -
                      { index: { _index: 'myindexA', _id: '1', data: { title: 'Test' } } },
         | 
| 99 | 
            -
                      { update: { _index: 'myindexB', _id: '2', data: { doc: { title: 'Update' } } } },
         | 
| 100 | 
            -
                      { delete: { _index: 'myindexC', _id: '3' } }
         | 
| 101 | 
            -
                    ]
         | 
| 102 | 
            -
                  end
         | 
| 103 | 
            -
             | 
| 104 | 
            -
                  let(:expected_string) do
         | 
| 105 | 
            -
                    <<-PAYLOAD.gsub(/^\s+/, '')
         | 
| 106 | 
            -
                            {"index":{"_index":"myindexA","_id":"1"}}
         | 
| 107 | 
            -
                            {"title":"Test"}
         | 
| 108 | 
            -
                            {"update":{"_index":"myindexB","_id":"2"}}
         | 
| 109 | 
            -
                            {"doc":{"title":"Update"}}
         | 
| 110 | 
            -
                            {"delete":{"_index":"myindexC","_id":"3"}}
         | 
| 111 | 
            -
                    PAYLOAD
         | 
| 112 | 
            -
                  end
         | 
| 113 | 
            -
             | 
| 114 | 
            -
                  it 'serializes the hashes' do
         | 
| 115 | 
            -
                    expect(result).to eq(expected_string)
         | 
| 116 | 
            -
                  end
         | 
| 117 | 
            -
                end
         | 
| 118 | 
            -
             | 
| 119 | 
            -
                context 'when the input is an array of strings' do
         | 
| 120 | 
            -
             | 
| 121 | 
            -
                  let(:result) do
         | 
| 122 | 
            -
                    utils.__bulkify(['{"foo":"bar"}','{"moo":"bam"}'])
         | 
| 123 | 
            -
                  end
         | 
| 124 | 
            -
             | 
| 125 | 
            -
                  let(:expected_string) do
         | 
| 126 | 
            -
                    <<-PAYLOAD.gsub(/^\s+/, '')
         | 
| 127 | 
            -
                          {"foo":"bar"}
         | 
| 128 | 
            -
                          {"moo":"bam"}
         | 
| 129 | 
            -
                    PAYLOAD
         | 
| 130 | 
            -
                  end
         | 
| 131 | 
            -
             | 
| 132 | 
            -
                  it 'serializes the array of strings' do
         | 
| 133 | 
            -
                    expect(result).to eq(expected_string)
         | 
| 134 | 
            -
                  end
         | 
| 135 | 
            -
                end
         | 
| 136 | 
            -
             | 
| 137 | 
            -
                context 'when the input is an array of header/data pairs' do
         | 
| 138 | 
            -
             | 
| 139 | 
            -
                  let(:result) do
         | 
| 140 | 
            -
                    utils.__bulkify([{ foo: 'bar' }, { moo: 'bam' },{ foo: 'baz' }])
         | 
| 141 | 
            -
                  end
         | 
| 142 | 
            -
             | 
| 143 | 
            -
                  let(:expected_string) do
         | 
| 144 | 
            -
                    <<-PAYLOAD.gsub(/^\s+/, '')
         | 
| 145 | 
            -
                          {"foo":"bar"}
         | 
| 146 | 
            -
                          {"moo":"bam"}
         | 
| 147 | 
            -
                          {"foo":"baz"}
         | 
| 148 | 
            -
                    PAYLOAD
         | 
| 149 | 
            -
                  end
         | 
| 150 | 
            -
             | 
| 151 | 
            -
                  it 'serializes the array of strings' do
         | 
| 152 | 
            -
                    expect(result).to eq(expected_string)
         | 
| 153 | 
            -
                  end
         | 
| 154 | 
            -
                end
         | 
| 155 | 
            -
             | 
| 156 | 
            -
                context 'when the payload has the :data option' do
         | 
| 157 | 
            -
             | 
| 158 | 
            -
                  let(:input) do
         | 
| 159 | 
            -
                    { index: { foo: 'bar', data: { moo: 'bam' } } }
         | 
| 160 | 
            -
                  end
         | 
| 161 | 
            -
             | 
| 162 | 
            -
                  let(:result) do
         | 
| 163 | 
            -
                    utils.__bulkify([input])
         | 
| 164 | 
            -
                  end
         | 
| 165 | 
            -
             | 
| 166 | 
            -
                  let(:expected_string) do
         | 
| 167 | 
            -
                    <<-PAYLOAD.gsub(/^\s+/, '')
         | 
| 168 | 
            -
                          {"index":{"foo":"bar"}}
         | 
| 169 | 
            -
                          {"moo":"bam"}
         | 
| 170 | 
            -
                    PAYLOAD
         | 
| 171 | 
            -
                  end
         | 
| 172 | 
            -
             | 
| 173 | 
            -
                  it 'does not mutate the input' do
         | 
| 174 | 
            -
                    expect(input[:index][:data]).to eq(moo: 'bam')
         | 
| 175 | 
            -
                  end
         | 
| 176 | 
            -
             | 
| 177 | 
            -
                  it 'serializes the array of strings' do
         | 
| 178 | 
            -
                    expect(result).to eq(expected_string)
         | 
| 179 | 
            -
                  end
         | 
| 180 | 
            -
                end
         | 
| 181 | 
            -
             | 
| 182 | 
            -
                context 'when the payload has nested :data options' do
         | 
| 183 | 
            -
             | 
| 184 | 
            -
                  let(:data) do
         | 
| 185 | 
            -
                    { data: { a: 'b', data: { c: 'd' } } }
         | 
| 186 | 
            -
                  end
         | 
| 187 | 
            -
             | 
| 188 | 
            -
                  let(:result) do
         | 
| 189 | 
            -
                    utils.__bulkify([{ index: { foo: 'bar'} } , data])
         | 
| 190 | 
            -
                  end
         | 
| 191 | 
            -
             | 
| 192 | 
            -
                  let(:lines) do
         | 
| 193 | 
            -
                    result.split("\n")
         | 
| 194 | 
            -
                  end
         | 
| 195 | 
            -
             | 
| 196 | 
            -
                  let(:header) do
         | 
| 197 | 
            -
                    MultiJson.load(lines.first)
         | 
| 198 | 
            -
                  end
         | 
| 199 | 
            -
             | 
| 200 | 
            -
                  let(:data_string) do
         | 
| 201 | 
            -
                    MultiJson.load(lines.last)
         | 
| 202 | 
            -
                  end
         | 
| 203 | 
            -
             | 
| 204 | 
            -
                  it 'does not mutate the input' do
         | 
| 205 | 
            -
                    expect(data[:data]).to eq(a: 'b', data: { c: 'd' })
         | 
| 206 | 
            -
                  end
         | 
| 207 | 
            -
             | 
| 208 | 
            -
                  it 'serializes the array of strings' do
         | 
| 209 | 
            -
                    expect(header['index']['foo']).to eq('bar')
         | 
| 210 | 
            -
                    expect(data_string['data']['a']).to eq('b')
         | 
| 211 | 
            -
                    expect(data_string['data']['data']['c']).to eq('d')
         | 
| 212 | 
            -
                  end
         | 
| 213 | 
            -
                end
         | 
| 214 | 
            -
              end
         | 
| 215 | 
            -
             | 
| 216 | 
            -
              context '#__validate_and_extract_params' do
         | 
| 217 | 
            -
             | 
| 218 | 
            -
                it 'listify Arrays' do
         | 
| 219 | 
            -
                  expect(utils.__validate_and_extract_params({ foo: ['a', 'b'] }, [:foo] )).to eq(foo: 'a,b')
         | 
| 220 | 
            -
                end
         | 
| 221 | 
            -
             | 
| 222 | 
            -
                it 'does not escape the parameters' do
         | 
| 223 | 
            -
                  expect(utils.__validate_and_extract_params({ foo: ['a.*', 'b.*'] }, [:foo] )).to eq(foo: 'a.*,b.*')
         | 
| 224 | 
            -
                end
         | 
| 225 | 
            -
             | 
| 226 | 
            -
                context 'when the params are valid' do
         | 
| 227 | 
            -
             | 
| 228 | 
            -
                  it 'extracts the valid params from the hash' do
         | 
| 229 | 
            -
                    expect(utils.__validate_and_extract_params({ foo: 'qux' }, [:foo, :bar]) ).to eq(foo: 'qux')
         | 
| 230 | 
            -
                  end
         | 
| 231 | 
            -
                end
         | 
| 232 | 
            -
             | 
| 233 | 
            -
                context 'when the params are invalid' do
         | 
| 234 | 
            -
             | 
| 235 | 
            -
                  it 'raises an ArgumentError' do
         | 
| 236 | 
            -
                    expect {
         | 
| 237 | 
            -
                      utils.__validate_and_extract_params({ foo: 'qux', bam: 'mux' }, [:foo, :bar])
         | 
| 238 | 
            -
                    }.to raise_exception(ArgumentError)
         | 
| 239 | 
            -
                  end
         | 
| 240 | 
            -
                end
         | 
| 241 | 
            -
             | 
| 242 | 
            -
                context 'when COMMON_PARAMS are provided' do
         | 
| 243 | 
            -
             | 
| 244 | 
            -
                  it 'extracts the params' do
         | 
| 245 | 
            -
                    expect(utils.__validate_and_extract_params({ index: 'foo'}, [:foo])).to eq({})
         | 
| 246 | 
            -
                  end
         | 
| 247 | 
            -
                end
         | 
| 248 | 
            -
             | 
| 249 | 
            -
                context 'when COMMON_QUERY_PARAMS are provided' do
         | 
| 250 | 
            -
             | 
| 251 | 
            -
                  it 'extracts the params' do
         | 
| 252 | 
            -
                    expect(utils.__validate_and_extract_params(format: 'yaml')).to eq(format: 'yaml')
         | 
| 253 | 
            -
                  end
         | 
| 254 | 
            -
                end
         | 
| 255 | 
            -
             | 
| 256 | 
            -
                context 'when the :skip_paramter_validation option is set' do
         | 
| 257 | 
            -
             | 
| 258 | 
            -
                  let(:result) do
         | 
| 259 | 
            -
                    utils.__validate_and_extract_params( { foo: 'q', bam: 'm' }, [:foo, :bar], { skip_parameter_validation: true } )
         | 
| 260 | 
            -
                  end
         | 
| 261 | 
            -
             | 
| 262 | 
            -
                  it 'skips parameter validation' do
         | 
| 263 | 
            -
                    expect(result).to eq(foo: 'q', bam: 'm')
         | 
| 264 | 
            -
                  end
         | 
| 265 | 
            -
                end
         | 
| 266 | 
            -
             | 
| 267 | 
            -
                context 'when the module has the setting to skip parameter validation' do
         | 
| 268 | 
            -
             | 
| 269 | 
            -
                  around do |example|
         | 
| 270 | 
            -
                    original_value = Elasticsearch::API.settings[:skip_parameter_validation]
         | 
| 271 | 
            -
                    Elasticsearch::API.settings[:skip_parameter_validation] = true
         | 
| 272 | 
            -
                    example.run
         | 
| 273 | 
            -
                    Elasticsearch::API.settings[:skip_parameter_validation] = original_value
         | 
| 274 | 
            -
                  end
         | 
| 275 | 
            -
             | 
| 276 | 
            -
                  let(:result) do
         | 
| 277 | 
            -
                    utils.__validate_and_extract_params( { foo: 'q', bam: 'm' }, [:foo, :bar])
         | 
| 278 | 
            -
                  end
         | 
| 279 | 
            -
             | 
| 280 | 
            -
                  it 'applies the module setting' do
         | 
| 281 | 
            -
                    expect(result).to eq(foo: 'q', bam: 'm')
         | 
| 282 | 
            -
                  end
         | 
| 283 | 
            -
                end
         | 
| 284 | 
            -
              end
         | 
| 285 | 
            -
             | 
| 286 | 
            -
              describe '#__extract_parts' do
         | 
| 287 | 
            -
             | 
| 288 | 
            -
                it 'extracts parts with true value from a Hash' do
         | 
| 289 | 
            -
                  expect(utils.__extract_parts({ foo: true, moo: 'blah' }, [:foo, :bar])).to eq(['foo'])
         | 
| 290 | 
            -
                end
         | 
| 291 | 
            -
             | 
| 292 | 
            -
                it 'extracts parts with string value from a Hash' do
         | 
| 293 | 
            -
                  expect(utils.__extract_parts({ foo: 'qux', moo: 'blah' }, [:foo, :bar])).to eq(['qux'])
         | 
| 294 | 
            -
                end
         | 
| 295 | 
            -
              end
         | 
| 296 | 
            -
             | 
| 297 | 
            -
              context '#__rescue_from_not_found' do
         | 
| 298 | 
            -
             | 
| 299 | 
            -
                it 'returns false if exception class name contains \'NotFound\'' do
         | 
| 300 | 
            -
                  expect(utils.__rescue_from_not_found { raise NotFound }).to be(false)
         | 
| 301 | 
            -
                end
         | 
| 302 | 
            -
             | 
| 303 | 
            -
                it 'returns false if exception message contains \'Not Found\'' do
         | 
| 304 | 
            -
                  expect(utils.__rescue_from_not_found { raise StandardError.new "Not Found" }).to be(false)
         | 
| 305 | 
            -
                  expect(utils.__rescue_from_not_found { raise StandardError.new "NotFound" }).to be(false)
         | 
| 306 | 
            -
                end
         | 
| 307 | 
            -
             | 
| 308 | 
            -
                it 'raises the exception if the class name and message do not include \'NotFound\'' do
         | 
| 309 | 
            -
                  expect {
         | 
| 310 | 
            -
                    utils.__rescue_from_not_found { raise StandardError.new "Any other exception" }
         | 
| 311 | 
            -
                  }.to raise_exception(StandardError)
         | 
| 312 | 
            -
                end
         | 
| 313 | 
            -
              end
         | 
| 314 | 
            -
             | 
| 315 | 
            -
              context '#__report_unsupported_parameters' do
         | 
| 316 | 
            -
             | 
| 317 | 
            -
                context 'when the parameters are passed as Symbols' do
         | 
| 318 | 
            -
             | 
| 319 | 
            -
                  let(:arguments) do
         | 
| 320 | 
            -
                    { foo: 'bar', moo: 'bam', baz: 'qux' }
         | 
| 321 | 
            -
                  end
         | 
| 322 | 
            -
             | 
| 323 | 
            -
                  let(:unsupported_params) do
         | 
| 324 | 
            -
                    [ :foo, :moo]
         | 
| 325 | 
            -
                  end
         | 
| 326 | 
            -
             | 
| 327 | 
            -
                  let(:message) do
         | 
| 328 | 
            -
                    message = ''
         | 
| 329 | 
            -
                    expect(Kernel).to receive(:warn) { |msg| message = msg }
         | 
| 330 | 
            -
                    utils.__report_unsupported_parameters(arguments, unsupported_params)
         | 
| 331 | 
            -
                    message
         | 
| 332 | 
            -
                  end
         | 
| 333 | 
            -
             | 
| 334 | 
            -
                  it 'prints the unsupported parameters' do
         | 
| 335 | 
            -
                    expect(message).to match(/You are using unsupported parameter \[\:foo\]/)
         | 
| 336 | 
            -
                    expect(message).to match(/You are using unsupported parameter \[\:moo\]/)
         | 
| 337 | 
            -
                  end
         | 
| 338 | 
            -
                end
         | 
| 339 | 
            -
             | 
| 340 | 
            -
                context 'when the parameters are passed as Hashes' do
         | 
| 341 | 
            -
             | 
| 342 | 
            -
                  let(:arguments) do
         | 
| 343 | 
            -
                    { foo: 'bar', moo: 'bam', baz: 'qux' }
         | 
| 344 | 
            -
                  end
         | 
| 345 | 
            -
             | 
| 346 | 
            -
                  let(:unsupported_params) do
         | 
| 347 | 
            -
                    [ :foo, :moo]
         | 
| 348 | 
            -
                  end
         | 
| 349 | 
            -
             | 
| 350 | 
            -
                  let(:message) do
         | 
| 351 | 
            -
                    message = ''
         | 
| 352 | 
            -
                    expect(Kernel).to receive(:warn) { |msg| message = msg }
         | 
| 353 | 
            -
                    utils.__report_unsupported_parameters(arguments, unsupported_params)
         | 
| 354 | 
            -
                    message
         | 
| 355 | 
            -
                  end
         | 
| 356 | 
            -
             | 
| 357 | 
            -
                  it 'prints the unsupported parameters' do
         | 
| 358 | 
            -
                    expect(message).to match(/You are using unsupported parameter \[\:foo\]/)
         | 
| 359 | 
            -
                    expect(message).to match(/You are using unsupported parameter \[\:moo\]/)
         | 
| 360 | 
            -
                  end
         | 
| 361 | 
            -
                end
         | 
| 362 | 
            -
             | 
| 363 | 
            -
                context 'when the parameters are passed as a mix of Hashes and Symbols' do
         | 
| 364 | 
            -
             | 
| 365 | 
            -
                  let(:arguments) do
         | 
| 366 | 
            -
                    { foo: 'bar', moo: 'bam', baz: 'qux' }
         | 
| 367 | 
            -
                  end
         | 
| 368 | 
            -
             | 
| 369 | 
            -
                  let(:unsupported_params) do
         | 
| 370 | 
            -
                    [ { foo: { explanation: 'NOT_SUPPORTED'} }, :moo ]
         | 
| 371 | 
            -
                  end
         | 
| 372 | 
            -
             | 
| 373 | 
            -
             | 
| 374 | 
            -
                  let(:message) do
         | 
| 375 | 
            -
                    message = ''
         | 
| 376 | 
            -
                    expect(Kernel).to receive(:warn) { |msg| message = msg }
         | 
| 377 | 
            -
                    utils.__report_unsupported_parameters(arguments, unsupported_params)
         | 
| 378 | 
            -
                    message
         | 
| 379 | 
            -
                  end
         | 
| 380 | 
            -
             | 
| 381 | 
            -
                  it 'prints the unsupported parameters' do
         | 
| 382 | 
            -
                    expect(message).to match(/You are using unsupported parameter \[\:foo\]/)
         | 
| 383 | 
            -
                    expect(message).to match(/You are using unsupported parameter \[\:moo\]/)
         | 
| 384 | 
            -
                    expect(message).to match(/NOT_SUPPORTED/)
         | 
| 385 | 
            -
                  end
         | 
| 386 | 
            -
                end
         | 
| 387 | 
            -
             | 
| 388 | 
            -
                context 'when unsupported parameters are unused' do
         | 
| 389 | 
            -
             | 
| 390 | 
            -
                  let(:arguments) do
         | 
| 391 | 
            -
                    { moo: 'bam', baz: 'qux' }
         | 
| 392 | 
            -
                  end
         | 
| 393 | 
            -
             | 
| 394 | 
            -
                  let(:unsupported_params) do
         | 
| 395 | 
            -
                    [ :foo ]
         | 
| 396 | 
            -
                  end
         | 
| 397 | 
            -
             | 
| 398 | 
            -
                  it 'prints the unsupported parameters' do
         | 
| 399 | 
            -
                    expect(Kernel).not_to receive(:warn)
         | 
| 400 | 
            -
                    utils.__report_unsupported_parameters(arguments, unsupported_params)
         | 
| 401 | 
            -
                  end
         | 
| 402 | 
            -
                end
         | 
| 403 | 
            -
              end
         | 
| 404 | 
            -
             | 
| 405 | 
            -
              describe '#__report_unsupported_method' do
         | 
| 406 | 
            -
             | 
| 407 | 
            -
                let(:message) do
         | 
| 408 | 
            -
                  message = ''
         | 
| 409 | 
            -
                  expect(Kernel).to receive(:warn) { |msg| message = msg }
         | 
| 410 | 
            -
                  utils.__report_unsupported_method(:foo)
         | 
| 411 | 
            -
                  message
         | 
| 412 | 
            -
                end
         | 
| 413 | 
            -
             | 
| 414 | 
            -
                it 'prints a warning' do
         | 
| 415 | 
            -
                  expect(message).to match(/foo/)
         | 
| 416 | 
            -
                end
         | 
| 417 | 
            -
              end
         | 
| 418 | 
            -
            end
         | 
| @@ -1,135 +0,0 @@ | |
| 1 | 
            -
            # Licensed to Elasticsearch B.V. under one or more contributor
         | 
| 2 | 
            -
            # license agreements. See the NOTICE file distributed with
         | 
| 3 | 
            -
            # this work for additional information regarding copyright
         | 
| 4 | 
            -
            # ownership. Elasticsearch B.V. licenses this file to you under
         | 
| 5 | 
            -
            # the Apache License, Version 2.0 (the "License"); you may
         | 
| 6 | 
            -
            # not use this file except in compliance with the License.
         | 
| 7 | 
            -
            # You may obtain a copy of the License at
         | 
| 8 | 
            -
            #
         | 
| 9 | 
            -
            #   http://www.apache.org/licenses/LICENSE-2.0
         | 
| 10 | 
            -
            #
         | 
| 11 | 
            -
            # Unless required by applicable law or agreed to in writing,
         | 
| 12 | 
            -
            # software distributed under the License is distributed on an
         | 
| 13 | 
            -
            # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
         | 
| 14 | 
            -
            # KIND, either express or implied.  See the License for the
         | 
| 15 | 
            -
            # specific language governing permissions and limitations
         | 
| 16 | 
            -
            # under the License.
         | 
| 17 | 
            -
             | 
| 18 | 
            -
            require "#{File.expand_path(File.dirname('..'), '..')}/api-spec-testing/test_file"
         | 
| 19 | 
            -
            require "#{File.expand_path(File.dirname('..'), '..')}/api-spec-testing/rspec_matchers"
         | 
| 20 | 
            -
            require "#{File.expand_path(File.dirname('..'), '..')}/api-spec-testing/wipe_cluster"
         | 
| 21 | 
            -
            include Elasticsearch::RestAPIYAMLTests
         | 
| 22 | 
            -
             | 
| 23 | 
            -
            TRANSPORT_OPTIONS = {}
         | 
| 24 | 
            -
            PROJECT_PATH = File.join(File.dirname(__FILE__), '..')
         | 
| 25 | 
            -
            STACK_VERSION = ENV['STACK_VERSION']
         | 
| 26 | 
            -
            require 'elasticsearch/xpack'
         | 
| 27 | 
            -
             | 
| 28 | 
            -
            def testing_compatibility?
         | 
| 29 | 
            -
              [1, true, 'true'].include?(ENV['ELASTIC_CLIENT_APIVERSIONING'])
         | 
| 30 | 
            -
            end
         | 
| 31 | 
            -
             | 
| 32 | 
            -
            if (hosts = ELASTICSEARCH_URL)
         | 
| 33 | 
            -
              split_hosts = hosts.split(',').map do |host|
         | 
| 34 | 
            -
                /(http\:\/\/)?\S+/.match(host)
         | 
| 35 | 
            -
              end
         | 
| 36 | 
            -
              uri = URI.parse(split_hosts.first[0])
         | 
| 37 | 
            -
              TEST_HOST = uri.host
         | 
| 38 | 
            -
              TEST_PORT = uri.port
         | 
| 39 | 
            -
            else
         | 
| 40 | 
            -
              TEST_HOST, TEST_PORT = 'localhost', '9200'
         | 
| 41 | 
            -
            end
         | 
| 42 | 
            -
             | 
| 43 | 
            -
            test_suite = ENV['TEST_SUITE'] || 'free'
         | 
| 44 | 
            -
            password = ENV['ELASTIC_PASSWORD'] || 'changeme'
         | 
| 45 | 
            -
            user = ENV['ELASTIC_USER'] || 'elastic'
         | 
| 46 | 
            -
             | 
| 47 | 
            -
            if defined?(TEST_HOST) && defined?(TEST_PORT)
         | 
| 48 | 
            -
              URL = "http://#{TEST_HOST}:#{TEST_PORT}".freeze
         | 
| 49 | 
            -
             | 
| 50 | 
            -
              if STACK_VERSION.match?(/^8\./)
         | 
| 51 | 
            -
                if ENV['TEST_SUITE'] == 'platinum'
         | 
| 52 | 
            -
                  raw_certificate = File.read(File.join(PROJECT_PATH, '../.ci/certs/testnode.crt'))
         | 
| 53 | 
            -
                  certificate = OpenSSL::X509::Certificate.new(raw_certificate)
         | 
| 54 | 
            -
                  raw_key = File.read(File.join(PROJECT_PATH, '../.ci/certs/testnode.key'))
         | 
| 55 | 
            -
                  key = OpenSSL::PKey::RSA.new(raw_key)
         | 
| 56 | 
            -
                  ca_file = File.expand_path(File.join(PROJECT_PATH, '/.ci/certs/ca.crt'))
         | 
| 57 | 
            -
                  host = "https://elastic:#{password}@#{uri.host}:#{uri.port}".freeze
         | 
| 58 | 
            -
                  transport_options = { ssl: { verify: false, client_cert: certificate, client_key: key, ca_file: ca_file } }
         | 
| 59 | 
            -
                else
         | 
| 60 | 
            -
                  host = "http://elastic:#{password}@#{uri.host}:#{uri.port}".freeze
         | 
| 61 | 
            -
                  transport_options = {}
         | 
| 62 | 
            -
                end
         | 
| 63 | 
            -
             | 
| 64 | 
            -
                ADMIN_CLIENT = Elasticsearch::Client.new(host: host, transport_options: transport_options)
         | 
| 65 | 
            -
             | 
| 66 | 
            -
                DEFAULT_CLIENT = if ENV['QUIET'] == 'true'
         | 
| 67 | 
            -
                                   Elasticsearch::Client.new(host: host, transport_options: transport_options)
         | 
| 68 | 
            -
                                 else
         | 
| 69 | 
            -
                                   Elasticsearch::Client.new(
         | 
| 70 | 
            -
                                     host: host,
         | 
| 71 | 
            -
                                     tracer: Logger.new($stdout),
         | 
| 72 | 
            -
                                     transport_options: transport_options
         | 
| 73 | 
            -
                                   )
         | 
| 74 | 
            -
                                 end
         | 
| 75 | 
            -
             | 
| 76 | 
            -
                if ENV['QUIET'] == 'true'
         | 
| 77 | 
            -
                  DEFAULT_CLIENT = Elasticsearch::Client.new(
         | 
| 78 | 
            -
                    host: URL,
         | 
| 79 | 
            -
                    transport_options: TRANSPORT_OPTIONS,
         | 
| 80 | 
            -
                    user: user,
         | 
| 81 | 
            -
                    password: password
         | 
| 82 | 
            -
                  )
         | 
| 83 | 
            -
                else
         | 
| 84 | 
            -
                  DEFAULT_CLIENT = Elasticsearch::Client.new(
         | 
| 85 | 
            -
                    host: URL,
         | 
| 86 | 
            -
                    transport_options: TRANSPORT_OPTIONS,
         | 
| 87 | 
            -
                    user: user,
         | 
| 88 | 
            -
                    password: password,
         | 
| 89 | 
            -
                    tracer: Logger.new($stdout)
         | 
| 90 | 
            -
                  )
         | 
| 91 | 
            -
                end
         | 
| 92 | 
            -
              else
         | 
| 93 | 
            -
                ADMIN_CLIENT = Elasticsearch::Client.new(host: URL, transport_options: TRANSPORT_OPTIONS)
         | 
| 94 | 
            -
             | 
| 95 | 
            -
                if ENV['QUIET'] == 'true'
         | 
| 96 | 
            -
                  DEFAULT_CLIENT = Elasticsearch::Client.new(host: URL, transport_options: TRANSPORT_OPTIONS)
         | 
| 97 | 
            -
                else
         | 
| 98 | 
            -
                  DEFAULT_CLIENT = Elasticsearch::Client.new(host: URL,
         | 
| 99 | 
            -
                                                             transport_options: TRANSPORT_OPTIONS,
         | 
| 100 | 
            -
                                                             tracer: Logger.new($stdout))
         | 
| 101 | 
            -
                end
         | 
| 102 | 
            -
              end
         | 
| 103 | 
            -
            end
         | 
| 104 | 
            -
             | 
| 105 | 
            -
            YAML_FILES_DIRECTORY = "#{PROJECT_PATH}/../tmp/rest-api-spec/#{STACK_VERSION.match?(/^8\./) ? 'compatTest' : 'test'}/free"
         | 
| 106 | 
            -
             | 
| 107 | 
            -
            SINGLE_TEST = if ENV['SINGLE_TEST'] && !ENV['SINGLE_TEST'].empty?
         | 
| 108 | 
            -
                            test_target = ENV['SINGLE_TEST']
         | 
| 109 | 
            -
             | 
| 110 | 
            -
                            if test_target.match?(/\.yml$/)
         | 
| 111 | 
            -
                              ["#{PROJECT_PATH}/../tmp/rest-api-spec/test/free/#{test_target}"]
         | 
| 112 | 
            -
                            else
         | 
| 113 | 
            -
                              Dir.glob(
         | 
| 114 | 
            -
                                ["#{PROJECT_PATH}/../tmp/rest-api-spec/test/free/#{test_target}/*.yml"]
         | 
| 115 | 
            -
                              )
         | 
| 116 | 
            -
                            end
         | 
| 117 | 
            -
                          end
         | 
| 118 | 
            -
             | 
| 119 | 
            -
            # Skipped tests
         | 
| 120 | 
            -
            file = File.expand_path("#{__dir__}/skipped_tests.yml")
         | 
| 121 | 
            -
            skipped_tests = YAML.load_file(file)
         | 
| 122 | 
            -
             | 
| 123 | 
            -
            # The directory of rest api YAML files.
         | 
| 124 | 
            -
            REST_API_YAML_FILES = if ENV['RUN_SKIPPED_TESTS'] # only run the skipped tests if true
         | 
| 125 | 
            -
                                    SKIPPED_TESTS = []
         | 
| 126 | 
            -
                                    skipped_tests.map { |test| "#{YAML_FILES_DIRECTORY}/#{test[:file]}" }
         | 
| 127 | 
            -
                                  else
         | 
| 128 | 
            -
                                    # If not, define the skipped tests constant and try the single test or all
         | 
| 129 | 
            -
                                    # the tests
         | 
| 130 | 
            -
                                    SKIPPED_TESTS = skipped_tests
         | 
| 131 | 
            -
                                    SINGLE_TEST || Dir.glob("#{YAML_FILES_DIRECTORY}/**/*.yml")
         | 
| 132 | 
            -
                                  end
         | 
| 133 | 
            -
             | 
| 134 | 
            -
            # The features to skip
         | 
| 135 | 
            -
            REST_API_YAML_SKIP_FEATURES = ['warnings', 'node_selector'].freeze
         | 
    
        data/spec/skipped_tests.yml
    DELETED
    
    | @@ -1,29 +0,0 @@ | |
| 1 | 
            -
            # Response from Elasticsearch is just a String, so it's not possible to compare using headers.
         | 
| 2 | 
            -
            -
         | 
| 3 | 
            -
              :file:        'cat.aliases/20_headers.yml'
         | 
| 4 | 
            -
              :description: 'Simple alias with yaml body through Accept header'
         | 
| 5 | 
            -
             | 
| 6 | 
            -
            # Check version skip logic
         | 
| 7 | 
            -
            -
         | 
| 8 | 
            -
              :file:        'create/15_without_id.yml'
         | 
| 9 | 
            -
              :description: 'Create without ID'
         | 
| 10 | 
            -
             | 
| 11 | 
            -
            # No error is raised
         | 
| 12 | 
            -
            -
         | 
| 13 | 
            -
              :file:        'create/15_without_id_with_types.yml'
         | 
| 14 | 
            -
              :description: 'Create without ID'
         | 
| 15 | 
            -
             | 
| 16 | 
            -
            # Error message doesn't match
         | 
| 17 | 
            -
            -
         | 
| 18 | 
            -
              :file:        'tasks.get/10_basic.yml'
         | 
| 19 | 
            -
              :description: 'get task test'
         | 
| 20 | 
            -
             | 
| 21 | 
            -
            # Figure out how to match response when there is an error
         | 
| 22 | 
            -
            -
         | 
| 23 | 
            -
              :file:        'delete/70_mix_typeless_typeful.yml'
         | 
| 24 | 
            -
              :description: '*'
         | 
| 25 | 
            -
             | 
| 26 | 
            -
            # Figure out how to match response when there is an error
         | 
| 27 | 
            -
            -
         | 
| 28 | 
            -
              :file:        'cat.templates/10_basic.yml'
         | 
| 29 | 
            -
              :description: '*'
         | 
    
        data/spec/spec_helper.rb
    DELETED
    
    | @@ -1,82 +0,0 @@ | |
| 1 | 
            -
            # Licensed to Elasticsearch B.V. under one or more contributor
         | 
| 2 | 
            -
            # license agreements. See the NOTICE file distributed with
         | 
| 3 | 
            -
            # this work for additional information regarding copyright
         | 
| 4 | 
            -
            # ownership. Elasticsearch B.V. licenses this file to you under
         | 
| 5 | 
            -
            # the Apache License, Version 2.0 (the "License"); you may
         | 
| 6 | 
            -
            # not use this file except in compliance with the License.
         | 
| 7 | 
            -
            # You may obtain a copy of the License at
         | 
| 8 | 
            -
            #
         | 
| 9 | 
            -
            #   http://www.apache.org/licenses/LICENSE-2.0
         | 
| 10 | 
            -
            #
         | 
| 11 | 
            -
            # Unless required by applicable law or agreed to in writing,
         | 
| 12 | 
            -
            # software distributed under the License is distributed on an
         | 
| 13 | 
            -
            # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
         | 
| 14 | 
            -
            # KIND, either express or implied.  See the License for the
         | 
| 15 | 
            -
            # specific language governing permissions and limitations
         | 
| 16 | 
            -
            # under the License.
         | 
| 17 | 
            -
            if ENV['COVERAGE'] && ENV['CI'].nil?
         | 
| 18 | 
            -
              require 'simplecov'
         | 
| 19 | 
            -
              SimpleCov.start { add_filter %r{^/test|spec/} }
         | 
| 20 | 
            -
            end
         | 
| 21 | 
            -
             | 
| 22 | 
            -
            if defined?(JRUBY_VERSION)
         | 
| 23 | 
            -
              require 'pry-nav'
         | 
| 24 | 
            -
            else
         | 
| 25 | 
            -
              require 'pry-byebug'
         | 
| 26 | 
            -
            end
         | 
| 27 | 
            -
            require 'ansi'
         | 
| 28 | 
            -
            require 'yaml'
         | 
| 29 | 
            -
            require 'active_support/isolated_execution_state' unless RUBY_VERSION < '2.7.0'
         | 
| 30 | 
            -
            require 'jbuilder'
         | 
| 31 | 
            -
            require 'jsonify'
         | 
| 32 | 
            -
            require 'elasticsearch'
         | 
| 33 | 
            -
            require 'elasticsearch-api'
         | 
| 34 | 
            -
            require 'elasticsearch-transport'
         | 
| 35 | 
            -
            require 'jbuilder'
         | 
| 36 | 
            -
            require 'jsonify'
         | 
| 37 | 
            -
            require 'yaml'
         | 
| 38 | 
            -
             | 
| 39 | 
            -
            tracer = ::Logger.new(STDERR)
         | 
| 40 | 
            -
            tracer.formatter = lambda { |s, d, p, m| "#{m.gsub(/^.*$/) { |n| '   ' + n }.ansi(:faint)}\n" }
         | 
| 41 | 
            -
             | 
| 42 | 
            -
            unless defined?(ELASTICSEARCH_URL)
         | 
| 43 | 
            -
              ELASTICSEARCH_URL = ENV['ELASTICSEARCH_URL'] ||
         | 
| 44 | 
            -
                                    ENV['TEST_ES_SERVER'] ||
         | 
| 45 | 
            -
                                    "localhost:#{(ENV['TEST_CLUSTER_PORT'] || 9200)}"
         | 
| 46 | 
            -
            end
         | 
| 47 | 
            -
             | 
| 48 | 
            -
            DEFAULT_CLIENT = Elasticsearch::Client.new(host: ELASTICSEARCH_URL,
         | 
| 49 | 
            -
                                                       tracer: (tracer unless ENV['QUIET']))
         | 
| 50 | 
            -
             | 
| 51 | 
            -
            module HelperModule
         | 
| 52 | 
            -
              def self.included(context)
         | 
| 53 | 
            -
                context.let(:client_double) do
         | 
| 54 | 
            -
                  Class.new { include Elasticsearch::API }.new.tap do |client|
         | 
| 55 | 
            -
                    expect(client).to receive(:perform_request).with(*expected_args).and_return(response_double)
         | 
| 56 | 
            -
                  end
         | 
| 57 | 
            -
                end
         | 
| 58 | 
            -
             | 
| 59 | 
            -
                context.let(:client) do
         | 
| 60 | 
            -
                  Class.new { include Elasticsearch::API }.new.tap do |client|
         | 
| 61 | 
            -
                    expect(client).to receive(:perform_request).with(*expected_args).and_return(response_double)
         | 
| 62 | 
            -
                  end
         | 
| 63 | 
            -
                end
         | 
| 64 | 
            -
             | 
| 65 | 
            -
                context.let(:response_double) do
         | 
| 66 | 
            -
                  double('response', status: 200, body: {}, headers: {})
         | 
| 67 | 
            -
                end
         | 
| 68 | 
            -
              end
         | 
| 69 | 
            -
            end
         | 
| 70 | 
            -
             | 
| 71 | 
            -
            RSpec.configure do |config|
         | 
| 72 | 
            -
              config.include(HelperModule)
         | 
| 73 | 
            -
              config.formatter = 'documentation'
         | 
| 74 | 
            -
              config.add_formatter('RspecJunitFormatter', 'tmp/elasticsearch-api-junit.xml')
         | 
| 75 | 
            -
              config.add_formatter(
         | 
| 76 | 
            -
                'RSpec::Core::Formatters::HtmlFormatter',
         | 
| 77 | 
            -
                "tmp/elasticsearch-#{ENV['TEST_SUITE']}-#{RUBY_VERSION}-#{ENV['STACK_VERSION']}.html"
         | 
| 78 | 
            -
              )
         | 
| 79 | 
            -
              config.color_mode = :on
         | 
| 80 | 
            -
            end
         | 
| 81 | 
            -
             | 
| 82 | 
            -
            class NotFound < StandardError; end
         | 
    
        data/utils/Gemfile
    DELETED
    
    | @@ -1,28 +0,0 @@ | |
| 1 | 
            -
            # Licensed to Elasticsearch B.V. under one or more contributor
         | 
| 2 | 
            -
            # license agreements. See the NOTICE file distributed with
         | 
| 3 | 
            -
            # this work for additional information regarding copyright
         | 
| 4 | 
            -
            # ownership. Elasticsearch B.V. licenses this file to you under
         | 
| 5 | 
            -
            # the Apache License, Version 2.0 (the "License"); you may
         | 
| 6 | 
            -
            # not use this file except in compliance with the License.
         | 
| 7 | 
            -
            # You may obtain a copy of the License at
         | 
| 8 | 
            -
            #
         | 
| 9 | 
            -
            #   http://www.apache.org/licenses/LICENSE-2.0
         | 
| 10 | 
            -
            #
         | 
| 11 | 
            -
            # Unless required by applicable law or agreed to in writing,
         | 
| 12 | 
            -
            # software distributed under the License is distributed on an
         | 
| 13 | 
            -
            # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
         | 
| 14 | 
            -
            # KIND, either express or implied.  See the License for the
         | 
| 15 | 
            -
            # specific language governing permissions and limitations
         | 
| 16 | 
            -
            # under the License.
         | 
| 17 | 
            -
             | 
| 18 | 
            -
            source 'https://rubygems.org'
         | 
| 19 | 
            -
             | 
| 20 | 
            -
            gem 'activesupport'
         | 
| 21 | 
            -
            gem 'byebug'
         | 
| 22 | 
            -
            gem 'coderay'
         | 
| 23 | 
            -
            gem 'json'
         | 
| 24 | 
            -
            gem 'multi_json'
         | 
| 25 | 
            -
            gem 'pry'
         | 
| 26 | 
            -
            gem 'rest-client'
         | 
| 27 | 
            -
            gem 'rubocop'
         | 
| 28 | 
            -
            gem 'thor'
         |