Changeset 459

Show
Ignore:
Timestamp:
08/15/08 19:28:50 (3 months ago)
Author:
deveiant
Message:
  • Updated the build system
  • Started conversion of unit tests for Arrow::Session to Rspec
Location:
trunk
Files:
1 added
14 modified

Legend:

Unmodified
Added
Removed
  • trunk/LICENSE

    r452 r459  
    1 == Copyright 
    2  
    3 Copyright © 2003-2008 The FaerieMUD Consortium. 
    4  
     1Copyright (c) 2008, Michael Granger 
    52All rights reserved. 
    63 
     
    85modification, are permitted provided that the following conditions are met: 
    96 
    10     * Redistributions of source code must retain the above copyright notice, 
    11       this list of conditions and the following disclaimer. 
     7  * Redistributions of source code must retain the above copyright notice, 
     8    this list of conditions and the following disclaimer. 
    129 
    13     * Redistributions in binary form must reproduce the above copyright 
    14       notice, this list of conditions and the following disclaimer in the 
    15       documentation and/or other materials provided with the distribution. 
     10  * Redistributions in binary form must reproduce the above copyright notice, 
     11    this list of conditions and the following disclaimer in the documentation 
     12    and/or other materials provided with the distribution. 
    1613 
    17     * Neither the name of FaerieMUD nor the names of its contributors 
    18       may be used to endorse or promote products derived from this software 
    19       without specific prior written permission. 
     14  * Neither the name of the author/s, nor the names of the project's 
     15    contributors may be used to endorse or promote products derived from this 
     16    software without specific prior written permission. 
    2017 
    21 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
    22 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
    23 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
    24 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 
    25 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 
    26 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 
    27 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
    28 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 
    29 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 
    30 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
    31 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
    32  
     18THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
     19AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
     20IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
     21DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 
     22FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
     23DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 
     24SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
     25CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 
     26OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
     27OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
  • trunk/README

    • Property svn:keywords set to Date Rev Author URL Id
    r440 r459  
    9999 
    100100 
    101  $Id: README,v 1.3 2004/02/14 03:21:29 deveiant Exp $ 
     101 $Id$ 
    102102 
    103103 
  • trunk/Rakefile

    r457 r459  
    3939DOCSDIR       = BASEDIR + 'docs' 
    4040PKGDIR        = BASEDIR + 'pkg' 
    41 RAKE_TASKDIR  = BASEDIR + 'rake' 
    4241 
    4342PKG_NAME      = 'arrow' 
    44 PKG_SUMMARY   = '' 
     43PKG_SUMMARY   = 'A mod_ruby web application framework' 
    4544VERSION_FILE  = LIBDIR + 'arrow.rb' 
    4645PKG_VERSION   = VERSION_FILE.read[ /VERSION = '(\d+\.\d+\.\d+)'/, 1 ] 
     
    4847GEM_FILE_NAME = "#{PKG_FILE_NAME}.gem" 
    4948 
    50 RELEASE_NAME  = "RELEASE_#{PKG_VERSION.gsub(/\./, '_')}" 
    51  
    5249ARTIFACTS_DIR = Pathname.new( ENV['CC_BUILD_ARTIFACTS'] || 'artifacts' ) 
    5350 
     
    6259TEST_FILES    = Pathname.glob( TESTDIR + '**/*.tests.rb' ).delete_if {|item| item =~ /\.svn/ } 
    6360 
    64 RELEASE_FILES = FileList[ TEXT_FILES + SPEC_FILES + TEST_FILES + LIB_FILES + EXT_FILES ] 
    65  
     61RAKE_TASKDIR  = BASEDIR + 'rake' 
     62RAKE_TASKLIBS = Pathname.glob( RAKE_TASKDIR + '*.rb' ) 
     63 
     64LOCAL_RAKEFILE = BASEDIR + 'Rakefile.local' 
     65 
     66EXTRA_PKGFILES = [] 
     67EXTRA_PKGFILES.concat Pathname.glob( BASEDIR + 'applets/**/*.rb' ).delete_if {|item| item =~ /\.svn/ }  
     68EXTRA_PKGFILES.concat Pathname.glob( BASEDIR + 'docs/manual/**' ).delete_if {|item| item =~ /\.svn/ }  
     69 
     70RELEASE_FILES = TEXT_FILES +  
     71    SPEC_FILES +  
     72    TEST_FILES +  
     73    LIB_FILES +  
     74    EXT_FILES +  
     75    RAKE_TASKLIBS + 
     76    EXTRA_PKGFILES 
     77 
     78RELEASE_FILES << LOCAL_RAKEFILE if LOCAL_RAKEFILE.exist? 
     79 
     80COVERAGE_MINIMUM = ENV['COVERAGE_MINIMUM'] ? Float( ENV['COVERAGE_MINIMUM'] ) : 85.0 
    6681RCOV_EXCLUDES = 'spec,tests,/Library/Ruby,/var/lib,/usr/local/lib' 
    6782RCOV_OPTS = [ 
     
    8095SVN_TAGS_DIR     = 'tags' 
    8196 
     97SVN_DOTDIR       = BASEDIR + '.svn' 
     98SVN_ENTRIES      = SVN_DOTDIR + 'entries' 
     99 
     100 
    82101### Load some task libraries that need to be loaded early 
    83102require RAKE_TASKDIR + 'helpers.rb' 
     
    96115    '-i', '.', 
    97116    '-m', 'README', 
    98     '-W', 'http://deveiate.org/projects/Arrow/browser/trunk/' 
     117    '-W', 'http://deveiate.org/projects/Arrow//browser/trunk/' 
    99118  ] 
    100119 
     
    107126PROJECT_PUBDIR = "/usr/local/www/public/code" 
    108127PROJECT_DOCDIR = "#{PROJECT_PUBDIR}/#{PKG_NAME}" 
    109 PROJECT_SCPURL = "#{PROJECT_HOST}:#{PROJECT_DOCDIR}" 
     128PROJECT_SCPPUBURL = "#{PROJECT_HOST}:#{PROJECT_PUBDIR}" 
     129PROJECT_SCPDOCURL = "#{PROJECT_HOST}:#{PROJECT_DOCDIR}" 
     130 
     131# Rubyforge stuff 
     132RUBYFORGE_GROUP = 'deveiate' 
     133RUBYFORGE_PROJECT = 'arrow' 
    110134 
    111135# Gem dependencies: gemname => version 
     
    129153    gem.summary           = PKG_SUMMARY 
    130154    gem.description       = <<-EOD 
    131     A mod_ruby web application framework 
     155    Arrow is a web application framework for mod_ruby. It was designed to make 
     156    development of web applications under Apache easier and more fun without 
     157    sacrificing the power of being able to access the native Apache API. 
    132158    EOD 
    133159 
    134160    gem.authors           = 'Michael Granger' 
    135161    gem.email             = 'ged@FaerieMUD.org' 
    136     gem.homepage          = 'http://deveiate.org/projects/Arrow' 
    137     gem.rubyforge_project = 'deveiate' 
     162    gem.homepage          = 'http://deveiate.org/projects/Arrow/' 
     163    gem.rubyforge_project = RUBYFORGE_PROJECT 
    138164 
    139165    gem.has_rdoc          = true 
     
    155181end 
    156182 
     183$trace = Rake.application.options.trace ? true : false 
     184$dryrun = Rake.application.options.dryrun ? true : false 
     185 
    157186 
    158187# Load any remaining task libraries 
    159 Pathname.glob( RAKE_TASKDIR + '*.rb' ).each do |tasklib| 
    160     RELEASE_FILES.include( tasklib ) 
    161  
     188RAKE_TASKLIBS.each do |tasklib| 
    162189    next if tasklib =~ %r{/(helpers|svn|verifytask)\.rb$} 
    163190    begin 
     
    174201end 
    175202 
    176 $trace = Rake.application.options.trace ? true : false 
    177 $dryrun = Rake.application.options.dryrun ? true : false 
    178  
    179203# Load any project-specific rules defined in 'Rakefile.local' if it exists 
    180 LOCAL_RAKEFILE = BASEDIR + 'Rakefile.local' 
    181 if LOCAL_RAKEFILE.exist? 
    182     import LOCAL_RAKEFILE  
    183     RELEASE_FILES.include( LOCAL_RAKEFILE.to_s ) 
    184 end 
     204import LOCAL_RAKEFILE if LOCAL_RAKEFILE.exist? 
    185205 
    186206 
     
    190210 
    191211### Default task 
    192 task :default  => [:clean, :spec, :rdoc, :package] 
     212task :default  => [:clean, :local, :spec, :rdoc, :package] 
     213 
     214### Task the local Rakefile can append to -- no-op by default 
     215task :local 
    193216 
    194217 
     
    197220CLOBBER.include 'artifacts', 'coverage.info', PKGDIR 
    198221 
    199  
    200 ### Cruisecontrol task 
     222# Target to hinge on ChangeLog updates 
     223file SVN_ENTRIES 
     224 
     225### Task: changelog 
     226file 'ChangeLog' => SVN_ENTRIES.to_s do |task| 
     227    log "Updating #{task.name}" 
     228 
     229    changelog = make_svn_changelog() 
     230    File.open( task.name, 'w' ) do |fh| 
     231        fh.print( changelog ) 
     232    end 
     233end 
     234 
     235 
     236### Task: cruise (Cruisecontrol task) 
    201237desc "Cruisecontrol build" 
    202238task :cruise => [:clean, :spec, :package] do |task| 
     
    205241    artifact_dir.mkpath 
    206242     
    207     $stderr.puts "Copying coverage stats..." 
    208     FileUtils.cp_r( 'coverage', artifact_dir ) 
     243    coverage = BASEDIR + 'coverage' 
     244    if coverage.exist? && coverage.directory? 
     245        $stderr.puts "Copying coverage stats..." 
     246        FileUtils.cp_r( 'coverage', artifact_dir ) 
     247    end 
    209248     
    210249    $stderr.puts "Copying packages..." 
     
    213252 
    214253 
     254desc "Update the build system to the latest version" 
     255task :update_build do 
     256    log "Updating the build system" 
     257    sh 'svn', 'up', RAKE_TASKDIR 
     258    log "Updating the Rakefile" 
     259    sh 'rake', '-f', RAKE_TASKDIR + 'Metarakefile' 
     260end 
     261 
  • trunk/TODO

    • Property svn:keywords set to Date Rev Author URL Id
  • trunk/arrow.css

    • Property svn:keywords changed from Id URL Rev to Date Rev Author URL Id
  • trunk/docs/manual/resources/css/deveiate.css

    • Property svn:keywords set to Date Rev Author URL Id
  • trunk/docs/manual/resources/css/ie.css

    • Property svn:keywords set to Date Rev Author URL Id
  • trunk/docs/manual/resources/css/manual.css

    • Property svn:keywords changed from Id URL Rev to Date Rev Author URL Id
  • trunk/docs/manual/resources/css/print.css

    • Property svn:keywords set to Date Rev Author URL Id
  • trunk/docs/manual/resources/css/screen.css

    • Property svn:keywords set to Date Rev Author URL Id
  • trunk/lib/arrow/session.rb

    r452 r459  
    5353    ############################################################# 
    5454 
    55     @config = Arrow::Config.new 
     55    @config = Arrow::Config.new.session 
    5656    class << self 
    5757        attr_reader :config 
  • trunk/lib/arrow/transaction.rb

    r452 r459  
    8484    ### objects. 
    8585    def initialize( request, config, broker ) 
    86         @request            = request 
    87         @config             = config 
    88         @broker             = broker 
    89         @handler_status     = Apache::OK 
    90  
    91         @serial             = make_transaction_serial( request ) 
     86        @request         = request 
     87        @config          = config 
     88        @broker          = broker 
     89        @handler_status  = Apache::OK 
     90 
     91        @serial          = make_transaction_serial( request ) 
    9292 
    9393        # Stuff that may be filled in later 
    94         @session            = nil # Lazily-instantiated 
    95         @applet_path        = nil # Added by the broker 
    96         @vargs              = nil # Filled in by the applet 
    97         @data               = {} 
    98         @request_cookies    = parse_cookies( request ) 
    99         @cookies            = Arrow::CookieSet.new() 
     94        @session         = nil # Lazily-instantiated 
     95        @applet_path     = nil # Added by the broker 
     96        @vargs           = nil # Filled in by the applet 
     97        @data            = {} 
     98        @request_cookies = parse_cookies( request ) 
     99        @cookies         = Arrow::CookieSet.new() 
    100100 
    101101        # Check for a "RubyOption root_dispatcher true" 
     
    525525    ### Parse cookies from the specified request and return them in a Hash. 
    526526    def parse_cookies( request ) 
    527         hash = Arrow::Cookie.parse(request.headers_in['cookie']) 
     527        hash = Arrow::Cookie.parse( request.headers_in['cookie'] ) 
    528528        return Arrow::CookieSet.new( hash.values ) 
    529529    end 
  • trunk/project.yml

    r457 r459  
    11---  
    2 project_description: A mod_ruby web application framework 
     2rubyforge_project: arrow 
     3project_requirements:  
     4  mod_ruby: ">= 1.2.6" 
     5  Apache: ">= 2.2.6" 
     6project_description: |- 
     7  Arrow is a web application framework for mod_ruby. It was designed to make 
     8  development of web applications under Apache easier and more fun without 
     9  sacrificing the power of being able to access the native Apache API. 
     10rubyforge_group: deveiate 
    311author_name: Michael Granger 
    4 project_homepage: http://deveiate.org/projects/Arrow 
     12project_homepage: http://deveiate.org/projects/Arrow/ 
     13project_dependencies:  
     14  formvalidator: ">= 0.1.4" 
     15  ruby-cache: ">= 0.3.0" 
     16  PluginFactory: ">= 1.0.3" 
     17project_summary: A mod_ruby web application framework 
    518project_name: Arrow 
     19additional_pkgfiles:  
     20- applets/**/*.rb 
     21- docs/manual/** 
    622author_email: ged@FaerieMUD.org 
    7 project_dependencies: 
    8   ruby-cache: '>= 0.3.0' 
    9   formvalidator: '>= 0.1.4' 
    10   PluginFactory: '>= 1.0.3' 
    11 project_requirements: 
    12   Apache: >= 2.2.6 
    13   mod_ruby: >= 1.2.6 
    14  
  • trunk/spec/arrow/appletregistry_spec.rb

    • Property svn:keywords changed from Id URL Rev to Date Rev Author URL Id