diff options
author | minskim <minskim> | 2008-02-09 06:31:59 +0000 |
---|---|---|
committer | minskim <minskim> | 2008-02-09 06:31:59 +0000 |
commit | 81ebe8d5ec8a2972decf31309aa5a5a6ef6f35e1 (patch) | |
tree | cb5d6bfef5a3f0254db098b9ea9d31c1a4b734b5 /www | |
parent | d1ce125497908db0daaaa88251b41a4b9e5d8d95 (diff) | |
download | pkgsrc-81ebe8d5ec8a2972decf31309aa5a5a6ef6f35e1.tar.gz |
Update rails to 2.0.2. Now the default database is sqlite3, not mysql.
There are many other changes. Please see CHANGELOG for the complete list:
http://dev.rubyonrails.org/browser/tags/rel_2-0-2/railties/CHANGELOG
Diffstat (limited to 'www')
-rw-r--r-- | www/rails/Makefile | 16 | ||||
-rw-r--r-- | www/rails/PLIST | 67 | ||||
-rw-r--r-- | www/rails/distinfo | 13 | ||||
-rw-r--r-- | www/rails/patches/patch-aa | 11 | ||||
-rw-r--r-- | www/rails/patches/patch-ab | 107 | ||||
-rw-r--r-- | www/rails/patches/patch-ac | 14 |
6 files changed, 139 insertions, 89 deletions
diff --git a/www/rails/Makefile b/www/rails/Makefile index 7d4e3807704..dde5ae5ed3f 100644 --- a/www/rails/Makefile +++ b/www/rails/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.9 2008/01/04 15:42:53 ghen Exp $ +# $NetBSD: Makefile,v 1.10 2008/02/09 06:31:59 minskim Exp $ -DISTNAME= rails-1.2.6 +DISTNAME= rails-2.0.2 CATEGORIES= www -MASTER_SITES= http://rubyforge.org/frs/download.php/28338/ +MASTER_SITES= http://rubyforge.org/frs/download.php/29360/ EXTRACT_SUFX= .tgz MAINTAINER= minskim@NetBSD.org @@ -11,11 +11,11 @@ COMMENT= Framework for developing database-backed web applications PKG_DESTDIR_SUPPORT= user-destdir -DEPENDS+= ${RUBY_PKGPREFIX}-activesupport>=1.4.4:../../devel/ruby-activesupport -DEPENDS+= ${RUBY_PKGPREFIX}-activerecord>=1.15.5:../../databases/ruby-activerecord -DEPENDS+= ${RUBY_PKGPREFIX}-actionpack>=1.13.5:../../www/ruby-actionpack -DEPENDS+= ${RUBY_PKGPREFIX}-actionmailer>=1.3.5:../../mail/ruby-actionmailer -DEPENDS+= ${RUBY_PKGPREFIX}-actionwebservice>=1.2.5:../../www/ruby-actionwebservice +DEPENDS+= ${RUBY_PKGPREFIX}-activesupport>=2.0.2:../../devel/ruby-activesupport +DEPENDS+= ${RUBY_PKGPREFIX}-activerecord>=2.0.2:../../databases/ruby-activerecord +DEPENDS+= ${RUBY_PKGPREFIX}-activeresource>=2.0.2:../../www/ruby-activeresource +DEPENDS+= ${RUBY_PKGPREFIX}-actionpack>=2.0.2:../../www/ruby-actionpack +DEPENDS+= ${RUBY_PKGPREFIX}-actionmailer>=2.0.2:../../mail/ruby-actionmailer NO_BUILD= yes WRKSRC= ${WRKDIR}/rails/vendor/rails/railties diff --git a/www/rails/PLIST b/www/rails/PLIST index 5f43d9cd6a0..37f95436323 100644 --- a/www/rails/PLIST +++ b/www/rails/PLIST @@ -1,12 +1,8 @@ -@comment $NetBSD: PLIST,v 1.3 2007/10/16 04:03:42 minskim Exp $ +@comment $NetBSD: PLIST,v 1.4 2008/02/09 06:31:59 minskim Exp $ bin/rails -${RUBY_SITELIBDIR}/binding_of_caller.rb -${RUBY_SITELIBDIR}/breakpoint.rb -${RUBY_SITELIBDIR}/breakpoint_client.rb ${RUBY_SITELIBDIR}/code_statistics.rb ${RUBY_SITELIBDIR}/commands.rb ${RUBY_SITELIBDIR}/commands/about.rb -${RUBY_SITELIBDIR}/commands/breakpointer.rb ${RUBY_SITELIBDIR}/commands/console.rb ${RUBY_SITELIBDIR}/commands/destroy.rb ${RUBY_SITELIBDIR}/commands/generate.rb @@ -14,6 +10,7 @@ ${RUBY_SITELIBDIR}/commands/ncgi/listener ${RUBY_SITELIBDIR}/commands/ncgi/tracker ${RUBY_SITELIBDIR}/commands/performance/benchmarker.rb ${RUBY_SITELIBDIR}/commands/performance/profiler.rb +${RUBY_SITELIBDIR}/commands/performance/request.rb ${RUBY_SITELIBDIR}/commands/plugin.rb ${RUBY_SITELIBDIR}/commands/process/inspector.rb ${RUBY_SITELIBDIR}/commands/process/reaper.rb @@ -32,6 +29,9 @@ ${RUBY_SITELIBDIR}/console_with_helpers.rb ${RUBY_SITELIBDIR}/dispatcher.rb ${RUBY_SITELIBDIR}/fcgi_handler.rb ${RUBY_SITELIBDIR}/initializer.rb +${RUBY_SITELIBDIR}/rails/plugin.rb +${RUBY_SITELIBDIR}/rails/plugin/loader.rb +${RUBY_SITELIBDIR}/rails/plugin/locator.rb ${RUBY_SITELIBDIR}/rails/version.rb ${RUBY_SITELIBDIR}/rails_generator.rb ${RUBY_SITELIBDIR}/rails_generator/base.rb @@ -44,15 +44,17 @@ ${RUBY_SITELIBDIR}/rails_generator/generators/components/controller/controller_g ${RUBY_SITELIBDIR}/rails_generator/generators/components/controller/templates/controller.rb ${RUBY_SITELIBDIR}/rails_generator/generators/components/controller/templates/functional_test.rb ${RUBY_SITELIBDIR}/rails_generator/generators/components/controller/templates/helper.rb -${RUBY_SITELIBDIR}/rails_generator/generators/components/controller/templates/view.rhtml +${RUBY_SITELIBDIR}/rails_generator/generators/components/controller/templates/view.html.erb ${RUBY_SITELIBDIR}/rails_generator/generators/components/integration_test/USAGE ${RUBY_SITELIBDIR}/rails_generator/generators/components/integration_test/integration_test_generator.rb ${RUBY_SITELIBDIR}/rails_generator/generators/components/integration_test/templates/integration_test.rb ${RUBY_SITELIBDIR}/rails_generator/generators/components/mailer/USAGE ${RUBY_SITELIBDIR}/rails_generator/generators/components/mailer/mailer_generator.rb +${RUBY_SITELIBDIR}/rails_generator/generators/components/mailer/templates/fixture.erb ${RUBY_SITELIBDIR}/rails_generator/generators/components/mailer/templates/fixture.rhtml ${RUBY_SITELIBDIR}/rails_generator/generators/components/mailer/templates/mailer.rb ${RUBY_SITELIBDIR}/rails_generator/generators/components/mailer/templates/unit_test.rb +${RUBY_SITELIBDIR}/rails_generator/generators/components/mailer/templates/view.erb ${RUBY_SITELIBDIR}/rails_generator/generators/components/mailer/templates/view.rhtml ${RUBY_SITELIBDIR}/rails_generator/generators/components/migration/USAGE ${RUBY_SITELIBDIR}/rails_generator/generators/components/migration/migration_generator.rb @@ -69,6 +71,7 @@ ${RUBY_SITELIBDIR}/rails_generator/generators/components/observer/templates/obse ${RUBY_SITELIBDIR}/rails_generator/generators/components/observer/templates/unit_test.rb ${RUBY_SITELIBDIR}/rails_generator/generators/components/plugin/USAGE ${RUBY_SITELIBDIR}/rails_generator/generators/components/plugin/plugin_generator.rb +${RUBY_SITELIBDIR}/rails_generator/generators/components/plugin/templates/MIT-LICENSE ${RUBY_SITELIBDIR}/rails_generator/generators/components/plugin/templates/README ${RUBY_SITELIBDIR}/rails_generator/generators/components/plugin/templates/Rakefile ${RUBY_SITELIBDIR}/rails_generator/generators/components/plugin/templates/USAGE @@ -79,51 +82,25 @@ ${RUBY_SITELIBDIR}/rails_generator/generators/components/plugin/templates/plugin ${RUBY_SITELIBDIR}/rails_generator/generators/components/plugin/templates/tasks.rake ${RUBY_SITELIBDIR}/rails_generator/generators/components/plugin/templates/uninstall.rb ${RUBY_SITELIBDIR}/rails_generator/generators/components/plugin/templates/unit_test.rb +${RUBY_SITELIBDIR}/rails_generator/generators/components/resource/USAGE ${RUBY_SITELIBDIR}/rails_generator/generators/components/resource/resource_generator.rb -${RUBY_SITELIBDIR}/rails_generator/generators/components/resource/templates/USAGE ${RUBY_SITELIBDIR}/rails_generator/generators/components/resource/templates/controller.rb -${RUBY_SITELIBDIR}/rails_generator/generators/components/resource/templates/fixtures.yml ${RUBY_SITELIBDIR}/rails_generator/generators/components/resource/templates/functional_test.rb ${RUBY_SITELIBDIR}/rails_generator/generators/components/resource/templates/helper.rb -${RUBY_SITELIBDIR}/rails_generator/generators/components/resource/templates/migration.rb -${RUBY_SITELIBDIR}/rails_generator/generators/components/resource/templates/model.rb -${RUBY_SITELIBDIR}/rails_generator/generators/components/resource/templates/unit_test.rb ${RUBY_SITELIBDIR}/rails_generator/generators/components/scaffold/USAGE ${RUBY_SITELIBDIR}/rails_generator/generators/components/scaffold/scaffold_generator.rb ${RUBY_SITELIBDIR}/rails_generator/generators/components/scaffold/templates/controller.rb -${RUBY_SITELIBDIR}/rails_generator/generators/components/scaffold/templates/form.rhtml -${RUBY_SITELIBDIR}/rails_generator/generators/components/scaffold/templates/form_scaffolding.rhtml ${RUBY_SITELIBDIR}/rails_generator/generators/components/scaffold/templates/functional_test.rb ${RUBY_SITELIBDIR}/rails_generator/generators/components/scaffold/templates/helper.rb -${RUBY_SITELIBDIR}/rails_generator/generators/components/scaffold/templates/layout.rhtml +${RUBY_SITELIBDIR}/rails_generator/generators/components/scaffold/templates/layout.html.erb ${RUBY_SITELIBDIR}/rails_generator/generators/components/scaffold/templates/style.css -${RUBY_SITELIBDIR}/rails_generator/generators/components/scaffold/templates/view_edit.rhtml -${RUBY_SITELIBDIR}/rails_generator/generators/components/scaffold/templates/view_list.rhtml -${RUBY_SITELIBDIR}/rails_generator/generators/components/scaffold/templates/view_new.rhtml -${RUBY_SITELIBDIR}/rails_generator/generators/components/scaffold/templates/view_show.rhtml -${RUBY_SITELIBDIR}/rails_generator/generators/components/scaffold_resource/USAGE -${RUBY_SITELIBDIR}/rails_generator/generators/components/scaffold_resource/scaffold_resource_generator.rb -${RUBY_SITELIBDIR}/rails_generator/generators/components/scaffold_resource/templates/controller.rb -${RUBY_SITELIBDIR}/rails_generator/generators/components/scaffold_resource/templates/fixtures.yml -${RUBY_SITELIBDIR}/rails_generator/generators/components/scaffold_resource/templates/functional_test.rb -${RUBY_SITELIBDIR}/rails_generator/generators/components/scaffold_resource/templates/helper.rb -${RUBY_SITELIBDIR}/rails_generator/generators/components/scaffold_resource/templates/layout.rhtml -${RUBY_SITELIBDIR}/rails_generator/generators/components/scaffold_resource/templates/migration.rb -${RUBY_SITELIBDIR}/rails_generator/generators/components/scaffold_resource/templates/model.rb -${RUBY_SITELIBDIR}/rails_generator/generators/components/scaffold_resource/templates/style.css -${RUBY_SITELIBDIR}/rails_generator/generators/components/scaffold_resource/templates/unit_test.rb -${RUBY_SITELIBDIR}/rails_generator/generators/components/scaffold_resource/templates/view_edit.rhtml -${RUBY_SITELIBDIR}/rails_generator/generators/components/scaffold_resource/templates/view_index.rhtml -${RUBY_SITELIBDIR}/rails_generator/generators/components/scaffold_resource/templates/view_new.rhtml -${RUBY_SITELIBDIR}/rails_generator/generators/components/scaffold_resource/templates/view_show.rhtml +${RUBY_SITELIBDIR}/rails_generator/generators/components/scaffold/templates/view_edit.html.erb +${RUBY_SITELIBDIR}/rails_generator/generators/components/scaffold/templates/view_index.html.erb +${RUBY_SITELIBDIR}/rails_generator/generators/components/scaffold/templates/view_new.html.erb +${RUBY_SITELIBDIR}/rails_generator/generators/components/scaffold/templates/view_show.html.erb ${RUBY_SITELIBDIR}/rails_generator/generators/components/session_migration/USAGE ${RUBY_SITELIBDIR}/rails_generator/generators/components/session_migration/session_migration_generator.rb ${RUBY_SITELIBDIR}/rails_generator/generators/components/session_migration/templates/migration.rb -${RUBY_SITELIBDIR}/rails_generator/generators/components/web_service/USAGE -${RUBY_SITELIBDIR}/rails_generator/generators/components/web_service/templates/api_definition.rb -${RUBY_SITELIBDIR}/rails_generator/generators/components/web_service/templates/controller.rb -${RUBY_SITELIBDIR}/rails_generator/generators/components/web_service/templates/functional_test.rb -${RUBY_SITELIBDIR}/rails_generator/generators/components/web_service/web_service_generator.rb ${RUBY_SITELIBDIR}/rails_generator/lookup.rb ${RUBY_SITELIBDIR}/rails_generator/manifest.rb ${RUBY_SITELIBDIR}/rails_generator/options.rb @@ -131,17 +108,19 @@ ${RUBY_SITELIBDIR}/rails_generator/scripts.rb ${RUBY_SITELIBDIR}/rails_generator/scripts/destroy.rb ${RUBY_SITELIBDIR}/rails_generator/scripts/generate.rb ${RUBY_SITELIBDIR}/rails_generator/scripts/update.rb +${RUBY_SITELIBDIR}/rails_generator/secret_key_generator.rb ${RUBY_SITELIBDIR}/rails_generator/simple_logger.rb ${RUBY_SITELIBDIR}/rails_generator/spec.rb ${RUBY_SITELIBDIR}/railties_path.rb ${RUBY_SITELIBDIR}/ruby_version_check.rb ${RUBY_SITELIBDIR}/rubyprof_ext.rb +${RUBY_SITELIBDIR}/source_annotation_extractor.rb +${RUBY_SITELIBDIR}/tasks/annotations.rake ${RUBY_SITELIBDIR}/tasks/databases.rake ${RUBY_SITELIBDIR}/tasks/documentation.rake ${RUBY_SITELIBDIR}/tasks/framework.rake ${RUBY_SITELIBDIR}/tasks/log.rake ${RUBY_SITELIBDIR}/tasks/misc.rake -${RUBY_SITELIBDIR}/tasks/pre_namespace_aliases.rake ${RUBY_SITELIBDIR}/tasks/rails.rb ${RUBY_SITELIBDIR}/tasks/routes.rake ${RUBY_SITELIBDIR}/tasks/statistics.rake @@ -153,12 +132,12 @@ share/rails/CHANGELOG share/rails/MIT-LICENSE share/rails/README share/rails/bin/about -share/rails/bin/breakpointer share/rails/bin/console share/rails/bin/destroy share/rails/bin/generate share/rails/bin/performance/benchmarker share/rails/bin/performance/profiler +share/rails/bin/performance/request share/rails/bin/plugin share/rails/bin/process/inspector share/rails/bin/process/reaper @@ -178,6 +157,8 @@ share/rails/configs/databases/postgresql.yml share/rails/configs/databases/sqlite2.yml share/rails/configs/databases/sqlite3.yml share/rails/configs/empty.log +share/rails/configs/initializers/inflections.rb +share/rails/configs/initializers/mime_types.rb share/rails/configs/lighttpd.conf share/rails/configs/routes.rb share/rails/dispatches/dispatch.fcgi @@ -194,6 +175,7 @@ share/rails/helpers/application.rb share/rails/helpers/application_helper.rb share/rails/helpers/test_helper.rb share/rails/html/404.html +share/rails/html/422.html share/rails/html/500.html share/rails/html/favicon.ico share/rails/html/images/rails.png @@ -211,6 +193,7 @@ share/rails/html/robots.txt @dirrm share/rails/environments @dirrm share/rails/doc @dirrm share/rails/dispatches +@dirrm share/rails/configs/initializers @dirrm share/rails/configs/databases @dirrm share/rails/configs @dirrm share/rails/builtin/rails_info/rails @@ -222,12 +205,11 @@ share/rails/html/robots.txt @dirrm share/rails @dirrm ${RUBY_SITELIBDIR}/tasks @dirrm ${RUBY_SITELIBDIR}/rails_generator/scripts +@exec ${MKDIR} %D/lib/ruby/site_ruby/1.8/rails_generator/generators/components/web_service/templates @dirrm ${RUBY_SITELIBDIR}/rails_generator/generators/components/web_service/templates @dirrm ${RUBY_SITELIBDIR}/rails_generator/generators/components/web_service @dirrm ${RUBY_SITELIBDIR}/rails_generator/generators/components/session_migration/templates @dirrm ${RUBY_SITELIBDIR}/rails_generator/generators/components/session_migration -@dirrm ${RUBY_SITELIBDIR}/rails_generator/generators/components/scaffold_resource/templates -@dirrm ${RUBY_SITELIBDIR}/rails_generator/generators/components/scaffold_resource @dirrm ${RUBY_SITELIBDIR}/rails_generator/generators/components/scaffold/templates @dirrm ${RUBY_SITELIBDIR}/rails_generator/generators/components/scaffold @dirrm ${RUBY_SITELIBDIR}/rails_generator/generators/components/resource/templates @@ -251,6 +233,7 @@ share/rails/html/robots.txt @dirrm ${RUBY_SITELIBDIR}/rails_generator/generators/applications @dirrm ${RUBY_SITELIBDIR}/rails_generator/generators @dirrm ${RUBY_SITELIBDIR}/rails_generator +@dirrm ${RUBY_SITELIBDIR}/rails/plugin @dirrm ${RUBY_SITELIBDIR}/rails @dirrm ${RUBY_SITELIBDIR}/commands/servers @dirrm ${RUBY_SITELIBDIR}/commands/process diff --git a/www/rails/distinfo b/www/rails/distinfo index c89689d78b3..409666ea51b 100644 --- a/www/rails/distinfo +++ b/www/rails/distinfo @@ -1,7 +1,8 @@ -$NetBSD: distinfo,v 1.6 2007/12/10 05:24:01 minskim Exp $ +$NetBSD: distinfo,v 1.7 2008/02/09 06:31:59 minskim Exp $ -SHA1 (rails-1.2.6.tgz) = 1cde28b8ed4a930637c830b3408c9f844928f8a8 -RMD160 (rails-1.2.6.tgz) = c36419e2c3d2cb74bf50ab5da6cef3e761e11281 -Size (rails-1.2.6.tgz) = 8332143 bytes -SHA1 (patch-aa) = 7a3d4f4b435c0de22f00f665092ccff046387170 -SHA1 (patch-ab) = 46e835f687d88436ee011d5a0134637ae05f3180 +SHA1 (rails-2.0.2.tgz) = 0c24eb2c7b2359a0bdd6c615d0d9586b547acbcb +RMD160 (rails-2.0.2.tgz) = a5c6f0ad6f94818b60155807574a2bdbdc6ddf41 +Size (rails-2.0.2.tgz) = 9106857 bytes +SHA1 (patch-aa) = 53cfcd759ca40e73ef23e98fcd69851be20491df +SHA1 (patch-ab) = 2b65f52a521b6499fce2d1279382acb6fa09b85e +SHA1 (patch-ac) = 747f4ec91766930210bcb251c254f0296e836cc5 diff --git a/www/rails/patches/patch-aa b/www/rails/patches/patch-aa index 17de08a022d..c80bac3da01 100644 --- a/www/rails/patches/patch-aa +++ b/www/rails/patches/patch-aa @@ -1,6 +1,6 @@ -$NetBSD: patch-aa,v 1.1.1.1 2006/10/12 08:36:22 minskim Exp $ +$NetBSD: patch-aa,v 1.2 2008/02/09 06:31:59 minskim Exp $ ---- bin/rails.orig 2006-08-10 10:34:33.000000000 -0700 +--- bin/rails.orig 2007-12-16 17:05:17.000000000 -0800 +++ bin/rails @@ -1,7 +1,8 @@ -require File.dirname(__FILE__) + '/../lib/ruby_version_check' @@ -13,7 +13,7 @@ $NetBSD: patch-aa,v 1.1.1.1 2006/10/12 08:36:22 minskim Exp $ if %w(--version -v).include? ARGV.first puts "Rails #{Rails::VERSION::STRING}" exit(0) -@@ -10,7 +11,7 @@ end +@@ -10,10 +11,10 @@ end freeze = ARGV.any? { |option| %w(--freeze -f).include?(option) } app_path = ARGV.first @@ -22,3 +22,8 @@ $NetBSD: patch-aa,v 1.1.1.1 2006/10/12 08:36:22 minskim Exp $ require 'rails_generator/scripts/generate' Rails::Generator::Base.use_application_sources! + Rails::Generator::Scripts::Generate.new.run(ARGV, :generator => 'app') + +-Dir.chdir(app_path) { `rake rails:freeze:gems`; puts "froze" } if freeze +\ No newline at end of file ++Dir.chdir(app_path) { `rake rails:freeze:gems`; puts "froze" } if freeze diff --git a/www/rails/patches/patch-ab b/www/rails/patches/patch-ab index 091b7ec8ae4..6f741cb840d 100644 --- a/www/rails/patches/patch-ab +++ b/www/rails/patches/patch-ab @@ -1,39 +1,86 @@ -$NetBSD: patch-ab,v 1.4 2007/10/16 04:03:43 minskim Exp $ +$NetBSD: patch-ab,v 1.5 2008/02/09 06:31:59 minskim Exp $ ---- environments/boot.rb.orig 2007-10-12 09:35:07.000000000 -0700 +--- environments/boot.rb.orig 2007-12-16 17:05:17.000000000 -0800 +++ environments/boot.rb -@@ -6,33 +6,7 @@ unless defined?(Rails::Initializer) - if File.directory?("#{RAILS_ROOT}/vendor/rails") - require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer" - else -- require 'rubygems' -- -- rails_gem_version = -- if defined? RAILS_GEM_VERSION -- RAILS_GEM_VERSION +@@ -8,7 +8,7 @@ module Rails + def boot! + unless booted? + preinitialize +- pick_boot.run ++ Boot.new.run + end + end + +@@ -36,71 +36,8 @@ module Rails + + class Boot + def run +- load_initializer +- Rails::Initializer.run(:set_load_path) +- end +- end +- +- class VendorBoot < Boot +- def load_initializer +- require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer" +- end +- end +- +- class GemBoot < Boot +- def load_initializer +- self.class.load_rubygems +- load_rails_gem + require 'initializer' +- end +- +- def load_rails_gem +- if version = self.class.gem_version +- gem 'rails', version - else -- File.read("#{File.dirname(__FILE__)}/environment.rb") =~ /^[^#]*RAILS_GEM_VERSION\s+=\s+'([\d.]+)'/ -- $1 +- gem 'rails' +- end +- rescue Gem::LoadError => load_error +- $stderr.puts %(Missing the Rails #{version} gem. Please `gem install -v=#{version} rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.) +- exit 1 +- end +- +- class << self +- def rubygems_version +- Gem::RubyGemsVersion if defined? Gem::RubyGemsVersion - end - -- if rails_gem_version -- rails_gem = Gem.cache.search('rails', "=#{rails_gem_version}.0").sort_by { |g| g.version.version }.last +- def gem_version +- if defined? RAILS_GEM_VERSION +- RAILS_GEM_VERSION +- elsif ENV.include?('RAILS_GEM_VERSION') +- ENV['RAILS_GEM_VERSION'] +- else +- parse_gem_version(read_environment_rb) +- end +- end - -- if rails_gem -- gem "rails", "=#{rails_gem.version.version}" -- require rails_gem.full_gem_path + '/lib/initializer' -- else -- STDERR.puts %(Cannot find gem for Rails =#{rails_gem_version}.0: -- Install the missing gem with 'gem install -v=#{rails_gem_version} rails', or -- change environment.rb to define RAILS_GEM_VERSION with your desired version. -- ) +- def load_rubygems +- require 'rubygems' +- +- unless rubygems_version >= '0.9.4' +- $stderr.puts %(Rails requires RubyGems >= 0.9.4 (you have #{rubygems_version}). Please `gem update --system` and try again.) +- exit 1 +- end +- +- rescue LoadError +- $stderr.puts %(Rails requires RubyGems >= 0.9.4. Please install RubyGems and try again: http://rubygems.rubyforge.org) - exit 1 - end -- else -- gem "rails" -- require 'initializer' -- end -+ require 'initializer' +- +- def parse_gem_version(text) +- $1 if text =~ /^[^#]*RAILS_GEM_VERSION\s*=\s*["']([!~<>=]*\s*[\d.]+)["']/ +- end +- +- private +- def read_environment_rb +- File.read("#{RAILS_ROOT}/config/environment.rb") +- end ++ Rails::Initializer.run(:set_load_path) + end end - - Rails::Initializer.run(:set_load_path) + end diff --git a/www/rails/patches/patch-ac b/www/rails/patches/patch-ac new file mode 100644 index 00000000000..623cf355db9 --- /dev/null +++ b/www/rails/patches/patch-ac @@ -0,0 +1,14 @@ +$NetBSD: patch-ac,v 1.1 2008/02/09 06:31:59 minskim Exp $ + +--- lib/rails_generator.rb.orig 2008-02-08 22:01:52.000000000 -0800 ++++ lib/rails_generator.rb +@@ -26,9 +26,6 @@ $:.unshift(File.dirname(__FILE__) + "/.. + + begin + require 'active_support' +-rescue LoadError +- require 'rubygems' +- gem 'activesupport' + end + + require 'rails_generator/base' |