Show
Ignore:
Timestamp:
07/14/05 03:19:56 (8 years ago)
Author:
dema
Message:
  • Upgraded Rails to 0.13.1
  • Improved change of repository screen
  • Added filter to set charset to UTF-8
  • Set all strings to Unicode in environment.rb
  • Fixed pluralization of 'index' to 'indices' (instead of 'indexes')
  • Added ability to import scripts via the Web UI (#1)
  • Added ability to import scripts via the script\import command
  • Moved the import script example 'exemplo-di.yml' to db\
  • Moved the import script library 'model_loader.rb to lib\
  • Removed initial repository configuration from the source code to the database.yml configuration file (#3)
  • Renamed datagrid list functions to avoid name conflicts (#10)
  • Adjusted generation of UUIDs to produce more human readable IDs (#7)
Location:
trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore set to
      log
  • trunk/vendor/railties/Rakefile

    r1 r5  
    1010PKG_BUILD       = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : '' 
    1111PKG_NAME        = 'rails' 
    12 PKG_VERSION     = '0.11.0' + PKG_BUILD 
     12PKG_VERSION     = '0.13.1' + PKG_BUILD 
    1313PKG_FILE_NAME   = "#{PKG_NAME}-#{PKG_VERSION}" 
    1414PKG_DESTINATION = ENV["RAILS_PKG_DESTINATION"] || "../#{PKG_NAME}" 
     15 
     16RELEASE_NAME  = "REL #{PKG_VERSION}" 
     17 
     18RUBY_FORGE_PROJECT = "rails" 
     19RUBY_FORGE_USER    = "webster132" 
    1520 
    1621 
     
    2126 
    2227LOG_FILES    = %w( server.log development.log test.log production.log ) 
    23 HTML_FILES   = %w( 404.html 500.html index.html favicon.ico javascripts/prototype.js ) 
    24 BIN_FILES    = %w( generate destroy breakpointer console server update runner ) 
     28HTML_FILES   = %w( 404.html 500.html index.html favicon.ico javascripts/prototype.js javascripts/effects.js javascripts/dragdrop.js javascripts/controls.js ) 
     29BIN_FILES    = %w( generate destroy breakpointer console server update runner profiler benchmarker ) # listener tracker 
    2530 
    2631VENDOR_LIBS = %w( actionpack activerecord actionmailer activesupport actionwebservice railties ) 
     
    5560end 
    5661 
     62# Get external spinoffs ------------------------------------------------------------------- 
     63 
     64desc "Updates railties to the latest version of the javascript spinoffs" 
     65task :update_js do 
     66  for js in %w( prototype controls dragdrop effects ) 
     67    rm "html/javascripts/#{js}.js" 
     68    cp "./../actionpack/lib/action_view/helpers/javascripts/#{js}.js", "html/javascripts" 
     69  end 
     70end 
    5771 
    5872# Make directory structure ---------------------------------------------------------------- 
     
    119133  copy_with_rewritten_ruby_path("dispatches/dispatch.fcgi", "#{PKG_DESTINATION}/public/dispatch.fcgi") 
    120134  chmod 0755, "#{PKG_DESTINATION}/public/dispatch.fcgi" 
     135 
     136  # copy_with_rewritten_ruby_path("dispatches/gateway.cgi", "#{PKG_DESTINATION}/public/gateway.cgi") 
     137  # chmod 0755, "#{PKG_DESTINATION}/public/gateway.cgi" 
    121138end 
    122139 
    123140task :copy_html_files do 
    124   cp HTML_FILES.map { |dir| File.join('html', dir) }, 
    125      File.join(PKG_DESTINATION, 'public') 
     141  HTML_FILES.each { |file| cp File.join('html', file), File.join(PKG_DESTINATION, 'public', file) } 
    126142end 
    127143 
     
    232248  s.description = <<-EOF 
    233249    Rails is a framework for building web-application using CGI, FCGI, mod_ruby, or WEBrick 
    234     on top of either MySQL, PostgreSQL, or SQLite with eRuby-based templates. 
     250    on top of either MySQL, PostgreSQL, SQLite, DB2, SQL Server, or Oracle with eRuby- or Builder-based templates. 
    235251  EOF 
    236252 
    237   s.add_dependency('rake', '>= 0.4.15') 
    238   s.add_dependency('activesupport',    '= 1.0.2' + PKG_BUILD) 
    239   s.add_dependency('activerecord',     '= 1.9.0' + PKG_BUILD) 
    240   s.add_dependency('actionpack',       '= 1.6.0' + PKG_BUILD) 
    241   s.add_dependency('actionmailer',     '= 0.8.0' + PKG_BUILD) 
    242   s.add_dependency('actionwebservice', '= 0.6.1' + PKG_BUILD) 
     253  s.add_dependency('rake', '>= 0.5.3') 
     254  s.add_dependency('activesupport',    '= 1.1.1' + PKG_BUILD) 
     255  s.add_dependency('activerecord',     '= 1.11.1' + PKG_BUILD) 
     256  s.add_dependency('actionpack',       '= 1.9.1' + PKG_BUILD) 
     257  s.add_dependency('actionmailer',     '= 1.0.1' + PKG_BUILD) 
     258  s.add_dependency('actionwebservice', '= 0.8.1' + PKG_BUILD) 
    243259 
    244260  s.rdoc_options << '--exclude' << '.' 
     
    261277end 
    262278 
    263 # Publish beta gem 
     279 
     280# Publishing ------------------------------------------------------- 
    264281desc "Publish the API documentation" 
    265282task :pgem => [:gem] do  
    266   Rake::SshFilePublisher.new("davidhh@comox.textdrive.com", "public_html/gems/gems", "pkg", "#{PKG_FILE_NAME}.gem").upload 
    267   `ssh davidhh@comox.textdrive.com './gemupdate.sh'` 
    268 end 
     283  Rake::SshFilePublisher.new("davidhh@wrath.rubyonrails.org", "public_html/gems/gems", "pkg", "#{PKG_FILE_NAME}.gem").upload 
     284  `ssh davidhh@wrath.rubyonrails.org './gemupdate.sh'` 
     285end 
     286 
     287desc "Publish the release files to RubyForge." 
     288task :release => [:gem] do 
     289  files = ["gem"].map { |ext| "pkg/#{PKG_FILE_NAME}.#{ext}" } 
     290 
     291  if RUBY_FORGE_PROJECT then 
     292    require 'net/http' 
     293    require 'open-uri' 
     294 
     295    project_uri = "http://rubyforge.org/projects/#{RUBY_FORGE_PROJECT}/" 
     296    project_data = open(project_uri) { |data| data.read } 
     297    group_id = project_data[/[?&]group_id=(\d+)/, 1] 
     298    raise "Couldn't get group id" unless group_id 
     299 
     300    # This echos password to shell which is a bit sucky 
     301    if ENV["RUBY_FORGE_PASSWORD"] 
     302      password = ENV["RUBY_FORGE_PASSWORD"] 
     303    else 
     304      print "#{RUBY_FORGE_USER}@rubyforge.org's password: " 
     305      password = STDIN.gets.chomp 
     306    end 
     307 
     308    login_response = Net::HTTP.start("rubyforge.org", 80) do |http| 
     309      data = [ 
     310        "login=1", 
     311        "form_loginname=#{RUBY_FORGE_USER}", 
     312        "form_pw=#{password}" 
     313      ].join("&") 
     314      http.post("/account/login.php", data) 
     315    end 
     316 
     317    cookie = login_response["set-cookie"] 
     318    raise "Login failed" unless cookie 
     319    headers = { "Cookie" => cookie } 
     320 
     321    release_uri = "http://rubyforge.org/frs/admin/?group_id=#{group_id}" 
     322    release_data = open(release_uri, headers) { |data| data.read } 
     323    package_id = release_data[/[?&]package_id=(\d+)/, 1] 
     324    raise "Couldn't get package id" unless package_id 
     325 
     326    first_file = true 
     327    release_id = "" 
     328 
     329    files.each do |filename| 
     330      basename  = File.basename(filename) 
     331      file_ext  = File.extname(filename) 
     332      file_data = File.open(filename, "rb") { |file| file.read } 
     333 
     334      puts "Releasing #{basename}..." 
     335 
     336      release_response = Net::HTTP.start("rubyforge.org", 80) do |http| 
     337        release_date = Time.now.strftime("%Y-%m-%d %H:%M") 
     338        type_map = { 
     339          ".zip"    => "3000", 
     340          ".tgz"    => "3110", 
     341          ".gz"     => "3110", 
     342          ".gem"    => "1400" 
     343        }; type_map.default = "9999" 
     344        type = type_map[file_ext] 
     345        boundary = "rubyqMY6QN9bp6e4kS21H4y0zxcvoor" 
     346 
     347        query_hash = if first_file then 
     348          { 
     349            "group_id" => group_id, 
     350            "package_id" => package_id, 
     351            "release_name" => RELEASE_NAME, 
     352            "release_date" => release_date, 
     353            "type_id" => type, 
     354            "processor_id" => "8000", # Any 
     355            "release_notes" => "", 
     356            "release_changes" => "", 
     357            "preformatted" => "1", 
     358            "submit" => "1" 
     359          } 
     360        else 
     361          { 
     362            "group_id" => group_id, 
     363            "release_id" => release_id, 
     364            "package_id" => package_id, 
     365            "step2" => "1", 
     366            "type_id" => type, 
     367            "processor_id" => "8000", # Any 
     368            "submit" => "Add This File" 
     369          } 
     370        end 
     371 
     372        query = "?" + query_hash.map do |(name, value)| 
     373          [name, URI.encode(value)].join("=") 
     374        end.join("&") 
     375 
     376        data = [ 
     377          "--" + boundary, 
     378          "Content-Disposition: form-data; name=\"userfile\"; filename=\"#{basename}\"", 
     379          "Content-Type: application/octet-stream", 
     380          "Content-Transfer-Encoding: binary", 
     381          "", file_data, "" 
     382          ].join("\x0D\x0A") 
     383 
     384        release_headers = headers.merge( 
     385          "Content-Type" => "multipart/form-data; boundary=#{boundary}" 
     386        ) 
     387 
     388        target = first_file ? "/frs/admin/qrs.php" : "/frs/admin/editrelease.php" 
     389        http.post(target + query, data, release_headers) 
     390      end 
     391 
     392      if first_file then 
     393        release_id = release_response.body[/release_id=(\d+)/, 1] 
     394        raise("Couldn't get release id") unless release_id 
     395      end 
     396 
     397      first_file = false 
     398    end 
     399  end 
     400end