From 4af8eadde6b5b83a8b08213e5021ada7bfc3191a Mon Sep 17 00:00:00 2001 From: Mario Carrion Date: Wed, 3 Mar 2010 18:10:31 -0500 Subject: [PATCH] 2010-03-03 Mario Carrion In /: * lib/pulque/changelogs/git.rb: Removing / --- ChangeLog | 4 ++++ lib/pulque/changelogs/git.rb | 11 ++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a16c6e6..0f7a74e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-03-03 Mario Carrion + + * lib/pulque/changelogs/git.rb: Removing / + 2010-03-03 Mario Carrion * bin/pcl: Using working directory when no arguments are used. diff --git a/lib/pulque/changelogs/git.rb b/lib/pulque/changelogs/git.rb index 969a6f1..b4efe99 100644 --- a/lib/pulque/changelogs/git.rb +++ b/lib/pulque/changelogs/git.rb @@ -69,9 +69,10 @@ def print def format_array(main_array, array, section_message) # Excluding files that are not in the same level files = [] + array.each do |file| if "#{file.path[0,@pwd_relative.length]}" == @pwd_relative - files << file.path[@pwd_relative.length, file.path.length-@pwd_relative.length] + files << remove_slash!(file.path[@pwd_relative.length, file.path.length-@pwd_relative.length]) end end @@ -83,6 +84,14 @@ def format_array(main_array, array, section_message) end end end + + def remove_slash!(file) + if file[0,1] == "/" +puts "fil is #{file}" + file = file [1,file.length-1] + end + file + end end Pulque::ChangeLogs::Factory.register(Pulque::ChangeLogs::GitChangeLog)