Read Rails version from a file instead of modifying the load path and doing requires

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
This commit is contained in:
Bryan Helmkamp 2010-03-04 22:41:39 -05:00 committed by Jeremy Kemper
parent 46bf2f04a8
commit deb00bcb8c
10 changed files with 39 additions and 49 deletions

1
RAILS_VERSION Normal file

@ -0,0 +1 @@
3.0.0.beta1

@ -3,15 +3,6 @@ require 'rake/rdoctask'
require 'rake/gempackagetask'
PROJECTS = %w(activesupport activemodel actionpack actionmailer activeresource activerecord railties)
PROJECTS.each { |project| $:.unshift "#{project}/lib" }
require "active_support/version"
require "active_model/version"
require "action_pack/version"
require "action_mailer/version"
require "active_resource/version"
require "active_record/version"
require "rails/version"
desc 'Run all tests by default'
task :default => %w(test test:isolated)
@ -130,6 +121,12 @@ task :pdoc => :rdoc do
end
task :update_versions do
require File.dirname(__FILE__) + "/version"
File.open("RAILS_VERSION", "w") do |f|
f.write Rails::VERSION::STRING + "\n"
end
constants = {
"activesupport" => "ActiveSupport",
"activemodel" => "ActiveModel",

@ -1,10 +1,9 @@
$:.unshift "lib"
require "action_mailer/version"
version = File.read("../RAILS_VERSION").strip
Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY
s.name = 'actionmailer'
s.version = ActionMailer::VERSION::STRING
s.version = version
s.summary = 'Email composition, delivery, and receiving framework (part of Rails).'
s.description = 'Email on Rails. Compose, deliver, receive, and test emails using the familiar controller/view pattern. First-class support for multipart email and attachments.'
s.required_ruby_version = '>= 1.8.7'
@ -20,7 +19,7 @@
s.has_rdoc = true
s.add_dependency('actionpack', "= #{ActionMailer::VERSION::STRING}")
s.add_dependency('actionpack', version)
s.add_dependency('mail', '~> 2.1.3')
s.add_dependency('text-format', '~> 1.0.0')
end

@ -1,10 +1,9 @@
$:.unshift "lib"
require "action_pack/version"
version = File.read("../RAILS_VERSION").strip
Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY
s.name = 'actionpack'
s.version = ActionPack::VERSION::STRING
s.version = version
s.summary = 'Web-flow and rendering framework putting the VC in MVC (part of Rails).'
s.description = 'Web apps on Rails. Simple, battle-tested conventions for building and testing MVC web applications. Works with any Rack-compatible server.'
s.required_ruby_version = '>= 1.8.7'
@ -20,8 +19,8 @@
s.has_rdoc = true
s.add_dependency('activesupport', "= #{ActionPack::VERSION::STRING}")
s.add_dependency('activemodel', "= #{ActionPack::VERSION::STRING}")
s.add_dependency('activesupport', version)
s.add_dependency('activemodel', version)
s.add_dependency('rack', '~> 1.1.0')
s.add_dependency('rack-test', '~> 0.5.0')
s.add_dependency('rack-mount', '~> 0.5.1')

@ -1,10 +1,9 @@
$:.unshift "lib"
require "active_model/version"
version = File.read("../RAILS_VERSION").strip
Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY
s.name = 'activemodel'
s.version = ActiveModel::VERSION::STRING
s.version = version
s.summary = 'A toolkit for building modeling frameworks (part of Rails).'
s.description = 'A toolkit for building modeling frameworks like Active Record and Active Resource. Rich support for attributes, callbacks, validations, observers, serialization, internationalization, and testing.'
s.required_ruby_version = '>= 1.8.7'
@ -16,7 +15,7 @@
s.has_rdoc = true
s.add_dependency('activesupport', "= #{ActiveModel::VERSION::STRING}")
s.add_dependency('activesupport', version)
s.require_path = 'lib'
s.files = Dir["CHANGELOG", "MIT-LICENSE", "README", "lib/**/*"]

@ -1,10 +1,9 @@
$:.unshift "lib"
require "active_record/version"
version = File.read("../RAILS_VERSION").strip
Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY
s.name = 'activerecord'
s.version = ActiveRecord::VERSION::STRING
s.version = version
s.summary = 'Object-relational mapper framework (part of Rails).'
s.description = 'Databases on Rails. Build a persistent domain model by mapping database tables to Ruby classes. Strong conventions for associations, validations, aggregations, migrations, and testing come baked-in.'
s.required_ruby_version = '>= 1.8.7'
@ -21,7 +20,7 @@
s.extra_rdoc_files = %w( README )
s.rdoc_options.concat ['--main', 'README']
s.add_dependency('activesupport', "= #{ActiveRecord::VERSION::STRING}")
s.add_dependency('activemodel', "= #{ActiveRecord::VERSION::STRING}")
s.add_dependency('activesupport', version)
s.add_dependency('activemodel', version)
s.add_dependency('arel', '~> 0.2.1')
end

@ -1,10 +1,9 @@
$:.unshift "lib"
require "active_resource/version"
version = File.read("../RAILS_VERSION").strip
Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY
s.name = 'activeresource'
s.version = ActiveResource::VERSION::STRING
s.version = version
s.summary = 'REST modeling framework (part of Rails).'
s.description = 'REST on Rails. Wrap your RESTful web app with Ruby classes and work with them like Active Record models.'
s.required_ruby_version = '>= 1.8.7'
@ -21,6 +20,6 @@
s.extra_rdoc_files = %w( README )
s.rdoc_options.concat ['--main', 'README']
s.add_dependency('activesupport', "= #{ActiveResource::VERSION::STRING}")
s.add_dependency('activemodel', "= #{ActiveResource::VERSION::STRING}")
s.add_dependency('activesupport', version)
s.add_dependency('activemodel', version)
end

@ -1,10 +1,9 @@
$:.unshift "lib"
require "active_support/version"
version = File.read("../RAILS_VERSION").strip
Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY
s.name = 'activesupport'
s.version = ActiveSupport::VERSION::STRING
s.version = version
s.summary = 'A toolkit of support libraries and Ruby core extensions extracted from the Rails framework.'
s.description = 'A toolkit of support libraries and Ruby core extensions extracted from the Rails framework. Rich support for multibyte strings, internationalization, time zones, and testing.'
s.required_ruby_version = '>= 1.8.7'

@ -1,10 +1,9 @@
$:.unshift "railties/lib"
require "rails/version"
version = File.read("RAILS_VERSION").strip
Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY
s.name = 'rails'
s.version = Rails::VERSION::STRING
s.version = version
s.summary = 'Full-stack web application framework.'
s.description = 'Ruby on Rails is a full-stack web framework optimized for programmer happiness and sustainable productivity. It encourages beautiful code by favoring convention over configuration.'
s.required_ruby_version = '>= 1.8.7'
@ -17,11 +16,11 @@
s.files = []
s.require_path = []
s.add_dependency('activesupport', "= #{Rails::VERSION::STRING}")
s.add_dependency('actionpack', "= #{Rails::VERSION::STRING}")
s.add_dependency('activerecord', "= #{Rails::VERSION::STRING}")
s.add_dependency('activeresource', "= #{Rails::VERSION::STRING}")
s.add_dependency('actionmailer', "= #{Rails::VERSION::STRING}")
s.add_dependency('railties', "= #{Rails::VERSION::STRING}")
s.add_dependency('activesupport', version)
s.add_dependency('actionpack', version)
s.add_dependency('activerecord', version)
s.add_dependency('activeresource', version)
s.add_dependency('actionmailer', version)
s.add_dependency('railties', version)
s.add_dependency('bundler', '>= 0.9.8')
end

@ -1,10 +1,9 @@
$:.unshift "lib"
require "rails/version"
version = File.read("../RAILS_VERSION").strip
Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY
s.name = 'railties'
s.version = Rails::VERSION::STRING
s.version = version
s.summary = 'Tools for creating, working with, and running Rails applications.'
s.description = 'Rails internals: application bootup, plugins, generators, and rake tasks.'
s.required_ruby_version = '>= 1.8.7'
@ -25,6 +24,6 @@
s.add_dependency('rake', '>= 0.8.3')
s.add_dependency('thor', '~> 0.13.4')
s.add_dependency('activesupport', "= #{Rails::VERSION::STRING}")
s.add_dependency('actionpack', "= #{Rails::VERSION::STRING}")
s.add_dependency('activesupport', version)
s.add_dependency('actionpack', version)
end