Skip to content

Commit

Permalink
More lenient YAML testing
Browse files Browse the repository at this point in the history
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]
  • Loading branch information
Christopher Frost committed Jun 23, 2015
1 parent c17a1e0 commit 7a538fb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 0 additions & 2 deletions lib/java_buildpack/util/configuration_utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ def write(identifier, new_content, should_log = true)

File.open(file, 'w') do |f|
header.each { |line| f.write line }
# f.write(header.join('\n'))
# f.write('\n')
YAML.dump(new_content, f)
end
else
Expand Down
1 change: 1 addition & 0 deletions spec/java_buildpack/util/configuration_utils_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ def file_contents(file)
header = []
File.open(file, 'r') do |f|
f.each do |line|
break if line =~ /^---/
header << line
end
end
Expand Down

0 comments on commit 7a538fb

Please sign in to comment.