tdx 0.2.8 → 0.2.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +9 -1
- data/README.md +6 -0
- data/lib/tdx/base.rb +10 -3
- data/lib/tdx/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c35b5e6ca7f95fb7e4975868ded9c3d7bed3faa6
|
4
|
+
data.tar.gz: 36a40cf9a06b946170b58611037831ad2ee41427
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69a4aa37939a6c91c0c373d6a9ae0b8f89d36ba401f5ff417b32dce8991420a363dd2124c4bb707336c6343f2bdc031814a68dd71652681e347b8939c319a47d
|
7
|
+
data.tar.gz: b4b948f90400114710c94077697ae716b810a16327b3011d599cdb1f6742b04f8c501b89075e81e58dff094186102ec8a778a97ae821a80f0c71948ef73528b1
|
data/.travis.yml
CHANGED
@@ -6,7 +6,15 @@ branches:
|
|
6
6
|
only:
|
7
7
|
- master
|
8
8
|
install:
|
9
|
-
- travis_retry
|
9
|
+
- travis_retry sudo apt-get update
|
10
|
+
- travis_retry sudo apt-get remove -y git
|
11
|
+
- travis_retry sudo add-apt-repository "deb http://ppa.launchpad.net/svn/ppa/ubuntu precise main"
|
12
|
+
- travis_retry sudo add-apt-repository -y ppa:git-core/ppa
|
13
|
+
- travis_retry sudo apt-get update
|
14
|
+
- travis_retry sudo apt-get install -y git
|
15
|
+
- travis_retry sudo apt-get install -y gnuplot
|
16
|
+
- travis_retry bundle install
|
17
|
+
- git --version
|
10
18
|
script:
|
11
19
|
- rake
|
12
20
|
|
data/README.md
CHANGED
@@ -33,6 +33,12 @@ Run it locally and read its output:
|
|
33
33
|
$ tdx --help
|
34
34
|
```
|
35
35
|
|
36
|
+
This command, for example, will generate SVG graph for this repo:
|
37
|
+
|
38
|
+
```bash
|
39
|
+
$ tdx --tests=test/**/* --tests=features/**/* git@github.com:yegor256/tdx.git graph.svg
|
40
|
+
```
|
41
|
+
|
36
42
|
## How to contribute
|
37
43
|
|
38
44
|
Just fork it and submit a pull request. Make sure `rake` passes.
|
data/lib/tdx/base.rb
CHANGED
@@ -59,10 +59,11 @@ module TDX
|
|
59
59
|
metrics = commits.each_with_index.map do |c, i|
|
60
60
|
Exec.new("git checkout --quiet --force #{c[0]}", path).stdout
|
61
61
|
pure = pure(path, c[0])
|
62
|
+
total = hoc(path, c[0])
|
62
63
|
m = {
|
63
64
|
date: c[1],
|
64
65
|
code: pure,
|
65
|
-
tests:
|
66
|
+
tests: pure > total ? total : total - pure,
|
66
67
|
issues: issues(commits)[c[0]],
|
67
68
|
sha: c[0]
|
68
69
|
}
|
@@ -139,12 +140,18 @@ module TDX
|
|
139
140
|
end
|
140
141
|
|
141
142
|
def pure(path, sha)
|
142
|
-
|
143
|
+
if @pure.nil?
|
144
|
+
@pure = hashes(path, @opts[:tests])
|
145
|
+
puts "#{@pure.length} code commits"
|
146
|
+
end
|
143
147
|
sum(@pure, sha)
|
144
148
|
end
|
145
149
|
|
146
150
|
def hoc(path, sha)
|
147
|
-
|
151
|
+
if @hoc.nil?
|
152
|
+
@hoc = hashes(path, [])
|
153
|
+
puts "#{@hoc.length} total commits"
|
154
|
+
end
|
148
155
|
sum(@hoc, sha)
|
149
156
|
end
|
150
157
|
|
data/lib/tdx/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tdx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yegor Bugayenko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03-
|
11
|
+
date: 2017-03-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: slop
|