Skip to content
This repository has been archived by the owner on Jul 24, 2019. It is now read-only.

Commit

Permalink
Compatibility with Crystal 0.27
Browse files Browse the repository at this point in the history
  • Loading branch information
icyleaf committed Nov 6, 2018
1 parent 9adff38 commit e734703
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion shard.yml
Expand Up @@ -17,6 +17,6 @@ development_dependencies:
github: stefanwille/crystal-redis
version: ~> 1.11.0

crystal: 0.25.1
crystal: 0.27.0

license: MIT
5 changes: 2 additions & 3 deletions src/salt/environment.cr
@@ -1,6 +1,5 @@
require "./middlewares/session/abstract/session_hash"
require "uri"
require "tempfile"

module Salt
# `Salt::Environment` provides a convenient interface to a Salt environment.
Expand Down Expand Up @@ -236,7 +235,7 @@ module Salt
end
private struct UploadFile
getter filename : String
getter tempfile : Tempfile
getter tempfile : File
getter size : UInt64?
getter created_at : Time?
getter modifed_at : Time?
Expand All @@ -249,7 +248,7 @@ module Salt
@modifed_at = part.modification_time
@headers = part.headers

@tempfile = Tempfile.new(@filename)
@tempfile = File.tempfile(@filename)
::File.open(@tempfile.path, "w") do |f|
IO.copy(part.body, f)
end
Expand Down

0 comments on commit e734703

Please sign in to comment.