Permalink
Browse files

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.
  • Loading branch information...
1 parent abfc4da commit 8ff310aef4e7ed424429059d10e3af0f169323fb Carlhuda committed with Carlhuda Dec 1, 2009
Showing with 50 additions and 13 deletions.
  1. +3 −0 .gitmodules
  2. +13 −2 Rakefile
  3. +1 −0 rack
  4. +3 −9 {railties → }/rails.gemspec
  5. +2 −2 railties/Rakefile
  6. +28 −0 railties/railties.gemspec
View
@@ -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
View
@@ -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"
1 rack
Submodule rack added at adf996
@@ -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"
View
@@ -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
View
@@ -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

0 comments on commit 8ff310a

Please sign in to comment.