Skip to content
This repository was archived by the owner on Nov 8, 2024. It is now read-only.

Commit

Permalink
Merge pull request #74 from mojowill/patch-1
Browse files Browse the repository at this point in the history
Fixing hardcoded tmp path
  • Loading branch information
abtris committed Mar 20, 2015
2 parents b312868 + 0d618b7 commit ea7a799
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/apiary/command/preview.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
require 'rack'
require 'ostruct'
require 'json'
require 'tmpdir'

require "apiary/common"

Expand Down Expand Up @@ -74,7 +75,8 @@ def run_server

def preview_path(path)
basename = File.basename(@options.path)
"/tmp/#{basename}-preview.html"
temp = Dir.tmpdir()
"#{temp}/#{basename}-preview.html"
end

def query_apiary(host, path)
Expand Down

0 comments on commit ea7a799

Please sign in to comment.