Skip to content

Commit

Permalink
[DOCS] Updates docs generator
Browse files Browse the repository at this point in the history
  • Loading branch information
picandocodigo committed May 16, 2024
1 parent afebcc4 commit eb376ea
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions rake_tasks/doc_generator.rake
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ require 'json'
require 'fileutils'
require 'logger'

namespace :docs do
SRC_FILE = "#{__dir__}/docs/parsed_alternative_report.json".freeze
EXAMPLES_TO_PARSE = JSON.parse(File.read("#{__dir__}/docs/examples_to_parse.json")).freeze
TARGET_DIR = "#{__dir__}/../docs/examples/guide".freeze
SRC_FILE = "#{__dir__}/docs/parsed_alternative_report.json".freeze
EXAMPLES_TO_PARSE = JSON.parse(File.read("#{__dir__}/docs/examples_to_parse.json")).freeze
TARGET_DIR = "#{__dir__}/../docs/examples/guide".freeze

namespace :docs do
desc 'Generate doc examples'
task :generate do
# Remove existing documents to avoid having outdated files
Expand Down Expand Up @@ -206,7 +206,8 @@ module TestDocs
end

def self.log_successful_code(filename)
logger = Logger.new('log/200-ok.log')
FileUtils.mkdir_p('./log') unless File.directory?('./log')
logger = Logger.new('./log/200-ok.log')
logger.formatter = -> (_, _, _, msg) { "#{msg} " }
logger.info(filename)
end
Expand Down

0 comments on commit eb376ea

Please sign in to comment.