diff options
author | Carlhuda <carlhuda@Carlhudas-iMac.local> | 2009-11-30 16:46:09 -0800 |
---|---|---|
committer | Carlhuda <carlhuda@engineyard.com> | 2009-12-02 11:35:47 -0800 |
commit | 8ff310aef4e7ed424429059d10e3af0f169323fb (patch) | |
tree | 88e27c97d9e3adbc91c875f372bbcd0b01fa122d | |
parent | abfc4dad3ebb17eccd32d1f1eb8a3e9c0f6e6e4e (diff) | |
download | rails-8ff310aef4e7ed424429059d10e3af0f169323fb.tar.gz rails-8ff310aef4e7ed424429059d10e3af0f169323fb.tar.bz2 rails-8ff310aef4e7ed424429059d10e3af0f169323fb.zip |
Break up rails and railties:
* rails is now a metagem (gem install rails works as it does now)
* railties includes the glue layer, so you can easily declare dependencies
on railties, actionpack, and actionmailer and not get ActiveRecord's rake
tasks, initializers, etc.
-rw-r--r-- | .gitmodules | 3 | ||||
-rw-r--r-- | Rakefile | 15 | ||||
m--------- | rack | 0 | ||||
-rw-r--r-- | rails.gemspec (renamed from railties/rails.gemspec) | 12 | ||||
-rw-r--r-- | railties/Rakefile | 4 | ||||
-rw-r--r-- | railties/railties.gemspec | 28 |
6 files changed, 49 insertions, 13 deletions
diff --git a/.gitmodules b/.gitmodules index fd4fd34d3e..d0be7ff194 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "arel"] path = arel url = git://github.com/rails/arel.git +[submodule "rack"] + path = rack + url = git://github.com/rails/rack.git @@ -1,9 +1,10 @@ require 'rake' require 'rake/rdoctask' +require 'rake/gempackagetask' env = %(PKG_BUILD="#{ENV['PKG_BUILD']}") if ENV['PKG_BUILD'] -PROJECTS = %w(activesupport actionpack actionmailer activeresource activerecord activemodel railties) +PROJECTS = %w(activesupport activemodel actionpack actionmailer activeresource activerecord railties) Dir["#{File.dirname(__FILE__)}/*/lib/*/version.rb"].each do |version_path| require version_path @@ -23,11 +24,21 @@ task :default => %w(test test:isolated) end end +spec = eval(File.read('rails.gemspec')) + +Rake::GemPackageTask.new(spec) do |pkg| + pkg.gem_spec = spec +end + task :install => :gem do + system %(cd arel && gem build arel.gemspec && gem install arel-0.2.pre.gem --no-ri --no-rdoc --ignore-dependencies) + system %(cd rack && rake gem VERSION=1.0.2.pre && gem install rack-1.0.2.pre.gem --no-ri --no-rdoc --ignore-dependencies) (PROJECTS - ["railties"]).each do |project| + puts "INSTALLING #{project}" system("gem install #{project}/pkg/#{project}-#{ActionPack::VERSION::STRING}.gem --no-ri --no-rdoc") end - system("gem install railties/pkg/rails-#{ActionPack::VERSION::STRING}.gem --no-ri --no-rdoc") + system("gem install railties/pkg/railties-#{ActionPack::VERSION::STRING}.gem --no-ri --no-rdoc") + system("gem install pkg/rails-#{ActionPack::VERSION::STRING}.gem --no-ri --no-rdoc") end desc "Generate documentation for the Rails framework" diff --git a/rack b/rack new file mode 160000 +Subproject adf996587aecdd604eff441b8b69e4c47a8c261 diff --git a/railties/rails.gemspec b/rails.gemspec index dc66e1efea..878a342903 100644 --- a/railties/rails.gemspec +++ b/rails.gemspec @@ -8,22 +8,16 @@ Gem::Specification.new do |s| on top of either MySQL, PostgreSQL, SQLite, DB2, SQL Server, or Oracle with eRuby- or Builder-based templates. EOF - s.add_dependency('rake', '>= 0.8.3') s.add_dependency('activesupport', '= 3.0.pre') - s.add_dependency('activerecord', '= 3.0.pre') s.add_dependency('actionpack', '= 3.0.pre') - s.add_dependency('actionmailer', '= 3.0.pre') + s.add_dependency('activerecord', '= 3.0.pre') s.add_dependency('activeresource', '= 3.0.pre') + s.add_dependency('actionmailer', '= 3.0.pre') + s.add_dependency('railties', '= 3.0.pre') s.rdoc_options << '--exclude' << '.' s.has_rdoc = false - s.files = Dir['CHANGELOG', 'README', 'bin/**/*', 'builtin/**/*', 'guides/**/*', 'lib/**/{*,.[a-z]*}'] - s.require_path = 'lib' - s.bindir = "bin" - s.executables = ["rails"] - s.default_executable = "rails" - s.author = "David Heinemeier Hansson" s.email = "david@loudthinking.com" s.homepage = "http://www.rubyonrails.org" diff --git a/railties/Rakefile b/railties/Rakefile index e6f698fc74..cb482c90bf 100644 --- a/railties/Rakefile +++ b/railties/Rakefile @@ -10,7 +10,7 @@ $LOAD_PATH.unshift "#{File.dirname(__FILE__)}/lib" require 'rails/version' PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : '' -PKG_NAME = ENV['PKG_NAME'] || 'rails' +PKG_NAME = ENV['PKG_NAME'] || 'railties' PKG_VERSION = Rails::VERSION::STRING + PKG_BUILD PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}" PKG_DESTINATION = ENV["RAILS_PKG_DESTINATION"] || "../#{PKG_NAME}" @@ -141,7 +141,7 @@ Rake::RDocTask.new { |rdoc| # Generate GEM ---------------------------------------------------------------------------- -spec = eval(File.read('rails.gemspec')) +spec = eval(File.read('railties.gemspec')) Rake::GemPackageTask.new(spec) do |pkg| pkg.gem_spec = spec diff --git a/railties/railties.gemspec b/railties/railties.gemspec new file mode 100644 index 0000000000..a060c3c301 --- /dev/null +++ b/railties/railties.gemspec @@ -0,0 +1,28 @@ +Gem::Specification.new do |s| + s.platform = Gem::Platform::RUBY + s.name = 'railties' + s.version = '3.0.pre' + s.summary = "Controls boot-up, rake tasks and generators for the Rails framework." + s.description = <<-EOF + Rails is a framework for building web-application using CGI, FCGI, mod_ruby, or WEBrick + on top of either MySQL, PostgreSQL, SQLite, DB2, SQL Server, or Oracle with eRuby- or Builder-based templates. + EOF + + s.add_dependency('rake', '>= 0.8.3') + s.add_dependency('activesupport', '= 3.0.pre') + s.add_dependency('actionpack', '= 3.0.pre') + + s.rdoc_options << '--exclude' << '.' + s.has_rdoc = false + + s.files = Dir['CHANGELOG', 'README', 'bin/**/*', 'builtin/**/*', 'guides/**/*', 'lib/**/{*,.[a-z]*}'] + s.require_path = 'lib' + s.bindir = "bin" + s.executables = ["rails"] + s.default_executable = "rails" + + s.author = "David Heinemeier Hansson" + s.email = "david@loudthinking.com" + s.homepage = "http://www.rubyonrails.org" + s.rubyforge_project = "rails" +end |