File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
elasticsearch-api/utils/thor Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ def generate
6868 @http_path = __http_path
6969 @required_parts = __required_parts
7070
71+ @module_namespace . shift if @module_namespace . first == 'xpack'
7172 @path_to_file = @output . join ( @module_namespace . join ( '/' ) ) . join ( "#{ @method_name } .rb" )
7273 dir = @output . join ( @module_namespace . join ( '/' ) )
7374 empty_directory ( dir , verbose : false )
Original file line number Diff line number Diff line change 33# See the LICENSE file in the project root for more information
44
55module Elasticsearch
6+ <%- if @xpack -%>
7+ <%= ' '*(@namespace_depth) %> module XPack
8+ <%- end %>
69<%= ' '*(@namespace_depth) %> module API
710<%- @module_namespace.each_with_index do |name, i| -%>
8- <%= ' '*i %> module <%= name == 'xpack' ? 'XPack' : name .capitalize %>
11+ <%= ' '*i %> module <%= name.capitalize %>
912<%- end -%>
1013<%= ' '*(@namespace_depth+2) %> module Actions
1114<%= ERB.new(File.new("./thor/templates/_documentation_top.erb").read, trim_mode: '-').result(binding) -%>
You can’t perform that action at this time.
0 commit comments