Skip to content

Commit

Permalink
Fix Tempfile usage for ruby v2.0.0
Browse files Browse the repository at this point in the history
In earlier versions of ruby, you can create a new Tempfile without
passing a default name, but not in older versions.

Closes #3
  • Loading branch information
andersonvom committed Jan 23, 2017
1 parent bcf746c commit 5ac097c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
adp-downloader (0.2.0)
adp-downloader (0.2.1)
mechanize (~> 2.7)
netrc (~> 0.11)
parallel (~> 1.10)
Expand Down
2 changes: 1 addition & 1 deletion lib/adp-downloader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def self.download

private
def self.log_exception_to_file(e)
file = Tempfile.new
file = Tempfile.new("adp-downloader-")
file.puts(e)
file.puts(e.backtrace)
FileUtils.mv file.path, File.join("", "tmp")
Expand Down
2 changes: 1 addition & 1 deletion lib/adp-downloader/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module ADPDownloader
VERSION = "0.2.0"
VERSION = "0.2.1"
end

0 comments on commit 5ac097c

Please sign in to comment.