Class: BetweenMeals::Repo
- Inherits:
-
Object
- Object
- BetweenMeals::Repo
- Defined in:
- lib/between_meals/repo.rb,
lib/between_meals/repo/git.rb,
lib/between_meals/repo/svn.rb
Overview
Local checkout wrapper
Defined Under Namespace
Instance Attribute Summary collapse
-
#bin ⇒ Object
writeonly
Sets the attribute bin.
-
#repo_path ⇒ Object
readonly
Returns the value of attribute repo_path.
Class Method Summary collapse
Instance Method Summary collapse
-
#changes(_start_ref, _end_ref) ⇒ Object
Return files changed between two revisions.
- #checkout ⇒ Object
- #create(_url) ⇒ Object
- #exists? ⇒ Boolean
-
#files ⇒ Object
Return all files.
- #head ⇒ Object
- #head_msg ⇒ Object
- #head_msg= ⇒ Object
- #head_parents ⇒ Object
- #head_rev ⇒ Object
-
#initialize(repo_path, logger) ⇒ Repo
constructor
A new instance of Repo.
- #last_author ⇒ Object
- #last_msg ⇒ Object
- #last_msg= ⇒ Object
- #latest_revision ⇒ Object
- #setup ⇒ Object
- #status ⇒ Object
- #update ⇒ Object
Constructor Details
#initialize(repo_path, logger) ⇒ Repo
Returns a new instance of Repo.
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/between_meals/repo.rb', line 25 def initialize(repo_path, logger) @repo_path = repo_path @logger = logger @repo = nil @bin = nil setup rescue @logger.warn("Unable to read repo from #{File.expand_path(repo_path)}") exit(1) end |
Instance Attribute Details
#bin=(value) ⇒ Object (writeonly)
Sets the attribute bin
23 24 25 |
# File 'lib/between_meals/repo.rb', line 23 def bin=(value) @bin = value end |
#repo_path ⇒ Object (readonly)
Returns the value of attribute repo_path.
22 23 24 |
# File 'lib/between_meals/repo.rb', line 22 def repo_path @repo_path end |
Class Method Details
.get(type, repo_path, logger) ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/between_meals/repo.rb', line 36 def self.get(type, repo_path, logger) case type when 'svn' require 'between_meals/repo/svn' BetweenMeals::Repo::Svn.new(repo_path, logger) when 'git' require 'between_meals/repo/git' BetweenMeals::Repo::Git.new(repo_path, logger) else fail "Do not know repo type #{type}" end end |
Instance Method Details
#changes(_start_ref, _end_ref) ⇒ Object
Return files changed between two revisions
86 87 88 |
# File 'lib/between_meals/repo.rb', line 86 def changes(_start_ref, _end_ref) fail 'Not implemented' end |
#checkout ⇒ Object
107 108 109 |
# File 'lib/between_meals/repo.rb', line 107 def checkout fail 'Not implemented' end |
#create(_url) ⇒ Object
81 82 83 |
# File 'lib/between_meals/repo.rb', line 81 def create(_url) fail 'Not implemented' end |
#exists? ⇒ Boolean
49 50 51 |
# File 'lib/between_meals/repo.rb', line 49 def exists? fail 'Not implemented' end |
#files ⇒ Object
Return all files
95 96 97 |
# File 'lib/between_meals/repo.rb', line 95 def files fail 'Not implemented' end |
#head ⇒ Object
103 104 105 |
# File 'lib/between_meals/repo.rb', line 103 def head fail 'Not implemented' end |
#head_msg ⇒ Object
65 66 67 |
# File 'lib/between_meals/repo.rb', line 65 def head_msg fail 'Not implemented' end |
#head_msg= ⇒ Object
69 70 71 |
# File 'lib/between_meals/repo.rb', line 69 def head_msg= fail 'Not implemented' end |
#head_parents ⇒ Object
73 74 75 |
# File 'lib/between_meals/repo.rb', line 73 def head_parents fail 'Not implemented' end |
#head_rev ⇒ Object
61 62 63 |
# File 'lib/between_meals/repo.rb', line 61 def head_rev fail 'Not implemented' end |
#last_author ⇒ Object
115 116 117 |
# File 'lib/between_meals/repo.rb', line 115 def fail 'Not implemented' end |
#last_msg ⇒ Object
119 120 121 |
# File 'lib/between_meals/repo.rb', line 119 def last_msg fail 'Not implemented' end |
#last_msg= ⇒ Object
123 124 125 |
# File 'lib/between_meals/repo.rb', line 123 def last_msg= fail 'Not implemented' end |
#latest_revision ⇒ Object
77 78 79 |
# File 'lib/between_meals/repo.rb', line 77 def latest_revision fail 'Not implemented' end |
#setup ⇒ Object
57 58 59 |
# File 'lib/between_meals/repo.rb', line 57 def setup fail 'Not implemented' end |
#status ⇒ Object
53 54 55 |
# File 'lib/between_meals/repo.rb', line 53 def status fail 'Not implemented' end |
#update ⇒ Object
90 91 92 |
# File 'lib/between_meals/repo.rb', line 90 def update fail 'Not implemented' end |