Skip to content

Commit c8d1d8c

Browse files
committed
Reformats Gemfile, moves require elasticsearch in docs task
1 parent 3070580 commit c8d1d8c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717

1818
source 'https://rubygems.org'
1919

20-
gem 'elasticsearch-api', path: File.expand_path('../elasticsearch-api', __FILE__), require: false
21-
gem 'elasticsearch', path: File.expand_path('../elasticsearch', __FILE__), require: false
20+
gem 'elasticsearch-api', path: File.expand_path('../elasticsearch-api', __FILE__), require: false
21+
gem 'elasticsearch', path: File.expand_path('../elasticsearch', __FILE__), require: false
2222

2323
gem 'ansi'
2424
gem 'cane'

rake_tasks/doc_generator.rake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ namespace :docs do
4848
end
4949

5050
def generate_docs(entry)
51+
require 'elasticsearch'
52+
5153
filename = "#{entry['digest']}.asciidoc"
5254
unless entry['parsed_source'].empty?
5355
api = entry['parsed_source'].first['api']
@@ -132,7 +134,6 @@ end
132134
# Test module to run the generated code
133135
#
134136
module TestDocs
135-
require 'elasticsearch'
136137
@formatter = -> (_, d, _, msg) { "#{d}: #{msg}" }
137138

138139
def self.perform(code, filename)

0 commit comments

Comments
 (0)