Skip to content

Commit

Permalink
Remove unncessary logs
Browse files Browse the repository at this point in the history
  • Loading branch information
MalekKamel committed Oct 26, 2024
1 parent b86d8ec commit d6f8584
Showing 2 changed files with 11 additions and 17 deletions.
26 changes: 11 additions & 15 deletions solara/lib/core/scripts/file_manager.rb
Original file line number Diff line number Diff line change
@@ -5,23 +5,19 @@ def copy_files_recursively(source_dir, destination_dir)
source_path = Pathname.new(source_dir).expand_path
destination_path = Pathname.new(destination_dir).expand_path

if Dir.exist?(source_path)
Dir.glob(source_path.join('*')).each do |item|
relative_path = Pathname.new(item).relative_path_from(source_path).to_s
destination_item_path = destination_path.join(relative_path)

if File.directory?(item)
FileUtils.mkdir_p(destination_item_path)
FileUtils.cp_r(item + '/.', destination_item_path) # Ensure to copy contents
else
FileUtils.mkdir_p(destination_item_path.dirname) # Create parent directory
FileUtils.cp(item, destination_item_path)
end
Dir.glob(source_path.join('*')).each do |item|
relative_path = Pathname.new(item).relative_path_from(source_path).to_s
destination_item_path = destination_path.join(relative_path)

Solara.logger.debug("🚗 Copied #{relative_path} \n\t↑ From: #{source_path} \n\t↓ To: #{destination_path}")
end
if File.directory?(item)
FileUtils.mkdir_p(destination_item_path)
FileUtils.cp_r(item + '/.', destination_item_path) # Ensure to copy contents
else
Solara.logger.failure("#{source_path} not found!")
FileUtils.mkdir_p(destination_item_path.dirname) # Create parent directory
FileUtils.cp(item, destination_item_path)
end

Solara.logger.debug("🚗 Copied #{relative_path} \n\t↑ From: #{source_path} \n\t↓ To: #{destination_path}")
end
end

2 changes: 0 additions & 2 deletions solara/lib/core/scripts/json_manifest_processor.rb
Original file line number Diff line number Diff line change
@@ -79,7 +79,6 @@ def get_json_files

def process_json_file(file_path, class_name, custom_types, is_manifest_file)
begin
puts "Processing #{is_manifest_file ? 'manifest' : 'additional'} file: #{file_path}"
json_content = JSON.parse(File.read(file_path))
code_generator = CodeGenerator.new(
json: json_content,
@@ -129,7 +128,6 @@ def to_snake_case(string)
end

def write_to_file(output, content)
puts "generate_code: output = #{output}, content = #{content}"
File.write(output, content)
Solara.logger.debug("Generated #{output}")
rescue StandardError => e

0 comments on commit d6f8584

Please sign in to comment.