Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
Extract formatting for possible resuse.
  • Loading branch information
mostlyobvious committed Sep 6, 2023
1 parent b143788 commit 0c5b75f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion support/ci/generate
Original file line number Diff line number Diff line change
Expand Up @@ -408,14 +408,18 @@ class CI
).result_with_hash(
name: name,
working_directory: gem.fetch(:working_directory),
matrix: Psych.dump(gem[:matrix]).lines.drop(1).join(" " * 10).strip
matrix: as_formatted_yaml(gem[:matrix], indent: 10),
)
)

puts "writing #{filename}"
end
end

def as_formatted_yaml(content, indent:)
Psych.dump(content).lines.drop(1).join(" " * indent).strip
end

def initialize(workflows_root, template_root)
@workflows_root = workflows_root
@template_root = template_root
Expand Down

0 comments on commit 0c5b75f

Please sign in to comment.