utils 0.57.1 → 0.59.0

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: 4aac57a70b356647de0bdd6dd93ef4f327f58935e28cb85d3d40efc855a13c16
4
- data.tar.gz: 0d12e68efae607546f43d287c67f1b02d70dd4d56a73367d434ab8748d6390fb
3
+ metadata.gz: e0bf21550f351ce141bc9afcb65e2f96f6af735d3d2f7bdd240335dde11da71a
4
+ data.tar.gz: a606b8d88a1e7a7d1d7da1a7c0cc70f30f8f79444195fa3d4a1a0aab0f718df6
5
5
  SHA512:
6
- metadata.gz: 9f730b4ec5bb32fa151a759f3d9e5638e090d7497dabecc5d5535b62dfe4c056a1176004c69b4fea83bf63f508666abc4048b99f0341c11b830d57d6ac0e0fea
7
- data.tar.gz: 03507d0cffb9bdf7c93eb923d50ff9b1824acdea35f03ab0c658255f1290768e224f22da3e1743a28f0f4f4be3cb494820cde007d39b0cdc48e6cd2bb21e8bc2
6
+ metadata.gz: ee6fed0cad3362591e59c90d2748fed4b2954b55ce3f7eecb5ea8d9d28b8c5ccc96e8777e62206b35b7cee908368f595bef6d361eb52811fce0e623895f47ec3
7
+ data.tar.gz: '0096a2c87c1aacd717a8c73dc5e6ef290823b2e758c097c81f9ead5e25782be67368a442b37dc44a7a7d508c7047683fac6425dcfe35107baea2c48425cd1f5b'
data/bin/changes CHANGED
@@ -55,8 +55,10 @@ def compute_change(range_from, range_to)
55
55
  - Summarize the changes in the following git log messages as bullet points.
56
56
  - List significant changes as bullet points using markdown when applicable.
57
57
  - Mark all names and values for variables, methods, functions, and
58
- constants, you see in the messages as markdown `code`.
59
- - Mark all version numbers you see in the messages as markdown **bold**.
58
+ constants, you see in the messages as markdown code surrounded by
59
+ backtick characters.
60
+ - Mark all version numbers you see in the messages as markdown bold
61
+ surrounded by two asterisk characters.
60
62
  - Don't refer to single commits by sha1 hash.
61
63
  - Don't add information about changes you are not sure about.
62
64
  - Don't output any additional chatty remarks, notes, introductions,
data/bin/git-md CHANGED
@@ -3,9 +3,11 @@
3
3
  require 'utils/markdown'
4
4
  include Utils::Markdown
5
5
  require 'utils/pager'
6
+ require 'term/ansicolor'
7
+ include Term::ANSIColor
6
8
  require 'shellwords'
7
9
 
8
- cmd = %{git log --color=always --pretty=format:"commit %C(auto)%H%d%nDate: %Cgreen%cD (%cr)%Creset%nAuthor: %Cblue%an <%ae>%Creset%n%nMARKUP%n%s%n%n%b%nMARKDOWN%n"}
10
+ cmd = %{git log --color=always --pretty=format:"commit %H%C(auto)%d%nDate: %Cgreen%cD (%cr)%Creset%nAuthor: %Cblue%an <%ae>%Creset%n%nMARKUP%n%s%n%n%b%nMARKDOWN%n"}
9
11
 
10
12
  core_pager = `git config get core.pager`.chomp.full?
11
13
  git_pager = ENV['GIT_PAGER'].full?
@@ -15,6 +17,14 @@ if fallback_pager = `which less`.chomp.full? || `which more`.chomp.full?
15
17
  end
16
18
  my_pager = git_pager || core_pager || default_pager || fallback_pager
17
19
 
20
+ repo_url = case git_origin_url = `git remote get-url origin`.chomp
21
+ when %r(\Ahttps://)
22
+ u = git_origin_url.sub(%r(\.git\z), '')
23
+ u << '/commit/'
24
+ when %r(\Agit@github.com:([^.]+))
25
+ "https://github.com/#$1/commit/"
26
+ end
27
+
18
28
  Utils::Pager.pager(command: my_pager) do |output|
19
29
  IO.popen("#{cmd} #{Shellwords.join(ARGV)}") do |log|
20
30
  until log.eof?
@@ -30,7 +40,9 @@ Utils::Pager.pager(command: my_pager) do |output|
30
40
  if message
31
41
  message << line
32
42
  else
33
- output.puts line
43
+ output.puts line.sub(/(?<=^commit )(\h{40})/) {
44
+ yellow { repo_url ? hyperlink(repo_url + $1) { $1 } : $1 }
45
+ }
34
46
  end
35
47
  end
36
48
  end
data/lib/utils/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Utils
2
2
  # Utils version
3
- VERSION = '0.57.1'
3
+ VERSION = '0.59.0'
4
4
  VERSION_ARRAY = VERSION.split('.').map(&:to_i) # :nodoc:
5
5
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
6
6
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
data/utils.gemspec CHANGED
@@ -1,14 +1,14 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: utils 0.57.1 ruby lib
2
+ # stub: utils 0.59.0 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "utils".freeze
6
- s.version = "0.57.1".freeze
6
+ s.version = "0.59.0".freeze
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
9
9
  s.require_paths = ["lib".freeze]
10
10
  s.authors = ["Florian Frank".freeze]
11
- s.date = "2024-10-03"
11
+ s.date = "2024-10-17"
12
12
  s.description = "This ruby gem provides some useful command line utilities".freeze
13
13
  s.email = "flori@ping.de".freeze
14
14
  s.executables = ["ascii7".freeze, "blameline".freeze, "changes".freeze, "classify".freeze, "code_comment".freeze, "commit_message".freeze, "create_cstags".freeze, "create_tags".freeze, "discover".freeze, "edit".freeze, "edit_wait".freeze, "enum".freeze, "git-empty".freeze, "git-md".freeze, "git-versions".freeze, "json_check".freeze, "long_lines".freeze, "md".freeze, "myex".freeze, "number_files".freeze, "on_change".freeze, "path".freeze, "print_method".freeze, "probe".freeze, "rd2md".freeze, "search".freeze, "sedit".freeze, "serve".freeze, "ssh-tunnel".freeze, "strip_spaces".freeze, "sync_dir".freeze, "untest".freeze, "utils-utilsrc".freeze, "vcf2alias".freeze, "yaml_check".freeze]
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
22
22
 
23
23
  s.specification_version = 4
24
24
 
25
- s.add_development_dependency(%q<gem_hadar>.freeze, ["~> 1.18.0".freeze])
25
+ s.add_development_dependency(%q<gem_hadar>.freeze, ["~> 1.19".freeze])
26
26
  s.add_runtime_dependency(%q<drb>.freeze, [">= 0".freeze])
27
27
  s.add_runtime_dependency(%q<webrick>.freeze, [">= 0".freeze])
28
28
  s.add_runtime_dependency(%q<tins>.freeze, ["~> 1.14".freeze])
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.57.1
4
+ version: 0.59.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-03 00:00:00.000000000 Z
11
+ date: 2024-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gem_hadar
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.18.0
19
+ version: '1.19'
20
20
  type: :development
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: 1.18.0
26
+ version: '1.19'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: drb
29
29
  requirement: !ruby/object:Gem::Requirement