m2m_keygen 0.4.7 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.overcommit.yml +4 -7
- data/.rubocop.yml +19 -16
- data/.ruby-version +1 -1
- data/.streerc +1 -0
- data/.tool-versions +1 -0
- data/CHANGELOG.md +73 -1
- data/Gemfile +2 -2
- data/Gemfile.lock +138 -160
- data/README.md +64 -78
- data/docs/MIGRATING.md +69 -0
- data/docs/SPEC.md +245 -0
- data/examples/nonce_store/postgres.rb +40 -0
- data/examples/nonce_store/redis.rb +23 -0
- data/gemfiles/rack_2.gemfile +5 -0
- data/gemfiles/rack_3.gemfile +5 -0
- data/lib/m2m_keygen/canonicalizer.rb +57 -0
- data/lib/m2m_keygen/nonce_store/disabled.rb +19 -0
- data/lib/m2m_keygen/nonce_store/memory.rb +64 -0
- data/lib/m2m_keygen/nonce_store.rb +18 -0
- data/lib/m2m_keygen/rack_validator.rb +72 -19
- data/lib/m2m_keygen/request_signer/signed_request.rb +10 -0
- data/lib/m2m_keygen/request_signer.rb +118 -0
- data/lib/m2m_keygen/signature.rb +41 -39
- data/lib/m2m_keygen/types/params_type.rb +6 -16
- data/lib/m2m_keygen/version.rb +1 -1
- data/lib/m2m_keygen.rb +6 -0
- data/m2m_keygen.gemspec +12 -14
- data/sorbet/config +1 -0
- data/sorbet/rbi/gems/.gitattributes +1 -0
- data/sorbet/rbi/gems/{ast@2.4.2.rbi → ast@2.4.3.rbi} +45 -79
- data/sorbet/rbi/gems/{benchmark@0.2.0.rbi → benchmark@0.5.0.rbi} +91 -58
- data/sorbet/rbi/gems/bundler-audit@0.9.3.rbi +397 -0
- data/sorbet/rbi/gems/byebug@13.0.0.rbi +3651 -0
- data/sorbet/rbi/gems/childprocess@5.1.0.rbi +336 -0
- data/sorbet/rbi/gems/concurrent-ruby@1.3.7.rbi +384 -0
- data/sorbet/rbi/gems/{diff-lcs@1.5.0.rbi → diff-lcs@1.6.2.rbi} +189 -199
- data/sorbet/rbi/gems/{docile@1.4.0.rbi → docile@1.4.1.rbi} +147 -147
- data/sorbet/rbi/gems/dotenv@3.2.0.rbi +267 -0
- data/sorbet/rbi/gems/erubi@1.13.1.rbi +155 -0
- data/sorbet/rbi/gems/{faker@2.22.0.rbi → faker@3.8.0.rbi} +8468 -3829
- data/sorbet/rbi/gems/{ffi@1.15.5.rbi → ffi@1.17.4.rbi} +1 -0
- data/sorbet/rbi/gems/{formatador@1.1.0.rbi → formatador@1.2.3.rbi} +1 -0
- data/sorbet/rbi/gems/{guard@2.18.0.rbi → guard@2.20.1.rbi} +1 -0
- data/sorbet/rbi/gems/{i18n@1.12.0.rbi → i18n@1.15.2.rbi} +687 -827
- data/sorbet/rbi/gems/io-console@0.8.2.rbi +9 -0
- data/sorbet/rbi/gems/{json@2.6.2.rbi → json@2.20.0.rbi} +994 -252
- data/sorbet/rbi/gems/language_server-protocol@3.17.0.5.rbi +9 -0
- data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +189 -0
- data/sorbet/rbi/gems/listen@3.10.0.rbi +9 -0
- data/sorbet/rbi/gems/logger@1.7.0.rbi +896 -0
- data/sorbet/rbi/gems/{lumberjack@1.2.8.rbi → lumberjack@1.4.2.rbi} +1 -0
- data/sorbet/rbi/gems/{method_source@1.0.0.rbi → method_source@1.1.0.rbi} +111 -90
- data/sorbet/rbi/gems/{overcommit@0.59.1.rbi → overcommit@0.71.0.rbi} +503 -647
- data/sorbet/rbi/gems/parallel@2.1.0.rbi +321 -0
- data/sorbet/rbi/gems/parser@3.3.11.1.rbi +5229 -0
- data/sorbet/rbi/gems/prettier_print@1.2.1.rbi +878 -0
- data/sorbet/rbi/gems/prism@1.9.0.rbi +42224 -0
- data/sorbet/rbi/gems/pry-byebug@3.12.0.rbi +481 -0
- data/sorbet/rbi/gems/{pry@0.14.1.rbi → pry@0.16.0.rbi} +2567 -3550
- data/sorbet/rbi/gems/{racc@1.6.0.rbi → racc@1.8.1.rbi} +54 -40
- data/sorbet/rbi/gems/rack@3.2.6.rbi +4653 -0
- data/sorbet/rbi/gems/{rake@13.0.6.rbi → rake@13.4.2.rbi} +963 -732
- data/sorbet/rbi/gems/{rb-inotify@0.10.1.rbi → rb-inotify@0.11.1.rbi} +1 -0
- data/sorbet/rbi/gems/rbi@0.3.14.rbi +5519 -0
- data/sorbet/rbi/gems/rbs@4.0.3.rbi +6908 -0
- data/sorbet/rbi/gems/regexp_parser@2.12.0.rbi +3398 -0
- data/sorbet/rbi/gems/reline@0.6.3.rbi +2446 -0
- data/sorbet/rbi/gems/require-hooks@0.4.0.rbi +152 -0
- data/sorbet/rbi/gems/{rexml@3.2.5.rbi → rexml@3.4.4.rbi} +1085 -894
- data/sorbet/rbi/gems/rspec-core@3.13.6.rbi +9475 -0
- data/sorbet/rbi/gems/rspec-expectations@3.13.5.rbi +6108 -0
- data/sorbet/rbi/gems/rspec-mocks@3.13.8.rbi +4787 -0
- data/sorbet/rbi/gems/rspec-support@3.13.7.rbi +1274 -0
- data/sorbet/rbi/gems/rspec@3.13.2.rbi +15 -0
- data/sorbet/rbi/gems/rspec_in_context@1.2.2.rbi +294 -0
- data/sorbet/rbi/gems/rubocop-ast@1.49.1.rbi +7140 -0
- data/sorbet/rbi/gems/rubocop-faker@1.3.0.rbi +88 -0
- data/sorbet/rbi/gems/rubocop-performance@1.26.1.rbi +3403 -0
- data/sorbet/rbi/gems/rubocop-sorbet@0.12.0.rbi +2448 -0
- data/sorbet/rbi/gems/rubocop@1.88.1.rbi +63103 -0
- data/sorbet/rbi/gems/ruby-lsp@0.26.9.rbi +28 -0
- data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +988 -0
- data/sorbet/rbi/gems/rubydex@0.2.7.rbi +836 -0
- data/sorbet/rbi/gems/simplecov-html@0.13.2.rbi +90 -0
- data/sorbet/rbi/gems/{simplecov@0.21.2.rbi → simplecov@0.22.0.rbi} +438 -578
- data/sorbet/rbi/gems/spoom@1.8.2.rbi +6691 -0
- data/sorbet/rbi/gems/syntax_tree@6.3.0.rbi +22090 -0
- data/sorbet/rbi/gems/tapioca@0.19.2.rbi +3597 -0
- data/sorbet/rbi/gems/{thor@1.2.1.rbi → thor@1.5.0.rbi} +1085 -1171
- data/sorbet/rbi/gems/tsort@0.2.0.rbi +389 -0
- data/sorbet/rbi/gems/unicode-display_width@3.2.0.rbi +130 -0
- data/sorbet/rbi/gems/unicode-emoji@4.2.0.rbi +332 -0
- data/sorbet/rbi/gems/{yard-sorbet@0.7.0.rbi → yard-sorbet@0.9.0.rbi} +142 -99
- data/sorbet/rbi/gems/{yard@0.9.28.rbi → yard@0.9.44.rbi} +5350 -6316
- data/sorbet/rbi/gems/zeitwerk@2.8.2.rbi +1178 -0
- metadata +106 -111
- data/.prettierrc.js +0 -4
- data/docs/M2mKeygen/Error.html +0 -135
- data/docs/M2mKeygen/ParamsEncoder.html +0 -321
- data/docs/M2mKeygen/RackValidator.html +0 -533
- data/docs/M2mKeygen/Signature.html +0 -680
- data/docs/M2mKeygen/Types.html +0 -147
- data/docs/M2mKeygen.html +0 -157
- data/docs/_index.html +0 -182
- data/docs/class_list.html +0 -51
- data/docs/css/common.css +0 -1
- data/docs/css/full_list.css +0 -58
- data/docs/css/style.css +0 -497
- data/docs/file.README.html +0 -230
- data/docs/file_list.html +0 -56
- data/docs/frames.html +0 -17
- data/docs/index.html +0 -230
- data/docs/js/app.js +0 -314
- data/docs/js/full_list.js +0 -216
- data/docs/js/jquery.js +0 -4
- data/docs/method_list.html +0 -139
- data/docs/top-level-namespace.html +0 -110
- data/lib/m2m_keygen/params_encoder.rb +0 -56
- data/package.json +0 -12
- data/sig/m2m_keygen.rbs +0 -4
- data/sorbet/rbi/gems/activesupport@7.0.3.1.rbi +0 -18608
- data/sorbet/rbi/gems/backport@1.2.0.rbi +0 -522
- data/sorbet/rbi/gems/bundler-audit@0.9.1.rbi +0 -308
- data/sorbet/rbi/gems/byebug@11.1.3.rbi +0 -3603
- data/sorbet/rbi/gems/childprocess@4.1.0.rbi +0 -401
- data/sorbet/rbi/gems/concurrent-ruby@1.1.10.rbi +0 -11581
- data/sorbet/rbi/gems/dotenv@2.8.1.rbi +0 -234
- data/sorbet/rbi/gems/e2mmap@0.1.0.rbi +0 -8
- data/sorbet/rbi/gems/haml@5.2.2.rbi +0 -3190
- data/sorbet/rbi/gems/jaro_winkler@1.5.4.rbi +0 -19
- data/sorbet/rbi/gems/kramdown-parser-gfm@1.1.0.rbi +0 -133
- data/sorbet/rbi/gems/kramdown@2.4.0.rbi +0 -3261
- data/sorbet/rbi/gems/listen@3.7.1.rbi +0 -1181
- data/sorbet/rbi/gems/minitest@5.16.3.rbi +0 -1459
- data/sorbet/rbi/gems/nokogiri@1.13.8.rbi +0 -6514
- data/sorbet/rbi/gems/parallel@1.22.1.rbi +0 -277
- data/sorbet/rbi/gems/parser@3.1.2.1.rbi +0 -6826
- data/sorbet/rbi/gems/prettier@3.2.0.rbi +0 -22
- data/sorbet/rbi/gems/prettier_print@0.1.0.rbi +0 -8
- data/sorbet/rbi/gems/pry-byebug@3.10.1.rbi +0 -1222
- data/sorbet/rbi/gems/rack@2.2.4.rbi +0 -5630
- data/sorbet/rbi/gems/rbi@0.0.15.rbi +0 -3007
- data/sorbet/rbi/gems/rbs@2.6.0.rbi +0 -8
- data/sorbet/rbi/gems/regexp_parser@2.5.0.rbi +0 -3366
- data/sorbet/rbi/gems/reverse_markdown@2.1.1.rbi +0 -389
- data/sorbet/rbi/gems/rspec-core@3.11.0.rbi +0 -10786
- data/sorbet/rbi/gems/rspec-expectations@3.11.0.rbi +0 -8170
- data/sorbet/rbi/gems/rspec-mocks@3.11.1.rbi +0 -5385
- data/sorbet/rbi/gems/rspec-support@3.11.0.rbi +0 -1746
- data/sorbet/rbi/gems/rspec@3.11.0.rbi +0 -187
- data/sorbet/rbi/gems/rspec_in_context@1.1.0.3.rbi +0 -1113
- data/sorbet/rbi/gems/rubocop-ast@1.21.0.rbi +0 -7044
- data/sorbet/rbi/gems/rubocop-faker@1.1.0.rbi +0 -106
- data/sorbet/rbi/gems/rubocop-performance@1.14.3.rbi +0 -2982
- data/sorbet/rbi/gems/rubocop-sorbet@0.6.11.rbi +0 -990
- data/sorbet/rbi/gems/rubocop@1.35.1.rbi +0 -52002
- data/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi +0 -1239
- data/sorbet/rbi/gems/simplecov-html@0.12.3.rbi +0 -219
- data/sorbet/rbi/gems/solargraph@0.46.0.rbi +0 -9075
- data/sorbet/rbi/gems/spoom@1.1.12.rbi +0 -2369
- data/sorbet/rbi/gems/syntax_tree-haml@1.3.1.rbi +0 -8
- data/sorbet/rbi/gems/syntax_tree-rbs@0.5.0.rbi +0 -8
- data/sorbet/rbi/gems/syntax_tree@3.5.0.rbi +0 -8
- data/sorbet/rbi/gems/tapioca@0.9.4.rbi +0 -2946
- data/sorbet/rbi/gems/temple@0.8.2.rbi +0 -1712
- data/sorbet/rbi/gems/tilt@2.0.11.rbi +0 -742
- data/sorbet/rbi/gems/tzinfo@2.0.5.rbi +0 -5914
- data/sorbet/rbi/gems/unicode-display_width@2.2.0.rbi +0 -48
- data/sorbet/rbi/gems/unparser@0.6.5.rbi +0 -4529
- data/sorbet/rbi/gems/webrick@1.7.0.rbi +0 -2553
- data/sorbet/rbi/gems/zeitwerk@2.6.0.rbi +0 -867
- data/sorbet/rbi/manual.rbi +0 -7
- data/yarn.lock +0 -20
|
@@ -4,61 +4,43 @@
|
|
|
4
4
|
# This is an autogenerated file for types exported from the `overcommit` gem.
|
|
5
5
|
# Please instead update this file by running `bin/tapioca gem overcommit`.
|
|
6
6
|
|
|
7
|
+
|
|
7
8
|
# Provides a handler for interrupt signals (SIGINT), allowing the application to
|
|
8
9
|
# finish what it's currently working on.
|
|
9
10
|
#
|
|
10
|
-
#
|
|
11
|
+
# pkg:gem/overcommit#lib/overcommit/interrupt_handler.rb:7
|
|
11
12
|
class InterruptHandler
|
|
13
|
+
include ::Singleton::SingletonInstanceMethods
|
|
12
14
|
include ::Singleton
|
|
13
15
|
extend ::Singleton::SingletonClassMethods
|
|
14
16
|
|
|
15
17
|
# Initialize safe interrupt signal handling.
|
|
16
18
|
#
|
|
17
|
-
#
|
|
18
|
-
#
|
|
19
|
-
# source://overcommit-0.59.1/lib/overcommit/interrupt_handler.rb:13
|
|
19
|
+
# pkg:gem/overcommit#lib/overcommit/interrupt_handler.rb:13
|
|
20
20
|
def initialize; end
|
|
21
21
|
|
|
22
|
-
#
|
|
23
|
-
#
|
|
24
|
-
# source://overcommit-0.59.1/lib/overcommit/interrupt_handler.rb:10
|
|
22
|
+
# pkg:gem/overcommit#lib/overcommit/interrupt_handler.rb:10
|
|
25
23
|
def isolate_signals; end
|
|
26
24
|
|
|
27
|
-
#
|
|
28
|
-
#
|
|
29
|
-
# @param value the value to set the attribute isolate_signals to.
|
|
30
|
-
#
|
|
31
|
-
# source://overcommit-0.59.1/lib/overcommit/interrupt_handler.rb:10
|
|
25
|
+
# pkg:gem/overcommit#lib/overcommit/interrupt_handler.rb:10
|
|
32
26
|
def isolate_signals=(_arg0); end
|
|
33
27
|
|
|
34
|
-
#
|
|
35
|
-
#
|
|
36
|
-
# source://overcommit-0.59.1/lib/overcommit/interrupt_handler.rb:10
|
|
28
|
+
# pkg:gem/overcommit#lib/overcommit/interrupt_handler.rb:10
|
|
37
29
|
def reenable_on_interrupt; end
|
|
38
30
|
|
|
39
|
-
#
|
|
40
|
-
#
|
|
41
|
-
# @param value the value to set the attribute reenable_on_interrupt to.
|
|
42
|
-
#
|
|
43
|
-
# source://overcommit-0.59.1/lib/overcommit/interrupt_handler.rb:10
|
|
31
|
+
# pkg:gem/overcommit#lib/overcommit/interrupt_handler.rb:10
|
|
44
32
|
def reenable_on_interrupt=(_arg0); end
|
|
45
33
|
|
|
46
|
-
#
|
|
47
|
-
#
|
|
48
|
-
# source://overcommit-0.59.1/lib/overcommit/interrupt_handler.rb:10
|
|
34
|
+
# pkg:gem/overcommit#lib/overcommit/interrupt_handler.rb:10
|
|
49
35
|
def signal_received; end
|
|
50
36
|
|
|
51
|
-
#
|
|
52
|
-
#
|
|
53
|
-
# @param value the value to set the attribute signal_received to.
|
|
54
|
-
#
|
|
55
|
-
# source://overcommit-0.59.1/lib/overcommit/interrupt_handler.rb:10
|
|
37
|
+
# pkg:gem/overcommit#lib/overcommit/interrupt_handler.rb:10
|
|
56
38
|
def signal_received=(_arg0); end
|
|
57
39
|
|
|
58
40
|
class << self
|
|
59
41
|
# Disable interrupt isolation.
|
|
60
42
|
#
|
|
61
|
-
#
|
|
43
|
+
# pkg:gem/overcommit#lib/overcommit/interrupt_handler.rb:71
|
|
62
44
|
def disable!; end
|
|
63
45
|
|
|
64
46
|
# Provide a way to allow a single Ctrl-C interrupt to happen and atomically
|
|
@@ -91,32 +73,50 @@ class InterruptHandler
|
|
|
91
73
|
# ... handle any other exceptions ...
|
|
92
74
|
# end
|
|
93
75
|
#
|
|
94
|
-
#
|
|
76
|
+
# pkg:gem/overcommit#lib/overcommit/interrupt_handler.rb:62
|
|
95
77
|
def disable_until_finished_or_interrupted; end
|
|
96
78
|
|
|
97
79
|
# Enable interrupt isolation.
|
|
98
80
|
#
|
|
99
|
-
#
|
|
81
|
+
# pkg:gem/overcommit#lib/overcommit/interrupt_handler.rb:76
|
|
100
82
|
def enable!; end
|
|
101
83
|
|
|
102
84
|
# Enable interrupt isolation while executing the provided block.
|
|
103
85
|
#
|
|
104
86
|
# @yield block to execute with interrupt isolation
|
|
105
87
|
#
|
|
106
|
-
#
|
|
88
|
+
# pkg:gem/overcommit#lib/overcommit/interrupt_handler.rb:83
|
|
107
89
|
def isolate_from_interrupts; end
|
|
90
|
+
|
|
91
|
+
private
|
|
92
|
+
|
|
93
|
+
# pkg:gem/overcommit#lib/overcommit/interrupt_handler.rb:8
|
|
94
|
+
def allocate; end
|
|
95
|
+
|
|
96
|
+
# pkg:gem/overcommit#lib/overcommit/interrupt_handler.rb:8
|
|
97
|
+
def new(*_arg0); end
|
|
108
98
|
end
|
|
109
99
|
end
|
|
110
100
|
|
|
101
|
+
# Global application constants.
|
|
102
|
+
# Returns the version of the available git binary.
|
|
103
|
+
#
|
|
104
|
+
# This is intended to be used to conveniently execute code based on a specific
|
|
105
|
+
# git version. Simply compare to a version string:
|
|
106
|
+
#
|
|
107
|
+
# @example
|
|
108
|
+
# if GIT_VERSION <= '1.8.5'
|
|
109
|
+
# ...
|
|
110
|
+
# end
|
|
111
111
|
# Defines the gem version.
|
|
112
112
|
#
|
|
113
|
-
#
|
|
113
|
+
# pkg:gem/overcommit#lib/overcommit/os.rb:5
|
|
114
114
|
module Overcommit; end
|
|
115
115
|
|
|
116
|
-
#
|
|
116
|
+
# pkg:gem/overcommit#lib/overcommit/constants.rb:12
|
|
117
117
|
Overcommit::BUG_REPORT_URL = T.let(T.unsafe(nil), String)
|
|
118
118
|
|
|
119
|
-
#
|
|
119
|
+
# pkg:gem/overcommit#lib/overcommit/constants.rb:6
|
|
120
120
|
Overcommit::CONFIG_FILE_NAME = T.let(T.unsafe(nil), String)
|
|
121
121
|
|
|
122
122
|
# Distributes a list of arguments over multiple invocations of a command.
|
|
@@ -133,24 +133,24 @@ Overcommit::CONFIG_FILE_NAME = T.let(T.unsafe(nil), String)
|
|
|
133
133
|
# standard `status`, `stdout`, and `stderr` will still work but be a
|
|
134
134
|
# aggregation/concatenation of all statuses/outputs.
|
|
135
135
|
#
|
|
136
|
-
#
|
|
136
|
+
# pkg:gem/overcommit#lib/overcommit/command_splitter.rb:17
|
|
137
137
|
class Overcommit::CommandSplitter
|
|
138
138
|
class << self
|
|
139
|
-
#
|
|
139
|
+
# pkg:gem/overcommit#lib/overcommit/command_splitter.rb:56
|
|
140
140
|
def execute(initial_args, options); end
|
|
141
141
|
|
|
142
142
|
private
|
|
143
143
|
|
|
144
144
|
# @return [Array<Array<String>, Integer>] tuple of arguments and new index
|
|
145
145
|
#
|
|
146
|
-
#
|
|
146
|
+
# pkg:gem/overcommit#lib/overcommit/command_splitter.rb:104
|
|
147
147
|
def arguments_under_limit(splittable_args, start_index, byte_limit); end
|
|
148
148
|
|
|
149
149
|
# Given a list of prefix arguments and suffix arguments that can be split,
|
|
150
150
|
# returns a list of argument lists that are executable on the current OS
|
|
151
151
|
# without exceeding command line limitations.
|
|
152
152
|
#
|
|
153
|
-
#
|
|
153
|
+
# pkg:gem/overcommit#lib/overcommit/command_splitter.rb:79
|
|
154
154
|
def extract_argument_lists(args, splittable_args); end
|
|
155
155
|
|
|
156
156
|
# Returns the maximum number of arguments allowed in a single command on
|
|
@@ -158,7 +158,7 @@ class Overcommit::CommandSplitter
|
|
|
158
158
|
#
|
|
159
159
|
# @return [Integer]
|
|
160
160
|
#
|
|
161
|
-
#
|
|
161
|
+
# pkg:gem/overcommit#lib/overcommit/command_splitter.rb:132
|
|
162
162
|
def max_command_length; end
|
|
163
163
|
end
|
|
164
164
|
end
|
|
@@ -169,228 +169,201 @@ end
|
|
|
169
169
|
# @attr_reader stdouts [Array<String>] standard outputs from invocations
|
|
170
170
|
# @attr_reader stderrs [Array<String>] standard error outputs from invocations
|
|
171
171
|
#
|
|
172
|
-
#
|
|
172
|
+
# pkg:gem/overcommit#lib/overcommit/command_splitter.rb:23
|
|
173
173
|
class Overcommit::CommandSplitter::Result < ::Struct
|
|
174
|
-
#
|
|
175
|
-
#
|
|
176
|
-
# @return [true, false]
|
|
177
|
-
#
|
|
178
|
-
# source://overcommit-0.59.1/lib/overcommit/command_splitter.rb:34
|
|
174
|
+
# pkg:gem/overcommit#lib/overcommit/command_splitter.rb:34
|
|
179
175
|
def status; end
|
|
180
176
|
|
|
181
|
-
#
|
|
182
|
-
#
|
|
183
|
-
# @return [Array<Integer>] the current value of statuses
|
|
177
|
+
# pkg:gem/overcommit#lib/overcommit/command_splitter.rb:23
|
|
184
178
|
def statuses; end
|
|
185
179
|
|
|
180
|
+
# pkg:gem/overcommit#lib/overcommit/command_splitter.rb:23
|
|
186
181
|
def statuses=(_); end
|
|
187
182
|
|
|
188
|
-
#
|
|
189
|
-
# order they were executed.
|
|
190
|
-
#
|
|
191
|
-
# @return [String]
|
|
192
|
-
#
|
|
193
|
-
# source://overcommit-0.59.1/lib/overcommit/command_splitter.rb:50
|
|
183
|
+
# pkg:gem/overcommit#lib/overcommit/command_splitter.rb:50
|
|
194
184
|
def stderr; end
|
|
195
185
|
|
|
196
|
-
#
|
|
197
|
-
#
|
|
198
|
-
# @return [Array<String>] the current value of stderrs
|
|
186
|
+
# pkg:gem/overcommit#lib/overcommit/command_splitter.rb:23
|
|
199
187
|
def stderrs; end
|
|
200
188
|
|
|
189
|
+
# pkg:gem/overcommit#lib/overcommit/command_splitter.rb:23
|
|
201
190
|
def stderrs=(_); end
|
|
202
191
|
|
|
203
|
-
#
|
|
204
|
-
# order they were executed.
|
|
205
|
-
#
|
|
206
|
-
# @return [String]
|
|
207
|
-
#
|
|
208
|
-
# source://overcommit-0.59.1/lib/overcommit/command_splitter.rb:42
|
|
192
|
+
# pkg:gem/overcommit#lib/overcommit/command_splitter.rb:42
|
|
209
193
|
def stdout; end
|
|
210
194
|
|
|
211
|
-
#
|
|
212
|
-
#
|
|
213
|
-
# @return [Array<String>] the current value of stdouts
|
|
195
|
+
# pkg:gem/overcommit#lib/overcommit/command_splitter.rb:23
|
|
214
196
|
def stdouts; end
|
|
215
197
|
|
|
198
|
+
# pkg:gem/overcommit#lib/overcommit/command_splitter.rb:23
|
|
216
199
|
def stdouts=(_); end
|
|
217
200
|
|
|
218
|
-
#
|
|
219
|
-
#
|
|
220
|
-
# @return [true, false]
|
|
221
|
-
#
|
|
222
|
-
# source://overcommit-0.59.1/lib/overcommit/command_splitter.rb:27
|
|
201
|
+
# pkg:gem/overcommit#lib/overcommit/command_splitter.rb:27
|
|
223
202
|
def success?; end
|
|
224
203
|
|
|
225
204
|
class << self
|
|
205
|
+
# pkg:gem/overcommit#lib/overcommit/command_splitter.rb:23
|
|
226
206
|
def [](*_arg0); end
|
|
207
|
+
|
|
208
|
+
# pkg:gem/overcommit#lib/overcommit/command_splitter.rb:23
|
|
227
209
|
def inspect; end
|
|
210
|
+
|
|
211
|
+
# pkg:gem/overcommit#lib/overcommit/command_splitter.rb:23
|
|
228
212
|
def keyword_init?; end
|
|
213
|
+
|
|
214
|
+
# pkg:gem/overcommit#lib/overcommit/command_splitter.rb:23
|
|
229
215
|
def members; end
|
|
216
|
+
|
|
217
|
+
# pkg:gem/overcommit#lib/overcommit/command_splitter.rb:23
|
|
230
218
|
def new(*_arg0); end
|
|
231
219
|
end
|
|
232
220
|
end
|
|
233
221
|
|
|
234
222
|
# Stores configuration for Overcommit and the hooks it runs.
|
|
235
223
|
#
|
|
236
|
-
#
|
|
224
|
+
# pkg:gem/overcommit#lib/overcommit/configuration.rb:8
|
|
237
225
|
class Overcommit::Configuration
|
|
238
226
|
# Creates a configuration from the given hash.
|
|
239
227
|
#
|
|
240
|
-
# @option default
|
|
241
|
-
# @option logger
|
|
242
228
|
# @param hash [Hash] loaded YAML config file as a hash
|
|
243
229
|
# @param options [Hash]
|
|
244
|
-
# @
|
|
245
|
-
# @
|
|
246
|
-
# @return [Configuration] a new instance of Configuration
|
|
230
|
+
# @option default [Boolean] whether this is the default built-in configuration
|
|
231
|
+
# @option logger [Overcommit::Logger]
|
|
247
232
|
#
|
|
248
|
-
#
|
|
233
|
+
# pkg:gem/overcommit#lib/overcommit/configuration.rb:15
|
|
249
234
|
def initialize(hash, options = T.unsafe(nil)); end
|
|
250
235
|
|
|
251
|
-
#
|
|
236
|
+
# pkg:gem/overcommit#lib/overcommit/configuration.rb:24
|
|
252
237
|
def ==(other); end
|
|
253
238
|
|
|
254
239
|
# Access the configuration as if it were a hash.
|
|
255
240
|
#
|
|
256
241
|
# @param key [String]
|
|
257
|
-
# @return [Array,
|
|
242
|
+
# @return [Array,Hash,Number,String]
|
|
258
243
|
#
|
|
259
|
-
#
|
|
244
|
+
# pkg:gem/overcommit#lib/overcommit/configuration.rb:32
|
|
260
245
|
def [](key); end
|
|
261
246
|
|
|
262
247
|
# Returns configuration for all built-in hooks in each hook type.
|
|
263
248
|
#
|
|
264
249
|
# @return [Hash]
|
|
265
250
|
#
|
|
266
|
-
#
|
|
251
|
+
# pkg:gem/overcommit#lib/overcommit/configuration.rb:72
|
|
267
252
|
def all_builtin_hook_configs; end
|
|
268
253
|
|
|
269
254
|
# Returns configuration for all hooks in each hook type.
|
|
270
255
|
#
|
|
271
256
|
# @return [Hash]
|
|
272
257
|
#
|
|
273
|
-
#
|
|
258
|
+
# pkg:gem/overcommit#lib/overcommit/configuration.rb:65
|
|
274
259
|
def all_hook_configs; end
|
|
275
260
|
|
|
276
261
|
# Returns configuration for all plugin hooks in each hook type.
|
|
277
262
|
#
|
|
278
263
|
# @return [Hash]
|
|
279
264
|
#
|
|
280
|
-
#
|
|
265
|
+
# pkg:gem/overcommit#lib/overcommit/configuration.rb:91
|
|
281
266
|
def all_plugin_hook_configs; end
|
|
282
267
|
|
|
283
268
|
# Applies additional configuration settings based on the provided
|
|
284
269
|
# environment variables.
|
|
285
270
|
#
|
|
286
|
-
#
|
|
271
|
+
# pkg:gem/overcommit#lib/overcommit/configuration.rb:157
|
|
287
272
|
def apply_environment!(hook_context, env); end
|
|
288
273
|
|
|
289
|
-
#
|
|
274
|
+
# pkg:gem/overcommit#lib/overcommit/configuration.rb:42
|
|
290
275
|
def concurrency; end
|
|
291
276
|
|
|
292
277
|
# Returns the ad hoc hooks that have been enabled for a hook type.
|
|
293
278
|
#
|
|
294
|
-
#
|
|
279
|
+
# pkg:gem/overcommit#lib/overcommit/configuration.rb:123
|
|
295
280
|
def enabled_ad_hoc_hooks(hook_context); end
|
|
296
281
|
|
|
297
282
|
# Returns the built-in hooks that have been enabled for a hook type.
|
|
298
283
|
#
|
|
299
|
-
#
|
|
284
|
+
# pkg:gem/overcommit#lib/overcommit/configuration.rb:115
|
|
300
285
|
def enabled_builtin_hooks(hook_context); end
|
|
301
286
|
|
|
302
287
|
# Returns a non-modifiable configuration for a hook.
|
|
303
288
|
#
|
|
304
|
-
#
|
|
289
|
+
# pkg:gem/overcommit#lib/overcommit/configuration.rb:131
|
|
305
290
|
def for_hook(hook, hook_type = T.unsafe(nil)); end
|
|
306
291
|
|
|
307
292
|
# Merges the given configuration with this one, returning a new
|
|
308
293
|
# {Configuration}. The provided configuration will either add to or replace
|
|
309
294
|
# any options defined in this configuration.
|
|
310
295
|
#
|
|
311
|
-
#
|
|
296
|
+
# pkg:gem/overcommit#lib/overcommit/configuration.rb:151
|
|
312
297
|
def merge(config); end
|
|
313
298
|
|
|
314
299
|
# Returns absolute path to the directory that external hook plugins should
|
|
315
300
|
# be loaded from.
|
|
316
301
|
#
|
|
317
|
-
#
|
|
302
|
+
# pkg:gem/overcommit#lib/overcommit/configuration.rb:38
|
|
318
303
|
def plugin_directory; end
|
|
319
304
|
|
|
320
|
-
#
|
|
321
|
-
#
|
|
322
|
-
# source://overcommit-0.59.1/lib/overcommit/configuration.rb:181
|
|
305
|
+
# pkg:gem/overcommit#lib/overcommit/configuration.rb:181
|
|
323
306
|
def plugin_hook?(hook_context_or_type, hook_name); end
|
|
324
307
|
|
|
325
308
|
# Return whether a previous signature has been recorded for this
|
|
326
309
|
# configuration.
|
|
327
310
|
#
|
|
328
|
-
# @return [true,
|
|
311
|
+
# @return [true,false]
|
|
329
312
|
#
|
|
330
|
-
#
|
|
313
|
+
# pkg:gem/overcommit#lib/overcommit/configuration.rb:205
|
|
331
314
|
def previous_signature?; end
|
|
332
315
|
|
|
333
316
|
# Return whether the signature for this configuration has changed since it
|
|
334
317
|
# was last calculated.
|
|
335
318
|
#
|
|
336
|
-
# @return [true,
|
|
319
|
+
# @return [true,false]
|
|
337
320
|
#
|
|
338
|
-
#
|
|
321
|
+
# pkg:gem/overcommit#lib/overcommit/configuration.rb:197
|
|
339
322
|
def signature_changed?; end
|
|
340
323
|
|
|
341
324
|
# Update the currently stored signature for this hook.
|
|
342
325
|
#
|
|
343
|
-
#
|
|
326
|
+
# pkg:gem/overcommit#lib/overcommit/configuration.rb:234
|
|
344
327
|
def update_signature!; end
|
|
345
328
|
|
|
346
329
|
# Returns whether this configuration should verify itself by checking the
|
|
347
330
|
# stored configuration for the repo.
|
|
348
331
|
#
|
|
349
|
-
# @return [true,
|
|
332
|
+
# @return [true,false]
|
|
350
333
|
#
|
|
351
|
-
#
|
|
334
|
+
# pkg:gem/overcommit#lib/overcommit/configuration.rb:213
|
|
352
335
|
def verify_signatures?; end
|
|
353
336
|
|
|
354
337
|
protected
|
|
355
338
|
|
|
356
|
-
#
|
|
357
|
-
#
|
|
358
|
-
# source://overcommit-0.59.1/lib/overcommit/configuration.rb:252
|
|
339
|
+
# pkg:gem/overcommit#lib/overcommit/configuration.rb:252
|
|
359
340
|
def hash; end
|
|
360
341
|
|
|
361
342
|
private
|
|
362
343
|
|
|
363
|
-
#
|
|
364
|
-
#
|
|
365
|
-
# source://overcommit-0.59.1/lib/overcommit/configuration.rb:256
|
|
344
|
+
# pkg:gem/overcommit#lib/overcommit/configuration.rb:256
|
|
366
345
|
def ad_hoc_hook?(hook_context, hook_name); end
|
|
367
346
|
|
|
368
|
-
#
|
|
369
|
-
#
|
|
370
|
-
# source://overcommit-0.59.1/lib/overcommit/configuration.rb:266
|
|
347
|
+
# pkg:gem/overcommit#lib/overcommit/configuration.rb:266
|
|
371
348
|
def built_in_hook?(hook_context, hook_name); end
|
|
372
349
|
|
|
373
|
-
#
|
|
374
|
-
#
|
|
375
|
-
# source://overcommit-0.59.1/lib/overcommit/configuration.rb:279
|
|
350
|
+
# pkg:gem/overcommit#lib/overcommit/configuration.rb:279
|
|
376
351
|
def hook_enabled?(hook_context_or_type, hook_name); end
|
|
377
352
|
|
|
378
|
-
#
|
|
379
|
-
#
|
|
380
|
-
# source://overcommit-0.59.1/lib/overcommit/configuration.rb:273
|
|
353
|
+
# pkg:gem/overcommit#lib/overcommit/configuration.rb:273
|
|
381
354
|
def hook_exists?(hook_context, hook_name); end
|
|
382
355
|
|
|
383
356
|
# Returns the unique signature of this configuration.
|
|
384
357
|
#
|
|
385
358
|
# @return [String]
|
|
386
359
|
#
|
|
387
|
-
#
|
|
360
|
+
# pkg:gem/overcommit#lib/overcommit/configuration.rb:317
|
|
388
361
|
def signature; end
|
|
389
362
|
|
|
390
|
-
#
|
|
363
|
+
# pkg:gem/overcommit#lib/overcommit/configuration.rb:342
|
|
391
364
|
def signature_config_key; end
|
|
392
365
|
|
|
393
|
-
#
|
|
366
|
+
# pkg:gem/overcommit#lib/overcommit/configuration.rb:296
|
|
394
367
|
def smart_merge(parent, child); end
|
|
395
368
|
|
|
396
369
|
# Returns the stored signature of this repo's Overcommit configuration.
|
|
@@ -400,44 +373,42 @@ class Overcommit::Configuration
|
|
|
400
373
|
#
|
|
401
374
|
# @return [String]
|
|
402
375
|
#
|
|
403
|
-
#
|
|
376
|
+
# pkg:gem/overcommit#lib/overcommit/configuration.rb:327
|
|
404
377
|
def stored_signature; end
|
|
405
378
|
|
|
406
|
-
#
|
|
379
|
+
# pkg:gem/overcommit#lib/overcommit/configuration.rb:346
|
|
407
380
|
def verify_signature_config_key; end
|
|
408
381
|
end
|
|
409
382
|
|
|
410
383
|
# Manages configuration file loading.
|
|
411
384
|
#
|
|
412
|
-
#
|
|
385
|
+
# pkg:gem/overcommit#lib/overcommit/configuration_loader.rb:7
|
|
413
386
|
class Overcommit::ConfigurationLoader
|
|
414
387
|
# Create a configuration loader which writes warnings/errors to the given
|
|
415
388
|
# {Overcommit::Logger} instance.
|
|
416
389
|
#
|
|
417
|
-
# @option verify
|
|
418
390
|
# @param logger [Overcommit::Logger]
|
|
419
391
|
# @param options [Hash]
|
|
420
|
-
# @
|
|
421
|
-
# @return [ConfigurationLoader] a new instance of ConfigurationLoader
|
|
392
|
+
# @option verify [Boolean] whether to verify signatures
|
|
422
393
|
#
|
|
423
|
-
#
|
|
394
|
+
# pkg:gem/overcommit#lib/overcommit/configuration_loader.rb:47
|
|
424
395
|
def initialize(logger, options = T.unsafe(nil)); end
|
|
425
396
|
|
|
426
397
|
# Loads a configuration, ensuring it extends the default configuration.
|
|
427
398
|
#
|
|
428
|
-
#
|
|
429
|
-
def load_file(file); end
|
|
399
|
+
# pkg:gem/overcommit#lib/overcommit/configuration_loader.rb:71
|
|
400
|
+
def load_file(file, local_file = T.unsafe(nil)); end
|
|
430
401
|
|
|
431
402
|
# Loads and returns the configuration for the repository we're running in.
|
|
432
403
|
#
|
|
433
404
|
# @return [Overcommit::Configuration]
|
|
434
405
|
#
|
|
435
|
-
#
|
|
406
|
+
# pkg:gem/overcommit#lib/overcommit/configuration_loader.rb:55
|
|
436
407
|
def load_repo_config; end
|
|
437
408
|
|
|
438
409
|
private
|
|
439
410
|
|
|
440
|
-
#
|
|
411
|
+
# pkg:gem/overcommit#lib/overcommit/configuration_loader.rb:92
|
|
441
412
|
def verify_signatures(config); end
|
|
442
413
|
|
|
443
414
|
class << self
|
|
@@ -445,45 +416,40 @@ class Overcommit::ConfigurationLoader
|
|
|
445
416
|
#
|
|
446
417
|
# @return [Overcommit::Configuration]
|
|
447
418
|
#
|
|
448
|
-
#
|
|
419
|
+
# pkg:gem/overcommit#lib/overcommit/configuration_loader.rb:14
|
|
449
420
|
def default_configuration; end
|
|
450
421
|
|
|
451
422
|
# Loads configuration from file.
|
|
452
423
|
#
|
|
453
|
-
# @option logger
|
|
454
|
-
# @option verify
|
|
455
|
-
# @option default
|
|
456
|
-
# @param verify [Hash] a customizable set of options
|
|
457
|
-
# @param logger [Hash] a customizable set of options
|
|
458
|
-
# @param options [Hash]
|
|
459
424
|
# @param file [String] path to file
|
|
460
|
-
# @param
|
|
425
|
+
# @param options [Hash]
|
|
426
|
+
# @option default [Boolean] whether this is the default built-in configuration
|
|
427
|
+
# @option verify [Boolean] whether to verify the signature of the configuration
|
|
428
|
+
# @option logger [Overcommit::Logger]
|
|
461
429
|
# @return [Overcommit::Configuration]
|
|
462
430
|
#
|
|
463
|
-
#
|
|
431
|
+
# pkg:gem/overcommit#lib/overcommit/configuration_loader.rb:26
|
|
464
432
|
def load_from_file(file, options = T.unsafe(nil)); end
|
|
465
433
|
end
|
|
466
434
|
end
|
|
467
435
|
|
|
468
|
-
#
|
|
436
|
+
# pkg:gem/overcommit#lib/overcommit/configuration_loader.rb:8
|
|
469
437
|
Overcommit::ConfigurationLoader::DEFAULT_CONFIG_PATH = T.let(T.unsafe(nil), String)
|
|
470
438
|
|
|
471
439
|
# Validates and normalizes a configuration.
|
|
472
440
|
#
|
|
473
|
-
#
|
|
441
|
+
# pkg:gem/overcommit#lib/overcommit/configuration_validator.rb:6
|
|
474
442
|
class Overcommit::ConfigurationValidator
|
|
475
443
|
# Validates hash for any invalid options, normalizing where possible.
|
|
476
444
|
#
|
|
477
|
-
# @option logger
|
|
478
|
-
# @option default
|
|
479
|
-
# @param hash [Hash] hash representation of YAML config
|
|
480
|
-
# @param default [Hash] a customizable set of options
|
|
481
|
-
# @param logger [Hash] a customizable set of options
|
|
482
|
-
# @param options [Hash]
|
|
483
445
|
# @param config [Overcommit::Configuration]
|
|
446
|
+
# @param hash [Hash] hash representation of YAML config
|
|
447
|
+
# @param options[Hash]
|
|
448
|
+
# @option default [Boolean] whether hash represents the default built-in config
|
|
449
|
+
# @option logger [Overcommit::Logger] logger to output warnings to
|
|
484
450
|
# @return [Hash] validated hash (potentially modified)
|
|
485
451
|
#
|
|
486
|
-
#
|
|
452
|
+
# pkg:gem/overcommit#lib/overcommit/configuration_validator.rb:15
|
|
487
453
|
def validate(config, hash, options); end
|
|
488
454
|
|
|
489
455
|
private
|
|
@@ -491,28 +457,28 @@ class Overcommit::ConfigurationValidator
|
|
|
491
457
|
# Prints a warning if there are any hooks listed in the configuration
|
|
492
458
|
# without `enabled` explicitly set.
|
|
493
459
|
#
|
|
494
|
-
#
|
|
460
|
+
# pkg:gem/overcommit#lib/overcommit/configuration_validator.rb:125
|
|
495
461
|
def check_for_missing_enabled_option(hash); end
|
|
496
462
|
|
|
497
463
|
# Prints a warning if any hook has a number of processors larger than the
|
|
498
464
|
# global `concurrency` setting.
|
|
499
465
|
#
|
|
500
|
-
#
|
|
466
|
+
# pkg:gem/overcommit#lib/overcommit/configuration_validator.rb:147
|
|
501
467
|
def check_for_too_many_processors(config, hash); end
|
|
502
468
|
|
|
503
469
|
# Prints a warning if the `verify_plugin_signatures` option is used instead
|
|
504
470
|
# of the new `verify_signatures` option.
|
|
505
471
|
#
|
|
506
|
-
#
|
|
472
|
+
# pkg:gem/overcommit#lib/overcommit/configuration_validator.rb:174
|
|
507
473
|
def check_for_verify_plugin_signatures_option(hash); end
|
|
508
474
|
|
|
509
|
-
#
|
|
475
|
+
# pkg:gem/overcommit#lib/overcommit/configuration_validator.rb:58
|
|
510
476
|
def check_hook_env(hash); end
|
|
511
477
|
|
|
512
478
|
# Prints an error message and raises an exception if a hook has an
|
|
513
479
|
# invalid name, since this can result in strange errors elsewhere.
|
|
514
480
|
#
|
|
515
|
-
#
|
|
481
|
+
# pkg:gem/overcommit#lib/overcommit/configuration_validator.rb:98
|
|
516
482
|
def check_hook_name_format(hash); end
|
|
517
483
|
|
|
518
484
|
# Normalizes `nil` values to empty hashes.
|
|
@@ -521,132 +487,132 @@ class Overcommit::ConfigurationValidator
|
|
|
521
487
|
# together, since it's easier to merge two hashes than to have to check if
|
|
522
488
|
# one of the values is nil.
|
|
523
489
|
#
|
|
524
|
-
#
|
|
490
|
+
# pkg:gem/overcommit#lib/overcommit/configuration_validator.rb:46
|
|
525
491
|
def convert_nils_to_empty_hashes(hash); end
|
|
526
492
|
|
|
527
493
|
# Ensures that keys for all supported hook types exist (PreCommit,
|
|
528
494
|
# CommitMsg, etc.)
|
|
529
495
|
#
|
|
530
|
-
#
|
|
496
|
+
# pkg:gem/overcommit#lib/overcommit/configuration_validator.rb:34
|
|
531
497
|
def ensure_hook_type_sections_exist(hash); end
|
|
532
498
|
end
|
|
533
499
|
|
|
534
|
-
#
|
|
500
|
+
# pkg:gem/overcommit#lib/overcommit/exceptions.rb:3
|
|
535
501
|
module Overcommit::Exceptions; end
|
|
536
502
|
|
|
537
503
|
# Raised when a {Configuration} could not be loaded from a file.
|
|
538
504
|
#
|
|
539
|
-
#
|
|
505
|
+
# pkg:gem/overcommit#lib/overcommit/exceptions.rb:8
|
|
540
506
|
class Overcommit::Exceptions::ConfigurationError < ::Overcommit::Exceptions::Error; end
|
|
541
507
|
|
|
542
508
|
# Raised when the Overcommit configuration file signature has changed.
|
|
543
509
|
#
|
|
544
|
-
#
|
|
510
|
+
# pkg:gem/overcommit#lib/overcommit/exceptions.rb:11
|
|
545
511
|
class Overcommit::Exceptions::ConfigurationSignatureChanged < ::Overcommit::Exceptions::Error; end
|
|
546
512
|
|
|
547
513
|
# Base error class.
|
|
548
514
|
#
|
|
549
|
-
#
|
|
515
|
+
# pkg:gem/overcommit#lib/overcommit/exceptions.rb:5
|
|
550
516
|
class Overcommit::Exceptions::Error < ::StandardError; end
|
|
551
517
|
|
|
552
518
|
# Raised when trying to read/write to/from the local repo git config fails.
|
|
553
519
|
#
|
|
554
|
-
#
|
|
520
|
+
# pkg:gem/overcommit#lib/overcommit/exceptions.rb:14
|
|
555
521
|
class Overcommit::Exceptions::GitConfigError < ::Overcommit::Exceptions::Error; end
|
|
556
522
|
|
|
557
523
|
# Raised when there was a problem reading git revision information with `rev-list`.
|
|
558
524
|
#
|
|
559
|
-
#
|
|
525
|
+
# pkg:gem/overcommit#lib/overcommit/exceptions.rb:20
|
|
560
526
|
class Overcommit::Exceptions::GitRevListError < ::Overcommit::Exceptions::Error; end
|
|
561
527
|
|
|
562
528
|
# Raised when there was a problem reading submodule information for a repo.
|
|
563
529
|
#
|
|
564
|
-
#
|
|
530
|
+
# pkg:gem/overcommit#lib/overcommit/exceptions.rb:17
|
|
565
531
|
class Overcommit::Exceptions::GitSubmoduleError < ::Overcommit::Exceptions::Error; end
|
|
566
532
|
|
|
567
533
|
# Raised when a hook run was cancelled by the user.
|
|
568
534
|
#
|
|
569
|
-
#
|
|
535
|
+
# pkg:gem/overcommit#lib/overcommit/exceptions.rb:29
|
|
570
536
|
class Overcommit::Exceptions::HookCancelled < ::Overcommit::Exceptions::Error; end
|
|
571
537
|
|
|
572
538
|
# Raised when a {HookContext} is unable to clean the environment after a run.
|
|
573
539
|
#
|
|
574
|
-
#
|
|
540
|
+
# pkg:gem/overcommit#lib/overcommit/exceptions.rb:26
|
|
575
541
|
class Overcommit::Exceptions::HookCleanupFailed < ::Overcommit::Exceptions::Error; end
|
|
576
542
|
|
|
577
543
|
# Raised when a {HookRunner} could not be loaded.
|
|
578
544
|
#
|
|
579
|
-
#
|
|
545
|
+
# pkg:gem/overcommit#lib/overcommit/exceptions.rb:35
|
|
580
546
|
class Overcommit::Exceptions::HookContextLoadError < ::Overcommit::Exceptions::Error; end
|
|
581
547
|
|
|
582
548
|
# Raised when a hook could not be loaded by a {HookRunner}.
|
|
583
549
|
#
|
|
584
|
-
#
|
|
550
|
+
# pkg:gem/overcommit#lib/overcommit/exceptions.rb:32
|
|
585
551
|
class Overcommit::Exceptions::HookLoadError < ::Overcommit::Exceptions::Error; end
|
|
586
552
|
|
|
587
553
|
# Raised when a {HookContext} is unable to setup the environment before a run.
|
|
588
554
|
#
|
|
589
|
-
#
|
|
555
|
+
# pkg:gem/overcommit#lib/overcommit/exceptions.rb:23
|
|
590
556
|
class Overcommit::Exceptions::HookSetupFailed < ::Overcommit::Exceptions::Error; end
|
|
591
557
|
|
|
592
558
|
# Raised when a pipe character is used in the `execute` helper, as this was
|
|
593
559
|
# likely used in error.
|
|
594
560
|
#
|
|
595
|
-
#
|
|
561
|
+
# pkg:gem/overcommit#lib/overcommit/exceptions.rb:39
|
|
596
562
|
class Overcommit::Exceptions::InvalidCommandArgs < ::Overcommit::Exceptions::Error; end
|
|
597
563
|
|
|
598
564
|
# Raised when an installation target is not a valid git repository.
|
|
599
565
|
#
|
|
600
|
-
#
|
|
566
|
+
# pkg:gem/overcommit#lib/overcommit/exceptions.rb:42
|
|
601
567
|
class Overcommit::Exceptions::InvalidGitRepo < ::Overcommit::Exceptions::Error; end
|
|
602
568
|
|
|
603
569
|
# Raised when a hook was defined incorrectly.
|
|
604
570
|
#
|
|
605
|
-
#
|
|
571
|
+
# pkg:gem/overcommit#lib/overcommit/exceptions.rb:45
|
|
606
572
|
class Overcommit::Exceptions::InvalidHookDefinition < ::Overcommit::Exceptions::Error; end
|
|
607
573
|
|
|
608
574
|
# Raised when one or more hook plugin signatures have changed.
|
|
609
575
|
#
|
|
610
|
-
#
|
|
576
|
+
# pkg:gem/overcommit#lib/overcommit/exceptions.rb:48
|
|
611
577
|
class Overcommit::Exceptions::InvalidHookSignature < ::Overcommit::Exceptions::Error; end
|
|
612
578
|
|
|
613
579
|
# Raised when there is a problem processing output into {Hook::Messages}s.
|
|
614
580
|
#
|
|
615
|
-
#
|
|
581
|
+
# pkg:gem/overcommit#lib/overcommit/exceptions.rb:51
|
|
616
582
|
class Overcommit::Exceptions::MessageProcessingError < ::Overcommit::Exceptions::Error; end
|
|
617
583
|
|
|
618
584
|
# Raised when an installation target already contains non-Overcommit hooks.
|
|
619
585
|
#
|
|
620
|
-
#
|
|
586
|
+
# pkg:gem/overcommit#lib/overcommit/exceptions.rb:54
|
|
621
587
|
class Overcommit::Exceptions::PreExistingHooks < ::Overcommit::Exceptions::Error; end
|
|
622
588
|
|
|
623
|
-
#
|
|
589
|
+
# pkg:gem/overcommit#lib/overcommit/git_version.rb:13
|
|
624
590
|
Overcommit::GIT_VERSION = T.let(T.unsafe(nil), Overcommit::Utils::Version)
|
|
625
591
|
|
|
626
592
|
# Get configuration options from git
|
|
627
593
|
#
|
|
628
|
-
#
|
|
594
|
+
# pkg:gem/overcommit#lib/overcommit/git_config.rb:7
|
|
629
595
|
module Overcommit::GitConfig
|
|
630
596
|
private
|
|
631
597
|
|
|
632
|
-
#
|
|
598
|
+
# pkg:gem/overcommit#lib/overcommit/git_config.rb:10
|
|
633
599
|
def comment_character; end
|
|
634
600
|
|
|
635
|
-
#
|
|
601
|
+
# pkg:gem/overcommit#lib/overcommit/git_config.rb:16
|
|
636
602
|
def hooks_path; end
|
|
637
603
|
|
|
638
604
|
class << self
|
|
639
|
-
#
|
|
605
|
+
# pkg:gem/overcommit#lib/overcommit/git_config.rb:10
|
|
640
606
|
def comment_character; end
|
|
641
607
|
|
|
642
|
-
#
|
|
608
|
+
# pkg:gem/overcommit#lib/overcommit/git_config.rb:16
|
|
643
609
|
def hooks_path; end
|
|
644
610
|
end
|
|
645
611
|
end
|
|
646
612
|
|
|
647
613
|
# Provide a set of utilities for certain interactions with `git`.
|
|
648
614
|
#
|
|
649
|
-
#
|
|
615
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:8
|
|
650
616
|
module Overcommit::GitRepo
|
|
651
617
|
private
|
|
652
618
|
|
|
@@ -654,7 +620,7 @@ module Overcommit::GitRepo
|
|
|
654
620
|
#
|
|
655
621
|
# @return [Array<String>] list of absolute file paths
|
|
656
622
|
#
|
|
657
|
-
#
|
|
623
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:137
|
|
658
624
|
def all_files; end
|
|
659
625
|
|
|
660
626
|
# Returns the names of all branches containing the given commit.
|
|
@@ -662,14 +628,13 @@ module Overcommit::GitRepo
|
|
|
662
628
|
# @param commit_ref [String] git tree ref that resolves to a commit
|
|
663
629
|
# @return [Array<String>] list of branches containing the given commit
|
|
664
630
|
#
|
|
665
|
-
#
|
|
631
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:274
|
|
666
632
|
def branches_containing_commit(commit_ref); end
|
|
667
633
|
|
|
668
634
|
# Returns the name of the currently checked out branch.
|
|
669
|
-
#
|
|
670
635
|
# @return [String]
|
|
671
636
|
#
|
|
672
|
-
#
|
|
637
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:283
|
|
673
638
|
def current_branch; end
|
|
674
639
|
|
|
675
640
|
# Extract the set of modified lines from a given file.
|
|
@@ -678,23 +643,22 @@ module Overcommit::GitRepo
|
|
|
678
643
|
# @param options [Hash]
|
|
679
644
|
# @return [Set] line numbers that have been modified in file
|
|
680
645
|
#
|
|
681
|
-
#
|
|
646
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:68
|
|
682
647
|
def extract_modified_lines(file_path, options); end
|
|
683
648
|
|
|
684
649
|
# Returns whether the current git branch is empty (has no commits).
|
|
650
|
+
# @return [true,false]
|
|
685
651
|
#
|
|
686
|
-
#
|
|
687
|
-
#
|
|
688
|
-
# source://overcommit-0.59.1/lib/overcommit/git_repo.rb:146
|
|
652
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:146
|
|
689
653
|
def initial_commit?; end
|
|
690
654
|
|
|
691
655
|
# Returns the names of files in the given paths that are tracked by git.
|
|
692
656
|
#
|
|
693
|
-
# @option options
|
|
694
657
|
# @param paths [Array<String>] list of paths to check
|
|
658
|
+
# @option options [String] ref ('HEAD') Git ref to check
|
|
695
659
|
# @return [Array<String>] list of absolute file paths
|
|
696
660
|
#
|
|
697
|
-
#
|
|
661
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:110
|
|
698
662
|
def list_files(paths = T.unsafe(nil), options = T.unsafe(nil)); end
|
|
699
663
|
|
|
700
664
|
# Returns the names of all files that have been modified compared to HEAD.
|
|
@@ -702,19 +666,19 @@ module Overcommit::GitRepo
|
|
|
702
666
|
# @param options [Hash]
|
|
703
667
|
# @return [Array<String>] list of absolute file paths
|
|
704
668
|
#
|
|
705
|
-
#
|
|
669
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:93
|
|
706
670
|
def modified_files(options); end
|
|
707
671
|
|
|
708
672
|
# Restore any relevant files that were present when repo was in the middle
|
|
709
673
|
# of a cherry-pick.
|
|
710
674
|
#
|
|
711
|
-
#
|
|
675
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:203
|
|
712
676
|
def restore_cherry_pick_state; end
|
|
713
677
|
|
|
714
678
|
# Restore any relevant files that were present when repo was in the middle
|
|
715
679
|
# of a merge.
|
|
716
680
|
#
|
|
717
|
-
#
|
|
681
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:183
|
|
718
682
|
def restore_merge_state; end
|
|
719
683
|
|
|
720
684
|
# Returns the submodules that have been staged for removal.
|
|
@@ -733,7 +697,7 @@ module Overcommit::GitRepo
|
|
|
733
697
|
#
|
|
734
698
|
# @raise [Overcommit::Exceptions::GitSubmoduleError] when
|
|
735
699
|
#
|
|
736
|
-
#
|
|
700
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:231
|
|
737
701
|
def staged_submodule_removals; end
|
|
738
702
|
|
|
739
703
|
# Store any relevant files that are present when repo is in the middle of a
|
|
@@ -741,7 +705,7 @@ module Overcommit::GitRepo
|
|
|
741
705
|
#
|
|
742
706
|
# Restored via [#restore_cherry_pick_state].
|
|
743
707
|
#
|
|
744
|
-
#
|
|
708
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:171
|
|
745
709
|
def store_cherry_pick_state; end
|
|
746
710
|
|
|
747
711
|
# Store any relevant files that are present when repo is in the middle of a
|
|
@@ -749,16 +713,16 @@ module Overcommit::GitRepo
|
|
|
749
713
|
#
|
|
750
714
|
# Restored via [#restore_merge_state].
|
|
751
715
|
#
|
|
752
|
-
#
|
|
716
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:154
|
|
753
717
|
def store_merge_state; end
|
|
754
718
|
|
|
755
719
|
# Returns a list of SubmoduleStatus objects, one for each submodule in the
|
|
756
720
|
# parent repository.
|
|
757
721
|
#
|
|
758
|
-
# @option options
|
|
722
|
+
# @option options [Boolean] recursive check submodules recursively
|
|
759
723
|
# @return [Array<SubmoduleStatus>]
|
|
760
724
|
#
|
|
761
|
-
#
|
|
725
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:53
|
|
762
726
|
def submodule_statuses(options = T.unsafe(nil)); end
|
|
763
727
|
|
|
764
728
|
# Returns the current set of registered submodules.
|
|
@@ -766,15 +730,15 @@ module Overcommit::GitRepo
|
|
|
766
730
|
# @param options [Hash]
|
|
767
731
|
# @return [Array<Overcommit::GitRepo::Submodule>]
|
|
768
732
|
#
|
|
769
|
-
#
|
|
733
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:245
|
|
770
734
|
def submodules(options = T.unsafe(nil)); end
|
|
771
735
|
|
|
772
736
|
# Returns whether the specified file/path is tracked by this repository.
|
|
773
737
|
#
|
|
774
738
|
# @param path [String]
|
|
775
|
-
# @return [true,
|
|
739
|
+
# @return [true,false]
|
|
776
740
|
#
|
|
777
|
-
#
|
|
741
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:130
|
|
778
742
|
def tracked?(path); end
|
|
779
743
|
|
|
780
744
|
class << self
|
|
@@ -782,7 +746,7 @@ module Overcommit::GitRepo
|
|
|
782
746
|
#
|
|
783
747
|
# @return [Array<String>] list of absolute file paths
|
|
784
748
|
#
|
|
785
|
-
#
|
|
749
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:137
|
|
786
750
|
def all_files; end
|
|
787
751
|
|
|
788
752
|
# Returns the names of all branches containing the given commit.
|
|
@@ -790,14 +754,13 @@ module Overcommit::GitRepo
|
|
|
790
754
|
# @param commit_ref [String] git tree ref that resolves to a commit
|
|
791
755
|
# @return [Array<String>] list of branches containing the given commit
|
|
792
756
|
#
|
|
793
|
-
#
|
|
757
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:274
|
|
794
758
|
def branches_containing_commit(commit_ref); end
|
|
795
759
|
|
|
796
760
|
# Returns the name of the currently checked out branch.
|
|
797
|
-
#
|
|
798
761
|
# @return [String]
|
|
799
762
|
#
|
|
800
|
-
#
|
|
763
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:283
|
|
801
764
|
def current_branch; end
|
|
802
765
|
|
|
803
766
|
# Extract the set of modified lines from a given file.
|
|
@@ -806,24 +769,22 @@ module Overcommit::GitRepo
|
|
|
806
769
|
# @param options [Hash]
|
|
807
770
|
# @return [Set] line numbers that have been modified in file
|
|
808
771
|
#
|
|
809
|
-
#
|
|
772
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:68
|
|
810
773
|
def extract_modified_lines(file_path, options); end
|
|
811
774
|
|
|
812
775
|
# Returns whether the current git branch is empty (has no commits).
|
|
776
|
+
# @return [true,false]
|
|
813
777
|
#
|
|
814
|
-
#
|
|
815
|
-
#
|
|
816
|
-
# source://overcommit-0.59.1/lib/overcommit/git_repo.rb:146
|
|
778
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:146
|
|
817
779
|
def initial_commit?; end
|
|
818
780
|
|
|
819
781
|
# Returns the names of files in the given paths that are tracked by git.
|
|
820
782
|
#
|
|
821
|
-
# @option options
|
|
822
783
|
# @param paths [Array<String>] list of paths to check
|
|
823
|
-
# @
|
|
784
|
+
# @option options [String] ref ('HEAD') Git ref to check
|
|
824
785
|
# @return [Array<String>] list of absolute file paths
|
|
825
786
|
#
|
|
826
|
-
#
|
|
787
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:110
|
|
827
788
|
def list_files(paths = T.unsafe(nil), options = T.unsafe(nil)); end
|
|
828
789
|
|
|
829
790
|
# Returns the names of all files that have been modified compared to HEAD.
|
|
@@ -831,19 +792,19 @@ module Overcommit::GitRepo
|
|
|
831
792
|
# @param options [Hash]
|
|
832
793
|
# @return [Array<String>] list of absolute file paths
|
|
833
794
|
#
|
|
834
|
-
#
|
|
795
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:93
|
|
835
796
|
def modified_files(options); end
|
|
836
797
|
|
|
837
798
|
# Restore any relevant files that were present when repo was in the middle
|
|
838
799
|
# of a cherry-pick.
|
|
839
800
|
#
|
|
840
|
-
#
|
|
801
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:203
|
|
841
802
|
def restore_cherry_pick_state; end
|
|
842
803
|
|
|
843
804
|
# Restore any relevant files that were present when repo was in the middle
|
|
844
805
|
# of a merge.
|
|
845
806
|
#
|
|
846
|
-
#
|
|
807
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:183
|
|
847
808
|
def restore_merge_state; end
|
|
848
809
|
|
|
849
810
|
# Returns the submodules that have been staged for removal.
|
|
@@ -862,7 +823,7 @@ module Overcommit::GitRepo
|
|
|
862
823
|
#
|
|
863
824
|
# @raise [Overcommit::Exceptions::GitSubmoduleError] when
|
|
864
825
|
#
|
|
865
|
-
#
|
|
826
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:231
|
|
866
827
|
def staged_submodule_removals; end
|
|
867
828
|
|
|
868
829
|
# Store any relevant files that are present when repo is in the middle of a
|
|
@@ -870,7 +831,7 @@ module Overcommit::GitRepo
|
|
|
870
831
|
#
|
|
871
832
|
# Restored via [#restore_cherry_pick_state].
|
|
872
833
|
#
|
|
873
|
-
#
|
|
834
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:171
|
|
874
835
|
def store_cherry_pick_state; end
|
|
875
836
|
|
|
876
837
|
# Store any relevant files that are present when repo is in the middle of a
|
|
@@ -878,17 +839,16 @@ module Overcommit::GitRepo
|
|
|
878
839
|
#
|
|
879
840
|
# Restored via [#restore_merge_state].
|
|
880
841
|
#
|
|
881
|
-
#
|
|
842
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:154
|
|
882
843
|
def store_merge_state; end
|
|
883
844
|
|
|
884
845
|
# Returns a list of SubmoduleStatus objects, one for each submodule in the
|
|
885
846
|
# parent repository.
|
|
886
847
|
#
|
|
887
|
-
# @option options
|
|
888
|
-
# @param options [Hash] a customizable set of options
|
|
848
|
+
# @option options [Boolean] recursive check submodules recursively
|
|
889
849
|
# @return [Array<SubmoduleStatus>]
|
|
890
850
|
#
|
|
891
|
-
#
|
|
851
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:53
|
|
892
852
|
def submodule_statuses(options = T.unsafe(nil)); end
|
|
893
853
|
|
|
894
854
|
# Returns the current set of registered submodules.
|
|
@@ -896,61 +856,60 @@ module Overcommit::GitRepo
|
|
|
896
856
|
# @param options [Hash]
|
|
897
857
|
# @return [Array<Overcommit::GitRepo::Submodule>]
|
|
898
858
|
#
|
|
899
|
-
#
|
|
859
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:245
|
|
900
860
|
def submodules(options = T.unsafe(nil)); end
|
|
901
861
|
|
|
902
862
|
# Returns whether the specified file/path is tracked by this repository.
|
|
903
863
|
#
|
|
904
864
|
# @param path [String]
|
|
905
|
-
# @return [true,
|
|
865
|
+
# @return [true,false]
|
|
906
866
|
#
|
|
907
|
-
#
|
|
867
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:130
|
|
908
868
|
def tracked?(path); end
|
|
909
869
|
end
|
|
910
870
|
end
|
|
911
871
|
|
|
912
872
|
# Regular expression used to extract diff ranges from hunks of diff output.
|
|
913
873
|
#
|
|
914
|
-
#
|
|
874
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:12
|
|
915
875
|
Overcommit::GitRepo::DIFF_HUNK_REGEX = T.let(T.unsafe(nil), Regexp)
|
|
916
876
|
|
|
917
877
|
# Regular expression used to extract information from lines of
|
|
918
878
|
# `git submodule status` output
|
|
919
879
|
#
|
|
920
|
-
#
|
|
880
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:21
|
|
921
881
|
Overcommit::GitRepo::SUBMODULE_STATUS_REGEX = T.let(T.unsafe(nil), Regexp)
|
|
922
882
|
|
|
923
883
|
# Contains information about a registered submodule.
|
|
924
884
|
#
|
|
925
|
-
#
|
|
885
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:214
|
|
926
886
|
class Overcommit::GitRepo::Submodule < ::Struct
|
|
927
|
-
#
|
|
928
|
-
#
|
|
929
|
-
# @return [Object] the current value of path
|
|
887
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:214
|
|
930
888
|
def path; end
|
|
931
889
|
|
|
932
|
-
#
|
|
933
|
-
#
|
|
934
|
-
# @param value [Object] the value to set the attribute path to.
|
|
935
|
-
# @return [Object] the newly set value
|
|
890
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:214
|
|
936
891
|
def path=(_); end
|
|
937
892
|
|
|
938
|
-
#
|
|
939
|
-
#
|
|
940
|
-
# @return [Object] the current value of url
|
|
893
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:214
|
|
941
894
|
def url; end
|
|
942
895
|
|
|
943
|
-
#
|
|
944
|
-
#
|
|
945
|
-
# @param value [Object] the value to set the attribute url to.
|
|
946
|
-
# @return [Object] the newly set value
|
|
896
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:214
|
|
947
897
|
def url=(_); end
|
|
948
898
|
|
|
949
899
|
class << self
|
|
900
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:214
|
|
950
901
|
def [](*_arg0); end
|
|
902
|
+
|
|
903
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:214
|
|
951
904
|
def inspect; end
|
|
905
|
+
|
|
906
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:214
|
|
952
907
|
def keyword_init?; end
|
|
908
|
+
|
|
909
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:214
|
|
953
910
|
def members; end
|
|
911
|
+
|
|
912
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:214
|
|
954
913
|
def new(*_arg0); end
|
|
955
914
|
end
|
|
956
915
|
end
|
|
@@ -958,115 +917,89 @@ end
|
|
|
958
917
|
# Struct encapsulating submodule information extracted from the
|
|
959
918
|
# output of `git submodule status`
|
|
960
919
|
#
|
|
961
|
-
#
|
|
920
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:29
|
|
962
921
|
class Overcommit::GitRepo::SubmoduleStatus < ::Struct
|
|
963
|
-
#
|
|
964
|
-
#
|
|
965
|
-
# @return [Object] the current value of describe
|
|
922
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:29
|
|
966
923
|
def describe; end
|
|
967
924
|
|
|
968
|
-
#
|
|
969
|
-
#
|
|
970
|
-
# @param value [Object] the value to set the attribute describe to.
|
|
971
|
-
# @return [Object] the newly set value
|
|
925
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:29
|
|
972
926
|
def describe=(_); end
|
|
973
927
|
|
|
974
|
-
#
|
|
975
|
-
#
|
|
976
|
-
# @return [Boolean]
|
|
977
|
-
#
|
|
978
|
-
# source://overcommit-0.59.1/lib/overcommit/git_repo.rb:43
|
|
928
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:43
|
|
979
929
|
def merge_conflict?; end
|
|
980
930
|
|
|
981
|
-
#
|
|
982
|
-
# index, i.e. its checked-out commit differs from that stored in
|
|
983
|
-
# the index of the parent repo
|
|
984
|
-
#
|
|
985
|
-
# @return [Boolean]
|
|
986
|
-
#
|
|
987
|
-
# source://overcommit-0.59.1/lib/overcommit/git_repo.rb:38
|
|
931
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:38
|
|
988
932
|
def outdated?; end
|
|
989
933
|
|
|
990
|
-
#
|
|
991
|
-
#
|
|
992
|
-
# @return [Object] the current value of path
|
|
934
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:29
|
|
993
935
|
def path; end
|
|
994
936
|
|
|
995
|
-
#
|
|
996
|
-
#
|
|
997
|
-
# @param value [Object] the value to set the attribute path to.
|
|
998
|
-
# @return [Object] the newly set value
|
|
937
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:29
|
|
999
938
|
def path=(_); end
|
|
1000
939
|
|
|
1001
|
-
#
|
|
1002
|
-
#
|
|
1003
|
-
# @return [Object] the current value of prefix
|
|
940
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:29
|
|
1004
941
|
def prefix; end
|
|
1005
942
|
|
|
1006
|
-
#
|
|
1007
|
-
#
|
|
1008
|
-
# @param value [Object] the value to set the attribute prefix to.
|
|
1009
|
-
# @return [Object] the newly set value
|
|
943
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:29
|
|
1010
944
|
def prefix=(_); end
|
|
1011
945
|
|
|
1012
|
-
#
|
|
1013
|
-
#
|
|
1014
|
-
# @return [Object] the current value of sha1
|
|
946
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:29
|
|
1015
947
|
def sha1; end
|
|
1016
948
|
|
|
1017
|
-
#
|
|
1018
|
-
#
|
|
1019
|
-
# @param value [Object] the value to set the attribute sha1 to.
|
|
1020
|
-
# @return [Object] the newly set value
|
|
949
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:29
|
|
1021
950
|
def sha1=(_); end
|
|
1022
951
|
|
|
1023
|
-
#
|
|
1024
|
-
#
|
|
1025
|
-
# @return [Boolean]
|
|
1026
|
-
#
|
|
1027
|
-
# source://overcommit-0.59.1/lib/overcommit/git_repo.rb:31
|
|
952
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:31
|
|
1028
953
|
def uninitialized?; end
|
|
1029
954
|
|
|
1030
955
|
class << self
|
|
956
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:29
|
|
1031
957
|
def [](*_arg0); end
|
|
958
|
+
|
|
959
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:29
|
|
1032
960
|
def inspect; end
|
|
961
|
+
|
|
962
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:29
|
|
1033
963
|
def keyword_init?; end
|
|
964
|
+
|
|
965
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:29
|
|
1034
966
|
def members; end
|
|
967
|
+
|
|
968
|
+
# pkg:gem/overcommit#lib/overcommit/git_repo.rb:29
|
|
1035
969
|
def new(*_arg0); end
|
|
1036
970
|
end
|
|
1037
971
|
end
|
|
1038
972
|
|
|
1039
|
-
#
|
|
973
|
+
# pkg:gem/overcommit#lib/overcommit/constants.rb:5
|
|
1040
974
|
Overcommit::HOME = T.let(T.unsafe(nil), String)
|
|
1041
975
|
|
|
1042
|
-
#
|
|
976
|
+
# pkg:gem/overcommit#lib/overcommit/constants.rb:9
|
|
1043
977
|
Overcommit::HOOK_DIRECTORY = T.let(T.unsafe(nil), String)
|
|
1044
978
|
|
|
1045
979
|
# Container for top-level hook-related classes and constants.
|
|
1046
980
|
#
|
|
1047
|
-
#
|
|
981
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:7
|
|
1048
982
|
module Overcommit::Hook; end
|
|
1049
983
|
|
|
1050
984
|
# Functionality common to all hooks.
|
|
1051
985
|
#
|
|
1052
|
-
#
|
|
986
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:19
|
|
1053
987
|
class Overcommit::Hook::Base
|
|
1054
988
|
extend ::Forwardable
|
|
1055
989
|
|
|
1056
990
|
# @param config [Overcommit::Configuration]
|
|
1057
991
|
# @param context [Overcommit::HookContext]
|
|
1058
|
-
# @return [Base] a new instance of Base
|
|
1059
992
|
#
|
|
1060
|
-
#
|
|
993
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:27
|
|
1061
994
|
def initialize(config, context); end
|
|
1062
995
|
|
|
1063
|
-
#
|
|
996
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:22
|
|
1064
997
|
def all_files(*args, **_arg1, &block); end
|
|
1065
998
|
|
|
1066
999
|
# Gets a list of staged files that apply to this hook based on its
|
|
1067
1000
|
# configured `include` and `exclude` lists.
|
|
1068
1001
|
#
|
|
1069
|
-
#
|
|
1002
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:165
|
|
1070
1003
|
def applicable_files; end
|
|
1071
1004
|
|
|
1072
1005
|
# Return command to execute for this hook.
|
|
@@ -1080,25 +1013,19 @@ class Overcommit::Hook::Base
|
|
|
1080
1013
|
#
|
|
1081
1014
|
# @return [Array<String>]
|
|
1082
1015
|
#
|
|
1083
|
-
#
|
|
1016
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:141
|
|
1084
1017
|
def command; end
|
|
1085
1018
|
|
|
1086
|
-
#
|
|
1087
|
-
#
|
|
1088
|
-
# source://overcommit-0.59.1/lib/overcommit/hook/base.rb:23
|
|
1019
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:23
|
|
1089
1020
|
def config; end
|
|
1090
1021
|
|
|
1091
|
-
#
|
|
1022
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:58
|
|
1092
1023
|
def description; end
|
|
1093
1024
|
|
|
1094
|
-
#
|
|
1095
|
-
#
|
|
1096
|
-
# source://overcommit-0.59.1/lib/overcommit/hook/base.rb:78
|
|
1025
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:78
|
|
1097
1026
|
def enabled?; end
|
|
1098
1027
|
|
|
1099
|
-
#
|
|
1100
|
-
#
|
|
1101
|
-
# source://overcommit-0.59.1/lib/overcommit/hook/base.rb:82
|
|
1028
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:82
|
|
1102
1029
|
def excluded?; end
|
|
1103
1030
|
|
|
1104
1031
|
# Execute a command in a separate process.
|
|
@@ -1108,16 +1035,18 @@ class Overcommit::Hook::Base
|
|
|
1108
1035
|
# operating system's maximum command length is not exceeded. This is useful
|
|
1109
1036
|
# for splitting up long file lists.
|
|
1110
1037
|
#
|
|
1111
|
-
# @option options
|
|
1112
|
-
# @option options
|
|
1113
1038
|
# @param cmd [Array<String>] command arguments
|
|
1114
1039
|
# @param options [Hash]
|
|
1115
|
-
# @
|
|
1040
|
+
# @option options [Array<String>] :args arguments that can be split up over
|
|
1041
|
+
# multiple invocations (usually a list of files)
|
|
1042
|
+
# @option options [String] :input string to pass to process' standard input
|
|
1043
|
+
# stream
|
|
1044
|
+
# @return [#status,#stdout,#stderr] struct containing result of invocation
|
|
1116
1045
|
#
|
|
1117
|
-
#
|
|
1046
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:115
|
|
1118
1047
|
def execute(cmd, options = T.unsafe(nil)); end
|
|
1119
1048
|
|
|
1120
|
-
#
|
|
1049
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:119
|
|
1121
1050
|
def execute_in_background(cmd); end
|
|
1122
1051
|
|
|
1123
1052
|
# Return command line flags to be passed to the command.
|
|
@@ -1135,60 +1064,48 @@ class Overcommit::Hook::Base
|
|
|
1135
1064
|
#
|
|
1136
1065
|
# @return [Array<String>]
|
|
1137
1066
|
#
|
|
1138
|
-
#
|
|
1067
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:159
|
|
1139
1068
|
def flags; end
|
|
1140
1069
|
|
|
1141
|
-
#
|
|
1142
|
-
#
|
|
1143
|
-
# source://overcommit-0.59.1/lib/overcommit/hook/base.rb:97
|
|
1070
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:97
|
|
1144
1071
|
def in_path?(cmd); end
|
|
1145
1072
|
|
|
1146
1073
|
# Gets a list of all files that apply to this hook based on its
|
|
1147
1074
|
# configured `include` and `exclude` lists.
|
|
1148
1075
|
#
|
|
1149
|
-
#
|
|
1076
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:171
|
|
1150
1077
|
def included_files; end
|
|
1151
1078
|
|
|
1152
|
-
#
|
|
1079
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:22
|
|
1153
1080
|
def modified_files(*args, **_arg1, &block); end
|
|
1154
1081
|
|
|
1155
|
-
#
|
|
1082
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:54
|
|
1156
1083
|
def name; end
|
|
1157
1084
|
|
|
1158
|
-
#
|
|
1159
|
-
#
|
|
1160
|
-
# source://overcommit-0.59.1/lib/overcommit/hook/base.rb:66
|
|
1085
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:66
|
|
1161
1086
|
def parallelize?; end
|
|
1162
1087
|
|
|
1163
|
-
#
|
|
1088
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:70
|
|
1164
1089
|
def processors; end
|
|
1165
1090
|
|
|
1166
|
-
#
|
|
1167
|
-
#
|
|
1168
|
-
# source://overcommit-0.59.1/lib/overcommit/hook/base.rb:74
|
|
1091
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:74
|
|
1169
1092
|
def quiet?; end
|
|
1170
1093
|
|
|
1171
|
-
#
|
|
1172
|
-
#
|
|
1173
|
-
# source://overcommit-0.59.1/lib/overcommit/hook/base.rb:62
|
|
1094
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:62
|
|
1174
1095
|
def required?; end
|
|
1175
1096
|
|
|
1176
|
-
#
|
|
1097
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:123
|
|
1177
1098
|
def required_executable; end
|
|
1178
1099
|
|
|
1179
|
-
#
|
|
1100
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:127
|
|
1180
1101
|
def required_libraries; end
|
|
1181
1102
|
|
|
1182
1103
|
# Runs the hook.
|
|
1183
1104
|
#
|
|
1184
|
-
#
|
|
1185
|
-
#
|
|
1186
|
-
# source://overcommit-0.59.1/lib/overcommit/hook/base.rb:33
|
|
1105
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:33
|
|
1187
1106
|
def run; end
|
|
1188
1107
|
|
|
1189
|
-
#
|
|
1190
|
-
#
|
|
1191
|
-
# source://overcommit-0.59.1/lib/overcommit/hook/base.rb:91
|
|
1108
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:91
|
|
1192
1109
|
def run?; end
|
|
1193
1110
|
|
|
1194
1111
|
# Runs the hook and transforms the status returned based on the hook's
|
|
@@ -1198,47 +1115,43 @@ class Overcommit::Hook::Base
|
|
|
1198
1115
|
# implement `#run`, and we needed a wrapper step to transform the status
|
|
1199
1116
|
# based on any custom configuration.
|
|
1200
1117
|
#
|
|
1201
|
-
#
|
|
1118
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:43
|
|
1202
1119
|
def run_and_transform; end
|
|
1203
1120
|
|
|
1204
|
-
#
|
|
1205
|
-
#
|
|
1206
|
-
# source://overcommit-0.59.1/lib/overcommit/hook/base.rb:86
|
|
1121
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:86
|
|
1207
1122
|
def skip?; end
|
|
1208
1123
|
|
|
1209
1124
|
private
|
|
1210
1125
|
|
|
1211
|
-
#
|
|
1212
|
-
#
|
|
1213
|
-
# source://overcommit-0.59.1/lib/overcommit/hook/base.rb:181
|
|
1126
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:181
|
|
1214
1127
|
def applicable_file?(file); end
|
|
1215
1128
|
|
|
1216
1129
|
# If the hook defines a required executable, check if it's in the path and
|
|
1217
1130
|
# display the install command if one exists.
|
|
1218
1131
|
#
|
|
1219
|
-
#
|
|
1132
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:210
|
|
1220
1133
|
def check_for_executable; end
|
|
1221
1134
|
|
|
1222
1135
|
# If the hook defines required library paths that it wants to load, attempt
|
|
1223
1136
|
# to load them.
|
|
1224
1137
|
#
|
|
1225
|
-
#
|
|
1138
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:227
|
|
1226
1139
|
def check_for_libraries; end
|
|
1227
1140
|
|
|
1228
1141
|
# Check for any required executables or libraries.
|
|
1229
1142
|
#
|
|
1230
1143
|
# Returns output if any requirements are not met.
|
|
1231
1144
|
#
|
|
1232
|
-
#
|
|
1145
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:204
|
|
1233
1146
|
def check_for_requirements; end
|
|
1234
1147
|
|
|
1235
|
-
#
|
|
1148
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:288
|
|
1236
1149
|
def current_branch; end
|
|
1237
1150
|
|
|
1238
|
-
#
|
|
1151
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:284
|
|
1239
1152
|
def exclude_branches; end
|
|
1240
1153
|
|
|
1241
|
-
#
|
|
1154
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:217
|
|
1242
1155
|
def install_command_prompt; end
|
|
1243
1156
|
|
|
1244
1157
|
# Converts the hook's return value into a canonical form of a tuple
|
|
@@ -1254,92 +1167,81 @@ class Overcommit::Hook::Base
|
|
|
1254
1167
|
# @param hook_return_value [Symbol, Array<Symbol,String>, Array<Message>]
|
|
1255
1168
|
# @return [Array<Symbol,String>] tuple of status and output
|
|
1256
1169
|
#
|
|
1257
|
-
#
|
|
1170
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:256
|
|
1258
1171
|
def process_hook_return_value(hook_return_value); end
|
|
1259
1172
|
|
|
1260
|
-
#
|
|
1173
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:177
|
|
1261
1174
|
def select_applicable(list); end
|
|
1262
1175
|
|
|
1263
1176
|
# Transforms the hook's status based on custom configuration.
|
|
1264
1177
|
#
|
|
1265
1178
|
# This allows users to change failures into warnings, or vice versa.
|
|
1266
1179
|
#
|
|
1267
|
-
#
|
|
1180
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:273
|
|
1268
1181
|
def transform_status(status); end
|
|
1269
1182
|
end
|
|
1270
1183
|
|
|
1271
1184
|
# Possible types of messages.
|
|
1272
1185
|
#
|
|
1273
|
-
#
|
|
1186
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:16
|
|
1274
1187
|
Overcommit::Hook::MESSAGE_TYPES = T.let(T.unsafe(nil), Array)
|
|
1275
1188
|
|
|
1276
1189
|
# Helper containing metadata about error/warning messages returned by hooks.
|
|
1277
1190
|
#
|
|
1278
|
-
#
|
|
1191
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:9
|
|
1279
1192
|
class Overcommit::Hook::Message < ::Struct
|
|
1280
|
-
#
|
|
1281
|
-
#
|
|
1282
|
-
# @return [Object] the current value of content
|
|
1193
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:9
|
|
1283
1194
|
def content; end
|
|
1284
1195
|
|
|
1285
|
-
#
|
|
1286
|
-
#
|
|
1287
|
-
# @param value [Object] the value to set the attribute content to.
|
|
1288
|
-
# @return [Object] the newly set value
|
|
1196
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:9
|
|
1289
1197
|
def content=(_); end
|
|
1290
1198
|
|
|
1291
|
-
#
|
|
1292
|
-
#
|
|
1293
|
-
# @return [Object] the current value of file
|
|
1199
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:9
|
|
1294
1200
|
def file; end
|
|
1295
1201
|
|
|
1296
|
-
#
|
|
1297
|
-
#
|
|
1298
|
-
# @param value [Object] the value to set the attribute file to.
|
|
1299
|
-
# @return [Object] the newly set value
|
|
1202
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:9
|
|
1300
1203
|
def file=(_); end
|
|
1301
1204
|
|
|
1302
|
-
#
|
|
1303
|
-
#
|
|
1304
|
-
# @return [Object] the current value of line
|
|
1205
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:9
|
|
1305
1206
|
def line; end
|
|
1306
1207
|
|
|
1307
|
-
#
|
|
1308
|
-
#
|
|
1309
|
-
# @param value [Object] the value to set the attribute line to.
|
|
1310
|
-
# @return [Object] the newly set value
|
|
1208
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:9
|
|
1311
1209
|
def line=(_); end
|
|
1312
1210
|
|
|
1313
|
-
#
|
|
1211
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:10
|
|
1314
1212
|
def to_s; end
|
|
1315
1213
|
|
|
1316
|
-
#
|
|
1317
|
-
#
|
|
1318
|
-
# @return [Object] the current value of type
|
|
1214
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:9
|
|
1319
1215
|
def type; end
|
|
1320
1216
|
|
|
1321
|
-
#
|
|
1322
|
-
#
|
|
1323
|
-
# @param value [Object] the value to set the attribute type to.
|
|
1324
|
-
# @return [Object] the newly set value
|
|
1217
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:9
|
|
1325
1218
|
def type=(_); end
|
|
1326
1219
|
|
|
1327
1220
|
class << self
|
|
1221
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:9
|
|
1328
1222
|
def [](*_arg0); end
|
|
1223
|
+
|
|
1224
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:9
|
|
1329
1225
|
def inspect; end
|
|
1226
|
+
|
|
1227
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:9
|
|
1330
1228
|
def keyword_init?; end
|
|
1229
|
+
|
|
1230
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:9
|
|
1331
1231
|
def members; end
|
|
1232
|
+
|
|
1233
|
+
# pkg:gem/overcommit#lib/overcommit/hook/base.rb:9
|
|
1332
1234
|
def new(*_arg0); end
|
|
1333
1235
|
end
|
|
1334
1236
|
end
|
|
1335
1237
|
|
|
1336
1238
|
# Utility module which manages the creation of {HookContext}s.
|
|
1337
1239
|
#
|
|
1338
|
-
#
|
|
1240
|
+
# pkg:gem/overcommit#lib/overcommit/hook_context/base.rb:3
|
|
1339
1241
|
module Overcommit::HookContext
|
|
1340
1242
|
class << self
|
|
1341
|
-
#
|
|
1342
|
-
def create(hook_type, config, args, input); end
|
|
1243
|
+
# pkg:gem/overcommit#lib/overcommit/hook_context.rb:5
|
|
1244
|
+
def create(hook_type, config, args, input, **cli_options); end
|
|
1343
1245
|
end
|
|
1344
1246
|
end
|
|
1345
1247
|
|
|
@@ -1355,23 +1257,23 @@ end
|
|
|
1355
1257
|
#
|
|
1356
1258
|
# @abstract
|
|
1357
1259
|
#
|
|
1358
|
-
#
|
|
1260
|
+
# pkg:gem/overcommit#lib/overcommit/hook_context/base.rb:15
|
|
1359
1261
|
class Overcommit::HookContext::Base
|
|
1360
1262
|
# Creates a hook context from the given configuration and input options.
|
|
1361
1263
|
#
|
|
1362
1264
|
# @param config [Overcommit::Configuration]
|
|
1363
1265
|
# @param args [Array<String>]
|
|
1364
1266
|
# @param input [IO] standard input stream
|
|
1365
|
-
# @
|
|
1267
|
+
# @param options [Hash] cli options
|
|
1366
1268
|
#
|
|
1367
|
-
#
|
|
1368
|
-
def initialize(config, args, input); end
|
|
1269
|
+
# pkg:gem/overcommit#lib/overcommit/hook_context/base.rb:22
|
|
1270
|
+
def initialize(config, args, input, **options); end
|
|
1369
1271
|
|
|
1370
1272
|
# Returns the full list of files tracked by git
|
|
1371
1273
|
#
|
|
1372
1274
|
# @return [Array<String>]
|
|
1373
1275
|
#
|
|
1374
|
-
#
|
|
1276
|
+
# pkg:gem/overcommit#lib/overcommit/hook_context/base.rb:90
|
|
1375
1277
|
def all_files; end
|
|
1376
1278
|
|
|
1377
1279
|
# Resets the environment to an appropriate state.
|
|
@@ -1380,7 +1282,7 @@ class Overcommit::HookContext::Base
|
|
|
1380
1282
|
# Different hook types can perform different cleanup operations, which are
|
|
1381
1283
|
# intended to "undo" the results of the call to {#setup_environment}.
|
|
1382
1284
|
#
|
|
1383
|
-
#
|
|
1285
|
+
# pkg:gem/overcommit#lib/overcommit/hook_context/base.rb:73
|
|
1384
1286
|
def cleanup_environment; end
|
|
1385
1287
|
|
|
1386
1288
|
# Executes a command as if it were a regular git hook, passing all
|
|
@@ -1389,28 +1291,28 @@ class Overcommit::HookContext::Base
|
|
|
1389
1291
|
# This is intended to be used by ad hoc hooks so developers can link up
|
|
1390
1292
|
# their existing git hooks with Overcommit.
|
|
1391
1293
|
#
|
|
1392
|
-
#
|
|
1294
|
+
# pkg:gem/overcommit#lib/overcommit/hook_context/base.rb:35
|
|
1393
1295
|
def execute_hook(command); end
|
|
1394
1296
|
|
|
1395
1297
|
# Returns the camel-cased type of this hook (e.g. PreCommit)
|
|
1396
1298
|
#
|
|
1397
1299
|
# @return [String]
|
|
1398
1300
|
#
|
|
1399
|
-
#
|
|
1301
|
+
# pkg:gem/overcommit#lib/overcommit/hook_context/base.rb:42
|
|
1400
1302
|
def hook_class_name; end
|
|
1401
1303
|
|
|
1402
1304
|
# Returns the actual name of the hook script being run (e.g. pre-commit).
|
|
1403
1305
|
#
|
|
1404
1306
|
# @return [String]
|
|
1405
1307
|
#
|
|
1406
|
-
#
|
|
1308
|
+
# pkg:gem/overcommit#lib/overcommit/hook_context/base.rb:56
|
|
1407
1309
|
def hook_script_name; end
|
|
1408
1310
|
|
|
1409
1311
|
# Returns the snake-cased type of this hook (e.g. pre_commit)
|
|
1410
1312
|
#
|
|
1411
1313
|
# @return [String]
|
|
1412
1314
|
#
|
|
1413
|
-
#
|
|
1315
|
+
# pkg:gem/overcommit#lib/overcommit/hook_context/base.rb:49
|
|
1414
1316
|
def hook_type_name; end
|
|
1415
1317
|
|
|
1416
1318
|
# Returns an array of lines passed to the hook via the standard input
|
|
@@ -1418,7 +1320,7 @@ class Overcommit::HookContext::Base
|
|
|
1418
1320
|
#
|
|
1419
1321
|
# @return [Array<String>]
|
|
1420
1322
|
#
|
|
1421
|
-
#
|
|
1323
|
+
# pkg:gem/overcommit#lib/overcommit/hook_context/base.rb:112
|
|
1422
1324
|
def input_lines; end
|
|
1423
1325
|
|
|
1424
1326
|
# Returns the contents of the entire standard input stream that were passed
|
|
@@ -1426,7 +1328,7 @@ class Overcommit::HookContext::Base
|
|
|
1426
1328
|
#
|
|
1427
1329
|
# @return [String]
|
|
1428
1330
|
#
|
|
1429
|
-
#
|
|
1331
|
+
# pkg:gem/overcommit#lib/overcommit/hook_context/base.rb:98
|
|
1430
1332
|
def input_string; end
|
|
1431
1333
|
|
|
1432
1334
|
# Returns a list of files that have been modified.
|
|
@@ -1436,14 +1338,14 @@ class Overcommit::HookContext::Base
|
|
|
1436
1338
|
#
|
|
1437
1339
|
# @return [Array<String>]
|
|
1438
1340
|
#
|
|
1439
|
-
#
|
|
1341
|
+
# pkg:gem/overcommit#lib/overcommit/hook_context/base.rb:83
|
|
1440
1342
|
def modified_files; end
|
|
1441
1343
|
|
|
1442
1344
|
# Returns a message to display on failure.
|
|
1443
1345
|
#
|
|
1444
1346
|
# @return [String]
|
|
1445
1347
|
#
|
|
1446
|
-
#
|
|
1348
|
+
# pkg:gem/overcommit#lib/overcommit/hook_context/base.rb:119
|
|
1447
1349
|
def post_fail_message; end
|
|
1448
1350
|
|
|
1449
1351
|
# Initializes anything related to the environment.
|
|
@@ -1451,7 +1353,7 @@ class Overcommit::HookContext::Base
|
|
|
1451
1353
|
# This is called before the hooks are run by the [HookRunner]. Different
|
|
1452
1354
|
# hook types can perform different setup.
|
|
1453
1355
|
#
|
|
1454
|
-
#
|
|
1356
|
+
# pkg:gem/overcommit#lib/overcommit/hook_context/base.rb:64
|
|
1455
1357
|
def setup_environment; end
|
|
1456
1358
|
|
|
1457
1359
|
private
|
|
@@ -1460,10 +1362,10 @@ class Overcommit::HookContext::Base
|
|
|
1460
1362
|
# directory as part of an amendment, since the symlink will still appear as
|
|
1461
1363
|
# a file, but the actual working tree will have a directory.
|
|
1462
1364
|
#
|
|
1463
|
-
#
|
|
1365
|
+
# pkg:gem/overcommit#lib/overcommit/hook_context/base.rb:142
|
|
1464
1366
|
def filter_directories(modified_files); end
|
|
1465
1367
|
|
|
1466
|
-
#
|
|
1368
|
+
# pkg:gem/overcommit#lib/overcommit/hook_context/base.rb:125
|
|
1467
1369
|
def filter_modified_files(modified_files); end
|
|
1468
1370
|
|
|
1469
1371
|
# Filter out non-existent files (unless it's a broken symlink, in which case
|
|
@@ -1471,160 +1373,146 @@ class Overcommit::HookContext::Base
|
|
|
1471
1373
|
# file was renamed as part of an amendment, leading to the old file no
|
|
1472
1374
|
# longer existing.
|
|
1473
1375
|
#
|
|
1474
|
-
#
|
|
1376
|
+
# pkg:gem/overcommit#lib/overcommit/hook_context/base.rb:133
|
|
1475
1377
|
def filter_nonexistent(modified_files); end
|
|
1476
1378
|
end
|
|
1477
1379
|
|
|
1478
|
-
#
|
|
1380
|
+
# pkg:gem/overcommit#lib/overcommit/hook_loader/base.rb:3
|
|
1479
1381
|
module Overcommit::HookLoader; end
|
|
1480
1382
|
|
|
1481
1383
|
# Responsible for loading hooks from a file.
|
|
1482
1384
|
#
|
|
1483
|
-
#
|
|
1385
|
+
# pkg:gem/overcommit#lib/overcommit/hook_loader/base.rb:5
|
|
1484
1386
|
class Overcommit::HookLoader::Base
|
|
1485
1387
|
# @param config [Overcommit::Configuration]
|
|
1486
1388
|
# @param context [Overcommit::HookContext]
|
|
1487
1389
|
# @param logger [Overcommit::Logger]
|
|
1488
|
-
# @return [Base] a new instance of Base
|
|
1489
1390
|
#
|
|
1490
|
-
#
|
|
1391
|
+
# pkg:gem/overcommit#lib/overcommit/hook_loader/base.rb:9
|
|
1491
1392
|
def initialize(config, context, logger); end
|
|
1492
1393
|
|
|
1493
1394
|
# When implemented in subclasses, loads the hooks for which that subclass is
|
|
1494
1395
|
# responsible.
|
|
1495
1396
|
#
|
|
1496
|
-
# @raise [NotImplementedError]
|
|
1497
1397
|
# @return [Array<Hook>]
|
|
1498
1398
|
#
|
|
1499
|
-
#
|
|
1399
|
+
# pkg:gem/overcommit#lib/overcommit/hook_loader/base.rb:19
|
|
1500
1400
|
def load_hooks; end
|
|
1501
1401
|
|
|
1502
1402
|
private
|
|
1503
1403
|
|
|
1504
1404
|
# Load and return a {Hook} from a CamelCase hook name.
|
|
1505
1405
|
#
|
|
1506
|
-
#
|
|
1406
|
+
# pkg:gem/overcommit#lib/overcommit/hook_loader/base.rb:28
|
|
1507
1407
|
def create_hook(hook_name); end
|
|
1508
1408
|
|
|
1509
|
-
#
|
|
1510
|
-
#
|
|
1511
|
-
# source://overcommit-0.59.1/lib/overcommit/hook_loader/base.rb:25
|
|
1409
|
+
# pkg:gem/overcommit#lib/overcommit/hook_loader/base.rb:25
|
|
1512
1410
|
def log; end
|
|
1513
1411
|
end
|
|
1514
1412
|
|
|
1515
1413
|
# Responsible for loading hooks that ship with Overcommit.
|
|
1516
1414
|
#
|
|
1517
|
-
#
|
|
1415
|
+
# pkg:gem/overcommit#lib/overcommit/hook_loader/built_in_hook_loader.rb:5
|
|
1518
1416
|
class Overcommit::HookLoader::BuiltInHookLoader < ::Overcommit::HookLoader::Base
|
|
1519
|
-
#
|
|
1417
|
+
# pkg:gem/overcommit#lib/overcommit/hook_loader/built_in_hook_loader.rb:6
|
|
1520
1418
|
def load_hooks; end
|
|
1521
1419
|
end
|
|
1522
1420
|
|
|
1523
1421
|
# Responsible for loading hooks that are specific to the repository Overcommit
|
|
1524
1422
|
# is running in.
|
|
1525
1423
|
#
|
|
1526
|
-
#
|
|
1424
|
+
# pkg:gem/overcommit#lib/overcommit/hook_loader/plugin_hook_loader.rb:8
|
|
1527
1425
|
class Overcommit::HookLoader::PluginHookLoader < ::Overcommit::HookLoader::Base
|
|
1528
|
-
#
|
|
1426
|
+
# pkg:gem/overcommit#lib/overcommit/hook_loader/plugin_hook_loader.rb:9
|
|
1529
1427
|
def load_hooks; end
|
|
1530
1428
|
|
|
1531
|
-
#
|
|
1429
|
+
# pkg:gem/overcommit#lib/overcommit/hook_loader/plugin_hook_loader.rb:24
|
|
1532
1430
|
def update_signatures; end
|
|
1533
1431
|
|
|
1534
1432
|
private
|
|
1535
1433
|
|
|
1536
|
-
#
|
|
1434
|
+
# pkg:gem/overcommit#lib/overcommit/hook_loader/plugin_hook_loader.rb:46
|
|
1537
1435
|
def ad_hoc_hook_names; end
|
|
1538
1436
|
|
|
1539
|
-
#
|
|
1540
|
-
#
|
|
1541
|
-
# source://overcommit-0.59.1/lib/overcommit/hook_loader/plugin_hook_loader.rb:56
|
|
1437
|
+
# pkg:gem/overcommit#lib/overcommit/hook_loader/plugin_hook_loader.rb:56
|
|
1542
1438
|
def check_for_modified_plugins; end
|
|
1543
1439
|
|
|
1544
|
-
#
|
|
1440
|
+
# pkg:gem/overcommit#lib/overcommit/hook_loader/plugin_hook_loader.rb:77
|
|
1545
1441
|
def create_ad_hoc_hook(hook_name); end
|
|
1546
1442
|
|
|
1547
|
-
#
|
|
1443
|
+
# pkg:gem/overcommit#lib/overcommit/hook_loader/plugin_hook_loader.rb:50
|
|
1548
1444
|
def modified_plugins; end
|
|
1549
1445
|
|
|
1550
|
-
#
|
|
1446
|
+
# pkg:gem/overcommit#lib/overcommit/hook_loader/plugin_hook_loader.rb:40
|
|
1551
1447
|
def plugin_hook_names; end
|
|
1552
1448
|
|
|
1553
|
-
#
|
|
1449
|
+
# pkg:gem/overcommit#lib/overcommit/hook_loader/plugin_hook_loader.rb:35
|
|
1554
1450
|
def plugin_paths; end
|
|
1555
1451
|
end
|
|
1556
1452
|
|
|
1557
1453
|
# Responsible for loading the hooks the repository has configured and running
|
|
1558
1454
|
# them, collecting and displaying the results.
|
|
1559
1455
|
#
|
|
1560
|
-
#
|
|
1456
|
+
# pkg:gem/overcommit#lib/overcommit/hook_runner.rb:6
|
|
1561
1457
|
class Overcommit::HookRunner
|
|
1562
1458
|
# @param config [Overcommit::Configuration]
|
|
1563
1459
|
# @param logger [Overcommit::Logger]
|
|
1564
1460
|
# @param context [Overcommit::HookContext]
|
|
1565
1461
|
# @param printer [Overcommit::Printer]
|
|
1566
|
-
# @return [HookRunner] a new instance of HookRunner
|
|
1567
1462
|
#
|
|
1568
|
-
#
|
|
1463
|
+
# pkg:gem/overcommit#lib/overcommit/hook_runner.rb:11
|
|
1569
1464
|
def initialize(config, logger, context, printer); end
|
|
1570
1465
|
|
|
1571
1466
|
# Loads and runs the hooks registered for this {HookRunner}.
|
|
1572
1467
|
#
|
|
1573
|
-
#
|
|
1468
|
+
# pkg:gem/overcommit#lib/overcommit/hook_runner.rb:24
|
|
1574
1469
|
def run; end
|
|
1575
1470
|
|
|
1576
1471
|
private
|
|
1577
1472
|
|
|
1578
|
-
#
|
|
1473
|
+
# pkg:gem/overcommit#lib/overcommit/hook_runner.rb:93
|
|
1579
1474
|
def consume; end
|
|
1580
1475
|
|
|
1581
|
-
#
|
|
1476
|
+
# pkg:gem/overcommit#lib/overcommit/hook_runner.rb:199
|
|
1582
1477
|
def load_hooks; end
|
|
1583
1478
|
|
|
1584
|
-
#
|
|
1585
|
-
#
|
|
1586
|
-
# source://overcommit-0.59.1/lib/overcommit/hook_runner.rb:54
|
|
1479
|
+
# pkg:gem/overcommit#lib/overcommit/hook_runner.rb:54
|
|
1587
1480
|
def log; end
|
|
1588
1481
|
|
|
1589
|
-
#
|
|
1482
|
+
# pkg:gem/overcommit#lib/overcommit/hook_runner.rb:143
|
|
1590
1483
|
def print_results; end
|
|
1591
1484
|
|
|
1592
|
-
#
|
|
1485
|
+
# pkg:gem/overcommit#lib/overcommit/hook_runner.rb:139
|
|
1593
1486
|
def processors_for_hook(hook); end
|
|
1594
1487
|
|
|
1595
|
-
#
|
|
1488
|
+
# pkg:gem/overcommit#lib/overcommit/hook_runner.rb:128
|
|
1596
1489
|
def release_slot(hook); end
|
|
1597
1490
|
|
|
1598
|
-
#
|
|
1491
|
+
# pkg:gem/overcommit#lib/overcommit/hook_runner.rb:155
|
|
1599
1492
|
def run_hook(hook); end
|
|
1600
1493
|
|
|
1601
|
-
#
|
|
1494
|
+
# pkg:gem/overcommit#lib/overcommit/hook_runner.rb:56
|
|
1602
1495
|
def run_hooks; end
|
|
1603
1496
|
|
|
1604
|
-
#
|
|
1605
|
-
#
|
|
1606
|
-
# source://overcommit-0.59.1/lib/overcommit/hook_runner.rb:183
|
|
1497
|
+
# pkg:gem/overcommit#lib/overcommit/hook_runner.rb:183
|
|
1607
1498
|
def should_skip?(hook); end
|
|
1608
1499
|
|
|
1609
|
-
#
|
|
1500
|
+
# pkg:gem/overcommit#lib/overcommit/hook_runner.rb:102
|
|
1610
1501
|
def wait_for_slot(hook); end
|
|
1611
1502
|
end
|
|
1612
1503
|
|
|
1613
1504
|
# Calculates, stores, and retrieves stored signatures of hook plugins.
|
|
1614
1505
|
#
|
|
1615
|
-
#
|
|
1506
|
+
# pkg:gem/overcommit#lib/overcommit/hook_signer.rb:5
|
|
1616
1507
|
class Overcommit::HookSigner
|
|
1617
1508
|
# @param hook_name [String] name of the hook
|
|
1618
1509
|
# @param config [Overcommit::Configuration]
|
|
1619
1510
|
# @param context [Overcommit::HookContext]
|
|
1620
|
-
# @return [HookSigner] a new instance of HookSigner
|
|
1621
1511
|
#
|
|
1622
|
-
#
|
|
1512
|
+
# pkg:gem/overcommit#lib/overcommit/hook_signer.rb:15
|
|
1623
1513
|
def initialize(hook_name, config, context); end
|
|
1624
1514
|
|
|
1625
|
-
#
|
|
1626
|
-
#
|
|
1627
|
-
# source://overcommit-0.59.1/lib/overcommit/hook_signer.rb:6
|
|
1515
|
+
# pkg:gem/overcommit#lib/overcommit/hook_signer.rb:6
|
|
1628
1516
|
def hook_name; end
|
|
1629
1517
|
|
|
1630
1518
|
# Returns the path of the file that should be incorporated into this hooks
|
|
@@ -1632,30 +1520,28 @@ class Overcommit::HookSigner
|
|
|
1632
1520
|
#
|
|
1633
1521
|
# @return [String]
|
|
1634
1522
|
#
|
|
1635
|
-
#
|
|
1523
|
+
# pkg:gem/overcommit#lib/overcommit/hook_signer.rb:25
|
|
1636
1524
|
def hook_path; end
|
|
1637
1525
|
|
|
1638
|
-
#
|
|
1639
|
-
#
|
|
1640
|
-
# source://overcommit-0.59.1/lib/overcommit/hook_signer.rb:53
|
|
1526
|
+
# pkg:gem/overcommit#lib/overcommit/hook_signer.rb:53
|
|
1641
1527
|
def signable_file?(file); end
|
|
1642
1528
|
|
|
1643
1529
|
# Return whether the signature for this hook has changed since it was last
|
|
1644
1530
|
# calculated.
|
|
1645
1531
|
#
|
|
1646
|
-
# @return [true,
|
|
1532
|
+
# @return [true,false]
|
|
1647
1533
|
#
|
|
1648
|
-
#
|
|
1534
|
+
# pkg:gem/overcommit#lib/overcommit/hook_signer.rb:65
|
|
1649
1535
|
def signature_changed?; end
|
|
1650
1536
|
|
|
1651
1537
|
# Update the current stored signature for this hook.
|
|
1652
1538
|
#
|
|
1653
|
-
#
|
|
1539
|
+
# pkg:gem/overcommit#lib/overcommit/hook_signer.rb:70
|
|
1654
1540
|
def update_signature!; end
|
|
1655
1541
|
|
|
1656
1542
|
private
|
|
1657
1543
|
|
|
1658
|
-
#
|
|
1544
|
+
# pkg:gem/overcommit#lib/overcommit/hook_signer.rb:101
|
|
1659
1545
|
def hook_contents; end
|
|
1660
1546
|
|
|
1661
1547
|
# Calculates a hash of a hook using a combination of its configuration and
|
|
@@ -1664,180 +1550,174 @@ class Overcommit::HookSigner
|
|
|
1664
1550
|
# This way, if either the plugin code changes or its configuration changes,
|
|
1665
1551
|
# the hash will change and we can alert the user to this change.
|
|
1666
1552
|
#
|
|
1667
|
-
#
|
|
1553
|
+
# pkg:gem/overcommit#lib/overcommit/hook_signer.rb:88
|
|
1668
1554
|
def signature; end
|
|
1669
1555
|
|
|
1670
|
-
#
|
|
1556
|
+
# pkg:gem/overcommit#lib/overcommit/hook_signer.rb:120
|
|
1671
1557
|
def signature_config_key; end
|
|
1672
1558
|
|
|
1673
|
-
#
|
|
1559
|
+
# pkg:gem/overcommit#lib/overcommit/hook_signer.rb:105
|
|
1674
1560
|
def stored_signature; end
|
|
1675
1561
|
end
|
|
1676
1562
|
|
|
1677
1563
|
# We don't want to include the skip setting as it is set by Overcommit
|
|
1678
1564
|
# itself
|
|
1679
1565
|
#
|
|
1680
|
-
#
|
|
1566
|
+
# pkg:gem/overcommit#lib/overcommit/hook_signer.rb:10
|
|
1681
1567
|
Overcommit::HookSigner::IGNORED_CONFIG_KEYS = T.let(T.unsafe(nil), Array)
|
|
1682
1568
|
|
|
1683
1569
|
# Manages the installation of Overcommit hooks in a git repository.
|
|
1684
1570
|
#
|
|
1685
|
-
#
|
|
1571
|
+
# pkg:gem/overcommit#lib/overcommit/installer.rb:7
|
|
1686
1572
|
class Overcommit::Installer
|
|
1687
|
-
#
|
|
1688
|
-
#
|
|
1689
|
-
# source://overcommit-0.59.1/lib/overcommit/installer.rb:11
|
|
1573
|
+
# pkg:gem/overcommit#lib/overcommit/installer.rb:11
|
|
1690
1574
|
def initialize(logger); end
|
|
1691
1575
|
|
|
1692
|
-
#
|
|
1576
|
+
# pkg:gem/overcommit#lib/overcommit/installer.rb:15
|
|
1693
1577
|
def run(target, options); end
|
|
1694
1578
|
|
|
1695
1579
|
private
|
|
1696
1580
|
|
|
1697
|
-
#
|
|
1698
|
-
#
|
|
1699
|
-
# source://overcommit-0.59.1/lib/overcommit/installer.rb:125
|
|
1581
|
+
# pkg:gem/overcommit#lib/overcommit/installer.rb:125
|
|
1700
1582
|
def can_replace_file?(file); end
|
|
1701
1583
|
|
|
1702
1584
|
# Returns the configuration for this repository.
|
|
1703
1585
|
#
|
|
1704
|
-
#
|
|
1586
|
+
# pkg:gem/overcommit#lib/overcommit/installer.rb:190
|
|
1705
1587
|
def config(options = T.unsafe(nil)); end
|
|
1706
1588
|
|
|
1707
|
-
#
|
|
1589
|
+
# pkg:gem/overcommit#lib/overcommit/installer.rb:81
|
|
1708
1590
|
def ensure_directory(path); end
|
|
1709
1591
|
|
|
1710
|
-
#
|
|
1592
|
+
# pkg:gem/overcommit#lib/overcommit/installer.rb:69
|
|
1711
1593
|
def hooks_path; end
|
|
1712
1594
|
|
|
1713
|
-
#
|
|
1595
|
+
# pkg:gem/overcommit#lib/overcommit/installer.rb:32
|
|
1714
1596
|
def install; end
|
|
1715
1597
|
|
|
1716
|
-
#
|
|
1598
|
+
# pkg:gem/overcommit#lib/overcommit/installer.rb:110
|
|
1717
1599
|
def install_hook_files; end
|
|
1718
1600
|
|
|
1719
|
-
#
|
|
1601
|
+
# pkg:gem/overcommit#lib/overcommit/installer.rb:101
|
|
1720
1602
|
def install_master_hook; end
|
|
1721
1603
|
|
|
1722
|
-
#
|
|
1604
|
+
# pkg:gem/overcommit#lib/overcommit/installer.rb:173
|
|
1723
1605
|
def install_starter_config; end
|
|
1724
1606
|
|
|
1725
|
-
#
|
|
1726
|
-
#
|
|
1727
|
-
# source://overcommit-0.59.1/lib/overcommit/installer.rb:30
|
|
1607
|
+
# pkg:gem/overcommit#lib/overcommit/installer.rb:30
|
|
1728
1608
|
def log; end
|
|
1729
1609
|
|
|
1730
|
-
#
|
|
1610
|
+
# pkg:gem/overcommit#lib/overcommit/installer.rb:77
|
|
1731
1611
|
def master_hook_install_path; end
|
|
1732
1612
|
|
|
1733
|
-
#
|
|
1613
|
+
# pkg:gem/overcommit#lib/overcommit/installer.rb:73
|
|
1734
1614
|
def old_hooks_path; end
|
|
1735
1615
|
|
|
1736
|
-
#
|
|
1737
|
-
#
|
|
1738
|
-
# source://overcommit-0.59.1/lib/overcommit/installer.rb:181
|
|
1616
|
+
# pkg:gem/overcommit#lib/overcommit/installer.rb:181
|
|
1739
1617
|
def overcommit_hook?(file); end
|
|
1740
1618
|
|
|
1741
|
-
#
|
|
1619
|
+
# pkg:gem/overcommit#lib/overcommit/installer.rb:131
|
|
1742
1620
|
def preserve_old_hooks; end
|
|
1743
1621
|
|
|
1744
|
-
#
|
|
1622
|
+
# pkg:gem/overcommit#lib/overcommit/installer.rb:147
|
|
1745
1623
|
def restore_old_hooks; end
|
|
1746
1624
|
|
|
1747
|
-
#
|
|
1625
|
+
# pkg:gem/overcommit#lib/overcommit/installer.rb:47
|
|
1748
1626
|
def uninstall; end
|
|
1749
1627
|
|
|
1750
|
-
#
|
|
1628
|
+
# pkg:gem/overcommit#lib/overcommit/installer.rb:163
|
|
1751
1629
|
def uninstall_hook_files; end
|
|
1752
1630
|
|
|
1753
|
-
#
|
|
1631
|
+
# pkg:gem/overcommit#lib/overcommit/installer.rb:106
|
|
1754
1632
|
def uninstall_master_hook; end
|
|
1755
1633
|
|
|
1756
|
-
# @return [true,
|
|
1634
|
+
# @return [true,false] whether the hooks were updated
|
|
1757
1635
|
#
|
|
1758
|
-
#
|
|
1636
|
+
# pkg:gem/overcommit#lib/overcommit/installer.rb:58
|
|
1759
1637
|
def update; end
|
|
1760
1638
|
|
|
1761
|
-
#
|
|
1639
|
+
# pkg:gem/overcommit#lib/overcommit/installer.rb:85
|
|
1762
1640
|
def validate_target; end
|
|
1763
1641
|
end
|
|
1764
1642
|
|
|
1765
|
-
#
|
|
1643
|
+
# pkg:gem/overcommit#lib/overcommit/installer.rb:9
|
|
1766
1644
|
Overcommit::Installer::MASTER_HOOK = T.let(T.unsafe(nil), String)
|
|
1767
1645
|
|
|
1768
|
-
#
|
|
1646
|
+
# pkg:gem/overcommit#lib/overcommit/installer.rb:8
|
|
1769
1647
|
Overcommit::Installer::TEMPLATE_DIRECTORY = T.let(T.unsafe(nil), String)
|
|
1770
1648
|
|
|
1649
|
+
# pkg:gem/overcommit#lib/overcommit/constants.rb:7
|
|
1650
|
+
Overcommit::LOCAL_CONFIG_FILE_NAME = T.let(T.unsafe(nil), String)
|
|
1651
|
+
|
|
1771
1652
|
# Encapsulates all communication to an output source.
|
|
1772
1653
|
#
|
|
1773
|
-
#
|
|
1654
|
+
# pkg:gem/overcommit#lib/overcommit/logger.rb:5
|
|
1774
1655
|
class Overcommit::Logger
|
|
1775
1656
|
# Creates a logger that will write to the given output stream.
|
|
1776
1657
|
#
|
|
1777
1658
|
# @param out [IO]
|
|
1778
|
-
# @return [Logger] a new instance of Logger
|
|
1779
1659
|
#
|
|
1780
|
-
#
|
|
1660
|
+
# pkg:gem/overcommit#lib/overcommit/logger.rb:14
|
|
1781
1661
|
def initialize(out); end
|
|
1782
1662
|
|
|
1783
1663
|
# Write a line of output that is intended to be emphasized.
|
|
1784
1664
|
#
|
|
1785
|
-
#
|
|
1665
|
+
# pkg:gem/overcommit#lib/overcommit/logger.rb:52
|
|
1786
1666
|
def bold(*args); end
|
|
1787
1667
|
|
|
1788
1668
|
# Write a line of output indicating a problem or error which is emphasized
|
|
1789
1669
|
# over a regular problem or error.
|
|
1790
1670
|
#
|
|
1791
|
-
#
|
|
1671
|
+
# pkg:gem/overcommit#lib/overcommit/logger.rb:63
|
|
1792
1672
|
def bold_error(*args); end
|
|
1793
1673
|
|
|
1794
1674
|
# Write a line of output indicating a potential cause for concern, but with
|
|
1795
1675
|
# greater emphasize compared to other warnings.
|
|
1796
1676
|
#
|
|
1797
|
-
#
|
|
1677
|
+
# pkg:gem/overcommit#lib/overcommit/logger.rb:80
|
|
1798
1678
|
def bold_warning(*args); end
|
|
1799
1679
|
|
|
1800
1680
|
# Write a line of output if debug mode is enabled.
|
|
1801
1681
|
#
|
|
1802
|
-
#
|
|
1682
|
+
# pkg:gem/overcommit#lib/overcommit/logger.rb:47
|
|
1803
1683
|
def debug(*args); end
|
|
1804
1684
|
|
|
1805
1685
|
# Write a line of output indicating a problem or error.
|
|
1806
1686
|
#
|
|
1807
|
-
#
|
|
1687
|
+
# pkg:gem/overcommit#lib/overcommit/logger.rb:57
|
|
1808
1688
|
def error(*args); end
|
|
1809
1689
|
|
|
1810
1690
|
# Flushes the [IO] object for partial lines
|
|
1811
1691
|
#
|
|
1812
|
-
#
|
|
1692
|
+
# pkg:gem/overcommit#lib/overcommit/logger.rb:35
|
|
1813
1693
|
def flush; end
|
|
1814
1694
|
|
|
1815
1695
|
# Write a line of output.
|
|
1816
1696
|
#
|
|
1817
1697
|
# A newline character will always be appended.
|
|
1818
1698
|
#
|
|
1819
|
-
#
|
|
1699
|
+
# pkg:gem/overcommit#lib/overcommit/logger.rb:42
|
|
1820
1700
|
def log(*args); end
|
|
1821
1701
|
|
|
1822
1702
|
# Prints a newline character (alias for readability).
|
|
1823
1703
|
#
|
|
1824
|
-
#
|
|
1704
|
+
# pkg:gem/overcommit#lib/overcommit/logger.rb:30
|
|
1825
1705
|
def newline; end
|
|
1826
1706
|
|
|
1827
1707
|
# Write output without a trailing newline.
|
|
1828
1708
|
#
|
|
1829
|
-
#
|
|
1709
|
+
# pkg:gem/overcommit#lib/overcommit/logger.rb:25
|
|
1830
1710
|
def partial(*args); end
|
|
1831
1711
|
|
|
1832
1712
|
# Write a line of output indicating a successful or noteworthy event.
|
|
1833
1713
|
#
|
|
1834
|
-
#
|
|
1714
|
+
# pkg:gem/overcommit#lib/overcommit/logger.rb:68
|
|
1835
1715
|
def success(*args); end
|
|
1836
1716
|
|
|
1837
1717
|
# Write a line of output indicating a potential cause for concern, but not
|
|
1838
1718
|
# an actual error.
|
|
1839
1719
|
#
|
|
1840
|
-
#
|
|
1720
|
+
# pkg:gem/overcommit#lib/overcommit/logger.rb:74
|
|
1841
1721
|
def warning(*args); end
|
|
1842
1722
|
|
|
1843
1723
|
private
|
|
@@ -1847,15 +1727,15 @@ class Overcommit::Logger
|
|
|
1847
1727
|
#
|
|
1848
1728
|
# @param code [String] ANSI escape code, e.g. '1;33' for "bold yellow"
|
|
1849
1729
|
# @param str [String] string to wrap
|
|
1850
|
-
# @param partial [true,
|
|
1730
|
+
# @param partial [true,false] whether to omit a newline
|
|
1851
1731
|
#
|
|
1852
|
-
#
|
|
1732
|
+
# pkg:gem/overcommit#lib/overcommit/logger.rb:92
|
|
1853
1733
|
def color(code, str, partial = T.unsafe(nil)); end
|
|
1854
1734
|
|
|
1855
1735
|
class << self
|
|
1856
1736
|
# Helper for creating a logger which outputs nothing.
|
|
1857
1737
|
#
|
|
1858
|
-
#
|
|
1738
|
+
# pkg:gem/overcommit#lib/overcommit/logger.rb:7
|
|
1859
1739
|
def silent; end
|
|
1860
1740
|
end
|
|
1861
1741
|
end
|
|
@@ -1867,14 +1747,13 @@ end
|
|
|
1867
1747
|
# output tuple from an array of {Overcommit::Hook::Message}s, respecting the
|
|
1868
1748
|
# configuration settings for the given hook.
|
|
1869
1749
|
#
|
|
1870
|
-
#
|
|
1750
|
+
# pkg:gem/overcommit#lib/overcommit/message_processor.rb:10
|
|
1871
1751
|
class Overcommit::MessageProcessor
|
|
1872
1752
|
# @param hook [Overcommit::Hook::Base]
|
|
1873
1753
|
# @param unmodified_lines_setting [String] how to treat messages on
|
|
1874
1754
|
# unmodified lines
|
|
1875
|
-
# @return [MessageProcessor] a new instance of MessageProcessor
|
|
1876
1755
|
#
|
|
1877
|
-
#
|
|
1756
|
+
# pkg:gem/overcommit#lib/overcommit/message_processor.rb:21
|
|
1878
1757
|
def initialize(hook, unmodified_lines_setting); end
|
|
1879
1758
|
|
|
1880
1759
|
# Returns a hook status/output tuple from the messages this processor was
|
|
@@ -1882,7 +1761,7 @@ class Overcommit::MessageProcessor
|
|
|
1882
1761
|
#
|
|
1883
1762
|
# @return [Array<Symbol,String>]
|
|
1884
1763
|
#
|
|
1885
|
-
#
|
|
1764
|
+
# pkg:gem/overcommit#lib/overcommit/message_processor.rb:30
|
|
1886
1765
|
def hook_result(messages); end
|
|
1887
1766
|
|
|
1888
1767
|
private
|
|
@@ -1890,201 +1769,181 @@ class Overcommit::MessageProcessor
|
|
|
1890
1769
|
# Returns status and output for messages assuming no special treatment of
|
|
1891
1770
|
# messages occurring on unmodified lines.
|
|
1892
1771
|
#
|
|
1893
|
-
#
|
|
1772
|
+
# pkg:gem/overcommit#lib/overcommit/message_processor.rb:101
|
|
1894
1773
|
def basic_status_and_output(messages); end
|
|
1895
1774
|
|
|
1896
|
-
#
|
|
1897
|
-
#
|
|
1898
|
-
# source://overcommit-0.59.1/lib/overcommit/message_processor.rb:95
|
|
1775
|
+
# pkg:gem/overcommit#lib/overcommit/message_processor.rb:95
|
|
1899
1776
|
def can_upgrade_to_passing?(status, warning_messages); end
|
|
1900
1777
|
|
|
1901
|
-
#
|
|
1902
|
-
#
|
|
1903
|
-
# source://overcommit-0.59.1/lib/overcommit/message_processor.rb:91
|
|
1778
|
+
# pkg:gem/overcommit#lib/overcommit/message_processor.rb:91
|
|
1904
1779
|
def can_upgrade_to_warning?(status, error_messages); end
|
|
1905
1780
|
|
|
1906
|
-
#
|
|
1781
|
+
# pkg:gem/overcommit#lib/overcommit/message_processor.rb:44
|
|
1907
1782
|
def handle_modified_lines(messages, status); end
|
|
1908
1783
|
|
|
1909
|
-
#
|
|
1910
|
-
#
|
|
1911
|
-
# source://overcommit-0.59.1/lib/overcommit/message_processor.rb:141
|
|
1784
|
+
# pkg:gem/overcommit#lib/overcommit/message_processor.rb:141
|
|
1912
1785
|
def message_on_modified_line?(message); end
|
|
1913
1786
|
|
|
1914
|
-
#
|
|
1787
|
+
# pkg:gem/overcommit#lib/overcommit/message_processor.rb:119
|
|
1915
1788
|
def print_messages(messages, error_heading, warning_heading); end
|
|
1916
1789
|
|
|
1917
|
-
#
|
|
1790
|
+
# pkg:gem/overcommit#lib/overcommit/message_processor.rb:134
|
|
1918
1791
|
def remove_ignored_messages(messages); end
|
|
1919
1792
|
|
|
1920
|
-
#
|
|
1793
|
+
# pkg:gem/overcommit#lib/overcommit/message_processor.rb:73
|
|
1921
1794
|
def transform_status(status, messages_on_modified_lines); end
|
|
1922
1795
|
end
|
|
1923
1796
|
|
|
1924
|
-
#
|
|
1797
|
+
# pkg:gem/overcommit#lib/overcommit/message_processor.rb:15
|
|
1925
1798
|
Overcommit::MessageProcessor::ERRORS_GENERIC_HEADER = T.let(T.unsafe(nil), String)
|
|
1926
1799
|
|
|
1927
|
-
#
|
|
1800
|
+
# pkg:gem/overcommit#lib/overcommit/message_processor.rb:11
|
|
1928
1801
|
Overcommit::MessageProcessor::ERRORS_MODIFIED_HEADER = T.let(T.unsafe(nil), String)
|
|
1929
1802
|
|
|
1930
|
-
#
|
|
1803
|
+
# pkg:gem/overcommit#lib/overcommit/message_processor.rb:13
|
|
1931
1804
|
Overcommit::MessageProcessor::ERRORS_UNMODIFIED_HEADER = T.let(T.unsafe(nil), String)
|
|
1932
1805
|
|
|
1933
|
-
#
|
|
1806
|
+
# pkg:gem/overcommit#lib/overcommit/message_processor.rb:16
|
|
1934
1807
|
Overcommit::MessageProcessor::WARNINGS_GENERIC_HEADER = T.let(T.unsafe(nil), String)
|
|
1935
1808
|
|
|
1936
|
-
#
|
|
1809
|
+
# pkg:gem/overcommit#lib/overcommit/message_processor.rb:12
|
|
1937
1810
|
Overcommit::MessageProcessor::WARNINGS_MODIFIED_HEADER = T.let(T.unsafe(nil), String)
|
|
1938
1811
|
|
|
1939
|
-
#
|
|
1812
|
+
# pkg:gem/overcommit#lib/overcommit/message_processor.rb:14
|
|
1940
1813
|
Overcommit::MessageProcessor::WARNINGS_UNMODIFIED_HEADER = T.let(T.unsafe(nil), String)
|
|
1941
1814
|
|
|
1942
1815
|
# Methods relating to the current operating system
|
|
1943
1816
|
#
|
|
1944
|
-
#
|
|
1817
|
+
# pkg:gem/overcommit#lib/overcommit/os.rb:7
|
|
1945
1818
|
module Overcommit::OS
|
|
1946
1819
|
class << self
|
|
1947
|
-
#
|
|
1948
|
-
#
|
|
1949
|
-
# source://overcommit-0.59.1/lib/overcommit/os.rb:13
|
|
1820
|
+
# pkg:gem/overcommit#lib/overcommit/os.rb:13
|
|
1950
1821
|
def cygwin?; end
|
|
1951
1822
|
|
|
1952
|
-
#
|
|
1953
|
-
#
|
|
1954
|
-
# source://overcommit-0.59.1/lib/overcommit/os.rb:25
|
|
1823
|
+
# pkg:gem/overcommit#lib/overcommit/os.rb:25
|
|
1955
1824
|
def linux?; end
|
|
1956
1825
|
|
|
1957
|
-
#
|
|
1958
|
-
#
|
|
1959
|
-
# source://overcommit-0.59.1/lib/overcommit/os.rb:17
|
|
1826
|
+
# pkg:gem/overcommit#lib/overcommit/os.rb:17
|
|
1960
1827
|
def mac?; end
|
|
1961
1828
|
|
|
1962
|
-
#
|
|
1963
|
-
#
|
|
1964
|
-
# source://overcommit-0.59.1/lib/overcommit/os.rb:21
|
|
1829
|
+
# pkg:gem/overcommit#lib/overcommit/os.rb:21
|
|
1965
1830
|
def unix?; end
|
|
1966
1831
|
|
|
1967
|
-
#
|
|
1968
|
-
#
|
|
1969
|
-
# source://overcommit-0.59.1/lib/overcommit/os.rb:9
|
|
1832
|
+
# pkg:gem/overcommit#lib/overcommit/os.rb:9
|
|
1970
1833
|
def windows?; end
|
|
1971
1834
|
|
|
1972
1835
|
private
|
|
1973
1836
|
|
|
1974
|
-
#
|
|
1837
|
+
# pkg:gem/overcommit#lib/overcommit/os.rb:31
|
|
1975
1838
|
def host_os; end
|
|
1976
1839
|
end
|
|
1977
1840
|
end
|
|
1978
1841
|
|
|
1979
|
-
#
|
|
1842
|
+
# pkg:gem/overcommit#lib/overcommit/os.rb:36
|
|
1980
1843
|
Overcommit::OS::SEPARATOR = T.let(T.unsafe(nil), String)
|
|
1981
1844
|
|
|
1982
1845
|
# Provide a set of callbacks which can be executed as events occur during the
|
|
1983
1846
|
# course of {HookRunner#run}.
|
|
1984
1847
|
#
|
|
1985
|
-
#
|
|
1848
|
+
# pkg:gem/overcommit#lib/overcommit/printer.rb:8
|
|
1986
1849
|
class Overcommit::Printer
|
|
1987
|
-
#
|
|
1988
|
-
#
|
|
1989
|
-
# source://overcommit-0.59.1/lib/overcommit/printer.rb:11
|
|
1850
|
+
# pkg:gem/overcommit#lib/overcommit/printer.rb:11
|
|
1990
1851
|
def initialize(config, logger, context); end
|
|
1991
1852
|
|
|
1992
1853
|
# Executed at the end of an individual hook run.
|
|
1993
1854
|
#
|
|
1994
|
-
#
|
|
1855
|
+
# pkg:gem/overcommit#lib/overcommit/printer.rb:37
|
|
1995
1856
|
def end_hook(hook, status, output); end
|
|
1996
1857
|
|
|
1997
|
-
#
|
|
1858
|
+
# pkg:gem/overcommit#lib/overcommit/printer.rb:79
|
|
1998
1859
|
def hook_run_failed(message); end
|
|
1999
1860
|
|
|
2000
|
-
#
|
|
1861
|
+
# pkg:gem/overcommit#lib/overcommit/printer.rb:28
|
|
2001
1862
|
def hook_skipped(hook); end
|
|
2002
1863
|
|
|
2003
|
-
#
|
|
1864
|
+
# pkg:gem/overcommit#lib/overcommit/printer.rb:45
|
|
2004
1865
|
def interrupt_triggered; end
|
|
2005
1866
|
|
|
2006
|
-
#
|
|
2007
|
-
#
|
|
2008
|
-
# source://overcommit-0.59.1/lib/overcommit/printer.rb:9
|
|
1867
|
+
# pkg:gem/overcommit#lib/overcommit/printer.rb:9
|
|
2009
1868
|
def log; end
|
|
2010
1869
|
|
|
2011
|
-
#
|
|
1870
|
+
# pkg:gem/overcommit#lib/overcommit/printer.rb:24
|
|
2012
1871
|
def nothing_to_run; end
|
|
2013
1872
|
|
|
2014
|
-
#
|
|
1873
|
+
# pkg:gem/overcommit#lib/overcommit/printer.rb:32
|
|
2015
1874
|
def required_hook_not_skipped(hook); end
|
|
2016
1875
|
|
|
2017
1876
|
# Executed when one or more hooks by the end of the run.
|
|
2018
1877
|
#
|
|
2019
|
-
#
|
|
1878
|
+
# pkg:gem/overcommit#lib/overcommit/printer.rb:57
|
|
2020
1879
|
def run_failed; end
|
|
2021
1880
|
|
|
2022
1881
|
# Executed when a hook run was interrupted/cancelled by user.
|
|
2023
1882
|
#
|
|
2024
|
-
#
|
|
1883
|
+
# pkg:gem/overcommit#lib/overcommit/printer.rb:50
|
|
2025
1884
|
def run_interrupted; end
|
|
2026
1885
|
|
|
2027
1886
|
# Executed when no hooks failed by the end of the run.
|
|
2028
1887
|
#
|
|
2029
|
-
#
|
|
1888
|
+
# pkg:gem/overcommit#lib/overcommit/printer.rb:71
|
|
2030
1889
|
def run_succeeded; end
|
|
2031
1890
|
|
|
2032
1891
|
# Executed when no hooks failed by the end of the run, but some warned.
|
|
2033
1892
|
#
|
|
2034
|
-
#
|
|
1893
|
+
# pkg:gem/overcommit#lib/overcommit/printer.rb:64
|
|
2035
1894
|
def run_warned; end
|
|
2036
1895
|
|
|
2037
1896
|
# Executed at the very beginning of running the collection of hooks.
|
|
2038
1897
|
#
|
|
2039
|
-
#
|
|
1898
|
+
# pkg:gem/overcommit#lib/overcommit/printer.rb:20
|
|
2040
1899
|
def start_run; end
|
|
2041
1900
|
|
|
2042
1901
|
private
|
|
2043
1902
|
|
|
2044
|
-
#
|
|
1903
|
+
# pkg:gem/overcommit#lib/overcommit/printer.rb:119
|
|
2045
1904
|
def hook_script_name; end
|
|
2046
1905
|
|
|
2047
|
-
#
|
|
1906
|
+
# pkg:gem/overcommit#lib/overcommit/printer.rb:87
|
|
2048
1907
|
def print_header(hook); end
|
|
2049
1908
|
|
|
2050
|
-
#
|
|
1909
|
+
# pkg:gem/overcommit#lib/overcommit/printer.rb:115
|
|
2051
1910
|
def print_report(output, format = T.unsafe(nil)); end
|
|
2052
1911
|
|
|
2053
|
-
#
|
|
1912
|
+
# pkg:gem/overcommit#lib/overcommit/printer.rb:95
|
|
2054
1913
|
def print_result(hook, status, output); end
|
|
2055
1914
|
|
|
2056
1915
|
# Get all public methods that were defined on this class and wrap them with
|
|
2057
1916
|
# synchronization locks so we ensure the output isn't interleaved amongst
|
|
2058
1917
|
# the various threads.
|
|
2059
1918
|
#
|
|
2060
|
-
#
|
|
1919
|
+
# pkg:gem/overcommit#lib/overcommit/printer.rb:126
|
|
2061
1920
|
def synchronize_all_methods; end
|
|
2062
1921
|
end
|
|
2063
1922
|
|
|
2064
|
-
#
|
|
1923
|
+
# pkg:gem/overcommit#lib/overcommit/constants.rb:11
|
|
2065
1924
|
Overcommit::REPO_URL = T.let(T.unsafe(nil), String)
|
|
2066
1925
|
|
|
2067
1926
|
# Manages execution of a child process, collecting the exit status and
|
|
2068
1927
|
# standard out/error output.
|
|
2069
1928
|
#
|
|
2070
|
-
#
|
|
1929
|
+
# pkg:gem/overcommit#lib/overcommit/subprocess.rb:10
|
|
2071
1930
|
class Overcommit::Subprocess
|
|
2072
1931
|
class << self
|
|
2073
1932
|
# Spawns a new process using the given array of arguments (the first
|
|
2074
1933
|
# element is the command).
|
|
2075
1934
|
#
|
|
2076
|
-
# @option options
|
|
2077
1935
|
# @param args [Array<String>]
|
|
2078
1936
|
# @param options [Hash]
|
|
1937
|
+
# @option options [String] input string to pass via standard input stream
|
|
2079
1938
|
# @return [Result]
|
|
2080
1939
|
#
|
|
2081
|
-
#
|
|
1940
|
+
# pkg:gem/overcommit#lib/overcommit/subprocess.rb:30
|
|
2082
1941
|
def spawn(args, options = T.unsafe(nil)); end
|
|
2083
1942
|
|
|
2084
1943
|
# Spawns a new process in the background using the given array of
|
|
2085
1944
|
# arguments (the first element is the command).
|
|
2086
1945
|
#
|
|
2087
|
-
#
|
|
1946
|
+
# pkg:gem/overcommit#lib/overcommit/subprocess.rb:60
|
|
2088
1947
|
def spawn_detached(args); end
|
|
2089
1948
|
|
|
2090
1949
|
private
|
|
@@ -2092,13 +1951,13 @@ class Overcommit::Subprocess
|
|
|
2092
1951
|
# @param process [ChildProcess]
|
|
2093
1952
|
# @return [Array<IO>]
|
|
2094
1953
|
#
|
|
2095
|
-
#
|
|
1954
|
+
# pkg:gem/overcommit#lib/overcommit/subprocess.rb:89
|
|
2096
1955
|
def assign_output_streams(process); end
|
|
2097
1956
|
|
|
2098
1957
|
# Necessary to run commands in the cmd.exe context.
|
|
2099
1958
|
# Args are joined to properly handle quotes and special characters.
|
|
2100
1959
|
#
|
|
2101
|
-
#
|
|
1960
|
+
# pkg:gem/overcommit#lib/overcommit/subprocess.rb:75
|
|
2102
1961
|
def win32_prepare_args(args); end
|
|
2103
1962
|
end
|
|
2104
1963
|
end
|
|
@@ -2109,58 +1968,62 @@ end
|
|
|
2109
1968
|
# @attr_reader stdout [String] standard output stream output
|
|
2110
1969
|
# @attr_reader stderr [String] standard error stream output
|
|
2111
1970
|
#
|
|
2112
|
-
#
|
|
1971
|
+
# pkg:gem/overcommit#lib/overcommit/subprocess.rb:16
|
|
2113
1972
|
class Overcommit::Subprocess::Result < ::Struct
|
|
2114
|
-
#
|
|
2115
|
-
#
|
|
2116
|
-
# @return [Integer] the current value of status
|
|
1973
|
+
# pkg:gem/overcommit#lib/overcommit/subprocess.rb:16
|
|
2117
1974
|
def status; end
|
|
2118
1975
|
|
|
1976
|
+
# pkg:gem/overcommit#lib/overcommit/subprocess.rb:16
|
|
2119
1977
|
def status=(_); end
|
|
2120
1978
|
|
|
2121
|
-
#
|
|
2122
|
-
#
|
|
2123
|
-
# @return [String] the current value of stderr
|
|
1979
|
+
# pkg:gem/overcommit#lib/overcommit/subprocess.rb:16
|
|
2124
1980
|
def stderr; end
|
|
2125
1981
|
|
|
1982
|
+
# pkg:gem/overcommit#lib/overcommit/subprocess.rb:16
|
|
2126
1983
|
def stderr=(_); end
|
|
2127
1984
|
|
|
2128
|
-
#
|
|
2129
|
-
#
|
|
2130
|
-
# @return [String] the current value of stdout
|
|
1985
|
+
# pkg:gem/overcommit#lib/overcommit/subprocess.rb:16
|
|
2131
1986
|
def stdout; end
|
|
2132
1987
|
|
|
1988
|
+
# pkg:gem/overcommit#lib/overcommit/subprocess.rb:16
|
|
2133
1989
|
def stdout=(_); end
|
|
2134
1990
|
|
|
2135
|
-
#
|
|
2136
|
-
#
|
|
2137
|
-
# source://overcommit-0.59.1/lib/overcommit/subprocess.rb:17
|
|
1991
|
+
# pkg:gem/overcommit#lib/overcommit/subprocess.rb:17
|
|
2138
1992
|
def success?; end
|
|
2139
1993
|
|
|
2140
1994
|
class << self
|
|
1995
|
+
# pkg:gem/overcommit#lib/overcommit/subprocess.rb:16
|
|
2141
1996
|
def [](*_arg0); end
|
|
1997
|
+
|
|
1998
|
+
# pkg:gem/overcommit#lib/overcommit/subprocess.rb:16
|
|
2142
1999
|
def inspect; end
|
|
2000
|
+
|
|
2001
|
+
# pkg:gem/overcommit#lib/overcommit/subprocess.rb:16
|
|
2143
2002
|
def keyword_init?; end
|
|
2003
|
+
|
|
2004
|
+
# pkg:gem/overcommit#lib/overcommit/subprocess.rb:16
|
|
2144
2005
|
def members; end
|
|
2006
|
+
|
|
2007
|
+
# pkg:gem/overcommit#lib/overcommit/subprocess.rb:16
|
|
2145
2008
|
def new(*_arg0); end
|
|
2146
2009
|
end
|
|
2147
2010
|
end
|
|
2148
2011
|
|
|
2149
2012
|
# Utility functions for general use.
|
|
2150
2013
|
#
|
|
2151
|
-
#
|
|
2014
|
+
# pkg:gem/overcommit#lib/overcommit/utils/file_utils.rb:6
|
|
2152
2015
|
module Overcommit::Utils
|
|
2153
2016
|
class << self
|
|
2154
2017
|
# Returns whether a file is a broken symlink.
|
|
2155
2018
|
#
|
|
2156
|
-
# @return [true,
|
|
2019
|
+
# @return [true,false]
|
|
2157
2020
|
#
|
|
2158
|
-
#
|
|
2021
|
+
# pkg:gem/overcommit#lib/overcommit/utils.rb:240
|
|
2159
2022
|
def broken_symlink?(file); end
|
|
2160
2023
|
|
|
2161
2024
|
# Converts a string containing underscores/hyphens/spaces into CamelCase.
|
|
2162
2025
|
#
|
|
2163
|
-
#
|
|
2026
|
+
# pkg:gem/overcommit#lib/overcommit/utils.rb:98
|
|
2164
2027
|
def camel_case(str); end
|
|
2165
2028
|
|
|
2166
2029
|
# Convert a glob pattern to an absolute path glob pattern rooted from the
|
|
@@ -2169,7 +2032,7 @@ module Overcommit::Utils
|
|
|
2169
2032
|
# @param glob [String]
|
|
2170
2033
|
# @return [String]
|
|
2171
2034
|
#
|
|
2172
|
-
#
|
|
2035
|
+
# pkg:gem/overcommit#lib/overcommit/utils.rb:251
|
|
2173
2036
|
def convert_glob_to_absolute(glob); end
|
|
2174
2037
|
|
|
2175
2038
|
# Execute a command in a subprocess, capturing exit status and output from
|
|
@@ -2188,12 +2051,12 @@ module Overcommit::Utils
|
|
|
2188
2051
|
# work split up in this way and still produce the same resultant output
|
|
2189
2052
|
# when outputs of the individual commands are concatenated back together.
|
|
2190
2053
|
#
|
|
2191
|
-
# @option options
|
|
2192
2054
|
# @param initial_args [Array<String>]
|
|
2193
2055
|
# @param options [Hash]
|
|
2056
|
+
# @option options [Array<String>] :args long list of arguments to split up
|
|
2194
2057
|
# @return [Overcommit::Subprocess::Result] status, stdout, and stderr
|
|
2195
2058
|
#
|
|
2196
|
-
#
|
|
2059
|
+
# pkg:gem/overcommit#lib/overcommit/utils.rb:179
|
|
2197
2060
|
def execute(initial_args, options = T.unsafe(nil)); end
|
|
2198
2061
|
|
|
2199
2062
|
# Execute a command in a subprocess, returning immediately.
|
|
@@ -2204,54 +2067,51 @@ module Overcommit::Utils
|
|
|
2204
2067
|
# @param args [Array<String>]
|
|
2205
2068
|
# @return [ChildProcess] detached process spawned in the background
|
|
2206
2069
|
#
|
|
2207
|
-
#
|
|
2070
|
+
# pkg:gem/overcommit#lib/overcommit/utils.rb:208
|
|
2208
2071
|
def execute_in_background(args); end
|
|
2209
2072
|
|
|
2210
2073
|
# Returns an absolute path to the .git directory for a repo.
|
|
2211
2074
|
#
|
|
2212
2075
|
# @return [String]
|
|
2213
2076
|
#
|
|
2214
|
-
#
|
|
2077
|
+
# pkg:gem/overcommit#lib/overcommit/utils.rb:62
|
|
2215
2078
|
def git_dir; end
|
|
2216
2079
|
|
|
2217
2080
|
# @param cmd [String]
|
|
2218
|
-
# @return [true,
|
|
2081
|
+
# @return [true,false] whether a command can be found given the current
|
|
2219
2082
|
# environment path.
|
|
2220
2083
|
#
|
|
2221
|
-
#
|
|
2084
|
+
# pkg:gem/overcommit#lib/overcommit/utils.rb:120
|
|
2222
2085
|
def in_path?(cmd); end
|
|
2223
2086
|
|
|
2224
2087
|
# @return [Overcommit::Logger] logger with which to send debug output
|
|
2225
2088
|
#
|
|
2226
|
-
#
|
|
2089
|
+
# pkg:gem/overcommit#lib/overcommit/utils.rb:33
|
|
2227
2090
|
def log; end
|
|
2228
2091
|
|
|
2229
2092
|
# @return [Overcommit::Logger] logger with which to send debug output
|
|
2230
2093
|
#
|
|
2231
|
-
#
|
|
2094
|
+
# pkg:gem/overcommit#lib/overcommit/utils.rb:33
|
|
2232
2095
|
def log=(_arg0); end
|
|
2233
2096
|
|
|
2234
2097
|
# Return whether a pattern matches the given path.
|
|
2235
2098
|
#
|
|
2236
2099
|
# @param pattern [String]
|
|
2237
2100
|
# @param path [String]
|
|
2238
|
-
# @return [Boolean]
|
|
2239
2101
|
#
|
|
2240
|
-
#
|
|
2102
|
+
# pkg:gem/overcommit#lib/overcommit/utils.rb:259
|
|
2241
2103
|
def matches_path?(pattern, path); end
|
|
2242
2104
|
|
|
2243
2105
|
# Return the parent command that triggered this hook run
|
|
2244
2106
|
#
|
|
2245
|
-
# @return [String,
|
|
2107
|
+
# @return [String,nil] the command as a string, if a parent exists.
|
|
2246
2108
|
#
|
|
2247
|
-
#
|
|
2109
|
+
# pkg:gem/overcommit#lib/overcommit/utils.rb:139
|
|
2248
2110
|
def parent_command; end
|
|
2249
2111
|
|
|
2250
2112
|
# Return the number of processors used by the OS for process scheduling.
|
|
2251
2113
|
#
|
|
2252
|
-
#
|
|
2253
|
-
#
|
|
2254
|
-
# source://overcommit-0.59.1/lib/overcommit/utils.rb:217
|
|
2114
|
+
# pkg:gem/overcommit#lib/overcommit/utils.rb:219
|
|
2255
2115
|
def processor_count; end
|
|
2256
2116
|
|
|
2257
2117
|
# Returns an absolute path to the root of the repository.
|
|
@@ -2262,16 +2122,16 @@ module Overcommit::Utils
|
|
|
2262
2122
|
#
|
|
2263
2123
|
# @return [String]
|
|
2264
2124
|
#
|
|
2265
|
-
#
|
|
2125
|
+
# pkg:gem/overcommit#lib/overcommit/utils.rb:46
|
|
2266
2126
|
def repo_root; end
|
|
2267
2127
|
|
|
2268
|
-
#
|
|
2128
|
+
# pkg:gem/overcommit#lib/overcommit/utils.rb:35
|
|
2269
2129
|
def script_path(script); end
|
|
2270
2130
|
|
|
2271
2131
|
# Shamelessly stolen from:
|
|
2272
2132
|
# stackoverflow.com/questions/1509915/converting-camel-case-to-underscore-case-in-ruby
|
|
2273
2133
|
#
|
|
2274
|
-
#
|
|
2134
|
+
# pkg:gem/overcommit#lib/overcommit/utils.rb:89
|
|
2275
2135
|
def snake_case(str); end
|
|
2276
2136
|
|
|
2277
2137
|
# Remove ANSI escape sequences from a string.
|
|
@@ -2281,23 +2141,23 @@ module Overcommit::Utils
|
|
|
2281
2141
|
# @param text [String]
|
|
2282
2142
|
# @return [String]
|
|
2283
2143
|
#
|
|
2284
|
-
#
|
|
2144
|
+
# pkg:gem/overcommit#lib/overcommit/utils.rb:83
|
|
2285
2145
|
def strip_color_codes(text); end
|
|
2286
2146
|
|
|
2287
2147
|
# Returns a list of supported hook classes (PreCommit, CommitMsg, etc.)
|
|
2288
2148
|
#
|
|
2289
|
-
#
|
|
2149
|
+
# pkg:gem/overcommit#lib/overcommit/utils.rb:111
|
|
2290
2150
|
def supported_hook_type_classes; end
|
|
2291
2151
|
|
|
2292
2152
|
# Returns a list of supported hook types (pre-commit, commit-msg, etc.)
|
|
2293
2153
|
#
|
|
2294
|
-
#
|
|
2154
|
+
# pkg:gem/overcommit#lib/overcommit/utils.rb:103
|
|
2295
2155
|
def supported_hook_types; end
|
|
2296
2156
|
|
|
2297
2157
|
# Calls a block of code with a modified set of environment variables,
|
|
2298
2158
|
# restoring them once the code has executed.
|
|
2299
2159
|
#
|
|
2300
|
-
#
|
|
2160
|
+
# pkg:gem/overcommit#lib/overcommit/utils.rb:225
|
|
2301
2161
|
def with_environment(env); end
|
|
2302
2162
|
|
|
2303
2163
|
private
|
|
@@ -2310,14 +2170,14 @@ module Overcommit::Utils
|
|
|
2310
2170
|
#
|
|
2311
2171
|
# @param args [Array<String>]
|
|
2312
2172
|
#
|
|
2313
|
-
#
|
|
2173
|
+
# pkg:gem/overcommit#lib/overcommit/utils.rb:276
|
|
2314
2174
|
def debug(*args); end
|
|
2315
2175
|
end
|
|
2316
2176
|
end
|
|
2317
2177
|
|
|
2318
2178
|
# Utility functions for file IO.
|
|
2319
2179
|
#
|
|
2320
|
-
#
|
|
2180
|
+
# pkg:gem/overcommit#lib/overcommit/utils/file_utils.rb:8
|
|
2321
2181
|
module Overcommit::Utils::FileUtils
|
|
2322
2182
|
class << self
|
|
2323
2183
|
# When the host OS is Windows, uses the `dir` command to check whether
|
|
@@ -2325,39 +2185,35 @@ module Overcommit::Utils::FileUtils
|
|
|
2325
2185
|
# the command output. Otherwise raises an `ArgumentError`. Delegates to
|
|
2326
2186
|
# `File.readlink` if the host OS is not Windows.
|
|
2327
2187
|
#
|
|
2328
|
-
#
|
|
2188
|
+
# pkg:gem/overcommit#lib/overcommit/utils/file_utils.rb:34
|
|
2329
2189
|
def readlink(link_name); end
|
|
2330
2190
|
|
|
2331
2191
|
# When the host OS is Windows, uses the `mklink` command to create an
|
|
2332
2192
|
# NTFS symbolic link from `new_name` to `old_name`. Otherwise delegates
|
|
2333
2193
|
# to `File.symlink`
|
|
2334
2194
|
#
|
|
2335
|
-
#
|
|
2195
|
+
# pkg:gem/overcommit#lib/overcommit/utils/file_utils.rb:13
|
|
2336
2196
|
def symlink(old_name, new_name); end
|
|
2337
2197
|
|
|
2338
2198
|
# When the host OS is Windows, uses the `dir` command to check whether
|
|
2339
2199
|
# `file_name` is an NTFS symbolic link. Otherwise delegates to
|
|
2340
2200
|
# `File.symlink`.
|
|
2341
2201
|
#
|
|
2342
|
-
#
|
|
2343
|
-
#
|
|
2344
|
-
# source://overcommit-0.59.1/lib/overcommit/utils/file_utils.rb:23
|
|
2202
|
+
# pkg:gem/overcommit#lib/overcommit/utils/file_utils.rb:23
|
|
2345
2203
|
def symlink?(file_name); end
|
|
2346
2204
|
|
|
2347
2205
|
private
|
|
2348
2206
|
|
|
2349
|
-
#
|
|
2207
|
+
# pkg:gem/overcommit#lib/overcommit/utils/file_utils.rb:50
|
|
2350
2208
|
def win32_dir_cmd(file_name); end
|
|
2351
2209
|
|
|
2352
|
-
#
|
|
2210
|
+
# pkg:gem/overcommit#lib/overcommit/utils/file_utils.rb:62
|
|
2353
2211
|
def win32_fix_pathsep(path); end
|
|
2354
2212
|
|
|
2355
|
-
#
|
|
2213
|
+
# pkg:gem/overcommit#lib/overcommit/utils/file_utils.rb:56
|
|
2356
2214
|
def win32_mklink_cmd(old_name, new_name); end
|
|
2357
2215
|
|
|
2358
|
-
#
|
|
2359
|
-
#
|
|
2360
|
-
# source://overcommit-0.59.1/lib/overcommit/utils/file_utils.rb:66
|
|
2216
|
+
# pkg:gem/overcommit#lib/overcommit/utils/file_utils.rb:66
|
|
2361
2217
|
def win32_symlink?(dir_output); end
|
|
2362
2218
|
end
|
|
2363
2219
|
end
|
|
@@ -2366,26 +2222,26 @@ end
|
|
|
2366
2222
|
#
|
|
2367
2223
|
# This allows us to execute code based on the git version.
|
|
2368
2224
|
#
|
|
2369
|
-
#
|
|
2225
|
+
# pkg:gem/overcommit#lib/overcommit/utils.rb:16
|
|
2370
2226
|
class Overcommit::Utils::Version < ::Gem::Version
|
|
2371
|
-
#
|
|
2227
|
+
# pkg:gem/overcommit#lib/overcommit/utils.rb:20
|
|
2372
2228
|
def !=(version); end
|
|
2373
2229
|
|
|
2374
|
-
#
|
|
2230
|
+
# pkg:gem/overcommit#lib/overcommit/utils.rb:20
|
|
2375
2231
|
def <(version); end
|
|
2376
2232
|
|
|
2377
|
-
#
|
|
2233
|
+
# pkg:gem/overcommit#lib/overcommit/utils.rb:20
|
|
2378
2234
|
def <=(version); end
|
|
2379
2235
|
|
|
2380
|
-
#
|
|
2236
|
+
# pkg:gem/overcommit#lib/overcommit/utils.rb:20
|
|
2381
2237
|
def ==(version); end
|
|
2382
2238
|
|
|
2383
|
-
#
|
|
2239
|
+
# pkg:gem/overcommit#lib/overcommit/utils.rb:20
|
|
2384
2240
|
def >(version); end
|
|
2385
2241
|
|
|
2386
|
-
#
|
|
2242
|
+
# pkg:gem/overcommit#lib/overcommit/utils.rb:20
|
|
2387
2243
|
def >=(version); end
|
|
2388
2244
|
end
|
|
2389
2245
|
|
|
2390
|
-
#
|
|
2246
|
+
# pkg:gem/overcommit#lib/overcommit/version.rb:5
|
|
2391
2247
|
Overcommit::VERSION = T.let(T.unsafe(nil), String)
|