<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>MIT-LICENSE</filename>
    </added>
    <added>
      <filename>generators/rest_scaffold/USAGE</filename>
    </added>
    <added>
      <filename>generators/rest_scaffold/rest_scaffold_generator.rb</filename>
    </added>
    <added>
      <filename>generators/rest_scaffold/templates/controller.rb</filename>
    </added>
    <added>
      <filename>tasks/compile_applets.rake</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,5 +1,25 @@
 = OpenLaszlo Rails Plugin -- Change History
 
+== 0.6 (2006-01-13)
+* Added documentation
+* :applet task installs the javascript too
+* switched to MIT license
+
+== 0.5 (2006-01-12)
+=== New features
+* Generated applet displays data from server
+* Default :applet task compiles applets
+* The rest_controller generator uses the rest_scaffold
+* New rest_scaffold generator writes out a copy of the methods
+* rest_controller and rest_scaffold generators create the model if it doesn't exist
+* applet generator creates the controller and model if they don't exist
+* Development mode warns when applet isn't present
+* Development mode warns when javascript isn't included
+=== Bug fixes
+* applet generator creates intermediate view directories
+=== Implementation
+* Remove copied templates from rest_controller generator; reference them via &quot;generator:filename&quot; notation instead
+
 == 0.4 (2006-01-12)
 * Generators for rest_controller, applet
 * Move helper methods out of scaffolding</diff>
      <filename>CHANGES</filename>
    </modified>
    <modified>
      <diff>@@ -1,13 +1,30 @@
 = OpenLaszlo Rails Plugin
 
 This plugin makes it easy to use OpenLaszlo applications with Rails.  It
-contains helpers and scaffolding that implement a variant of the {OpenLaszlo REST API}[http://wiki.openlaszlo.org/Database_Connector].
+contains helpers, scaffolding, and generators that implement a variant of the {OpenLaszlo REST API}[http://wiki.openlaszlo.org/Database_Connector].
 
-For example, the following controller implements a subset of the classes in the REST API:
+For example, the following controller implements  the methods in the REST API:
   class ContactsController &lt; ApplicationController
     rest_scaffold :contact
   end
 
+This adds the following URLs:
+  /contacts/records
+  /contacts/records/1-10 # Returns records with ids 1 through 10
+  /contacts/records/1,5,10
+  /contacts/records/1-10,20-30
+  /contacts/pages/1-10 # Returns the first 10 records
+  /contacts/create/firstname=Laszlo&amp;lastname=Moholy-Nogy
+  /contacts/update/id=40&amp;firstname=Victory
+  /contacts/delete/id=40
+
+The plugin defines these generators, that can be used to quickly create a REST controller and an OpenLaszlo stub application that uses it.  Use the +--help+ option for more information.
+  script/generate rest_controller # generates a controller that uses +rest_scaffold+
+  script/generate rest_scaffold # an alternative to the above, that generates explicit methods
+  script/generate applet # generates an OpenLaszlo source file, and a view to hold it
+
+The plugin also defines the +applets+ rake task, which compiles the OpenLaszlo applets in the +app/applets+ directory.
+
 == Requirements
 
  * Ruby -v of 1.8.2 (25-05-2004) or 1.8.3
@@ -33,43 +50,28 @@ right:
 
 In your rails application directory:
 
-1. Install the javascript:
-  &gt; rake update_javascripts
-
-2. Create a REST controller. Either use the scaffolding:
-  class ContactsController &lt; ApplicationController
-    rest_scaffold :contact
-  end
-or the generator:
+1. Create a REST controller:
   &gt; script/generate rest_controller contacts
 
-3. Create an applet, and a view that displays it:
+2. Create an applet, and a view that displays it:
   &gt; script/generate applet contacts applet
 
-4. Add a rake task that compiles the applet.  For example, place this in your lib/tasks/applets.rake file:
-  require 'ropenlaszlo'
-  task :applets =&gt; 'public/applets/contacts.swf'
-  file 'public/applets/contacts.swf' =&gt; 'app/applets/contacts/contacts.lzx' do |t|
-    OpenLaszlo::compile t.prerequisites.first, :output =&gt; t.name
-  end
-And execute:
+3. Compile the applet:
   &gt; rake applets
-(Automating this will be the topic if the next release.)
 
-Now launch the server (script/server), and you can view your applet at http:localhost:3000/contacts/applet.  It doesn't *do* anything yet -- that's up to you.
+Now launch the server (script/server), and you can view your applet at http:localhost:3000/contacts/applet.
 
 == Resources
 * {Calendar example application}[http://osteele.com/sources/ruby/openlaszlo].
 * {OpenLaszlo}[http://openlaszlo.org/]
 * {OpenLaszlo plugin project page}[http://ropenlaszlo.rubyforge.org/]
 * {Laszlo on Rails project page}[http://wiki.openlaszlo.org/Laszlo_on_Rails]
-* {Laszlo on Rails mailing
-list}[http://groups.google.com/group/laszlo-on-rails]
+* {Laszlo on Rails mailing list}[http://groups.google.com/group/laszlo-on-rails]
 *
 Subversion[svn://rubyforge.org//var/svn/ropenlaszlo/rails/plugins/openlaszlo]
 
-Credits
-============
-Oliver Steele http://osteele.com --- Ruby code
-Geoff Stearns http://blog.deconcept.com/flashobject/ --- FlashObject
+== Credits
+* {Oliver Steele}http://osteele.com --- Ruby code
+* {Geoff Stearns}http://blog.deconcept.com/flashobject/ --- FlashObject
 JavaScript
+* Rails team --- This plugin extends and in some cases borrows code from the Rails implementation
\ No newline at end of file</diff>
      <filename>README</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,6 @@
 = OpenLaszlo Rails Plugin -- To Do List
 
 == Packaging
-* Docs
 * Unit tests
 * Example
 
@@ -9,14 +8,10 @@
 * &quot;-&quot; range expression
 
 == Corners
-* Filename collision in applet generator
+* Applet generator: check for applet name collision
 
 == New features
-* Generators
 * Add scaffolding prefix?  Use simpler inclusion mechanism, if not.
-* Add tasks/openlaszlo.rake
 * Read width, height from canvas
+* Detect when applet needs recompilation
 * Automatic recompile
-* Default applet reads from server
-* Warn when applet isn't present
-* Warn when javascript isn't present
\ No newline at end of file</diff>
      <filename>TODO</filename>
    </modified>
    <modified>
      <diff>@@ -1,14 +1,15 @@
 Description:
     The applet generator creates an OpenLaszlo application source file and
-    a view that displays it.
+    a view that displays it.  If the model and controller do not exist, it
+    creates these as well.
 
-    The generator takes a controller name as its first arguments, and an
-    applet name as its second.
+    The generator takes a controller name as its first argument, and the
+    applet name as its second argument.
     
     The controller name may be given in CamelCase or under_score and should
     not be suffixed with 'Controller'.  To create a controller within a
     module, specify the controller name as 'module/controller'.
-
+    
 Example:
     ./script/generate applet contacts applet
 
@@ -16,4 +17,11 @@ Example:
         app/applets/contacts/contacts.lzx
         app/views/contacts/applet.rhtml
 
-Note that the pathname to the applet does not incorporate the name of the controller.  This accomodates the common case where there are a small number of applets (maybe just one), that communicate with multiple controllers.
\ No newline at end of file
+Notes:
+    The pathname to the applet does not incorporate the name of
+    the controller.  This accomodates the common case where there are
+    a small number of applets (maybe just one), that communicate with
+    multiple controllers.  It does mean that 'generate applet addresses
+    applet' will overwrite the applet created by 'generate applet contacts
+    applet'.  It is best to generate one applet and then hook it to
+    multiple controllers.</diff>
      <filename>generators/applet/USAGE</filename>
    </modified>
    <modified>
      <diff>@@ -1,14 +1,26 @@
+# Author:: Oliver Steele
+# Copyright:: Copyright (c) 2006 Oliver Steele.  All rights reserved.
+# License:: MIT License.
+
 class AppletGenerator &lt; Rails::Generator::NamedBase
   def manifest
     record do |m|
       # Applets, views directories.
       m.directory File.join('app/views', class_path)
-
+      
+      # Depend on model generator but skip if the model exists.
+      m.dependency 'model', [singular_name], :collision =&gt; :skip
+      
+      # Depend on controller generator but skip if the controller exists.
+      m.dependency 'rest_controller', [singular_name], :collision =&gt; :skip
+      
       actions.each do |action|
         m.directory File.join('app/applets', action)
         path = File.join 'app/applets', action, &quot;#{action}.lzx&quot;
-        m.template 'applet.lzx', path, :assigns =&gt; {:path =&gt; path}
+        m.template 'applet.lzx', path, :assigns =&gt; {
+          :path =&gt; path, :element_name =&gt; class_name.singularize.elementize}
         
+        m.directory File.join('app/views', class_path, file_name)
         path = File.join 'app/views', class_path, file_name, &quot;#{action}.rhtml&quot;
         m.template 'view.rhtml', path, :assigns =&gt; {:applet =&gt; action}
       end</diff>
      <filename>generators/applet/applet_generator.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,9 @@
-&lt;canvas&gt;
-  &lt;text&gt;My source code is in &lt;%= path %&gt;&lt;/text&gt;
-&lt;/canvas&gt;
\ No newline at end of file
+&lt;canvas layout=&quot;axis: y&quot;&gt;
+  &lt;% dataset_name = &quot;#{element_name}Data&quot; -%&gt;
+  &lt;text&gt;My source code is in &lt;%= path %&gt;.&lt;/text&gt;
+  
+  &lt;dataset name=&quot;&lt;%= dataset_name %&gt;&quot;
+           src=&quot;http://localhost:3000/&lt;%= singular_name %&gt;/records&quot; request=&quot;true&quot;/&gt;
+  
+  &lt;grid datapath=&quot;&lt;%= dataset_name %&gt;:/records&quot; contentdatapath=&quot;&lt;%= element_name %&gt;&quot;/&gt;
+&lt;/canvas&gt;</diff>
      <filename>generators/applet/templates/applet.lzx</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,7 @@
 &lt;html&gt;
   &lt;head&gt;
     &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
-    &lt;title&gt;&lt;%= class_name %&gt;&lt;/title&gt;
+    &lt;title&gt;&lt;%= applet.titleize %&gt;&lt;/title&gt;
     &lt;style type=&quot;text/css&quot;&gt;
       html, body { margin: 0; padding: 0; height: 100%; }
     &lt;/style&gt;</diff>
      <filename>generators/applet/templates/view.rhtml</filename>
    </modified>
    <modified>
      <diff>@@ -1,22 +1,13 @@
 Description:
     The rest_controller generator creates a controller that implements
-    the OpenLaszlo REST API.
+    the OpenLaszlo REST API.    If the model does not exist, it
+    creates it as well.
 
     The generator takes a controller name as its argument.
     The controller name may be given in CamelCase or under_score and should
     not be suffixed with 'Controller'.  To create a controller within a
     module, specify the controller name as 'module/controller'.
 
-    The generator is an alternative to the use of the scaffolding method:
-      class ContactsController &lt; ApplicationController
-        rest_scaffold :contact
-      end
-
-    The file that the generator creates differs from this in that it contains
-    an explicit methods for each action.  This is more verbose, but is a
-    better starting point for customizing the methods.
-
-
 Example:
     ./script/generate rest_controller contacts
 </diff>
      <filename>generators/rest_controller/USAGE</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,7 @@
+# Author:: Oliver Steele
+# Copyright:: Copyright (c) 2006 Oliver Steele.  All rights reserved.
+# License:: MIT License.
+
 class RestControllerGenerator &lt; Rails::Generator::NamedBase
   def manifest
     record do |m|
@@ -9,18 +13,21 @@ class RestControllerGenerator &lt; Rails::Generator::NamedBase
       m.directory File.join('app/helpers', class_path)
       m.directory File.join('test/functional', class_path)
       
+      # Depend on model generator but skip if the model exists.
+      m.dependency 'model', [singular_name], :collision =&gt; :skip
+      
       # Controller class, functional test, and helper class.
       m.template 'controller.rb',
                   File.join('app/controllers',
                             class_path,
                             &quot;#{file_name}_controller.rb&quot;)
 
-      m.template 'functional_test.rb',
+      m.template 'controller:functional_test.rb',
                   File.join('test/functional',
                             class_path,
                             &quot;#{file_name}_controller_test.rb&quot;)
 
-      m.template 'helper.rb',
+      m.template 'controller:helper.rb',
                   File.join('app/helpers',
                             class_path,
                             &quot;#{file_name}_helper.rb&quot;)</diff>
      <filename>generators/rest_controller/rest_controller_generator.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,57 +1,9 @@
 class &lt;%= class_name %&gt;Controller &lt; ApplicationController
-  def records
-    ranges = RangeList.parse(params[:id] || '', :domain_start =&gt; 1)
-    options = {}
-    options[:conditions] = ranges.to_sql_condition unless ranges.empty?
-    records = &lt;%= class_name %&gt;.find :all, options
-    response.headers[&quot;Content-Type&quot;] = &quot;text/xml&quot;
-    render :text =&gt; RestHelper::records_xml(records)
-  end
-  alias_method :index, :records
-  
-  def pages
-    ranges = RangeList.parse params[:id], :domain_start =&gt; 1
-    records = ranges.pages_for &lt;%= class_name %&gt;
-    response.headers[&quot;Content-Type&quot;] = &quot;text/xml&quot;
-    render :text =&gt; RestHelper::records_xml(records)
-  end
-  
-  def schema
-    response.headers[&quot;Content-Type&quot;] = &quot;text/xml&quot;
-    render :text =&gt; RestHelper::schema_xml(&lt;%= class_name %&gt;)
-  end
-  
-  def create
-    values = params['id'].split('&amp;').map {|s| s.split('=', 2)}
-    record = &lt;%= class_name %&gt;.new(Hash[*values.flatten])
-    response.headers[&quot;Content-Type&quot;] = &quot;text/xml&quot;
-    if record.save
-      render :text =&gt; &quot;&lt;create&gt;#{record.id}&lt;/create&gt;&quot;
-    else
-      render :text =&gt; &quot;&lt;error&gt;#{record.full_messages.join(&quot;\n&quot;)}&lt;/error&gt;&quot;
-    end
-  end
-  
-  def update
-    values = params['id'].split('&amp;').map {|s| s.split('=', 2)}
-    attributes = Hash[*values.flatten]
-    id = attributes['id']
-    attributes.delete 'id'
-    record = &lt;%= class_name %&gt;.find id
-    record.attributes = attributes
-    response.headers[&quot;Content-Type&quot;] = &quot;text/xml&quot;
-    if record.save
-      render :text =&gt; &quot;&lt;update&gt;#{record.id}&lt;/update&gt;&quot;
-    else
-      render :text =&gt; &quot;&lt;error&gt;#{record.full_messages.join(&quot;\n&quot;)}&lt;/error&gt;&quot;
-    end
-  end
-  
-  def delete
-    ranges = RangeList.parse params['id'], :domain_start =&gt; 1
-    conditions = ranges.to_array :first_index =&gt; 1
-    &lt;%= class_name %&gt;.delete_all conditions
-    response.headers[&quot;Content-Type&quot;] = &quot;text/xml&quot;
-    render :text =&gt; &quot;&lt;deleted id='#{id}'/&gt;&quot;
-  end
+  # The following line defines methods that implement the OpenLaszlo
+  # REST API.
+  #
+  # To replace this file with a file that contains explicit method
+  # definitions, execute:
+  #   script/generate rest_scaffold &lt;%= singular_name %&gt;
+  rest_scaffold :&lt;%= singular_name %&gt;
 end</diff>
      <filename>generators/rest_controller/templates/controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 # Author:: Oliver Steele
 # Copyright:: Copyright (c) 2006 Oliver Steele.  All rights reserved.
-# License:: Ruby License.
+# License:: MIT License.
 
 require 'rest_helper'
 require 'rest_scaffolding'</diff>
      <filename>init.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,22 @@
-class String
-  def xmlize
-    return self.underscore.gsub(/_/, '-')
+# Author:: Oliver Steele
+# Copyright:: Copyright (c) 2006 Oliver Steele.  All rights reserved.
+# License:: MIT License.
+
+module OpenLaszlo # :nodoc:
+  module CoreExtensions # :nodoc:
+    class String # :nodoc:
+      module Inflections
+        # Downcases and replaces spaces and CamelCasing by hyphens, so
+        # that &quot;Record Name&quot;, &quot;record_name&quot;, and &quot;RecordName&quot; all
+        # become &quot;record-name&quot;.
+        def elementize
+          return self.underscore.gsub(/_/, '-')
+        end
+      end
+    end
   end
 end
+
+class String #:nodoc:
+  include OpenLaszlo::CoreExtensions::String::Inflections
+end</diff>
      <filename>lib/extensions.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,23 +1,28 @@
 # Author:: Oliver Steele
 # Copyright:: Copyright (c) 2006 Oliver Steele.  All rights reserved.
-# License:: Ruby License.
+# License:: MIT License.
 
 require 'action_view'
 
 module OpenLaszlo #:nodoc:
-  module Helpers
+  module Helpers # :nodoc:
     module AssetTagHelper
       def self.included(base)
         base.class_eval do
           include InstanceMethods
         end
       end
-      module InstanceMethods #:nodoc:
+      module InstanceMethods
         def flashobject_path source
           compute_public_path source, 'applets', 'swf'
         end
         
         def flashobject_tags source, options={}
+          path = flashobject_path source
+          verify_file_exists = options.fetch(:verify_file_exists, ENV['RAILS_ENV'] == 'development')
+          if verify_file_exists and not File.exists? File.join(RAILS_ROOT, 'public', path)
+            return &quot;&lt;div&gt;&lt;strong&gt;Warning:&lt;/strong&gt; The file &lt;code&gt;#{File.join('public', path)}&lt;/code&gt; does not exist.  Did you forget to execute &lt;tt&gt;rake applets&lt;/tt&gt;?&lt;/div&gt;&quot;
+          end
           div_id = options[:div_id] || 'flashcontent'
           flash_id = options[:flash_id] || File.basename(source, '.swf')
           width, height = (options[:size]||'100%x100%').scan(/^(\d*%?)x(\d*%?)$/).first
@@ -26,15 +31,20 @@ module OpenLaszlo #:nodoc:
           variables = options.fetch(:variables, {:lzproxied =&gt; false})
           parameters = options.fetch(:parameters, {:scale =&gt; 'noscale'})
           fallback_html = options[:fallback_html] || %q{&lt;p&gt;Requires the Flash plugin.  If the plugin is already installed, click &lt;a href=&quot;?detectflash=false&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;}
+          if options.fetch(:check_for_javascript_include, ENV['RAILS_ENV'] == 'development')
+            check_for_javascript =&quot;if (typeof FlashObject == 'undefined') document.getElementById('#{div_id}').innerHTML = '&lt;strong&gt;Warning:&lt;/strong&gt; FlashObject is undefined.  Did you forget to execute &lt;tt&gt;rake update_javascripts&lt;/tt&gt;, or to include &lt;tt&gt;&amp;lt;%= javascript_include_tag :defaults %&gt;&lt;/tt&gt; in your view file?';&quot;
+          end
           return &lt;&lt;-&quot;EOF&quot;
           &lt;div id=&quot;#{div_id}&quot; style=&quot;height: #{height}&quot;&gt;
             #{fallback_html}
           &lt;/div&gt;
-          &lt;script type=&quot;text/javascript&quot;&gt;
-            var fo = new FlashObject(&quot;#{flashobject_path source}&quot;, &quot;#{flash_id}&quot;, &quot;#{width}&quot;, &quot;#{height}&quot;, &quot;#{flash_version}&quot;, &quot;#{background_color}&quot;);
+          &lt;script type=&quot;text/javascript&quot;&gt;//&lt;![CDATA[
+            #{check_for_javascript}
+            var fo = new FlashObject(&quot;#{path}&quot;, &quot;#{flash_id}&quot;, &quot;#{width}&quot;, &quot;#{height}&quot;, &quot;#{flash_version}&quot;, &quot;#{background_color}&quot;);
           #{parameters.map{|k,v|%Q[fo.addVariable(&quot;#{k}&quot;, &quot;#{v}&quot;);]}.join(&quot;\n&quot;)}
           #{variables.map{|k,v|%Q[fo.addVariable(&quot;#{k}&quot;, &quot;#{v}&quot;);]}.join(&quot;\n&quot;)}
           fo.write(&quot;#{div_id}&quot;);
+          //]]&gt;
           &lt;/script&gt;
 EOF
         end</diff>
      <filename>lib/flashobject_view_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 # Author:: Oliver Steele
 # Copyright:: Copyright (c) 2006 Oliver Steele.  All rights reserved.
-# License:: Ruby License.
+# License:: MIT License.
 
 class RangeList
   attr_accessor :domain_start, :domain_end</diff>
      <filename>lib/range_list.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 # Author:: Oliver Steele
 # Copyright:: Copyright (c) 2006 Oliver Steele.  All rights reserved.
-# License:: Ruby License.
+# License:: MIT License.
 
 require 'range_list'
 require 'extensions'
@@ -8,7 +8,6 @@ require 'extensions'
 # Implements helper functions to implement a subset of the
 # spec at http://wiki.openlaszlo.org/Database_Connector.
 module RestHelper
-  # TODO: order
   def self.records_xml records
     xm = Builder::XmlMarkup.new
     xm.records(:count =&gt; records.length) {
@@ -18,14 +17,14 @@ module RestHelper
           symbol = column.name.intern
           attrs[symbol] = record.send symbol
         end
-        xm.tag!(record.class.name.xmlize, attrs)
+        xm.tag!(record.class.name.singularize.elementize, attrs)
       end
     }
   end
   
   def self.schema_xml klass
     xm = Builder::XmlMarkup.new
-    xm.element(:name =&gt; klass.name.xmlize) {
+    xm.element(:name =&gt; klass.name.singularize.elementize) {
       klass.content_columns.map do |column|
         xm.column(:name =&gt; column.name, :type =&gt; column.klass || &quot;String&quot;)
       end</diff>
      <filename>lib/rest_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,17 +1,28 @@
 # Author:: Oliver Steele
 # Copyright:: Copyright (c) 2006 Oliver Steele.  All rights reserved.
-# License:: Ruby License.
+# License:: MIT License.
 
 require 'action_controller'
 
-module ActionController
+module ActionController # :nodoc:
   module RestScaffolding # :nodoc:
     def self.append_features(base)
       super
       base.extend(ClassMethods)
     end
     
+    # REST Scaffolding provides OpenLaszlo REST actions for creating, reading,
+    # updating, and destroying records.
+    #
+    # Example:
+    #
+    #  class ContactsController &lt; ActionController::Base
+    #    rest_scaffold :contacts
+    #  end
     module ClassMethods
+      # Adds OpenLaszlo REST actions to the controller.  The options
+      # are the same as for ActionView::Scaffolding.scaffold, except
+      # that the +:suffix+ option is not currently supported.
       def rest_scaffold(model_id, options = {})
         options.assert_valid_keys(:class_name, :suffix)
         
@@ -30,12 +41,13 @@ module ActionController
           end
           alias_method :index, :records
           
-          def pages
+          def page
             ranges = RangeList.parse params[:id], :domain_start =&gt; 1
             records = ranges.pages_for #{class_name}
             response.headers[&quot;Content-Type&quot;] = &quot;text/xml&quot;
             render :text =&gt; RestHelper::records_xml(records)
           end
+          alias_method :pages, :page
           
           def schema
             response.headers[&quot;Content-Type&quot;] = &quot;text/xml&quot;</diff>
      <filename>lib/rest_scaffolding.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,8 +1,17 @@
 # Author:: Oliver Steele
 # Copyright:: Copyright (c) 2006 Oliver Steele.  All rights reserved.
-# License:: Ruby License.
+# License:: MIT License.
 
-task :update_javascripts do
+task :update_javascripts =&gt; :update_openlaszlo_javascripts
+
+# This is a separate task from :update_javascripts so that :applets can
+# depend just on this one.
+task :update_openlaszlo_javascripts =&gt; do
   sources = Dir[File.expand_path(File.join(File.dirname(__FILE__), '../javascripts/*.js'))]
-  cp sources, File.join(RAILS_ROOT, '/public/javascripts/')
+  target_dir = File.join(RAILS_ROOT, 'public/javascripts')
+  # This test is in order to print the update message (via cp) exactly when
+  # something is happening.  The file copy itself isn't worth optimizing.
+  if sources.detect {|source| !uptodate? File.join(target_dir, File.basename(source)), source}
+    cp sources, target_dir
+  end
 end</diff>
      <filename>tasks/update_flashobject.rake</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>55a9eb24828b6447c69dd71576ce940fcf59e643</id>
    </parent>
  </parents>
  <author>
    <name>Oliver Steele</name>
    <email>steele@osteele.com</email>
  </author>
  <url>http://github.com/osteele/openlaszlo_plugin/commit/cfe4ea08a0de52030662166954722095b4601cc1</url>
  <id>cfe4ea08a0de52030662166954722095b4601cc1</id>
  <committed-date>2006-01-17T18:10:29-08:00</committed-date>
  <authored-date>2006-01-17T18:10:29-08:00</authored-date>
  <message>== 0.6 (2006-01-13)
* Added documentation
* :applet task installs the javascript too
* switched to MIT license

== 0.5 (2006-01-12)
=== New features
* Generated applet displays data from server
* Default :applet task compiles applets
* The rest_controller generator uses the rest_scaffold
* New rest_scaffold generator writes out a copy of the methods
* rest_controller and rest_scaffold generators create the model if it
doesn't exist
* applet generator creates the controller and model if they don't
exist
* Development mode warns when applet isn't present
* Development mode warns when javascript isn't included
=== Bug fixes
* applet generator creates intermediate view directories
=== Implementation
* Remove copied templates from rest_controller generator; reference
them via &quot;generator:filename&quot; notation instead</message>
  <tree>c68934463d61fa099c2b37f0310301a194de5e09</tree>
  <committer>
    <name>Oliver Steele</name>
    <email>steele@osteele.com</email>
  </committer>
</commit>
