svn_hooks 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/svn_file_stat.rb +2 -2
  2. data/lib/svn_stat.rb +5 -5
  3. metadata +1 -1
data/lib/svn_file_stat.rb CHANGED
@@ -13,12 +13,12 @@ module SVN
13
13
 
14
14
  attr_reader :path, :file_flag, :meta_flag, :lock_flag, :history_flag
15
15
 
16
- def self.parse line
16
+ def initialize line
17
17
  @file_flag = SVN::FLAGS[line[0,1]]
18
18
  @meta_flag = SVN::FLAGS[line[1,1]]
19
19
  @lock_flag = SVN::FLAGS[line[2,1]] == 'L'
20
20
  @history_flag = SVN::FLAGS[line[3,1]] == '+'
21
- @path = line[5,-1]
21
+ @path = line[4..-1]
22
22
  end
23
23
 
24
24
  def to_s
data/lib/svn_stat.rb CHANGED
@@ -2,10 +2,10 @@ require 'svn_file_stat'
2
2
 
3
3
  module SVN
4
4
  class Stat
5
- attr_reader :repository_path, :revision_number, :event
5
+ attr_reader :repository_path, :revision, :event
6
6
 
7
7
  def initialize repository_path, revision_number = nil
8
- @revision = revision_number
8
+ @revision = revision_number || svnlook(youngest)
9
9
  @repository_path = repository_path
10
10
  @event = SVN_EVENT
11
11
 
@@ -17,7 +17,7 @@ module SVN
17
17
  end
18
18
 
19
19
  def message
20
- @message ||= svnlook "cat"
20
+ @message ||= svnlook "log"
21
21
  end
22
22
 
23
23
  def date
@@ -27,7 +27,7 @@ module SVN
27
27
  def files
28
28
  unless @files
29
29
  @files = []
30
- svnlook('changed').each_line{|l| @files << SVN::FileStat.parse(l)}
30
+ svnlook('changed').each_line{|l| @files << SVN::FileStat.new(l)}
31
31
  end
32
32
 
33
33
  @files
@@ -36,7 +36,7 @@ module SVN
36
36
  private
37
37
 
38
38
  def revision_string
39
- @revision_number ? "--revision #{@revision_number}" : ''
39
+ @revision ? "--revision #{@revision}" : ''
40
40
  end
41
41
 
42
42
  def svnlook query
metadata CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: svn_hooks
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.0.2
6
+ version: 0.0.3
7
7
  date: 2007-11-25 00:00:00 -08:00
8
8
  summary: svn_hooks
9
9
  require_paths: