Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixes Rails version for the stable API [ci skip]

  • Loading branch information...
commit e890da1a065f8545dcc576f4743681309a34a825 1 parent ff184f0
@fxn fxn authored
Showing with 13 additions and 1 deletion.
  1. +5 −1 Rakefile
  2. +8 −0 railties/lib/rails/api/task.rb
View
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
View
8 railties/lib/rails/api/task.rb
@@ -135,12 +135,20 @@ def component_root_dir(component)
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]

0 comments on commit e890da1

Please sign in to comment.
Something went wrong with that request. Please try again.