svn_hooks 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/svn_file_stat.rb +2 -2
 - data/lib/svn_stat.rb +5 -5
 - 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  
     | 
| 
      
 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[ 
     | 
| 
      
 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, : 
     | 
| 
      
 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 " 
     | 
| 
      
 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. 
     | 
| 
      
 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 
     | 
    
         
            -
                  @ 
     | 
| 
      
 39 
     | 
    
         
            +
                  @revision ? "--revision #{@revision}" : ''
         
     | 
| 
       40 
40 
     | 
    
         
             
                end
         
     | 
| 
       41 
41 
     | 
    
         | 
| 
       42 
42 
     | 
    
         
             
                def svnlook query
         
     |