gitlab_git 5.7.1 → 5.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/gitlab_git/git_stats.rb +1 -1
- data/lib/gitlab_git/popen.rb +6 -2
- data/lib/gitlab_git/repository.rb +5 -5
- data/lib/gitlab_git/stats.rb +2 -2
- metadata +24 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b426ad76bd77854b340ad4ec842d8386ac54452
|
4
|
+
data.tar.gz: d606291695b9be10627e5bca829360ee7ab16c89
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d55ae4d0d02cc09a32f8dbd1415d19e9654e04c3033a382aaedb9015876c61fe8703956ff1d668cc143131663b9e4a8952046a79868f813caddb0634aba4c45
|
7
|
+
data.tar.gz: d19fa6a15134a44ffa23597d1491711f2ff753df100d2597a52edd658de20793d8bbbcba5dcd99ebc8891db3f5c6167b335269ac4e8145d3d00515811e7249b7
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
5.
|
1
|
+
5.8.0
|
data/lib/gitlab_git/git_stats.rb
CHANGED
@@ -14,7 +14,7 @@ module Gitlab
|
|
14
14
|
Grit::Git.with_timeout(timeout) do
|
15
15
|
# Limit log to 6k commits to avoid timeout for huge projects
|
16
16
|
args = [ref, '-6000', '--format=%aN%x0a%aE%x0a%cd', '--date=short', '--shortstat', '--no-merges', '--diff-filter=ACDM']
|
17
|
-
log = repo.git.
|
17
|
+
log = repo.git.native(:log, {}, args)
|
18
18
|
end
|
19
19
|
|
20
20
|
log
|
data/lib/gitlab_git/popen.rb
CHANGED
@@ -4,15 +4,19 @@ module Gitlab
|
|
4
4
|
module Git
|
5
5
|
module Popen
|
6
6
|
def popen(cmd, path)
|
7
|
+
unless cmd.is_a?(Array)
|
8
|
+
raise "System commands must be given as an array of strings"
|
9
|
+
end
|
10
|
+
|
7
11
|
vars = { "PWD" => path }
|
8
12
|
options = { :chdir => path }
|
9
13
|
|
10
14
|
@cmd_output = ""
|
11
15
|
@cmd_status = 0
|
12
|
-
Open3.popen3(vars, cmd, options) do |stdin, stdout, stderr, wait_thr|
|
13
|
-
@cmd_status = wait_thr.value.exitstatus
|
16
|
+
Open3.popen3(vars, *cmd, options) do |stdin, stdout, stderr, wait_thr|
|
14
17
|
@cmd_output << stdout.read
|
15
18
|
@cmd_output << stderr.read
|
19
|
+
@cmd_status = wait_thr.value.exitstatus
|
16
20
|
end
|
17
21
|
|
18
22
|
return @cmd_output, @cmd_status
|
@@ -141,19 +141,19 @@ module Gitlab
|
|
141
141
|
case format
|
142
142
|
when "tar.bz2", "tbz", "tbz2", "tb2", "bz2"
|
143
143
|
extension = ".tar.bz2"
|
144
|
-
pipe_cmd =
|
144
|
+
pipe_cmd = %W(bzip2)
|
145
145
|
when "tar"
|
146
146
|
extension = ".tar"
|
147
|
-
pipe_cmd =
|
147
|
+
pipe_cmd = %W(cat)
|
148
148
|
when "zip"
|
149
149
|
extension = ".zip"
|
150
150
|
git_archive_format = "zip"
|
151
|
-
pipe_cmd =
|
151
|
+
pipe_cmd = %W(cat)
|
152
152
|
else
|
153
153
|
# everything else should fall back to tar.gz
|
154
154
|
extension = ".tar.gz"
|
155
155
|
git_archive_format = nil
|
156
|
-
pipe_cmd =
|
156
|
+
pipe_cmd = %W(gzip -n)
|
157
157
|
end
|
158
158
|
|
159
159
|
# Build file path
|
@@ -174,7 +174,7 @@ module Gitlab
|
|
174
174
|
|
175
175
|
# Return repo size in megabytes
|
176
176
|
def size
|
177
|
-
size = popen(
|
177
|
+
size = popen(%W(du -s), path).first.strip.to_i
|
178
178
|
(size.to_f / 1024).round(2)
|
179
179
|
end
|
180
180
|
|
data/lib/gitlab_git/stats.rb
CHANGED
@@ -17,7 +17,7 @@ module Gitlab
|
|
17
17
|
|
18
18
|
def files_count
|
19
19
|
args = [ref, '-r', '--name-only' ]
|
20
|
-
repo.git.
|
20
|
+
repo.git.native(:ls_tree, {}, args).split("\n").count
|
21
21
|
end
|
22
22
|
|
23
23
|
def authors_count
|
@@ -55,7 +55,7 @@ module Gitlab
|
|
55
55
|
def build_graph(n = 4)
|
56
56
|
from, to = (Date.today.prev_day(n*7)), Date.today
|
57
57
|
args = ['--all', "--since=#{from.to_s}", '--format=%ad' ]
|
58
|
-
rev_list = repo.git.
|
58
|
+
rev_list = repo.git.native(:rev_list, {}, args).split("\n")
|
59
59
|
|
60
60
|
commits_dates = rev_list.values_at(* rev_list.each_index.select {|i| i.odd?})
|
61
61
|
commits_dates = commits_dates.map { |date_str| Time.parse(date_str).to_date.to_s }
|
metadata
CHANGED
@@ -1,91 +1,92 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitlab_git
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitriy Zaporozhets
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-04-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gitlab-linguist
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.0
|
19
|
+
version: '3.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 3.0
|
26
|
+
version: '3.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: gitlab-grit
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 2.6
|
33
|
+
version: '2.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: 2.6
|
40
|
+
version: '2.6'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: activesupport
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 4.0
|
47
|
+
version: '4.0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 4.0
|
54
|
+
version: '4.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rugged
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - ~>
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: 0.19.0
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - ~>
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 0.19.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: charlock_holmes
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - ~>
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.6
|
75
|
+
version: '0.6'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - ~>
|
80
|
+
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.6
|
82
|
+
version: '0.6'
|
83
83
|
description: GitLab wrapper around git objects
|
84
84
|
email: dmitriy.zaporozhets@gmail.com
|
85
85
|
executables: []
|
86
86
|
extensions: []
|
87
87
|
extra_rdoc_files: []
|
88
88
|
files:
|
89
|
+
- VERSION
|
89
90
|
- lib/gitlab_git.rb
|
90
91
|
- lib/gitlab_git/blame.rb
|
91
92
|
- lib/gitlab_git/blob.rb
|
@@ -103,7 +104,6 @@ files:
|
|
103
104
|
- lib/gitlab_git/stats.rb
|
104
105
|
- lib/gitlab_git/tag.rb
|
105
106
|
- lib/gitlab_git/tree.rb
|
106
|
-
- VERSION
|
107
107
|
homepage: http://rubygems.org/gems/gitlab_git
|
108
108
|
licenses:
|
109
109
|
- MIT
|
@@ -114,17 +114,17 @@ require_paths:
|
|
114
114
|
- lib
|
115
115
|
required_ruby_version: !ruby/object:Gem::Requirement
|
116
116
|
requirements:
|
117
|
-
- -
|
117
|
+
- - ">="
|
118
118
|
- !ruby/object:Gem::Version
|
119
119
|
version: '0'
|
120
120
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- -
|
122
|
+
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
requirements: []
|
126
126
|
rubyforge_project:
|
127
|
-
rubygems_version: 2.
|
127
|
+
rubygems_version: 2.2.2
|
128
128
|
signing_key:
|
129
129
|
specification_version: 4
|
130
130
|
summary: Gitlab::Git library
|