module GitHooks
Copyright (C) 2013 Carl P. Corliss
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Copyright (C) 2013 Carl P. Corliss
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Copyright (C) 2013 Carl P. Corliss
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Constants
- BIN_PATH
- FAILURE_SYMBOL
- GEM_PATH
- HOOK_NAME
- LIB_PATH
- SCRIPT_NAME
- SCRIPT_PATH
- SKIPPED_SYMBOL
- SUCCESS_SYMBOL
- UNKNOWN_SYMBOL
- VERSION
- WARNING_SYMBOL
Attributes
Public Class Methods
# File lib/githooks.rb, line 53 def debug=(value) @debug = !!value end
# File lib/githooks.rb, line 46 def debug? return true if ENV['GITHOOKS_DEBUG'] return true if ARGV.include?('--debug') return true if ARGV.include?('-d') debug end
# File lib/githooks.rb, line 72 def hook_name case GitHooks::HOOK_NAME.to_s when 'githooks', 'irb', '', nil then 'pre-commit' else GitHooks::HOOK_NAME end end
# File lib/githooks.rb, line 79 def hooks_root=(value) @hooks_root = Pathname.new(value) end
# File lib/githooks.rb, line 68 def ignore_script=(value) @ignore_script = !!value end
# File lib/githooks.rb, line 38 def quieted od, ov = @debug, @verbose @debug, @verbose = false, false yield ensure @debug, @verbose = od, ov end
# File lib/githooks.rb, line 64 def verbose=(value) @verbose = !!value end
# File lib/githooks.rb, line 57 def verbose? return true if ENV['GITHOOKS_VERBOSE'] return true if ARGV.include?('--verbose') return true if ARGV.include?('-v') verbose end