gerrit 0.9.0 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gerrit/command/clone.rb +27 -0
- data/lib/gerrit/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 94a021d12d290518ccce28a809efed5dc8553552
|
4
|
+
data.tar.gz: 8c97eef1eb4a73e3a61912d7a63f76d697539227
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c41edfd0c4e3b2f11c7ae1c1a9773c72799c59e51c790c82d582ce32191431ad7910fc3baf74e5548e3a2dbc7dfd82cb4744da820270f277fc3df38a44097956
|
7
|
+
data.tar.gz: 226ffa3f6555b4dce8d6b82ad240a795b9bc773121eef96d0b9f75e3d48227873fa32a18fd4f6bb18a47e0fa0373ff643e48d2875f52b9e050fa1b532ae8a357
|
data/lib/gerrit/command/clone.rb
CHANGED
@@ -42,6 +42,7 @@ module Gerrit::Command
|
|
42
42
|
project_dir = File.join(Dir.pwd, project)
|
43
43
|
|
44
44
|
if result.success?
|
45
|
+
install_change_id_hook(project_dir)
|
45
46
|
ui.success("#{project} successfully cloned into #{project_dir}")
|
46
47
|
ui.newline
|
47
48
|
setup_remotes(project_dir)
|
@@ -67,5 +68,31 @@ module Gerrit::Command
|
|
67
68
|
execute_command(%w[setup])
|
68
69
|
end
|
69
70
|
end
|
71
|
+
|
72
|
+
def install_change_id_hook(repo_directory)
|
73
|
+
Dir.chdir(repo_directory) do
|
74
|
+
commit_msg_hook_path = File.join(repo.git_dir, 'hooks', 'commit-msg')
|
75
|
+
|
76
|
+
if File.exist?(commit_msg_hook_path)
|
77
|
+
ui.warning('Skipping install of Gerrit Change ID commit-msg hook ' \
|
78
|
+
"as there is already a #{commit_msg_hook_path} file present")
|
79
|
+
return
|
80
|
+
end
|
81
|
+
|
82
|
+
result = ui.spinner('Downloading Gerrit Change ID commit-msg hook...') do
|
83
|
+
spawn(%W[scp -P #{config[:port]}
|
84
|
+
#{config[:user]}@#{config[:host]}:hooks/commit-msg
|
85
|
+
#{commit_msg_hook_path}])
|
86
|
+
end
|
87
|
+
|
88
|
+
if result.success?
|
89
|
+
ui.success('Installed Gerrit Change ID commit-msg hook')
|
90
|
+
else
|
91
|
+
ui.warning('Unable to install Gerrit Change ID commit-msg hook:')
|
92
|
+
ui.error(result.stdout + result.stderr)
|
93
|
+
ui.warning("You won't be able to push your commits to Gerrit without this hook")
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
70
97
|
end
|
71
98
|
end
|
data/lib/gerrit/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gerrit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shane da Silva
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: childprocess
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.6
|
33
|
+
version: '1.6'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.6
|
40
|
+
version: '1.6'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: pry
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|