fcom 0.7.1 → 0.9.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: 35db81d247c5989cf180a8e865f2bae40e4d7a306beff9689a68fd04029ad72e
4
- data.tar.gz: a9eea81557036e91ca1d13f232393509d84ddc1b232c083f53b16977b4ab08db
3
+ metadata.gz: 1f91904fc77448ff996bd6d4a8154a92f9429e24ddba55d9b9e9d921d99d8565
4
+ data.tar.gz: 6403ca8e50f7f983d1c27ee2f6e2395726bb8871943d7d1e61919dacaf43813a
5
5
  SHA512:
6
- metadata.gz: 02766b69f09721803ee1baa53f913aeb5789f173830dcd6efcaa34daca5479fb905d0444fffd836dc3aec10b7114c7b25bbdcf1a8a97e9f7ab246cf1c0e69f2b
7
- data.tar.gz: 9cd5afe2a8ef8ee3d7cfd9d7f869b1a08244e9e3bd61287336eea377e3fda68d11545ba0fec43f488f002228a111a53bb04c72048133086784c40b98ff12484c
6
+ metadata.gz: ef17dcd4f41915e6ceb5d757ffa5e859b14deee13796e2f99e48101ba22e961f035a50a45d0d43339b249f6ee937bbd5c37c04dd3a65afab7fd72804dbdb0d93
7
+ data.tar.gz: f7a40bf346a8d0f46172681592ad064f2ec313d6d03a218119231a3214ba652acf3468ffdcba9e678e71ee63f6cb6c5fbe2605d1ca055644ae893ff6e34396c9
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## v0.9.0 (2024-06-28)
2
+ - Print first 8 characters of commit SHA (not 7)
3
+
4
+ ## v0.8.0 (2024-06-28)
5
+ - Print a helpful error message if ripgrep is not installed
6
+
1
7
  ## v0.7.1 (2024-06-28)
2
8
  - Don't error if path option is a deleted file
3
9
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fcom (0.7.1)
4
+ fcom (0.9.0)
5
5
  activesupport (>= 6, < 8)
6
6
  memo_wise (>= 1.7, < 2)
7
7
  rainbow (>= 3.0, < 4)
data/exe/fcom CHANGED
@@ -43,7 +43,12 @@ opts =
43
43
  # Note: mutating the globally accessible `Fcom.logger` constant like this is not thread-safe
44
44
  Fcom.logger.level = Logger::DEBUG if opts.debug?
45
45
 
46
- if opts.parse_mode?
46
+ if !system('which rg > /dev/null')
47
+ puts("fcom requires that `rg` (ripgrep) be available on your PATH, but it's not.".red)
48
+ puts('If you are using Homebrew, you can install ripgrep with `brew install ripgrep`.'.blue)
49
+
50
+ exit(1)
51
+ elsif opts.parse_mode?
47
52
  Fcom::Parser.new(opts).parse
48
53
  elsif !opts.arguments.empty?
49
54
  Fcom.warn_if_config_file_repo_option_missing
data/lib/fcom/parser.rb CHANGED
@@ -39,7 +39,8 @@ class Fcom::Parser
39
39
  elsif line.match?(regex) && (filename.blank? || path_match?(filename))
40
40
  if previous_commit
41
41
  title, sha, author, date = previous_commit.split('|')
42
- sha_with_url = "#{sha[0, 7]} ( https://github.com/#{repo}/commit/#{sha[0, 7]} )"
42
+ short_sha = sha[0, 8]
43
+ sha_with_url = "#{short_sha} ( https://github.com/#{repo}/commit/#{short_sha} )"
43
44
 
44
45
  puts("\n\n") if a_commit_has_matched # print commit separator, if needed
45
46
  puts([title, sha_with_url, author, date])
data/lib/fcom/version.rb CHANGED
@@ -2,6 +2,6 @@
2
2
 
3
3
  # rubocop:disable Style/StaticClass
4
4
  class Fcom
5
- VERSION = '0.7.1'
5
+ VERSION = '0.9.0'
6
6
  end
7
7
  # rubocop:enable Style/StaticClass
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fcom
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Runger