Skip to content

Commit 7fb1c92

Browse files
committed
[API] Renames Xpack namespace to XPack
1 parent 51c4bfb commit 7fb1c92

File tree

7 files changed

+11
-14
lines changed

7 files changed

+11
-14
lines changed

Diff for: elasticsearch-api/lib/elasticsearch/api.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def self.included(base)
9898
Elasticsearch::API::TextStructure,
9999
Elasticsearch::API::Transform,
100100
Elasticsearch::API::Watcher,
101-
Elasticsearch::API::Xpack
101+
Elasticsearch::API::XPack
102102
end
103103

104104
# The serializer class

Diff for: elasticsearch-api/lib/elasticsearch/api/actions/xpack/info.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
module Elasticsearch
1919
module API
20-
module Xpack
20+
module XPack
2121
module Actions
2222
# Retrieves information about the installed X-Pack features.
2323
#

Diff for: elasticsearch-api/lib/elasticsearch/api/actions/xpack/params_registry.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
module Elasticsearch
1919
module API
20-
module Xpack
20+
module XPack
2121
module Actions
2222
module ParamsRegistry
2323
extend self

Diff for: elasticsearch-api/lib/elasticsearch/api/actions/xpack/usage.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
module Elasticsearch
1919
module API
20-
module Xpack
20+
module XPack
2121
module Actions
2222
# Retrieves usage information about the installed X-Pack features.
2323
#

Diff for: elasticsearch-api/lib/elasticsearch/api/namespace/xpack.rb

+6-6
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@
1717

1818
module Elasticsearch
1919
module API
20-
module Xpack
20+
module XPack
2121
module Actions; end
2222

23-
# Client for the "xpack" namespace (includes the {Xpack::Actions} methods)
23+
# Client for the "xpack" namespace (includes the {XPack::Actions} methods)
2424
#
25-
class XpackClient
26-
include Common::Client, Common::Client::Base, Xpack::Actions
25+
class XPackClient
26+
include Common::Client, Common::Client::Base, XPack::Actions
2727
end
2828

29-
# Proxy method for {XpackClient}, available in the receiving object
29+
# Proxy method for {XPackClient}, available in the receiving object
3030
#
3131
def xpack
32-
@xpack ||= XpackClient.new(self)
32+
@xpack ||= XPackClient.new(self)
3333
end
3434
end
3535
end

Diff for: elasticsearch-api/utils/thor/generator/endpoint_specifics.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def needs_complex_ignore_404?(endpoint)
7878
def module_name_helper(name)
7979
return name.upcase if %w[sql ssl].include? name
8080

81-
name.split('_').map(&:capitalize).join
81+
name.split('_').map(&:capitalize).map{ |n| n == 'Xpack' ? 'XPack' : n }.join
8282
end
8383

8484
def ping_perform_request

Diff for: elasticsearch-api/utils/thor/templates/method.erb

-3
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@
1616
# under the License.
1717

1818
module Elasticsearch
19-
<%- if @current_api == :xpack -%>
20-
<%= ' '*(@namespace_depth) %>module XPack
21-
<%- end %>
2219
<%= ' '*(@namespace_depth) %>module API
2320
<%- @module_namespace.each_with_index do |name, i| -%>
2421
<%= ' '*i %>module <%= module_name_helper(name) %>

0 commit comments

Comments
 (0)