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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8fba372ee68c94e51b42e71bfac06fadb0b534cf
4
- data.tar.gz: d789d0bc60773802e4833c03539e96575f7d2dd9
3
+ metadata.gz: c35b5e6ca7f95fb7e4975868ded9c3d7bed3faa6
4
+ data.tar.gz: 36a40cf9a06b946170b58611037831ad2ee41427
5
5
  SHA512:
6
- metadata.gz: 025703c60a02825785db1deb9bb39489817fdcab57f2cffab3b7a5d70647d2acc3ae5eea2a13ceed93879e17ce65c553e4d85438412f95b6b9fdc91a01384255
7
- data.tar.gz: a6b0535497ad4236077c4e1587238351ae4c861d56b2740b7d350e888b4d0c4d42a3ec54f287c047f48617e0a913f7230607494978bbf0b3815211093675019a
6
+ metadata.gz: 69a4aa37939a6c91c0c373d6a9ae0b8f89d36ba401f5ff417b32dce8991420a363dd2124c4bb707336c6343f2bdc031814a68dd71652681e347b8939c319a47d
7
+ data.tar.gz: b4b948f90400114710c94077697ae716b810a16327b3011d599cdb1f6742b04f8c501b89075e81e58dff094186102ec8a778a97ae821a80f0c71948ef73528b1
@@ -6,7 +6,15 @@ branches:
6
6
  only:
7
7
  - master
8
8
  install:
9
- - travis_retry bundle update
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.
@@ -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: hoc(path, c[0]) - pure,
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
- @pure = hashes(path, @opts[:tests]) if @pure.nil?
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
- @hoc = hashes(path, []) if @hoc.nil?
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
 
@@ -25,5 +25,5 @@
25
25
  # Copyright:: Copyright (c) 2017 Yegor Bugayenko
26
26
  # License:: MIT
27
27
  module TDX
28
- VERSION = '0.2.8'.freeze
28
+ VERSION = '0.2.9'.freeze
29
29
  end
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.8
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-16 00:00:00.000000000 Z
11
+ date: 2017-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: slop