<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,5 +1,16 @@
 module Silverline::Essential
-  # Nothing on purpose =)
+  
+  # What should generate the Xap?
+  # 
+  #   Uses rubyzip to generate the XAP. This is the default behavior, so
+  #   setting nothing is the same.
+  #   Note: you can install rubyzip with &quot;gem install rubyzip&quot;
+  # Xap = :rubyzip
+  # 
+  #   Uses Chiron.exe to generate the XAP
+  #   Note: This requires mono installed on Linux/Mac 
+  Xap = :chiron
+
 end
 
 require 'silverline/essential/generator'</diff>
      <filename>vendor/plugins/silverline/lib/silverline/essential.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,7 @@
 # NOTE: requires filesystemwatcher to be installed
 # http://www.jhorman.org/FileSystemWatcher/index.html
 require &quot;filesystemwatcher&quot;
+
 require 'silverline/essential/xap'
 
 def logger
@@ -10,8 +11,7 @@ end
 # Generates the XAP on modification of watched files
 module Silverline::Essential::Generator
   include Silverline
-  Xap = Silverline::Essential::XAPChiron
-  
+
   # List of files/directories to watch for modification.
   # Triggers generation of the Silverlight package (XAP)
   def self.register
@@ -49,7 +49,7 @@ module Silverline::Essential::Generator
     
     # Lastly, client root wins
     FileUtils.cp_r &quot;#{CLIENT_ROOT}/.&quot;, TMP_CLIENT
-    Xap.new(XAP_FILE, TMP_CLIENT).generate
+    Silverline::Essential::XAP.new(XAP_FILE, TMP_CLIENT).generate
     
     FileUtils.rm_r TMP_CLIENT
   end</diff>
      <filename>vendor/plugins/silverline/lib/silverline/essential/generator.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,46 +1,65 @@
 module Silverline::Essential
   
   # Handles packaging the Silverlight application.
-  class XAP
-  
-    # require rubyzip (gem install rubyzip | http://rubyzip.sourceforge.net/)
-    require 'zip/zipfilesystem'
-    require 'erb'
-  
+  class XAPBase
     def initialize(file, directory)
       @file = file
       @directory = directory
       @files = []
     end
+  end
   
-    def generate
-      Zip::ZipFile.open @file, Zip::ZipFile::CREATE do |zip|
-        xap zip, @directory
-        zip.file.open &quot;AppManifest.xaml&quot;, 'w' do |m| 
-          m.puts manifest
-          @files &lt;&lt; &quot;AppManifest.xaml&quot;
-        end
+  if Xap == :chiron
+    
+    # Handles packaging the Silverlight application with Chiron, a .NET console
+    # application written in C#. It handles generation of the AppManifest.xaml, as
+    # well as packaging the app and including language assemblies if needed.
+    # Note: because Chiron is a .NET application, it requires mono to run on 
+    # Mac/Linux. If you don't want to install mono, use the pure-ruby XAP module.
+    class XAP &lt; XAPBase
+      def generate
+        cmd = &quot;public/ironruby/Chiron.exe /s /d:#{@directory} /z:#{@file}&quot;
+        # TODO: Should I do some platform detection rather than trial&amp;error?
+        system &quot;#{cmd}&quot; unless system &quot;mono #{cmd}&quot;
       end
-      # Remove temp files left behind by rubyzip
-      # Bug: http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1702240&amp;group_id=43107&amp;atid=435170
-      @files.each do |file|
-        file = file.split(&quot;/&quot;).last
-        Dir[&quot;public/#{file}.*&quot;].each do |f|
-          File.delete f
+    end
+
+  else
+  
+    # require rubyzip (gem install rubyzip | http://rubyzip.sourceforge.net/)
+    require 'zip/zipfilesystem'
+    require 'erb'
+  
+    class XAP &lt; XAPBase
+  
+      def generate
+        Zip::ZipFile.open @file, Zip::ZipFile::CREATE do |zip|
+          xap zip, @directory
+          zip.file.open &quot;AppManifest.xaml&quot;, 'w' do |m| 
+            m.puts manifest
+            @files &lt;&lt; &quot;AppManifest.xaml&quot;
+          end
+        end
+        # Remove temp files left behind by rubyzip
+        # Bug: http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1702240&amp;group_id=43107&amp;atid=435170
+        @files.each do |file|
+          file = file.split(&quot;/&quot;).last
+          Dir[&quot;public/#{file}.*&quot;].each do |f|
+            File.delete f
+          end
         end
+        @files = []
       end
-      @files = []
-    end
   
     private 
-  
+
       def manifest
         @assembly_path = &quot;/public/ironruby&quot;
         # Note: Silverlight entry-point assembly must be the first in this list
         # (Microsoft.Scripting.Silverlight in this case)
         @assemblies = %w(Microsoft.Scripting.Silverlight Microsoft.Scripting.Core Microsoft.Scripting IronRuby IronRuby.Libraries)
         @entry_point_type = &quot;Microsoft.Scripting.Silverlight.DynamicSilverlight&quot;
-        file = File.open(&quot;#{PLUGIN_ROOT}/templates/AppManifest.xaml.erb&quot;, 'r'){|f| f.read }
+        file = File.open(&quot;#{Silverline::PLUGIN_ROOT}/templates/AppManifest.xaml.erb&quot;, 'r'){|f| f.read }
         xaml = ERB.new(file)
         xaml.run(binding)
       end
@@ -48,7 +67,7 @@ module Silverline::Essential
       def xap(zip, dir)
         xap_helper(zip, dir)
       end
-  
+
       def xap_helper(zip, dir, root = dir)
         Dir[&quot;#{dir}/*&quot;].each do |client|
           short_client = client.split(root).last
@@ -65,22 +84,9 @@ module Silverline::Essential
           @files &lt;&lt; short_client
         end
       end
-    
-  end
-
-  # Handles packaging the Silverlight application with Chiron, a .NET console
-  # application written in C#. It handles generation of the AppManifest.xaml, as
-  # well as packaging the app and including language assemblies if needed.
-  # Note: because Chiron is a .NET application, it requires mono to run on 
-  # Mac/Linux. If you don't want to install mono, use the pure-ruby XAP module.
-  class XAPChiron &lt; XAP
   
-    def generate
-      cmd = &quot;public/ironruby/Chiron.exe /s /d:#{@directory} /z:#{@file}&quot;
-      # TODO: Should I do some platform detection rather than trial&amp;error?
-      system &quot;#{cmd}&quot; unless system &quot;mono #{cmd}&quot;
     end
   
   end
-
+  
 end
\ No newline at end of file</diff>
      <filename>vendor/plugins/silverline/lib/silverline/essential/xap.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,7 +4,7 @@
   EntryPointAssembly=&quot;&lt;%= @assemblies.first %&gt;&quot;
   EntryPointType=&quot;&lt;%= @entry_point_type %&gt;&quot;&gt;
   &lt;Deployment.Parts&gt;
-  &lt;%= for assembly in @assemblies %&gt;
+  &lt;% for assembly in @assemblies %&gt;
 	&lt;AssemblyPart source=&quot;&lt;%= @assembly_path %&gt;/&lt;%= assembly %&gt;.dll&quot;
 	&lt;% if assembly == @assemblies.first %&gt;
 	  name=&quot;&lt;%= assembly %&gt;&quot; /&gt;</diff>
      <filename>vendor/plugins/silverline/templates/AppManifest.xaml.erb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>db/schema.rb</filename>
    </removed>
    <removed>
      <filename>log/production.log</filename>
    </removed>
    <removed>
      <filename>log/server.log</filename>
    </removed>
    <removed>
      <filename>log/test.log</filename>
    </removed>
    <removed>
      <filename>spec/controllers/test_rspec_controller_spec.rb</filename>
    </removed>
    <removed>
      <filename>spec/helpers/test_rspec_helper_spec.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>7462d5d8d4be7e872ee82e79931d9c3526338a32</id>
    </parent>
  </parents>
  <author>
    <name>Jimmy Schementi</name>
    <email>jschementi@gmail.com</email>
  </author>
  <url>http://github.com/jschementi/silverline-demos/commit/b2b1bd52708622ef5d7275c01e8f966b88414d16</url>
  <id>b2b1bd52708622ef5d7275c01e8f966b88414d16</id>
  <committed-date>2008-06-21T14:51:56-07:00</committed-date>
  <authored-date>2008-06-21T14:51:56-07:00</authored-date>
  <message>Added Silverline::Essential::Xap to switch between :chiron and :rubyzip
Fixed AppManifest.xaml.erb</message>
  <tree>819236180c88a0b235c5912f8f8c91fcbb8423e2</tree>
  <committer>
    <name>Jimmy Schementi</name>
    <email>jschementi@gmail.com</email>
  </committer>
</commit>
