Class: Rack::XapBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/xapper.rb

Constant Summary collapse

F =
::File
X =
::REXML

Class Method Summary collapse

Class Method Details

.collect_metadata(options) ⇒ Object



32
33
34
35
36
37
# File 'lib/rack/xapper.rb', line 32

def (options)
  options[:application_files] = collect_application_files options
  options[:extra_app_files] = collect_extra_app_files options
  options[:assembly_files] = Dir.glob(F.join(options[:assembly_path],"**","*"))
  options[:languages_in_use] = find_languages_in_use options        
end

.xap_to_disk(options, xap_file = "") ⇒ Object



20
21
22
23
24
25
26
27
28
29
30
# File 'lib/rack/xapper.rb', line 20

def xap_to_disk(options, xap_file="")
  xap_file = options[:xap_name] if xap_file.to_s.empty?
  xap_file = "#{xap_file}.xap" if xap_file !~ /\.xap$/
  
  (options) unless options.key?(:application_files)
  pth = F.join(options[:root], options[:xap_path], xap_file)
  FileUtils.mkdir_p(F.dirname(pth)) unless F.exist?(F.dirname(pth))
  Zip::ZipFile.open(pth, Zip::ZipFile::CREATE) do |zipfile|
    xap_files(zipfile, options)
  end
end

.xap_to_memory(root) ⇒ Object



16
17
18
# File 'lib/rack/xapper.rb', line 16

def xap_to_memory(root)
  
end