diff options
author | Francesc Esplugas <francesc.esplugas@gmail.com> | 2008-04-22 15:44:13 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2008-04-22 15:44:13 -0500 |
commit | bf1b1e0925085811f0b58bb4093e678438ea0236 (patch) | |
tree | ace4626f05ac932271196dc5a82bfd16a1121649 /railties/builtin/rails_info/rails/info.rb | |
parent | a4fc93c3a9f59dcd7cf56c6ae1cb1fb749f6678b (diff) | |
download | rails-bf1b1e0925085811f0b58bb4093e678438ea0236.tar.gz rails-bf1b1e0925085811f0b58bb4093e678438ea0236.tar.bz2 rails-bf1b1e0925085811f0b58bb4093e678438ea0236.zip |
Rails Edge info returns the latest git commit hash [#36 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
Diffstat (limited to 'railties/builtin/rails_info/rails/info.rb')
-rw-r--r-- | railties/builtin/rails_info/rails/info.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/railties/builtin/rails_info/rails/info.rb b/railties/builtin/rails_info/rails/info.rb index 2bd9b55617..4cbd2cca4a 100644 --- a/railties/builtin/rails_info/rails/info.rb +++ b/railties/builtin/rails_info/rails/info.rb @@ -29,8 +29,8 @@ module Rails "#{component.classify}::VERSION::STRING".constantize end - def edge_rails_revision(info = svn_info) - info[/^Revision: (\d+)/, 1] || freeze_edge_version + def edge_rails_revision(info = git_info) + info[/commit ([a-z0-9-]+)/, 1] || freeze_edge_version end def freeze_edge_version @@ -67,10 +67,10 @@ module Rails @rails_vendor_root ||= "#{RAILS_ROOT}/vendor/rails" end - def svn_info + def git_info env_lang, ENV['LC_ALL'] = ENV['LC_ALL'], 'C' Dir.chdir(rails_vendor_root) do - silence_stderr { `svn info` } + silence_stderr { `git log -n 1` } end ensure ENV['LC_ALL'] = env_lang @@ -98,7 +98,7 @@ module Rails end end - # The Rails SVN revision, if it's checked out into vendor/rails. + # The Rails Git revision, if it's checked out into vendor/rails. property 'Edge Rails revision' do edge_rails_revision end |