rabbitt-githooks 1.6.2 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/lib/githooks/cli/config.rb +1 -1
- data/lib/githooks/core_ext.rb +0 -1
- data/lib/githooks/core_ext/array.rb +0 -1
- data/lib/githooks/core_ext/pathname.rb +0 -27
- data/lib/githooks/runner.rb +1 -1
- data/lib/githooks/version.rb +1 -1
- data/rabbitt-githooks.gemspec +4 -2
- metadata +7 -9
- data/lib/githooks/core_ext/array/min_max.rb +0 -39
- data/lib/githooks/core_ext/object.rb +0 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 585f5e42349bd8eba63fa0968b9046bdfdb03f23
|
4
|
+
data.tar.gz: d0d24f2da8eb2e6487bcbcc4d385e9699749e595
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b620da55441f225b23aaf111d10ba9e6c43678d007c0f0ef2a7cbd41744a3d634befddc017105af6a709495dcb9143fa16191571d14486879a128be3b5f5c33b
|
7
|
+
data.tar.gz: 7a5052607723e90b9633c8116b00fe247d49118153ce9f042f75d1296d2a32913958fd7c0ddcd7fb10a0116963b40ad0bf26561aeb467f8fe070a881e60e02d1
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rabbitt-githooks (1.
|
4
|
+
rabbitt-githooks (1.7.0)
|
5
5
|
rainbow (>= 2.0.0, < 4.0)
|
6
6
|
thor (~> 0.19.1)
|
7
7
|
|
@@ -62,10 +62,10 @@ DEPENDENCIES
|
|
62
62
|
rabbitt-githooks!
|
63
63
|
rake (~> 10.1)
|
64
64
|
rspec (~> 2.14)
|
65
|
-
rubocop (~> 0.
|
65
|
+
rubocop (~> 0.58.2)
|
66
66
|
ruby-lint (~> 2.0)
|
67
67
|
simplecov (~> 0.9)
|
68
|
-
yard (~> 0.
|
68
|
+
yard (~> 0.9.15)
|
69
69
|
|
70
70
|
BUNDLED WITH
|
71
71
|
1.16.1
|
data/lib/githooks/cli/config.rb
CHANGED
@@ -83,7 +83,7 @@ module GitHooks
|
|
83
83
|
return unless githooks
|
84
84
|
|
85
85
|
githooks.each do |path, data|
|
86
|
-
key_size, value_size = data.keys.collect(&:size).
|
86
|
+
key_size, value_size = data.keys.collect(&:size).max, data.values.collect(&:size).max
|
87
87
|
display_format = " %-#{key_size}s = %-#{value_size}s\n"
|
88
88
|
|
89
89
|
puts "Repository [#{File.basename(path)}]"
|
data/lib/githooks/core_ext.rb
CHANGED
@@ -16,7 +16,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|
16
16
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
17
17
|
=end
|
18
18
|
|
19
|
-
require_relative 'core_ext/object'
|
20
19
|
require_relative 'core_ext/array'
|
21
20
|
require_relative 'core_ext/rainbow'
|
22
21
|
require_relative 'core_ext/numbers'
|
@@ -16,6 +16,5 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|
16
16
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
17
17
|
=end
|
18
18
|
|
19
|
-
require_relative 'array/min_max'
|
20
19
|
require_relative 'array/select_with_index'
|
21
20
|
require_relative 'array/extract_options'
|
@@ -18,33 +18,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|
18
18
|
|
19
19
|
require 'pathname'
|
20
20
|
|
21
|
-
if RUBY_ENGINE == 'jruby'
|
22
|
-
class Pathname
|
23
|
-
def realpath(basedir = nil)
|
24
|
-
java_realpath(basedir).tap do |path|
|
25
|
-
fail Errno::ENOENT, path.to_s unless path.exist?
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
def realdirpath(basedir = nil)
|
30
|
-
java_realpath(basedir)
|
31
|
-
end
|
32
|
-
|
33
|
-
def java_realpath(basedir = nil)
|
34
|
-
# rubocop:disable ElseAlignment, EndAlignment
|
35
|
-
path = if basedir && @path[0] != '/'
|
36
|
-
Pathname.new(basedir).realpath.join(@path)
|
37
|
-
else
|
38
|
-
@path.to_s
|
39
|
-
end
|
40
|
-
# rubocop:enable ElseAlignment, EndAlignment
|
41
|
-
|
42
|
-
self.class.new java.io.File.new(path.to_s).canonical_path
|
43
|
-
end
|
44
|
-
private :java_realpath
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
21
|
class Pathname
|
49
22
|
def include?(component)
|
50
23
|
to_s.split(File::SEPARATOR).include?(component)
|
data/lib/githooks/runner.rb
CHANGED
@@ -233,7 +233,7 @@ module GitHooks
|
|
233
233
|
end
|
234
234
|
|
235
235
|
success = active_hook.run
|
236
|
-
section_length = active_hook.sections.
|
236
|
+
section_length = active_hook.sections.map { |s| s.title.length }.max
|
237
237
|
sections = active_hook.sections.select { |section| !section.actions.empty? }
|
238
238
|
|
239
239
|
# TODO: refactor to show this in realtime instead of after the hooks have run
|
data/lib/githooks/version.rb
CHANGED
data/rabbitt-githooks.gemspec
CHANGED
@@ -38,17 +38,19 @@ begin
|
|
38
38
|
spec.require_paths = ['lib']
|
39
39
|
spec.extra_rdoc_files = ['README.md', 'LICENSE.txt']
|
40
40
|
|
41
|
+
spec.required_ruby_version = '>= 2.0.0'
|
42
|
+
|
41
43
|
spec.add_dependency 'rainbow', '>= 2.0.0', '< 4.0'
|
42
44
|
spec.add_dependency 'thor', '~> 0.19.1'
|
43
45
|
|
44
46
|
spec.add_development_dependency 'rake', '~> 10.1'
|
45
47
|
spec.add_development_dependency 'bundler', '~> 1.3'
|
46
48
|
|
47
|
-
spec.add_development_dependency 'yard', '~> 0.
|
49
|
+
spec.add_development_dependency 'yard', '~> 0.9.15'
|
48
50
|
spec.add_development_dependency 'rspec', '~> 2.14'
|
49
51
|
spec.add_development_dependency 'simplecov', '~> 0.9'
|
50
52
|
|
51
|
-
spec.add_development_dependency 'rubocop', '~> 0.
|
53
|
+
spec.add_development_dependency 'rubocop', '~> 0.58.2'
|
52
54
|
spec.add_development_dependency 'ruby-lint', '~> 2.0'
|
53
55
|
end
|
54
56
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rabbitt-githooks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carl P. Corliss
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-07-
|
11
|
+
date: 2018-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rainbow
|
@@ -78,14 +78,14 @@ dependencies:
|
|
78
78
|
requirements:
|
79
79
|
- - "~>"
|
80
80
|
- !ruby/object:Gem::Version
|
81
|
-
version:
|
81
|
+
version: 0.9.15
|
82
82
|
type: :development
|
83
83
|
prerelease: false
|
84
84
|
version_requirements: !ruby/object:Gem::Requirement
|
85
85
|
requirements:
|
86
86
|
- - "~>"
|
87
87
|
- !ruby/object:Gem::Version
|
88
|
-
version:
|
88
|
+
version: 0.9.15
|
89
89
|
- !ruby/object:Gem::Dependency
|
90
90
|
name: rspec
|
91
91
|
requirement: !ruby/object:Gem::Requirement
|
@@ -120,14 +120,14 @@ dependencies:
|
|
120
120
|
requirements:
|
121
121
|
- - "~>"
|
122
122
|
- !ruby/object:Gem::Version
|
123
|
-
version:
|
123
|
+
version: 0.58.2
|
124
124
|
type: :development
|
125
125
|
prerelease: false
|
126
126
|
version_requirements: !ruby/object:Gem::Requirement
|
127
127
|
requirements:
|
128
128
|
- - "~>"
|
129
129
|
- !ruby/object:Gem::Version
|
130
|
-
version:
|
130
|
+
version: 0.58.2
|
131
131
|
- !ruby/object:Gem::Dependency
|
132
132
|
name: ruby-lint
|
133
133
|
requirement: !ruby/object:Gem::Requirement
|
@@ -170,11 +170,9 @@ files:
|
|
170
170
|
- lib/githooks/core_ext.rb
|
171
171
|
- lib/githooks/core_ext/array.rb
|
172
172
|
- lib/githooks/core_ext/array/extract_options.rb
|
173
|
-
- lib/githooks/core_ext/array/min_max.rb
|
174
173
|
- lib/githooks/core_ext/array/select_with_index.rb
|
175
174
|
- lib/githooks/core_ext/numbers.rb
|
176
175
|
- lib/githooks/core_ext/numbers/infinity.rb
|
177
|
-
- lib/githooks/core_ext/object.rb
|
178
176
|
- lib/githooks/core_ext/ostruct.rb
|
179
177
|
- lib/githooks/core_ext/pathname.rb
|
180
178
|
- lib/githooks/core_ext/rainbow.rb
|
@@ -207,7 +205,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
207
205
|
requirements:
|
208
206
|
- - ">="
|
209
207
|
- !ruby/object:Gem::Version
|
210
|
-
version:
|
208
|
+
version: 2.0.0
|
211
209
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
212
210
|
requirements:
|
213
211
|
- - ">="
|
@@ -1,39 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
Copyright (C) 2013 Carl P. Corliss
|
3
|
-
|
4
|
-
This program is free software; you can redistribute it and/or modify
|
5
|
-
it under the terms of the GNU General Public License as published by
|
6
|
-
the Free Software Foundation; either version 2 of the License, or
|
7
|
-
(at your option) any later version.
|
8
|
-
|
9
|
-
This program is distributed in the hope that it will be useful,
|
10
|
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
|
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
-
GNU General Public License for more details.
|
13
|
-
|
14
|
-
You should have received a copy of the GNU General Public License along
|
15
|
-
with this program; if not, write to the Free Software Foundation, Inc.,
|
16
|
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
17
|
-
=end
|
18
|
-
|
19
|
-
require_relative '../numbers/infinity'
|
20
|
-
|
21
|
-
class Array
|
22
|
-
def minimum(&_block)
|
23
|
-
collection = block_given? ? collect { |obj| yield obj } : self
|
24
|
-
collection.inject(Infinity) do |min, num| # rubocop:disable Style/EachWithObject
|
25
|
-
min = num < min ? num : min
|
26
|
-
min
|
27
|
-
end
|
28
|
-
end
|
29
|
-
alias_method :min, :minimum
|
30
|
-
|
31
|
-
def maximum(&_block)
|
32
|
-
collection = block_given? ? collect { |obj| yield obj } : self
|
33
|
-
collection.inject(0) do |max, num| # rubocop:disable Style/EachWithObject
|
34
|
-
max = num > max ? num : max
|
35
|
-
max
|
36
|
-
end
|
37
|
-
end
|
38
|
-
alias_method :max, :maximum
|
39
|
-
end
|
@@ -1,26 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
Copyright (C) 2013 Carl P. Corliss
|
3
|
-
|
4
|
-
This program is free software; you can redistribute it and/or modify
|
5
|
-
it under the terms of the GNU General Public License as published by
|
6
|
-
the Free Software Foundation; either version 2 of the License, or
|
7
|
-
(at your option) any later version.
|
8
|
-
|
9
|
-
This program is distributed in the hope that it will be useful,
|
10
|
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11
|
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12
|
-
GNU General Public License for more details.
|
13
|
-
|
14
|
-
You should have received a copy of the GNU General Public License along
|
15
|
-
with this program; if not, write to the Free Software Foundation, Inc.,
|
16
|
-
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
17
|
-
=end
|
18
|
-
|
19
|
-
class Object
|
20
|
-
def deep_dup
|
21
|
-
Marshal.load(Marshal.dump(self))
|
22
|
-
rescue TypeError => e
|
23
|
-
raise e unless e.message.include? "can't dump"
|
24
|
-
dup
|
25
|
-
end
|
26
|
-
end
|