Sha256: d03c22d4a7303077217ec64350cba2a926fe0069be467aad6b2adcc2df806d35

Contents?: true

Size: 392 Bytes

Versions: 11

Compression:

Stored size: 392 Bytes

Contents

require 'delegate'
require 'tempfile'

class MiqTempfile < DelegateClass(Tempfile)
  # TODO: share this definition with appliance console code.
  MIQ_TMP_DIR = '/var/www/miq_tmp'.freeze

  def initialize(basename, *options)
    if File.directory?(MIQ_TMP_DIR)
      super(Tempfile.new(basename, MIQ_TMP_DIR, *options))
    else
      super(Tempfile.new(basename, *options))
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
manageiq-smartstate-0.10.0 lib/miq_tempfile.rb
manageiq-smartstate-0.9.0 lib/miq_tempfile.rb
manageiq-smartstate-0.8.1 lib/miq_tempfile.rb
manageiq-smartstate-0.8.0 lib/miq_tempfile.rb
manageiq-smartstate-0.7.0 lib/miq_tempfile.rb
manageiq-smartstate-0.6.2 lib/miq_tempfile.rb
manageiq-smartstate-0.5.10 lib/miq_tempfile.rb
manageiq-smartstate-0.6.1 lib/miq_tempfile.rb
manageiq-smartstate-0.6.0 lib/miq_tempfile.rb
manageiq-smartstate-0.5.9 lib/miq_tempfile.rb
manageiq-smartstate-0.5.8 lib/miq_tempfile.rb