1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Leverage VERSION constants from gemspecs to avoid tedious updates when releasing

This commit is contained in:
Bryan Helmkamp 2010-03-01 23:36:54 -05:00
parent a4111bbca0
commit f221a6f19f
17 changed files with 57 additions and 39 deletions

View file

@ -3,10 +3,15 @@ require 'rake/rdoctask'
require 'rake/gempackagetask' require 'rake/gempackagetask'
PROJECTS = %w(activesupport activemodel actionpack actionmailer activeresource activerecord railties) PROJECTS = %w(activesupport activemodel actionpack actionmailer activeresource activerecord railties)
PROJECTS.each { |project| $:.unshift "#{project}/lib" }
Dir["#{File.dirname(__FILE__)}/*/lib/*/version.rb"].each do |version_path| require "active_support/version"
require version_path require "active_model/version"
end 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' desc 'Run all tests by default'
task :default => %w(test test:isolated) task :default => %w(test test:isolated)

View file

@ -4,7 +4,6 @@ require 'rake/testtask'
require 'rake/rdoctask' require 'rake/rdoctask'
require 'rake/packagetask' require 'rake/packagetask'
require 'rake/gempackagetask' require 'rake/gempackagetask'
require File.join(File.dirname(__FILE__), 'lib', 'action_mailer', 'version')
desc "Default Task" desc "Default Task"
task :default => [ :test ] task :default => [ :test ]

View file

@ -1,7 +1,10 @@
$:.unshift "lib"
require "action_mailer/version"
Gem::Specification.new do |s| Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY s.platform = Gem::Platform::RUBY
s.name = 'actionmailer' s.name = 'actionmailer'
s.version = '3.0.0.beta1' s.version = ActionMailer::VERSION::STRING
s.summary = 'Email composition, delivery, and recieval framework (part of Rails).' s.summary = 'Email composition, delivery, and recieval framework (part of Rails).'
s.description = 'Email composition, delivery, and recieval framework (part of Rails).' s.description = 'Email composition, delivery, and recieval framework (part of Rails).'
s.required_ruby_version = '>= 1.8.7' s.required_ruby_version = '>= 1.8.7'
@ -17,7 +20,7 @@ Gem::Specification.new do |s|
s.has_rdoc = true s.has_rdoc = true
s.add_dependency('actionpack', '= 3.0.0.beta1') s.add_dependency('actionpack', "= #{ActionMailer::VERSION::STRING}")
s.add_dependency('mail', '~> 2.1.3') s.add_dependency('mail', '~> 2.1.3')
s.add_dependency('text-format', '~> 1.0.0') s.add_dependency('text-format', '~> 1.0.0')
end end

View file

@ -4,7 +4,6 @@ require 'rake/testtask'
require 'rake/rdoctask' require 'rake/rdoctask'
require 'rake/packagetask' require 'rake/packagetask'
require 'rake/gempackagetask' require 'rake/gempackagetask'
require File.join(File.dirname(__FILE__), 'lib', 'action_pack', 'version')
desc "Default Task" desc "Default Task"
task :default => :test task :default => :test

View file

@ -1,7 +1,10 @@
$:.unshift "lib"
require "action_pack/version"
Gem::Specification.new do |s| Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY s.platform = Gem::Platform::RUBY
s.name = 'actionpack' s.name = 'actionpack'
s.version = '3.0.0.beta1' s.version = ActionPack::VERSION::STRING
s.summary = 'Web-flow and rendering framework putting the VC in MVC (part of Rails).' s.summary = 'Web-flow and rendering framework putting the VC in MVC (part of Rails).'
s.description = 'Web-flow and rendering framework putting the VC in MVC (part of Rails).' s.description = 'Web-flow and rendering framework putting the VC in MVC (part of Rails).'
s.required_ruby_version = '>= 1.8.7' s.required_ruby_version = '>= 1.8.7'
@ -17,8 +20,8 @@ Gem::Specification.new do |s|
s.has_rdoc = true s.has_rdoc = true
s.add_dependency('activesupport', '= 3.0.0.beta1') s.add_dependency('activesupport', "= #{ActionPack::VERSION::STRING}")
s.add_dependency('activemodel', '= 3.0.0.beta1') s.add_dependency('activemodel', "= #{ActionPack::VERSION::STRING}")
s.add_dependency('rack', '~> 1.1.0') s.add_dependency('rack', '~> 1.1.0')
s.add_dependency('rack-test', '~> 0.5.0') s.add_dependency('rack-test', '~> 0.5.0')
s.add_dependency('rack-mount', '~> 0.5.1') s.add_dependency('rack-mount', '~> 0.5.1')

View file

@ -1,5 +1,4 @@
dir = File.dirname(__FILE__) dir = File.dirname(__FILE__)
require "#{dir}/lib/active_model/version"
require 'rake/testtask' require 'rake/testtask'

View file

@ -1,7 +1,10 @@
$:.unshift "lib"
require "active_model/version"
Gem::Specification.new do |s| Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY s.platform = Gem::Platform::RUBY
s.name = 'activemodel' s.name = 'activemodel'
s.version = '3.0.0.beta1' s.version = ActiveModel::VERSION::STRING
s.summary = "A toolkit for building other modeling frameworks like ActiveRecord" s.summary = "A toolkit for building other modeling frameworks like ActiveRecord"
s.description = %q{Extracts common modeling concerns from ActiveRecord to share between similar frameworks like ActiveResource.} s.description = %q{Extracts common modeling concerns from ActiveRecord to share between similar frameworks like ActiveResource.}
s.required_ruby_version = '>= 1.8.7' s.required_ruby_version = '>= 1.8.7'
@ -13,7 +16,7 @@ Gem::Specification.new do |s|
s.has_rdoc = true s.has_rdoc = true
s.add_dependency('activesupport', '= 3.0.0.beta1') s.add_dependency('activesupport', "= #{ActiveModel::VERSION::STRING}")
s.require_path = 'lib' s.require_path = 'lib'
s.files = Dir["CHANGELOG", "MIT-LICENSE", "README", "lib/**/*"] s.files = Dir["CHANGELOG", "MIT-LICENSE", "README", "lib/**/*"]

View file

@ -5,7 +5,6 @@ require 'rake/rdoctask'
require 'rake/packagetask' require 'rake/packagetask'
require 'rake/gempackagetask' require 'rake/gempackagetask'
require File.join(File.dirname(__FILE__), 'lib', 'active_record', 'version')
require File.expand_path(File.dirname(__FILE__)) + "/test/config" require File.expand_path(File.dirname(__FILE__)) + "/test/config"
MYSQL_DB_USER = 'rails' MYSQL_DB_USER = 'rails'

View file

@ -1,7 +1,10 @@
$:.unshift "lib"
require "active_record/version"
Gem::Specification.new do |s| Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY s.platform = Gem::Platform::RUBY
s.name = 'activerecord' s.name = 'activerecord'
s.version = '3.0.0.beta1' s.version = ActiveRecord::VERSION::STRING
s.summary = 'Object-relational mapper framework (part of Rails).' s.summary = 'Object-relational mapper framework (part of Rails).'
s.description = 'Object-relational mapper framework (part of Rails).' s.description = 'Object-relational mapper framework (part of Rails).'
s.required_ruby_version = '>= 1.8.7' s.required_ruby_version = '>= 1.8.7'
@ -18,7 +21,7 @@ Gem::Specification.new do |s|
s.extra_rdoc_files = %w( README ) s.extra_rdoc_files = %w( README )
s.rdoc_options.concat ['--main', 'README'] s.rdoc_options.concat ['--main', 'README']
s.add_dependency('activesupport', '= 3.0.0.beta1') s.add_dependency('activesupport', "= #{ActiveRecord::VERSION::STRING}")
s.add_dependency('activemodel', '= 3.0.0.beta1') s.add_dependency('activemodel', "= #{ActiveRecord::VERSION::STRING}")
s.add_dependency('arel', '~> 0.2.1') s.add_dependency('arel', '~> 0.2.1')
end end

View file

@ -5,8 +5,6 @@ require 'rake/rdoctask'
require 'rake/packagetask' require 'rake/packagetask'
require 'rake/gempackagetask' require 'rake/gempackagetask'
require File.join(File.dirname(__FILE__), 'lib', 'active_resource', 'version')
desc "Default Task" desc "Default Task"
task :default => [ :test ] task :default => [ :test ]

View file

@ -1,7 +1,10 @@
$:.unshift "lib"
require "active_resource/version"
Gem::Specification.new do |s| Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY s.platform = Gem::Platform::RUBY
s.name = 'activeresource' s.name = 'activeresource'
s.version = '3.0.0.beta1' s.version = ActiveResource::VERSION::STRING
s.summary = 'REST-model framework (part of Rails).' s.summary = 'REST-model framework (part of Rails).'
s.description = 'REST-model framework (part of Rails).' s.description = 'REST-model framework (part of Rails).'
s.required_ruby_version = '>= 1.8.7' s.required_ruby_version = '>= 1.8.7'
@ -18,6 +21,6 @@ Gem::Specification.new do |s|
s.extra_rdoc_files = %w( README ) s.extra_rdoc_files = %w( README )
s.rdoc_options.concat ['--main', 'README'] s.rdoc_options.concat ['--main', 'README']
s.add_dependency('activesupport', '= 3.0.0.beta1') s.add_dependency('activesupport', "= #{ActiveResource::VERSION::STRING}")
s.add_dependency('activemodel', '= 3.0.0.beta1') s.add_dependency('activemodel', "= #{ActiveResource::VERSION::STRING}")
end end

View file

@ -2,8 +2,6 @@ require 'rake/testtask'
require 'rake/rdoctask' require 'rake/rdoctask'
require 'rake/gempackagetask' require 'rake/gempackagetask'
require File.join(File.dirname(__FILE__), 'lib', 'active_support', 'version')
task :default => :test task :default => :test
Rake::TestTask.new do |t| Rake::TestTask.new do |t|
t.libs << 'test' t.libs << 'test'

View file

@ -1,7 +1,10 @@
$:.unshift "lib"
require "active_support/version"
Gem::Specification.new do |s| Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY s.platform = Gem::Platform::RUBY
s.name = 'activesupport' s.name = 'activesupport'
s.version = '3.0.0.beta1' s.version = ActiveSupport::VERSION::STRING
s.summary = 'Support and utility classes used by the Rails framework.' s.summary = 'Support and utility classes used by the Rails framework.'
s.description = 'Support and utility classes used by the Rails framework.' s.description = 'Support and utility classes used by the Rails framework.'
s.required_ruby_version = '>= 1.8.7' s.required_ruby_version = '>= 1.8.7'

View file

@ -1,7 +1,10 @@
$:.unshift "railties/lib"
require "rails/version"
Gem::Specification.new do |s| Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY s.platform = Gem::Platform::RUBY
s.name = 'rails' s.name = 'rails'
s.version = '3.0.0.beta1' s.version = Rails::VERSION::STRING
s.summary = 'Full-stack web-application framework.' s.summary = 'Full-stack web-application framework.'
s.description = 'Full-stack web-application framework.' s.description = 'Full-stack web-application framework.'
s.required_ruby_version = '>= 1.8.7' s.required_ruby_version = '>= 1.8.7'
@ -14,11 +17,11 @@ Gem::Specification.new do |s|
s.files = [] s.files = []
s.require_path = [] s.require_path = []
s.add_dependency('activesupport', '= 3.0.0.beta1') s.add_dependency('activesupport', "= #{Rails::VERSION::STRING}")
s.add_dependency('actionpack', '= 3.0.0.beta1') s.add_dependency('actionpack', "= #{Rails::VERSION::STRING}")
s.add_dependency('activerecord', '= 3.0.0.beta1') s.add_dependency('activerecord', "= #{Rails::VERSION::STRING}")
s.add_dependency('activeresource', '= 3.0.0.beta1') s.add_dependency('activeresource', "= #{Rails::VERSION::STRING}")
s.add_dependency('actionmailer', '= 3.0.0.beta1') s.add_dependency('actionmailer', "= #{Rails::VERSION::STRING}")
s.add_dependency('railties', '= 3.0.0.beta1') s.add_dependency('railties', "= #{Rails::VERSION::STRING}")
s.add_dependency('bundler', '>= 0.9.8') s.add_dependency('bundler', '>= 0.9.8')
end end

View file

@ -8,9 +8,6 @@ require 'rake/gempackagetask'
require 'date' require 'date'
require 'rbconfig' require 'rbconfig'
$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/lib"
require 'rails/version'
task :default => :test task :default => :test
task :test => 'test:isolated' task :test => 'test:isolated'

View file

@ -14,7 +14,7 @@ namespace :doc do
desc 'Generate documentation for the Rails framework. Specify path with PATH="/path/to/rails"' desc 'Generate documentation for the Rails framework. Specify path with PATH="/path/to/rails"'
Rake::RDocTask.new("rails") { |rdoc| Rake::RDocTask.new("rails") { |rdoc|
path = ENV['RAILS_PATH'] || 'vendor/gems/gems' path = ENV['RAILS_PATH'] || 'vendor/gems/gems'
version = '-3.0.0.beta1' unless ENV['RAILS_PATH'] version = "-#{Rails::VERSION::STRING}" unless ENV['RAILS_PATH']
rdoc.rdoc_dir = 'doc/api' rdoc.rdoc_dir = 'doc/api'
rdoc.template = "#{ENV['template']}.rb" if ENV['template'] rdoc.template = "#{ENV['template']}.rb" if ENV['template']
rdoc.title = "Rails Framework Documentation" rdoc.title = "Rails Framework Documentation"

View file

@ -1,7 +1,10 @@
$:.unshift "lib"
require "rails/version"
Gem::Specification.new do |s| Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY s.platform = Gem::Platform::RUBY
s.name = 'railties' s.name = 'railties'
s.version = '3.0.0.beta1' s.version = Rails::VERSION::STRING
s.summary = 'Controls boot-up, rake tasks and generators for the Rails framework.' s.summary = 'Controls boot-up, rake tasks and generators for the Rails framework.'
s.description = 'Controls boot-up, rake tasks and generators for the Rails framework.' s.description = 'Controls boot-up, rake tasks and generators for the Rails framework.'
s.required_ruby_version = '>= 1.8.7' s.required_ruby_version = '>= 1.8.7'
@ -22,6 +25,6 @@ Gem::Specification.new do |s|
s.add_dependency('rake', '>= 0.8.3') s.add_dependency('rake', '>= 0.8.3')
s.add_dependency('thor', '~> 0.13.4') s.add_dependency('thor', '~> 0.13.4')
s.add_dependency('activesupport', '= 3.0.0.beta1') s.add_dependency('activesupport', "= #{Rails::VERSION::STRING}")
s.add_dependency('actionpack', '= 3.0.0.beta1') s.add_dependency('actionpack', "= #{Rails::VERSION::STRING}")
end end