lib/travis/cli/repo_command.rb in travis-1.3.1 vs lib/travis/cli/repo_command.rb in travis-1.4.0

- old
+ new

@@ -86,14 +86,14 @@ error "no .travis.yml found" if parent == dir travis_yaml(parent) end end - def save_travis_config + def save_travis_config(file = travis_yaml) yaml = travis_config.to_yaml yaml.gsub! /^(\s+)('on'|true):/, "\\1on:" - yaml.gsub! /\A---\n/, '' - File.write(travis_yaml, yaml) + yaml.gsub! /\A---\s*\n/, '' + File.write(file, yaml) end end end end