Add Utils#error!
This commit is contained in:
parent
806642a6a1
commit
7cd6e81af9
1 changed files with 7 additions and 1 deletions
|
@ -59,7 +59,7 @@ module Utils
|
||||||
hash = nil
|
hash = nil
|
||||||
cmd("git", "rev-parse", "HEAD")
|
cmd("git", "rev-parse", "HEAD")
|
||||||
.success { hash = _1.stdout.strip }
|
.success { hash = _1.stdout.strip }
|
||||||
.failure { raise(Error, "git exited unsuccessfully in method Utils#commit", []) }
|
.failure { error!("git exited unsuccessfully in method Utils#commit") }
|
||||||
hash
|
hash
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -90,5 +90,11 @@ module Utils
|
||||||
include Inline
|
include Inline
|
||||||
include ERB
|
include ERB
|
||||||
include OpenGraph
|
include OpenGraph
|
||||||
|
|
||||||
|
private
|
||||||
|
|
||||||
|
def error!(m)
|
||||||
|
raise Error, m, []
|
||||||
|
end
|
||||||
end
|
end
|
||||||
use_helper(Utils) if respond_to?(:use_helper)
|
use_helper(Utils) if respond_to?(:use_helper)
|
||||||
|
|
Loading…
Reference in a new issue