fcom 1.0.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e65d9caf74b1e93ed107925a8e601991eea9e93852015fa9d70b6f4f22852689
4
- data.tar.gz: 361e48b4cd8174078afd0c2e278efbe366119cb5dfd4fcfb3324440b8080f5f5
3
+ metadata.gz: 4a056a9aab3e0ea48cc82af0c6d3c296ca8497d3c144e37961b1db241ddc92e2
4
+ data.tar.gz: b27fa969ce900aa5c19fe0d818cc0728b1e43c108419baa40ba226121fcadfe8
5
5
  SHA512:
6
- metadata.gz: d5c2b6e11a0c0eea3949ec3108233f589f8b3dc36b6e4db046aa1293e190476e86666195b672845cc975e89bf1b3686a5bb5e55b2373ea0d3f47c2b71f433a1f
7
- data.tar.gz: '096901b32e4d02674839c3817eb67292b1182d2331a5fa71a7916e9b9fdf22a82404630cde1129bd9db23e1a53da0b82cd957e49662567bd280c9d2bb1c2dfc3'
6
+ metadata.gz: 3c197afe0ccab572607fe42ca4ca723260eb8540bc3b18bd31a6cdc2aa2e35738400ae2d3c14dae4c0fa36a5a062eca4c4c03726599dfd3ec1c9651aee2153a3
7
+ data.tar.gz: c1503d963d3e9c5c4b8c508c1afc22fcdb08eb6cc095503245a56ea1d66da9fa644939d95ab5144f03106530aa7133d4383085a786b74dddbfc3341b8101de1f
data/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
1
  ## Unreleased
2
2
  [no unreleased changes yet]
3
3
 
4
+ ## v1.1.0 (2026-08-28)
5
+ - Don't include Git patch metadata as matching lines.
6
+ - Remove the hidden `--development` option. Use `bundle exec ruby exe/fcom` for development searches.
7
+
4
8
  ## v1.0.1 (2026-08-28)
5
9
  - Don't include commits or files whose matches are only in diff context lines.
6
10
 
data/Gemfile.lock CHANGED
@@ -10,7 +10,7 @@ GIT
10
10
  PATH
11
11
  remote: .
12
12
  specs:
13
- fcom (1.0.1)
13
+ fcom (1.1.0)
14
14
  activesupport (>= 6)
15
15
  memo_wise (>= 1.7)
16
16
  rainbow (>= 3.0)
@@ -177,7 +177,7 @@ CHECKSUMS
177
177
  diff-lcs (1.6.2) sha256=9ae0d2cba7d4df3075fe8cd8602a8604993efc0dfa934cff568969efb1909962
178
178
  drb (2.2.3) sha256=0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373
179
179
  erb (6.0.7) sha256=c5ca6dc25b0ef974a44dc8f59fe847577122483b1968a38dec305c60bf91ee92
180
- fcom (1.0.1)
180
+ fcom (1.1.0)
181
181
  i18n (1.15.2) sha256=00f9eb62412fe593b2a65a97daa75300d37abb8f7202ec748e94b6d46a9dd1b5
182
182
  io-console (0.9.2) sha256=efa74f891dd03c0939a931dfc6e74c2813d904763d456ea9762b0525e748db08
183
183
  irb (1.18.0) sha256=de9454a0703a54704b9811a5ef31a60c86949fbf4013fcf244fabc7c775248e3
data/README.md CHANGED
@@ -4,9 +4,9 @@
4
4
 
5
5
  This is a CLI tool that I use to parse the git history of a repo.
6
6
 
7
- For example, if I use `fcom` to search this repo with `fcom "line.(green|red)" --repo davidrunger/fcom`, I get this output:
7
+ For example, if I use `fcom` to search this repo with `fcom 'rename.?\b' --commits 2 --author "David Runger"`, I get this output:
8
8
 
9
- ![](https://s3.amazonaws.com/screens.davidrunger.com/2019-12-28-20-50-09-oect2(1).png)
9
+ ![fcom screenshot](https://david-runger-public-uploads.s3.us-east-1.amazonaws.com/fcom-screenshot.png)
10
10
 
11
11
  ## Table of Contents
12
12
 
@@ -108,9 +108,7 @@ The performance of `fcom`'s querying and parsing of git history can significantl
108
108
 
109
109
  ## Development
110
110
 
111
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run
112
- the tests. You can also run `bin/console` for an interactive prompt that will allow you to
113
- experiment.
111
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `bundle exec rake spec` to run the tests. To run a search using the local executable, use `bundle exec ruby exe/fcom`, for example `bundle exec ruby exe/fcom 'rename.?\b' --commits 2`. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
114
112
 
115
113
  To install this gem onto your local machine, run (in this repository's root directory):
116
114
 
@@ -32,10 +32,6 @@ module Fcom::OptionsHelpers
32
32
  @options.debug?
33
33
  end
34
34
 
35
- def development?
36
- @options.development?
37
- end
38
-
39
35
  def repo
40
36
  @options[:repo]
41
37
  end
data/lib/fcom/parser.rb CHANGED
@@ -22,7 +22,7 @@ class Fcom::Parser
22
22
  end
23
23
  regex =
24
24
  Regexp.new(
25
- "((\\+|-)\\s?.*#{expression_to_match}.*|Omitted long (matching )?line)",
25
+ "\\A(?:[+-]\\s?.*(?:#{expression_to_match}).*|Omitted long (?:matching )?line)",
26
26
  ignore_case? ? Regexp::IGNORECASE : nil,
27
27
  )
28
28
 
@@ -45,6 +45,8 @@ class Fcom::Parser
45
45
  when old_filename == new_filename then old_filename
46
46
  else "#{old_filename} --> #{new_filename}"
47
47
  end
48
+ elsif line.match?(%r{\A(?:---|\+\+\+) })
49
+ next
48
50
  elsif line.match?(regex) && (filename.blank? || path_match?(filename))
49
51
  if previous_commit
50
52
  title, sha, author, date = previous_commit.split('|')
data/lib/fcom/querier.rb CHANGED
@@ -116,9 +116,7 @@ class Fcom::Querier
116
116
  #{@options[:rg_options]}
117
117
  |
118
118
 
119
- #{if development?
120
- File.join(__dir__, '../../exe/')
121
- end}fcom #{quote}#{search_string}#{quote}
119
+ fcom #{quote}#{search_string}#{quote}
122
120
  #{if days
123
121
  "--days #{days}"
124
122
  end}
data/lib/fcom/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
 
3
3
  # rubocop:disable-next Style/StaticClass
4
4
  class Fcom
5
- VERSION = '1.0.1'
5
+ VERSION = '1.1.0'
6
6
  end
data/lib/fcom.rb CHANGED
@@ -79,7 +79,6 @@ class Fcom
79
79
  )
80
80
  options.bool('--debug', 'print debugging info', default: false)
81
81
  options.bool('--parse-mode', 'whether we are in parse mode', default: false, help: false)
82
- options.bool('--development', 'use local `fcom` executable', default: false, help: false)
83
82
  end
84
83
  end
85
84
  end
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: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Runger