Skip to content

Commit

Permalink
Merge branch 'fix-deprecated-name-warning' into 'stretch'
Browse files Browse the repository at this point in the history
Fix deprecated 'File.exists?' warning

See merge request open-source/symbiosis!70
  • Loading branch information
Patrick J Cherry committed Jun 19, 2018
2 parents ea656e7 + 4b3720b commit 6fa0cad
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions common/debian/changelog
@@ -1,3 +1,9 @@
symbiosis-common (2018:0616) stable; urgency=medium

* Rename deprecated 'File.exists?' call to 'File.exist?' in 'config_file.rb'.

-- Andrew Ladlow <andrew.ladlow@bytemark.co.uk> Sat, 16 Jun 2018 23:44:10 +0100

symbiosis-common (2017:0901) stable; urgency=medium

* Update postinstall hostname check to ensure HOSTNAME is qualfied.
Expand Down
4 changes: 2 additions & 2 deletions common/lib/symbiosis/config_file.rb
Expand Up @@ -123,7 +123,7 @@ def write(config = self.generate_config, opts = {})
end

#
# Return a diff of the new configuration comapred with the existing one.
# Return a diff of the new configuration compared with the existing one.
# The format option can take on of Diff::Diff.to_s() format options,
# currently :text, :color, :html, and :html_simple. Defaults to :html. A
# different configuraion template can be specified in the second option.
Expand All @@ -135,7 +135,7 @@ def diff(format = nil, templ = self.template)
tempfile.puts(config)
tempfile.flush

fn = ( File.exists?(self.filename) ? self.filename : '/dev/null' )
fn = ( File.exist?(self.filename) ? self.filename : '/dev/null' )

Diffy::Diff.new(fn, tempfile.path, source: 'files', include_diff_info: true).to_s(format)
end
Expand Down

0 comments on commit 6fa0cad

Please sign in to comment.