@@ -90,12 +90,12 module Redmine | |||||
90 | def url |
|
90 | def url | |
91 | @url |
|
91 | @url | |
92 | end |
|
92 | end | |
93 |
|
93 | |||
94 | # get info about the svn repository |
|
94 | # get info about the svn repository | |
95 | def info |
|
95 | def info | |
96 | return nil |
|
96 | return nil | |
97 | end |
|
97 | end | |
98 |
|
98 | |||
99 | # Returns the entry identified by path and revision identifier |
|
99 | # Returns the entry identified by path and revision identifier | |
100 | # or nil if entry doesn't exist in the repository |
|
100 | # or nil if entry doesn't exist in the repository | |
101 | def entry(path=nil, identifier=nil) |
|
101 | def entry(path=nil, identifier=nil) | |
@@ -250,12 +250,12 module Redmine | |||||
250 | end |
|
250 | end | |
251 | } |
|
251 | } | |
252 | end |
|
252 | end | |
253 |
|
253 | |||
254 | def revisions |
|
254 | def revisions | |
255 | revisions ||= Revisions.new(collect{|entry| entry.lastrev}.compact) |
|
255 | revisions ||= Revisions.new(collect{|entry| entry.lastrev}.compact) | |
256 | end |
|
256 | end | |
257 | end |
|
257 | end | |
258 |
|
258 | |||
259 | class Info |
|
259 | class Info | |
260 | attr_accessor :root_url, :lastrev |
|
260 | attr_accessor :root_url, :lastrev | |
261 | def initialize(attributes={}) |
|
261 | def initialize(attributes={}) | |
@@ -263,7 +263,7 module Redmine | |||||
263 | self.lastrev = attributes[:lastrev] |
|
263 | self.lastrev = attributes[:lastrev] | |
264 | end |
|
264 | end | |
265 | end |
|
265 | end | |
266 |
|
266 | |||
267 | class Entry |
|
267 | class Entry | |
268 | attr_accessor :name, :path, :kind, :size, :lastrev |
|
268 | attr_accessor :name, :path, :kind, :size, :lastrev | |
269 | def initialize(attributes={}) |
|
269 | def initialize(attributes={}) | |
@@ -273,15 +273,15 module Redmine | |||||
273 | self.size = attributes[:size].to_i if attributes[:size] |
|
273 | self.size = attributes[:size].to_i if attributes[:size] | |
274 | self.lastrev = attributes[:lastrev] |
|
274 | self.lastrev = attributes[:lastrev] | |
275 | end |
|
275 | end | |
276 |
|
276 | |||
277 | def is_file? |
|
277 | def is_file? | |
278 | 'file' == self.kind |
|
278 | 'file' == self.kind | |
279 | end |
|
279 | end | |
280 |
|
280 | |||
281 | def is_dir? |
|
281 | def is_dir? | |
282 | 'dir' == self.kind |
|
282 | 'dir' == self.kind | |
283 | end |
|
283 | end | |
284 |
|
284 | |||
285 | def is_text? |
|
285 | def is_text? | |
286 | Redmine::MimeType.is_type?('text', name) |
|
286 | Redmine::MimeType.is_type?('text', name) | |
287 | end |
|
287 | end |
General Comments 0
You need to be logged in to leave comments.
Login now