From 9f1a8e209c33597c78bf4e0bc57a902bc39471c8 Mon Sep 17 00:00:00 2001 From: Benjamin Kellermann Date: Fri, 25 Mar 2011 10:25:53 +0100 Subject: add silent comment for ruby 1.9 --- config_sample.rb | 1 + date_locale.rb | 2 +- dudle.rb | 1 + git.rb | 3 ++- html.rb | 1 + 5 files changed, 6 insertions(+), 2 deletions(-) diff --git a/config_sample.rb b/config_sample.rb index 470b53c..d54ff24 100644 --- a/config_sample.rb +++ b/config_sample.rb @@ -1,3 +1,4 @@ +# coding: utf-8 ############################################################################ # Copyright 2009,2010 Benjamin Kellermann # # # diff --git a/date_locale.rb b/date_locale.rb index e40e6c7..af00803 100644 --- a/date_locale.rb +++ b/date_locale.rb @@ -1,4 +1,4 @@ -# +# coding: utf-8 #Make a 'localization' for Date, DateTime and Time. # #This is not using locale, but if you use locale, it is detected and locale sensitive. diff --git a/dudle.rb b/dudle.rb index 031693e..c470a1e 100644 --- a/dudle.rb +++ b/dudle.rb @@ -1,3 +1,4 @@ +# coding: utf-8 ############################################################################ # Copyright 2009,2010 Benjamin Kellermann # # # diff --git a/git.rb b/git.rb index fbfb8cb..e74502c 100644 --- a/git.rb +++ b/git.rb @@ -35,7 +35,8 @@ class VCS end def VCS.revno - `#{GITCMD} log --oneline`.scan("\n").size + # there is a bug in git log --format, which supresses the \n on the last line + `#{GITCMD} log --format="format:x"`.scan("\n").size + 1 end def VCS.cat revision, file diff --git a/html.rb b/html.rb index 3ea4425..f95b2b8 100644 --- a/html.rb +++ b/html.rb @@ -1,3 +1,4 @@ +# coding: utf-8 ############################################################################ # Copyright 2009,2010 Benjamin Kellermann # # # -- cgit v1.2.3