Module: Babar
- Defined in:
- lib/babar.rb,
lib/babar/action.rb,
lib/babar/manifest.rb
Defined Under Namespace
Classes: Action, Manifest
Class Method Summary
collapse
Class Method Details
.changed(offset = 0) ⇒ Object
13
14
15
16
|
# File 'lib/babar.rb', line 13
def self.changed offset=0
commits = `git reflog -n #{offset + 2}`.lines.map { |l| l.split.first }
changed = `git diff --name-only #{commits.first} #{commits.last}`.lines.map &:strip
end
|
.hookfile ⇒ Object
18
19
20
21
22
|
# File 'lib/babar.rb', line 18
def self.hookfile
['Hookfile', File.expand_path('../../Hookfile', __FILE__)].find do |path|
File.exists? path
end
end
|
.run ⇒ Object
7
8
9
10
11
|
# File 'lib/babar.rb', line 7
def self.run
manifest = Manifest.new changed
manifest.perform
manifest.notify
end
|