class Qwik::MediaServer
Public Class Methods
new(config)
click to toggle source
# File vendor/qwik/lib/qwik/act-media.rb, line 146 def initialize(config) @config = config end
Public Instance Methods
output_file(site, input)
click to toggle source
# File vendor/qwik/lib/qwik/act-media.rb, line 150 def output_file(site, input) path = @config.real_server_content.path+site.sitename base = input.basename.to_s base = base.sub(%r!\A(.+)\.(\w+)!){|a| $1 } outbase = base+'.rm' output = path+outbase output end
publish_file(site, input)
click to toggle source
# File vendor/qwik/lib/qwik/act-media.rb, line 164 def publish_file(site, input) output = output_file(site, input) output.dirname.check_directory if windows? FileUtils.cp(input, output) else FileUtils.ln(input, output) end end
windows?()
click to toggle source
# File vendor/qwik/lib/qwik/act-media.rb, line 159 def windows? r = RUBY_PLATFORM return (r.index('cygwin') || r.index('mswin32') || r.index('mingw32')) end