tdx 0.2.2 → 0.2.3

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: 60591d8400307a666c5abbbb58e96e6528e73eaa
4
- data.tar.gz: 8c104eacfad5476280f0f226f94b5e2d103bd6af
3
+ metadata.gz: 95245c7a074cd4558a7a747c309708e6f27a214a
4
+ data.tar.gz: 20f7390a431a3fb77823a0777197124abf559671
5
5
  SHA512:
6
- metadata.gz: 6fdfaf587263cbac81f441a558db61f92f8e5fdd37eeb6cd253c3a1a1af34b5c14794a142f7297563fafc00ba43a417b770188d011e0aa89a02bb93ec9782b61
7
- data.tar.gz: 78a8910b954fd31905978f0b6565048a4cda084ea6bc71b891624956010db985ccfed1d6aea9b2988ffcc6c9835c42cfa2f2d11da3abb818c087a2681fc4dc29
6
+ metadata.gz: c792a91dabb0e941dc8c26c48fec04d344d9cbe5be3062430227836f5fc0c77f9421adc72ba84b4f62478d7d5852602a195269cf4e25d314d929d3209b2c8b65
7
+ data.tar.gz: 732b553ff646c0a292eac7928a63bd03cf93ab63fbde25d46609464d5fc25e78e2f8d9fd4ed229f12fee86d20a540770c952d53dee050a59d75e74f885e26439
data/lib/tdx/base.rb CHANGED
@@ -24,6 +24,7 @@ require 'date'
24
24
  require 'yaml'
25
25
  require 'octokit'
26
26
  require 'fileutils'
27
+ require 'nokogiri'
27
28
  require 'English'
28
29
  require 'tdx/exec'
29
30
 
@@ -105,12 +106,8 @@ module TDX
105
106
  end
106
107
 
107
108
  def loc(path)
108
- yaml = YAML.load(Exec.new('cloc . --yaml --quiet', path).stdout)
109
- if yaml
110
- yaml['SUM']['code']
111
- else
112
- 0
113
- end
109
+ Nokogiri::XML.parse(Exec.new('cloc . --xml --quiet', path).stdout)
110
+ .xpath('/results/languages/total/@code')
114
111
  end
115
112
 
116
113
  def hoc(path)
data/lib/tdx/version.rb CHANGED
@@ -25,5 +25,5 @@
25
25
  # Copyright:: Copyright (c) 2017 Yegor Bugayenko
26
26
  # License:: MIT
27
27
  module TDX
28
- VERSION = '0.2.2'.freeze
28
+ VERSION = '0.2.3'.freeze
29
29
  end
data/tdx.gemspec CHANGED
@@ -46,6 +46,7 @@ Gem::Specification.new do |s|
46
46
  s.extra_rdoc_files = ['README.md', 'LICENSE.txt']
47
47
  s.add_runtime_dependency 'slop', '~>4.4.1'
48
48
  s.add_runtime_dependency 'octokit', '~>4.6.2'
49
+ s.add_runtime_dependency 'nokogiri', '1.7.0.1'
49
50
  s.add_development_dependency 'rake', '12.0.0'
50
51
  s.add_development_dependency 'cucumber', '1.3.17'
51
52
  s.add_development_dependency 'coveralls', '0.7.2'
@@ -53,5 +54,4 @@ Gem::Specification.new do |s|
53
54
  s.add_development_dependency 'hoc', '0.8'
54
55
  s.add_development_dependency 'rubocop-rspec', '1.5.1'
55
56
  s.add_development_dependency 'minitest', '5.10.1'
56
- s.add_development_dependency 'nokogiri', '1.7.0.1'
57
57
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tdx
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: 4.6.2
41
+ - !ruby/object:Gem::Dependency
42
+ name: nokogiri
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '='
46
+ - !ruby/object:Gem::Version
47
+ version: 1.7.0.1
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '='
53
+ - !ruby/object:Gem::Version
54
+ version: 1.7.0.1
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: rake
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -136,20 +150,6 @@ dependencies:
136
150
  - - '='
137
151
  - !ruby/object:Gem::Version
138
152
  version: 5.10.1
139
- - !ruby/object:Gem::Dependency
140
- name: nokogiri
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - '='
144
- - !ruby/object:Gem::Version
145
- version: 1.7.0.1
146
- type: :development
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - '='
151
- - !ruby/object:Gem::Version
152
- version: 1.7.0.1
153
153
  description: Analyzer of GitHub repositories
154
154
  email: yegor256@gmail.com
155
155
  executables: