Skip to content

Commit 7a538fb

Browse files
author
Christopher Frost
committed
More lenient YAML testing
Ruby before and after 2.0 formats YAML differently. This commit makes a test more lenient of this difference so that CI builds on Ruby 2.2.2 pass. [#93987158]
1 parent c17a1e0 commit 7a538fb

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

lib/java_buildpack/util/configuration_utils.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ def write(identifier, new_content, should_log = true)
6565

6666
File.open(file, 'w') do |f|
6767
header.each { |line| f.write line }
68-
# f.write(header.join('\n'))
69-
# f.write('\n')
7068
YAML.dump(new_content, f)
7169
end
7270
else

spec/java_buildpack/util/configuration_utils_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ def file_contents(file)
105105
header = []
106106
File.open(file, 'r') do |f|
107107
f.each do |line|
108+
break if line =~ /^---/
108109
header << line
109110
end
110111
end

0 commit comments

Comments
 (0)