<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -16,6 +16,54 @@
 #    You should have received a copy of the GNU General Public License
 #    along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.
 
+#    Documentation here so RDoc can find it
+
+#    frame - create and manage digital art project directory structures
+#    Copyright (C) 2008 Rob Myers
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.
+
+# == Synopsis
+#    Creates a directory structure for an SVG-based art project
+#    and populates it with useful resources and scripts.
+#
+# == Examples
+#    Create a project called flowers:
+#    frame flowers
+#
+# == Usage
+#    frame [options] project_name
+#
+#    For help use: art_project -h
+#
+# == Options
+#   -h, --help          Displays help message
+#   -v, --version       Display version number
+#   -a, --artist        Your name
+#   -l, --license       Set the Creative Commons license URL for the project
+#   -g, --git URL       Use git for project vcs
+#   -r, --svn-rep URL   Use svn for project vcs, making a new repository
+#   -d, --svn-dir       Use svn for project vcs, in existing repository
+#   -d, --date          The year(s) for the copyright message
+#
+# == Author
+#    Rob Myers &lt;rob@robmyers.org&gt;
+#
+# == Copyright
+#    Copyright (C) 2008 Rob Myers. Licensed under the GNU GPL 3 or later.
+#    http://www.gnu.org/licenses/gpl-3.0.html
+
 bindir = File.dirname(__FILE__)
 rootdir = File.dirname(bindir) 
 </diff>
      <filename>bin/frame</filename>
    </modified>
    <modified>
      <diff>@@ -1,51 +1,5 @@
 #!/usr/env ruby
 
-#    frame - create and manage digital art project directory structures
-#    Copyright (C) 2008 Rob Myers
-# 
-#    This program is free software: you can redistribute it and/or modify
-#    it under the terms of the GNU General Public License as published by
-#    the Free Software Foundation, either version 3 of the License, or
-#    (at your option) any later version.
-# 
-#    This program is distributed in the hope that it will be useful,
-#    but WITHOUT ANY WARRANTY; without even the implied warranty of
-#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-#    GNU General Public License for more details.
-# 
-#    You should have received a copy of the GNU General Public License
-#    along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.
-
-# == Synopsis
-#    Creates a directory structure for an SVG-based art project
-#    and populates it with useful resources and scripts.
-#
-# == Examples
-#    Create a project called flowers:
-#    frame flowers
-#
-# == Usage
-#    frame [options] project_name
-#
-#    For help use: art_project -h
-#
-# == Options
-#   -h, --help          Displays help message
-#   -v, --version       Display version number
-#   -a, --artist        Your name
-#   -l, --license       Set the Creative Commons license URL for the project
-#   -g, --git URL       Use the git version control system for the project
-#   -s, --svn URL       Use the svn version control system for the project
-#   -d, --date          The year(s) for the copyright message
-#
-# == Author
-#    Rob Myers &lt;rob@robmyers.org&gt;
-#
-# == Copyright
-#    Copyright (C) 2008 Rob Myers. Licensed under the GNU GPL 3 or later.
-#    http://www.gnu.org/licenses/gpl-3.0.html
-
-
 require 'fileutils'
 #require 'liblicense'
 require 'optparse' 
@@ -58,10 +12,9 @@ class Frame
   
   def initialize (arguments)    
     @arguments = arguments
-
-    # Here __FILE__ is the absolute path to the installed script
-    @generator_dir = File.dirname(__FILE__) 
-    @source_dir = File.dirname(@generator_dir)
+    # Here __FILE__ is the absolute path to this installed script
+    @lib_dir = File.dirname(__FILE__)
+    @source_dir = File.dirname(@lib_dir)
     @template_dir = @source_dir + '/templates'
     
     initialize_project_details
@@ -85,7 +38,7 @@ class Frame
     @project.artist = ''
     @project.remote_repository = nil
     @project.use_git = false
-    @project.use_svn = false
+    @project.use_svn = :no
     @project.license_uri = ''
     
     # Don't save to the yaml in case the directory is moved by the user
@@ -101,10 +54,11 @@ class Frame
       @project.use_git = true
       @project.remote_repository = uri
     end
-    opts.on(&quot;-s&quot;, &quot;--svn URI&quot;)  do |uri| 
-      @project.use_svn = true
+    opts.on(&quot;-r&quot;, &quot;--svn-rep URI&quot;)  do |uri|
+      @project.use_svn = :repository
       @project.remote_repository = uri
     end 
+    opts.on(&quot;-d&quot;, &quot;--svn-dir&quot;)  { @project.use_svn = :subdirectory }
     #opts.on('-l LICENSE', '--license URI')  do |license|
     #  @project.license_id &lt;&lt; license
     #end 
@@ -131,8 +85,8 @@ class Frame
       puts &quot;No project name specified.&quot;
       return false
     end
-    if @project.use_git &amp;&amp; @project.use_svn
-      puts &quot;Both git and svn specified. Please one or the other, not both.&quot;
+    if @project.use_git &amp;&amp; (@project.use_svn != :no)
+      puts &quot;Both git and svn specified. Please specify one or the other, not both.&quot;
       return false
     end
     if @project.use_git
@@ -141,7 +95,7 @@ class Frame
         return false
       end
     end
-    if @project.use_svn
+    if @project.use_svn == :repository
       if @project.remote_repository.rindex(@project.unix_name) == nil
         puts &quot;svn uri must end with project name&quot;
         return false
@@ -158,7 +112,7 @@ class Frame
     @project.unix_name = @project.name.downcase.gsub(/ \//, '_')        
     @version_control_dir = Dir.pwd + '/' + @project.unix_name
     @project_dir = @version_control_dir
-    if @project.use_svn
+    if @project.use_svn == :repository
       @project_dir += '/trunk'
     end  
   end
@@ -169,7 +123,7 @@ class Frame
   end
   
   def output_usage
-    RDoc::usage('usage')
+    RDoc::usage()
   end
   
   def output_version
@@ -189,7 +143,7 @@ class Frame
     
     FileUtils.mkdir_p @project_dir
     
-    if @project.use_svn
+    if @project.use_svn == :repository
       FileUtils.mkdir_p @version_control_dir + '/branches'
       FileUtils.mkdir_p @version_control_dir + '/tags'
     end
@@ -208,7 +162,7 @@ class Frame
     File.open(script, 'w') {|f| 
       f.puts(&quot;#!/usr/bin/env ruby&quot;)
       f.puts(&quot;$project_dir=File.dirname(File.dirname(File.expand_path(__FILE__)))&quot;)
-      f.puts(&quot;require '#{@generator_dir}/#{name}.rb'&quot;)
+      f.puts(&quot;require '#{@lib_dir}/#{name}.rb'&quot;)
       f.puts(&quot;app = #{name.capitalize}.new(ARGV)&quot;)
       f.puts(&quot;app.run&quot;)
       File.chmod(0700, script)}
@@ -252,14 +206,16 @@ class Frame
                     @project.remote_repository)
       Kernel.system('git', 'push', 'origin', 'master')
       file.cd('..')
-   end
-     if @project.use_svn
+     elsif @project.use_svn == :repository
        Kernel.system('svn', 'import', @version_control_dir, 
                      @project.remote_repository,
-                     &quot;-m&quot;, &quot;Checkin of generated directory structure.&quot;)
+                     &quot;-m&quot;, &quot;Checkin of generated project directory structure.&quot;)
        FileUtils.remove_entry_secure(@version_control_dir)
        Kernel.system('svn', 'checkout', &quot;#{@project.remote_repository}/trunk&quot;,
                      @project.name)
+    elsif @project.use_svn == :directory
+      Kernel.system('svn', 'add', @version_control_dir,
+                     &quot;-m&quot;, &quot;Checkin of generated project directory structure.&quot;)
      end
   end
   </diff>
      <filename>lib/frame.rb</filename>
    </modified>
    <modified>
      <diff>@@ -119,14 +119,14 @@ class Move
     if File.dirname(@arguments[0]) == &quot;.&quot;
       # filename only
       @work = &quot;#{@project_dir}/preparatory/#{@arguments[0]}&quot;
-    elsif @arguments[0].index(@project_dir) != nil # Robustify me
-      # absolute path
+    elsif @arguments[0].index(@project_dir) != nil
+      # absolute or long paths
       @work = @arguments[0]
     else
       # status/filename
       @work = &quot;#{@project_dir}/#{@arguments[0]}&quot;
     end
-    @destination = file_of_status @work, @status
+     @destination = file_of_status @arguments[0], @status
   end
   
   def output_help
@@ -148,11 +148,11 @@ class Move
   end
    
   def using_git?
-    File.exists?(&quot;#{@project_path}/.git&quot;)
+    File.exists?(&quot;#{@project_dir}/.git&quot;)
   end
    
   def using_svn?
-      File.exists?(&quot;#{@project_path}/.svn&quot;)
+      File.exists?(&quot;#{@project_dir}/.svn&quot;)
   end
 
   def move_work_in_version_control</diff>
      <filename>lib/move.rb</filename>
    </modified>
    <modified>
      <diff>@@ -72,6 +72,10 @@ class Work
   
   protected
   
+  def valid_status_dir filename
+    [&quot;preparatory&quot;, &quot;discard&quot;, &quot;final&quot;].include?(filename)
+  end
+
   def parsed_options?
     opts = OptionParser.new       
     opts.on('-v', '--version')        { output_version ; exit 0 }</diff>
      <filename>lib/work.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>00efba16d6fa07be6923135d6003df31256f97bf</id>
    </parent>
  </parents>
  <author>
    <name>Rob Myers</name>
    <email>rob@robmeyrs.org</email>
  </author>
  <url>http://github.com/robmyers/frame/commit/137803b5c0fd60dca3f91328a823c97f8d531016</url>
  <id>137803b5c0fd60dca3f91328a823c97f8d531016</id>
  <committed-date>2008-12-21T11:25:20-08:00</committed-date>
  <authored-date>2008-12-21T11:25:20-08:00</authored-date>
  <message>Move help RDoc to bin/frame.
Add different options for svn in a new or existing repository.
Robustify some file path handling.</message>
  <tree>14b5a293e9b382a383c4b7acee9be2f3c22dcdb7</tree>
  <committer>
    <name>Rob Myers</name>
    <email>rob@robmeyrs.org</email>
  </committer>
</commit>
