git-age 0.1.7 → 0.1.8

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
  SHA256:
3
- metadata.gz: 1fbe783975bcef6d1078e1a9f164f8879318b2d92e205fd3a4303960f094451b
4
- data.tar.gz: 4a5d7ad103214b16e53ec2cc4f04f1b77641943dc48ee42198b91a4e89758b5c
3
+ metadata.gz: 51555542566fad38ca8c70e69bf5a3d0757a42258f5f6603495c1a143d2889ad
4
+ data.tar.gz: 8dba7887aad69063dc21457988f134ec961ff7e3013b9ec16ebf2a6e39b6d63d
5
5
  SHA512:
6
- metadata.gz: bff7fdd7358c94f99cb6d67cfb118d16eebb0b3cb28b381087041be75a4292849351b46ec350caa14b1d38fef0ea578e829decf312c9e3f15baede30bac90ef2
7
- data.tar.gz: e4b1102f940e665915ba7f207fe6259c430bf84cd13c9ccae9edcc339ab6bdc2e001abadf8ab7b30efbbc347137d0021a0d9f529e8f3ac83b388cc35d51491d5
6
+ metadata.gz: 51a5902b883b763678e02ed52d0df361a1f79552acb467f40cdf8ce5ef21e553a2214a46b68ed9008fda43b0aff7039b8c1ce49d0ccade784d5eab2bbc4aae0c
7
+ data.tar.gz: f4484ef6332d6ccea5dc6b94dcf2ad296cb5ee30f7b81b7c738b6775af384769be8f70e38d242bff35565f5a5caf45ad860cdf8cb4bc265a34694831b161acca
checksums.yaml.gz.sig CHANGED
Binary file
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- git-age (0.1.7)
4
+ git-age (0.1.8)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/bin/git-age CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
+ require_relative "../lib/git/age/version.rb"
3
4
  require_relative "../lib/git/age"
4
5
  require 'optparse'
5
6
 
data/lib/git/age/main.rb CHANGED
@@ -40,7 +40,7 @@ module Git
40
40
 
41
41
  return :c unless @code_regexp
42
42
 
43
- @code_regexp && file.match(@code_regexp) ? :c : :u
43
+ @code_regexp && file.match(@code_regexp) ? :c : :u
44
44
  end
45
45
 
46
46
  def read_files
@@ -54,7 +54,7 @@ module Git
54
54
  print "Checking [#{cnt}/#{total}] #{file} ...".ljust(@winsize[1]) + "\r"
55
55
 
56
56
  begin
57
- IO.popen("git blame #{file} | iconv -t utf8") do |io|
57
+ IO.popen("git blame #{file} | iconv -t utf8 | cut -c1-150") do |io|
58
58
  io.read.split("\n")
59
59
  end.each do |line|
60
60
  matches = line.match(/[\w^]+\s\((?<author>[\w\s]+)(?<date>\d{4}-\d{2})-\d{2}/)
@@ -148,9 +148,13 @@ module Git
148
148
  end
149
149
 
150
150
  def text?(file)
151
- IO.popen("file -i -b #{file}") do |io|
151
+ return false unless File.exist?(file)
152
+
153
+ IO.popen("file -i -b \"#{file}\" 2> /dev/null") do |io|
152
154
  io.read
153
155
  end.match?(/\Atext/)
156
+ rescue
157
+ false
154
158
  end
155
159
 
156
160
  def show_stats
@@ -1,5 +1,5 @@
1
1
  module Git
2
2
  module Age
3
- VERSION = "0.1.7"
3
+ VERSION = "0.1.8"
4
4
  end
5
5
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-age
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eustaquio Rangel
@@ -36,7 +36,7 @@ cert_chain:
36
36
  7NRJmY9c84Zb3sCf0DV6UH+d2id9Dndp9ewchgDOSwGznt+oJmjDFZ9gYd8IP2Ol
37
37
  1eLrW8x4LHV+EVEIaiVTvmKt
38
38
  -----END CERTIFICATE-----
39
- date: 2023-01-03 00:00:00.000000000 Z
39
+ date: 2023-01-12 00:00:00.000000000 Z
40
40
  dependencies: []
41
41
  description: Check all the repository files lines dates and group it by year and month,
42
42
  allowing check how old code is still in use
@@ -85,7 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
85
85
  - !ruby/object:Gem::Version
86
86
  version: '0'
87
87
  requirements: []
88
- rubygems_version: 3.0.3
88
+ rubygems_version: 3.3.3
89
89
  signing_key:
90
90
  specification_version: 4
91
91
  summary: Create a CSV file with line year and month from your Git repository
metadata.gz.sig CHANGED
Binary file