Module: GitHooks
- Defined in:
- lib/githooks/version.rb,
lib/githooks.rb,
lib/githooks/cli.rb,
lib/githooks/hook.rb,
lib/githooks/error.rb,
lib/githooks/action.rb,
lib/githooks/runner.rb,
lib/githooks/section.rb,
lib/githooks/cli/config.rb,
lib/githooks/repository.rb,
lib/githooks/system_utils.rb,
lib/githooks/repository/file.rb,
lib/githooks/repository/config.rb,
lib/githooks/repository/limiter.rb,
lib/githooks/repository/diff_index_entry.rb
Overview
Copyright © 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.
Defined Under Namespace
Modules: CLI, SystemUtils Classes: Action, Error, Hook, Repository, Runner, Section
Constant Summary collapse
- SUCCESS_SYMBOL =
'✓'.color_success!
- FAILURE_SYMBOL =
'X'.color_failure!
- UNKNOWN_SYMBOL =
'?'.color_unknown!
- WARNING_SYMBOL =
'W'.color_warning!
- SKIPPED_SYMBOL =
'S'.color_skipped!
- LIB_PATH =
Pathname.new(__FILE__).dirname.realpath
- GEM_PATH =
LIB_PATH.parent
- BIN_PATH =
GEM_PATH.join('bin')
- SCRIPT_PATH =
Pathname.new($0)
- SCRIPT_NAME =
SCRIPT_PATH.basename.to_s
- HOOK_NAME =
SCRIPT_NAME.to_s
- VERSION =
'1.5.5'
Class Attribute Summary collapse
-
.debug ⇒ Object
Returns the value of attribute debug.
-
.hooks_root ⇒ Object
Returns the value of attribute hooks_root.
-
.ignore_script ⇒ Object
Returns the value of attribute ignore_script.
-
.verbose ⇒ Object
Returns the value of attribute verbose.
Class Method Summary collapse
Class Attribute Details
.debug ⇒ Object
Returns the value of attribute debug.
36 37 38 |
# File 'lib/githooks.rb', line 36 def debug @debug end |
.hooks_root ⇒ Object
Returns the value of attribute hooks_root.
36 37 38 |
# File 'lib/githooks.rb', line 36 def hooks_root @hooks_root end |
.ignore_script ⇒ Object
Returns the value of attribute ignore_script.
36 37 38 |
# File 'lib/githooks.rb', line 36 def ignore_script @ignore_script end |
.verbose ⇒ Object
Returns the value of attribute verbose.
36 37 38 |
# File 'lib/githooks.rb', line 36 def verbose @verbose end |
Class Method Details
.debug? ⇒ Boolean
38 39 40 41 42 43 |
# File 'lib/githooks.rb', line 38 def debug? return true if ENV['GITHOOKS_DEBUG'] return true if ARGV.include?('--debug') return true if ARGV.include?('-d') debug end |
.hook_name ⇒ Object
64 65 66 67 68 69 |
# File 'lib/githooks.rb', line 64 def hook_name case GitHooks::HOOK_NAME.to_s when 'githooks', 'irb', '', nil then 'pre-commit' else GitHooks::HOOK_NAME end end |
.verbose? ⇒ Boolean
49 50 51 52 53 54 |
# File 'lib/githooks.rb', line 49 def verbose? return true if ENV['GITHOOKS_VERBOSE'] return true if ARGV.include?('--verbose') return true if ARGV.include?('-v') verbose end |