mirror of https://github.com/rails/rails
fixes Rails version for the stable API [ci skip]
This commit is contained in:
parent
7948d78905
commit
374fd6693a
6
Rakefile
6
Rakefile
|
@ -47,7 +47,11 @@ task :install => :build do
|
|||
end
|
||||
|
||||
desc "Generate documentation for the Rails framework"
|
||||
Rails::API::RepoTask.new('rdoc')
|
||||
if ENV['EDGE']
|
||||
Rails::API::EdgeTask.new('rdoc')
|
||||
else
|
||||
Rails::API::StableTask.new('rdoc')
|
||||
end
|
||||
|
||||
desc 'Bump all versions to match version.rb'
|
||||
task :update_versions do
|
||||
|
|
|
@ -135,12 +135,20 @@ module Rails
|
|||
def api_dir
|
||||
'doc/rdoc'
|
||||
end
|
||||
end
|
||||
|
||||
class EdgeTask < RepoTask
|
||||
def rails_version
|
||||
"master@#{`git rev-parse HEAD`[0, 7]}"
|
||||
end
|
||||
end
|
||||
|
||||
class StableTask < RepoTask
|
||||
def rails_version
|
||||
File.read('RAILS_VERSION').strip
|
||||
end
|
||||
end
|
||||
|
||||
class AppTask < Task
|
||||
def component_root_dir(gem_name)
|
||||
$:.grep(%r{#{gem_name}[\w.-]*/lib\z}).first[0..-5]
|
||||
|
|
Loading…
Reference in New Issue