diff --git a/COPYRIGHT b/COPYRIGHT new file mode 100644 index 0000000..a268cc6 --- /dev/null +++ b/COPYRIGHT @@ -0,0 +1,22 @@ +Copyright (c) 2010, Daniel Fox +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/SPUploader.rb b/SPUploader.rb index a03bb9d..bedb7c9 100644 --- a/SPUploader.rb +++ b/SPUploader.rb @@ -1,12 +1,9 @@ -require 'SPUploader/Site' -require 'SPUploader/Generator' -require 'SPUploader/SavedGenerator' -require 'SPUploader/Page' -require 'SPUploader/PageTemplate' -require 'SPUploader/RootTemplate' -require 'SPUploader/SftpUploader' -require 'SPUploader/SSVGenerator' -require 'SPUploader/TemplatedPage' +$LOAD_PATH << './SPUploader' +require 'Site' +#require 'SftpUploader' # Unsure if this needs to be required or not since it + # worked without it. It must be included somewhere else + # already. +require 'SSVGenerator' # This file just loads all of the needed class files for the user at once so # he/she only needs a single require statement. diff --git a/SPUploader/Page.rb b/SPUploader/Page.rb index fdce9a8..6ffb85a 100644 --- a/SPUploader/Page.rb +++ b/SPUploader/Page.rb @@ -1,4 +1,4 @@ -require 'SPUploader/Generator' +require File.dirname(__FILE__) + '/Generator' # This is the base class for the page types. It handles parsing of the files, # the tags, storing the values for the tags, incorporates the merging, diff --git a/SPUploader/PageTemplate.rb b/SPUploader/PageTemplate.rb index a1ea7e2..88b16f6 100644 --- a/SPUploader/PageTemplate.rb +++ b/SPUploader/PageTemplate.rb @@ -1,4 +1,4 @@ -require 'SPUploader/Page' +require File.dirname(__FILE__) + '/Page' # This class represents all templates for the pages. There is a special version, # RootTemplate, is the root of the template tree. This only exists so that diff --git a/SPUploader/RootTemplate.rb b/SPUploader/RootTemplate.rb index 91d6540..45c2de0 100644 --- a/SPUploader/RootTemplate.rb +++ b/SPUploader/RootTemplate.rb @@ -1,4 +1,4 @@ -require 'SPUploader/PageTemplate' +require File.dirname(__FILE__) + '/PageTemplate' # This class provides an abstraction for the end user of how a root template is # represented. A PageTemplate is only a root because the parent template diff --git a/SPUploader/SSVGenerator.rb b/SPUploader/SSVGenerator.rb index d2e0c7f..18676bd 100644 --- a/SPUploader/SSVGenerator.rb +++ b/SPUploader/SSVGenerator.rb @@ -1,4 +1,4 @@ -require 'SPUploader/SavedGenerator' +require File.dirname(__FILE__) + '/SavedGenerator' # This is both an example generator class and a useful generator to use. Rather # than using commas, this uses semicolon separated values so that commas can diff --git a/SPUploader/SavedGenerator.rb b/SPUploader/SavedGenerator.rb index a08e8ac..11f582e 100644 --- a/SPUploader/SavedGenerator.rb +++ b/SPUploader/SavedGenerator.rb @@ -1,4 +1,4 @@ -require 'SPUploader/Generator' +require File.dirname(__FILE__) + '/Generator' # This is a high-level generator class to be used for any generator that only # needs to be generated once but used in multiple pages and/or tags. diff --git a/SPUploader/Site.rb b/SPUploader/Site.rb index d21e207..dc9699c 100644 --- a/SPUploader/Site.rb +++ b/SPUploader/Site.rb @@ -1,6 +1,6 @@ -require 'SPUploader/PageTemplate' -require 'SPUploader/TemplatedPage' -require 'SPUploader/RootTemplate' +require File.dirname(__FILE__) + '/PageTemplate' +require File.dirname(__FILE__) + '/TemplatedPage' +require File.dirname(__FILE__) + '/RootTemplate' # This class is a wrapper for all of the templating stuff. It is designed to # provide a more simple way to interact with the templating system than using diff --git a/SPUploader/TemplatedPage.rb b/SPUploader/TemplatedPage.rb index aa2ffde..cd59eb7 100644 --- a/SPUploader/TemplatedPage.rb +++ b/SPUploader/TemplatedPage.rb @@ -1,5 +1,5 @@ -require 'SPUploader/Page' -require 'SPUploader/SftpUploader' +require File.dirname(__FILE__) + '/Page' +require File.dirname(__FILE__) + '/SftpUploader' # This class is the leaf node of a template tree. Each page on the site will # require one of these. The page has the functionality to upload the rendered