fcom 0.14.4 → 0.15.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: eb287de1d4165f913e1164806982cf092cb1c110af986b9e3f100856ac5ad9e2
4
- data.tar.gz: 3e2f553dd2e8bde3d85a33aa83916cc9aec7d566340829a13addc536374c8bec
3
+ metadata.gz: 1157b4eea9ea164c7298ea5836b988d86faabee8325c43653c91af5324b039d1
4
+ data.tar.gz: d9c17d1aaf8872659f7871a0117bf154d13bbdfce57692bd075e09c35f947f81
5
5
  SHA512:
6
- metadata.gz: b007d4c195eb37806bb7bd20dcb9b45d0d5d92274116fd0aef3adbc268eb21c3510204377d4ec649f0ac6dfe53c675f02777504fa1d8f17f9d301fd0d1ad6210
7
- data.tar.gz: b07b91caf00f8f35c1d644a0df6f6386755059624e9ef345e68d9ddf46b8f8a5218dee3dffe60f7e256d7c8a36bc403d97129836d42e9c114bab45e88edb524c
6
+ metadata.gz: ec64b4517a72e615d29107c9e051e43d81b5529b996ccfb7bb8d211013bbdee64315c78246d63ede4411695d3aca000436e9293295c27b2640b4b28711cfd149
7
+ data.tar.gz: 5ba5c4c4aaa9cb3626fdc33f28c92621ec6ac9c95c4f90db42ef42b53b61ce868aa5ac291f29f02f76ad4634d95cd6a0467794bd33f52a48b1fad85f625a1c87
@@ -4,8 +4,8 @@ updates:
4
4
  - package-ecosystem: bundler
5
5
  directory: "/"
6
6
  schedule:
7
- interval: daily
8
- time: "04:04"
7
+ interval: cron
8
+ cronjob: "4 4 * * *"
9
9
  timezone: America/Chicago
10
10
  allow:
11
11
  - dependency-type: all
@@ -8,6 +8,9 @@ on:
8
8
  branches:
9
9
  - main
10
10
 
11
+ permissions:
12
+ contents: read
13
+
11
14
  jobs:
12
15
  build:
13
16
  runs-on: ubuntu-latest
@@ -20,7 +23,5 @@ jobs:
20
23
  run: bin/rubocop --format clang
21
24
  - name: Run RSpec tests
22
25
  run: bin/rspec --format progress
23
- - name: Ensure alpha version
24
- run: grep alpha $(find . -type f -name version.rb)
25
26
  - name: Ensure no git diff
26
27
  run: git diff --exit-code && git diff-index --quiet --cached HEAD
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.4.2
1
+ 4.0.6
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## Unreleased
2
+ [no unreleased changes yet]
3
+
4
+ ## v0.15.0 (2026-08-06)
5
+ - Add a `-c`/`--commits` option to limit the number of commits shown.
6
+
7
+ ## v0.14.5 (2025-03-30)
8
+ - Use git `--diff-algorithm=default`.
9
+
1
10
  ## v0.14.4 (2025-02-25)
2
11
  - Fix bug where output might not be spaced after following a rename.
3
12
 
data/Gemfile CHANGED
@@ -12,7 +12,6 @@ gemspec
12
12
  group :development, :test do
13
13
  gem 'bundler', require: false
14
14
  gem 'pry'
15
- # Go back to upstream if/when https://github.com/deivid-rodriguez/pry-byebug/pull/ 428 is merged.
16
15
  gem 'pry-byebug', github: 'davidrunger/pry-byebug'
17
16
  gem 'rake', require: false
18
17
  gem 'rspec', require: false
data/Gemfile.lock CHANGED
@@ -1,15 +1,16 @@
1
1
  GIT
2
2
  remote: https://github.com/davidrunger/pry-byebug
3
- revision: 3ac27ef70a1b16a461db9f7572d3fe1a205effd4
3
+ revision: 7c0c1cac48b00f51e652a25423aeccd5eed5c966
4
4
  specs:
5
5
  pry-byebug (3.10.1)
6
6
  pry (>= 0.13)
7
+ readline (>= 0.0.4)
7
8
  runger_byebug (>= 11.0)
8
9
 
9
10
  PATH
10
11
  remote: .
11
12
  specs:
12
- fcom (0.14.4)
13
+ fcom (0.15.0)
13
14
  activesupport (>= 6)
14
15
  memo_wise (>= 1.7)
15
16
  rainbow (>= 3.0)
@@ -18,122 +19,134 @@ PATH
18
19
  GEM
19
20
  remote: https://rubygems.org/
20
21
  specs:
21
- activesupport (8.0.1)
22
+ activesupport (8.1.3.1)
22
23
  base64
23
- benchmark (>= 0.3)
24
24
  bigdecimal
25
25
  concurrent-ruby (~> 1.0, >= 1.3.1)
26
26
  connection_pool (>= 2.2.5)
27
27
  drb
28
28
  i18n (>= 1.6, < 2)
29
+ json
29
30
  logger (>= 1.4.2)
30
31
  minitest (>= 5.1)
31
32
  securerandom (>= 0.3)
32
33
  tzinfo (~> 2.0, >= 2.0.5)
33
34
  uri (>= 0.13.1)
34
- ast (2.4.2)
35
- base64 (0.2.0)
36
- benchmark (0.4.0)
37
- bigdecimal (3.1.9)
35
+ ast (2.4.3)
36
+ base64 (0.3.0)
37
+ bigdecimal (4.1.2)
38
38
  coderay (1.1.3)
39
- concurrent-ruby (1.3.5)
40
- connection_pool (2.5.0)
41
- date (3.4.1)
42
- diff-lcs (1.6.0)
43
- drb (2.2.1)
44
- i18n (1.14.7)
39
+ concurrent-ruby (1.3.8)
40
+ connection_pool (3.0.2)
41
+ diff-lcs (1.6.2)
42
+ drb (2.2.3)
43
+ erb (6.0.6)
44
+ i18n (1.15.2)
45
45
  concurrent-ruby (~> 1.0)
46
- io-console (0.8.0)
47
- irb (1.15.1)
46
+ io-console (0.8.2)
47
+ irb (1.18.0)
48
48
  pp (>= 0.6.0)
49
+ prism (>= 1.3.0)
49
50
  rdoc (>= 4.0.0)
50
51
  reline (>= 0.4.2)
51
- json (2.10.1)
52
- language_server-protocol (3.17.0.4)
52
+ json (2.21.2)
53
+ language_server-protocol (3.17.0.6)
53
54
  lint_roller (1.1.0)
54
- logger (1.6.6)
55
- memo_wise (1.10.0)
55
+ logger (1.7.0)
56
+ memo_wise (1.13.0)
56
57
  method_source (1.1.0)
57
- minitest (5.25.4)
58
- parallel (1.26.3)
59
- parser (3.3.7.1)
58
+ minitest (6.0.6)
59
+ drb (~> 2.0)
60
+ prism (~> 1.5)
61
+ parallel (2.1.0)
62
+ parser (3.3.12.0)
60
63
  ast (~> 2.4.1)
61
64
  racc
62
- pp (0.6.2)
65
+ pp (0.6.4)
63
66
  prettyprint
64
67
  prettyprint (0.2.0)
65
- prism (1.3.0)
66
- pry (0.15.2)
68
+ prism (1.9.0)
69
+ pry (0.16.0)
67
70
  coderay (~> 1.1)
68
71
  method_source (~> 1.0)
69
- psych (5.2.3)
70
- date
71
- stringio
72
+ reline (>= 0.6.0)
72
73
  racc (1.8.1)
73
74
  rainbow (3.1.1)
74
- rake (13.2.1)
75
- rdoc (6.12.0)
76
- psych (>= 4.0.0)
77
- regexp_parser (2.10.0)
78
- reline (0.6.0)
75
+ rake (13.4.2)
76
+ rbs (4.1.2)
77
+ logger
78
+ prism (>= 1.6.0)
79
+ tsort
80
+ rdoc (8.0.0)
81
+ erb
82
+ prism (>= 1.6.0)
83
+ rbs (>= 4.0.0)
84
+ tsort
85
+ readline (0.0.4)
86
+ reline
87
+ regexp_parser (2.12.0)
88
+ reline (0.6.3)
79
89
  io-console (~> 0.5)
80
- rspec (3.13.0)
90
+ rspec (3.13.2)
81
91
  rspec-core (~> 3.13.0)
82
92
  rspec-expectations (~> 3.13.0)
83
93
  rspec-mocks (~> 3.13.0)
84
- rspec-core (3.13.3)
94
+ rspec-core (3.13.6)
85
95
  rspec-support (~> 3.13.0)
86
- rspec-expectations (3.13.3)
96
+ rspec-expectations (3.13.5)
87
97
  diff-lcs (>= 1.2.0, < 2.0)
88
98
  rspec-support (~> 3.13.0)
89
- rspec-mocks (3.13.2)
99
+ rspec-mocks (3.13.8)
90
100
  diff-lcs (>= 1.2.0, < 2.0)
91
101
  rspec-support (~> 3.13.0)
92
- rspec-support (3.13.2)
93
- rubocop (1.72.2)
102
+ rspec-support (3.13.7)
103
+ rubocop (1.88.2)
94
104
  json (~> 2.3)
95
105
  language_server-protocol (~> 3.17.0.2)
96
106
  lint_roller (~> 1.1.0)
97
- parallel (~> 1.10)
107
+ parallel (>= 1.10)
98
108
  parser (>= 3.3.0.2)
99
109
  rainbow (>= 2.2.2, < 4.0)
100
110
  regexp_parser (>= 2.9.3, < 3.0)
101
- rubocop-ast (>= 1.38.0, < 2.0)
111
+ rubocop-ast (>= 1.49.0, < 2.0)
102
112
  ruby-progressbar (~> 1.7)
103
113
  unicode-display_width (>= 2.4.0, < 4.0)
104
- rubocop-ast (1.38.0)
105
- parser (>= 3.3.1.0)
106
- rubocop-performance (1.24.0)
114
+ rubocop-ast (1.50.0)
115
+ parser (>= 3.3.7.2)
116
+ prism (~> 1.7)
117
+ rubocop-performance (1.26.1)
107
118
  lint_roller (~> 1.1)
108
- rubocop (>= 1.72.1, < 2.0)
109
- rubocop-ast (>= 1.38.0, < 2.0)
119
+ rubocop (>= 1.75.0, < 2.0)
120
+ rubocop-ast (>= 1.47.1, < 2.0)
110
121
  rubocop-rake (0.7.1)
111
122
  lint_roller (~> 1.1)
112
123
  rubocop (>= 1.72.1)
113
- rubocop-rspec (3.5.0)
124
+ rubocop-rspec (3.10.2)
114
125
  lint_roller (~> 1.1)
115
- rubocop (~> 1.72, >= 1.72.1)
126
+ regexp_parser (>= 2.0)
127
+ rubocop (~> 1.86, >= 1.86.2)
116
128
  ruby-progressbar (1.13.0)
117
129
  runger_byebug (11.4.0)
118
130
  irb
119
131
  reline
120
- runger_release_assistant (2.0.0)
132
+ runger_release_assistant (4.3.1)
121
133
  activesupport (>= 6)
122
134
  memo_wise (>= 1.7)
123
135
  rainbow (>= 3.0)
136
+ rake (>= 13.2.1)
124
137
  slop (~> 4.8)
125
- runger_style (5.4.0)
138
+ runger_style (5.13.2)
126
139
  prism (>= 0.24.0)
127
140
  rubocop (>= 1.72.0)
128
141
  securerandom (0.4.1)
129
142
  slop (4.10.1)
130
- stringio (3.1.5)
143
+ tsort (0.2.0)
131
144
  tzinfo (2.0.6)
132
145
  concurrent-ruby (~> 1.0)
133
- unicode-display_width (3.1.4)
134
- unicode-emoji (~> 4.0, >= 4.0.4)
135
- unicode-emoji (4.0.4)
136
- uri (1.0.2)
146
+ unicode-display_width (3.2.0)
147
+ unicode-emoji (~> 4.1)
148
+ unicode-emoji (4.2.0)
149
+ uri (1.1.1)
137
150
 
138
151
  PLATFORMS
139
152
  ruby
@@ -153,66 +166,67 @@ DEPENDENCIES
153
166
  runger_style
154
167
 
155
168
  CHECKSUMS
156
- activesupport (8.0.1) sha256=fd5bc74641c24ac3541055c2879789198ff42adee3e39c2933289ba008912e37
157
- ast (2.4.2) sha256=1e280232e6a33754cde542bc5ef85520b74db2aac73ec14acef453784447cc12
158
- base64 (0.2.0) sha256=0f25e9b21a02a0cc0cea8ef92b2041035d39350946e8789c562b2d1a3da01507
159
- benchmark (0.4.0) sha256=0f12f8c495545e3710c3e4f0480f63f06b4c842cc94cec7f33a956f5180e874a
160
- bigdecimal (3.1.9) sha256=2ffc742031521ad69c2dfc815a98e426a230a3d22aeac1995826a75dabfad8cc
169
+ activesupport (8.1.3.1) sha256=85458765f25ea48b9019c46b6bb3fa5683197bf4280d9f06710a6e8d7a831376
170
+ ast (2.4.3) sha256=954615157c1d6a382bc27d690d973195e79db7f55e9765ac7c481c60bdb4d383
171
+ base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b
172
+ bigdecimal (4.1.2) sha256=53d217666027eab4280346fba98e7d5b66baaae1b9c3c1c0ffe89d48188a3fbd
173
+ bundler (4.0.16) sha256=d6ca5dd440c24f9abce9844cf44cc8e18c6a553de65a47efb4544137af92c47d
161
174
  coderay (1.1.3) sha256=dc530018a4684512f8f38143cd2a096c9f02a1fc2459edcfe534787a7fc77d4b
162
- concurrent-ruby (1.3.5) sha256=813b3e37aca6df2a21a3b9f1d497f8cbab24a2b94cab325bffe65ee0f6cbebc6
163
- connection_pool (2.5.0) sha256=233b92f8d38e038c1349ccea65dd3772727d669d6d2e71f9897c8bf5cd53ebfc
164
- date (3.4.1) sha256=bf268e14ef7158009bfeaec40b5fa3c7271906e88b196d958a89d4b408abe64f
165
- diff-lcs (1.6.0) sha256=a1e7f7b272962f8fc769358ad00001b87cdcf32ba349d6c70c6b544613d2da2e
166
- drb (2.2.1) sha256=e9d472bf785f558b96b25358bae115646da0dbfd45107ad858b0bc0d935cb340
167
- fcom (0.14.4)
168
- i18n (1.14.7) sha256=ceba573f8138ff2c0915427f1fc5bdf4aa3ab8ae88c8ce255eb3ecf0a11a5d0f
169
- io-console (0.8.0) sha256=cd6a9facbc69871d69b2cb8b926fc6ea7ef06f06e505e81a64f14a470fddefa2
170
- irb (1.15.1) sha256=d9bca745ac4207a8b728a52b98b766ca909b86ff1a504bcde3d6f8c84faae890
171
- json (2.10.1) sha256=ddc88ad91a1baf3f0038c174f253af3b086d30dc74db17ca4259bbde982f94dc
172
- language_server-protocol (3.17.0.4) sha256=c484626478664fd13482d8180947c50a8590484b1258b99b7aedb3b69df89669
175
+ concurrent-ruby (1.3.8) sha256=b2f1be836e968ccc78ccfce277ea79c72a88633f22306782c16ff23fb415d1e1
176
+ connection_pool (3.0.2) sha256=33fff5ba71a12d2aa26cb72b1db8bba2a1a01823559fb01d29eb74c286e62e0a
177
+ diff-lcs (1.6.2) sha256=9ae0d2cba7d4df3075fe8cd8602a8604993efc0dfa934cff568969efb1909962
178
+ drb (2.2.3) sha256=0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373
179
+ erb (6.0.6) sha256=a9b24986700f5bf127c4f297c5403c3ca41b83b0a316c0cd09a096b56e644ae5
180
+ fcom (0.15.0)
181
+ i18n (1.15.2) sha256=00f9eb62412fe593b2a65a97daa75300d37abb8f7202ec748e94b6d46a9dd1b5
182
+ io-console (0.8.2) sha256=d6e3ae7a7cc7574f4b8893b4fca2162e57a825b223a177b7afa236c5ef9814cc
183
+ irb (1.18.0) sha256=de9454a0703a54704b9811a5ef31a60c86949fbf4013fcf244fabc7c775248e3
184
+ json (2.21.2) sha256=1f1d3b7cf2b3ba1a69beca0bb6db13d5438b80bff3cd54cdaaa620b9b07c1c6a
185
+ language_server-protocol (3.17.0.6) sha256=5ef2c0c138f8267e1bc631d3328347d354f96724b0af22f2c79516120443b7f0
173
186
  lint_roller (1.1.0) sha256=2c0c845b632a7d172cb849cc90c1bce937a28c5c8ccccb50dfd46a485003cc87
174
- logger (1.6.6) sha256=dd618d24e637715472732e7eed02e33cfbdf56deaad225edd0f1f89d38024017
175
- memo_wise (1.10.0) sha256=ae40ff8e7799697ff5d59d739b8766f76be22eba69c7c8468edb42ab83c94c3f
187
+ logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
188
+ memo_wise (1.13.0) sha256=30220c38c4cef410849bc73553c58664dc2c91c6379e4a1df22aea02358b716b
176
189
  method_source (1.1.0) sha256=181301c9c45b731b4769bc81e8860e72f9161ad7d66dd99103c9ab84f560f5c5
177
- minitest (5.25.4) sha256=9cf2cae25ac4dfc90c988ebc3b917f53c054978b673273da1bd20bcb0778f947
178
- parallel (1.26.3) sha256=d86babb7a2b814be9f4b81587bf0b6ce2da7d45969fab24d8ae4bf2bb4d4c7ef
179
- parser (3.3.7.1) sha256=7dbe61618025519024ac72402a6677ead02099587a5538e84371b76659e6aca1
180
- pp (0.6.2) sha256=947ec3120c6f92195f8ee8aa25a7b2c5297bb106d83b41baa02983686577b6ff
190
+ minitest (6.0.6) sha256=153ea36d1d987a62942382b61075745042a2b3123b1cd48f4c3675af9cc7d6f1
191
+ parallel (2.1.0) sha256=b35258865c2e31134c5ecb708beaaf6772adf9d5efae28e93e99260877b09356
192
+ parser (3.3.12.0) sha256=21a6d7f755d5a24dfbdc6e6b772e4e879a52e7631a88bc5a3a134606052c9828
193
+ pp (0.6.4) sha256=dfcb0fce700c41456265922884f9fe195d7fbb0674a3578e6c0f69588e82b570
181
194
  prettyprint (0.2.0) sha256=2bc9e15581a94742064a3cc8b0fb9d45aae3d03a1baa6ef80922627a0766f193
182
- prism (1.3.0) sha256=b11620829831b1cb7e6c9b46c81ff8a6e36ccb3f888f164485eb7351f386273a
183
- pry (0.15.2) sha256=12d54b8640d3fa29c9211dd4ffb08f3fd8bf7a4fd9b5a73ce5b59c8709385b6b
195
+ prism (1.9.0) sha256=7b530c6a9f92c24300014919c9dcbc055bf4cdf51ec30aed099b06cd6674ef85
196
+ pry (0.16.0) sha256=d76c69065698ed1f85e717bd33d7942c38a50868f6b0673c636192b3d1b6054e
184
197
  pry-byebug (3.10.1)
185
- psych (5.2.3) sha256=84a54bb952d14604fea22d99938348814678782f58b12648fcdfa4d2fce859ee
186
198
  racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f
187
199
  rainbow (3.1.1) sha256=039491aa3a89f42efa1d6dec2fc4e62ede96eb6acd95e52f1ad581182b79bc6a
188
- rake (13.2.1) sha256=46cb38dae65d7d74b6020a4ac9d48afed8eb8149c040eccf0523bec91907059d
189
- rdoc (6.12.0) sha256=7d6f706e070bffa5d18a448f24076cbfb34923a99c1eab842aa18e6ca69f56e0
190
- regexp_parser (2.10.0) sha256=cb6f0ddde88772cd64bff1dbbf68df66d376043fe2e66a9ef77fcb1b0c548c61
191
- reline (0.6.0) sha256=57620375dcbe56ec09bac7192bfb7460c716bbf0054dc94345ecaa5438e539d2
192
- rspec (3.13.0) sha256=d490914ac1d5a5a64a0e1400c1d54ddd2a501324d703b8cfe83f458337bab993
193
- rspec-core (3.13.3) sha256=25136507f4f9cf2e8977a2851e64e438b4331646054e345998714108745cdfe4
194
- rspec-expectations (3.13.3) sha256=0e6b5af59b900147698ea0ff80456c4f2e69cac4394fbd392fbd1ca561f66c58
195
- rspec-mocks (3.13.2) sha256=2327335def0e1665325a9b617e3af9ae20272741d80ac550336309a7c59abdef
196
- rspec-support (3.13.2) sha256=cea3a2463fd9b84b9dcc9685efd80ea701aa8f7b3decb3b3ce795ed67737dbec
197
- rubocop (1.72.2) sha256=0259a32d89fee60882bf4c4d8847e696357719c9db4971839da742bf053ae96b
198
- rubocop-ast (1.38.0) sha256=4fdf6792fe443a9a18acb12dbc8225d0d64cd1654e41fedb30e79c18edbb26ae
199
- rubocop-performance (1.24.0) sha256=e5bd39ff3e368395b9af886927cc37f5892f43db4bd6c8526594352d5b4440b5
200
+ rake (13.4.2) sha256=cb825b2bd5f1f8e91ca37bddb4b9aaf345551b4731da62949be002fa89283701
201
+ rbs (4.1.2) sha256=050eb1d8b508f1233bed929c0f2c7052302f7adf295230d9cb314e9024078f48
202
+ rdoc (8.0.0) sha256=03bf8c08a9639658855a0cfd77c0abca8325c227693f7f33f82957811348c469
203
+ readline (0.0.4) sha256=6138eef17be2b98298b672c3ea63bf9cb5158d401324f26e1e84f235879c1d6a
204
+ regexp_parser (2.12.0) sha256=35a916a1d63190ab5c9009457136ae5f3c0c7512d60291d0d1378ba18ce08ebb
205
+ reline (0.6.3) sha256=1198b04973565b36ec0f11542ab3f5cfeeec34823f4e54cebde90968092b1835
206
+ rspec (3.13.2) sha256=206284a08ad798e61f86d7ca3e376718d52c0bc944626b2349266f239f820587
207
+ rspec-core (3.13.6) sha256=a8823c6411667b60a8bca135364351dda34cd55e44ff94c4be4633b37d828b2d
208
+ rspec-expectations (3.13.5) sha256=33a4d3a1d95060aea4c94e9f237030a8f9eae5615e9bd85718fe3a09e4b58836
209
+ rspec-mocks (3.13.8) sha256=086ad3d3d17533f4237643de0b5c42f04b66348c28bf6b9c2d3f4a3b01af1d47
210
+ rspec-support (3.13.7) sha256=0640e5570872aafefd79867901deeeeb40b0c9875a36b983d85f54fb7381c47c
211
+ rubocop (1.88.2) sha256=8def251c90cd955feb4daa3edc0ab56893250c4ce90ef81e6c80c03f9a939bbf
212
+ rubocop-ast (1.50.0) sha256=b9ca88300da0803ee222ad20cdb30494c0a784eed06fdc35d254b06d662788db
213
+ rubocop-performance (1.26.1) sha256=cd19b936ff196df85829d264b522fd4f98b6c89ad271fa52744a8c11b8f71834
200
214
  rubocop-rake (0.7.1) sha256=3797f2b6810c3e9df7376c26d5f44f3475eda59eb1adc38e6f62ecf027cbae4d
201
- rubocop-rspec (3.5.0) sha256=710c942fe1af884ba8eea75cbb8bdbb051929a2208880a6fc2e2dce1eed5304c
215
+ rubocop-rspec (3.10.2) sha256=0b3e2ecc592cd10ecbf0095bb58d1e357905276e069643523cc19eb7495f65e2
202
216
  ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33
203
217
  runger_byebug (11.4.0) sha256=569e22ba2215f57e7f69e145fcb63be401e29fcd312f7936d813e12d0c7bbee6
204
- runger_release_assistant (2.0.0) sha256=f4f5708291eaeef1b881208f87a494877fe768739d6e96b7293fc335b28a3865
205
- runger_style (5.4.0) sha256=96a575ff2ca8d4ee61d52bc135e1893e67bab7ea7f850e262781aa1a5849eee3
218
+ runger_release_assistant (4.3.1) sha256=3246c925240739eb12b9e6b9526a77ea00fcf0a0941441ff5ffacefb7e3e4d83
219
+ runger_style (5.13.2) sha256=7f01c78726399bed399dc7b9d520c747c021ea4e2b2dfa0dabf622a84d47a576
206
220
  securerandom (0.4.1) sha256=cc5193d414a4341b6e225f0cb4446aceca8e50d5e1888743fac16987638ea0b1
207
221
  slop (4.10.1) sha256=844322b5ffcf17ed4815fdb173b04a20dd82b4fd93e3744c88c8fafea696d9c7
208
- stringio (3.1.5) sha256=bca92461515a131535743bc81d5559fa1de7d80cff9a654d6c0af6f9f27e35c8
222
+ tsort (0.2.0) sha256=9650a793f6859a43b6641671278f79cfead60ac714148aabe4e3f0060480089f
209
223
  tzinfo (2.0.6) sha256=8daf828cc77bcf7d63b0e3bdb6caa47e2272dcfaf4fbfe46f8c3a9df087a829b
210
- unicode-display_width (3.1.4) sha256=8caf2af1c0f2f07ec89ef9e18c7d88c2790e217c482bfc78aaa65eadd5415ac1
211
- unicode-emoji (4.0.4) sha256=2c2c4ef7f353e5809497126285a50b23056cc6e61b64433764a35eff6c36532a
212
- uri (1.0.2) sha256=b303504ceb7e5905771fa7fa14b649652fa949df18b5880d69cfb12494791e27
224
+ unicode-display_width (3.2.0) sha256=0cdd96b5681a5949cdbc2c55e7b420facae74c4aaf9a9815eee1087cb1853c42
225
+ unicode-emoji (4.2.0) sha256=519e69150f75652e40bf736106cfbc8f0f73aa3fb6a65afe62fefa7f80b0f80f
226
+ uri (1.1.1) sha256=379fa58d27ffb1387eaada68c749d1426738bd0f654d812fcc07e7568f5c57c6
213
227
 
214
228
  RUBY VERSION
215
- ruby 3.4.2p28
229
+ ruby 4.0.6
216
230
 
217
231
  BUNDLED WITH
218
- 2.6.3
232
+ 4.0.16
data/README.md CHANGED
@@ -66,6 +66,7 @@ Examples:
66
66
 
67
67
  --repo GitHub repo (in form `username/repo`)
68
68
  -d, --days number of days to search back
69
+ -c, --commits maximum number of commits to show
69
70
  -r, --regex interpret search string as a regular expression
70
71
  -i, --ignore-case search case-insensitively
71
72
  -p, --path path (directory or file) used to filter results
@@ -2,7 +2,7 @@
2
2
 
3
3
  set -euo pipefail # exit on any error, don't allow undefined variables, pipes don't swallow errors
4
4
 
5
- lint gitleaks
5
+ lint secrets
6
6
 
7
7
  background-and-notify lint newlines
8
8
  background-and-notify lint rubocop
@@ -8,6 +8,10 @@ module Fcom::OptionsHelpers
8
8
  @options[:author]
9
9
  end
10
10
 
11
+ def commits
12
+ @options[:commits]
13
+ end
14
+
11
15
  def days
12
16
  @options[:days]
13
17
  end
data/lib/fcom/parser.rb CHANGED
@@ -6,12 +6,13 @@ using Rainbow
6
6
  class Fcom::Parser
7
7
  include ::Fcom::OptionsHelpers
8
8
 
9
+ COMMIT_HEADER_SEPARATOR = '=============================================='
10
+
9
11
  def initialize(options)
10
12
  @options = options
13
+ @matching_commits = 0
11
14
  end
12
15
 
13
- # rubocop:disable Metrics/PerceivedComplexity
14
- # rubocop:disable Metrics/MethodLength
15
16
  def parse
16
17
  expression_to_match = search_string
17
18
  expression_to_match = Regexp.escape(expression_to_match).gsub('\\ ', ' ') unless regex_mode?
@@ -27,6 +28,8 @@ class Fcom::Parser
27
28
  $stdin.each do |line|
28
29
  line.chomp!
29
30
  if (match = line.match(/^commit (.*)/)&.[](1))
31
+ break if commit_limit_reached?
32
+
30
33
  previous_commit = match
31
34
  elsif line.match?(/^diff /)
32
35
  old_filename = line.match(%r{ a/(\S+)})&.[](1) || '[weird filename]'
@@ -44,10 +47,11 @@ class Fcom::Parser
44
47
 
45
48
  puts("\n\n") if a_commit_has_matched # print commit separator, if needed
46
49
  puts([title, sha_with_url, author, date])
47
- puts('==============================================')
50
+ puts(COMMIT_HEADER_SEPARATOR)
48
51
 
49
52
  previous_commit = nil
50
53
  a_commit_has_matched = true
54
+ @matching_commits += 1
51
55
  end
52
56
 
53
57
  if filename
@@ -65,11 +69,13 @@ class Fcom::Parser
65
69
  end
66
70
  end
67
71
  end
68
- # rubocop:enable Metrics/MethodLength
69
- # rubocop:enable Metrics/PerceivedComplexity
70
72
 
71
73
  private
72
74
 
75
+ def commit_limit_reached?
76
+ commits && @matching_commits >= commits
77
+ end
78
+
73
79
  def path_match?(filename)
74
80
  return true if path == Fcom::ROOT_PATH
75
81
 
data/lib/fcom/querier.rb CHANGED
@@ -15,8 +15,6 @@ class Fcom::Querier
15
15
  @options = options
16
16
  end
17
17
 
18
- # rubocop:disable Metrics/PerceivedComplexity
19
- # rubocop:disable Metrics/MethodLength
20
18
  def query
21
19
  expression_to_match = search_string
22
20
  expression_to_match = Regexp.escape(expression_to_match).gsub('\\ ', ' ') unless regex_mode?
@@ -28,55 +26,16 @@ class Fcom::Querier
28
26
 
29
27
  quote = expression_to_match.include?('"') ? "'" : '"'
30
28
 
31
- commands =
32
- filename_by_most_recent_containing_commit.map do |commit, path_at_commit|
33
- commit_without_caret = commit.first(40)
34
-
35
- start_of_log =
36
- filtered_renames.
37
- drop_while { it.first != commit_without_caret }.
38
- detect { it.last == path_at_commit }&.
39
- first ||
40
- first_commit_sha
41
-
42
- <<~COMMAND.squish
43
- git rev-list #{start_of_log} #{commit} |
44
-
45
- git log
46
- --format="commit %s|%H|%an|%cr (%ci)"
47
- --patch
48
- --full-diff
49
- --topo-order
50
- --no-textconv
51
- --stdin
52
- #{%(--author="#{author}") if author}
53
- #{days_limiter}
54
- --
55
- #{path_at_commit}
56
- |
57
-
58
- rg #{quote}(#{expression_to_match})|(^commit )|(^diff )#{quote}
59
- --color never
60
- #{'--ignore-case' if ignore_case?}
61
- #{@options[:rg_options]}
62
- |
63
-
64
- #{File.join(__dir__, '../../exe/') if development?}fcom #{quote}#{search_string}#{quote}
65
- #{"--days #{days}" if days}
66
- #{'--regex' if regex_mode?}
67
- #{'--debug' if debug?}
68
- #{'--ignore-case' if ignore_case?}
69
- --path #{path_at_commit}
70
- --parse-mode
71
- --repo #{repo}
72
- COMMAND
73
- end
74
-
75
29
  a_previous_command_generated_output_not_yet_spaced = false
30
+ remaining_commits = commits
76
31
 
77
- commands.each do |command|
32
+ filename_by_most_recent_containing_commit.each do |commit, path_at_commit|
33
+ break if remaining_commits && remaining_commits <= 0
34
+
35
+ command = query_command(commit, path_at_commit, expression_to_match, quote, remaining_commits)
78
36
  Fcom.logger.debug("Executing command: #{command}")
79
37
 
38
+ commits_printed = 0
80
39
  PTY.spawn(command) do |stdout, _stdin, _pid|
81
40
  # Read first byte to detect any output
82
41
  first_byte = stdout.read(1)
@@ -92,18 +51,66 @@ class Fcom::Querier
92
51
  print(first_byte)
93
52
 
94
53
  # Now read the rest line by line
95
- stdout.each_line { puts(it) }
54
+ stdout.each_line do |line|
55
+ puts(line)
56
+ commits_printed += 1 if line.chomp == Fcom::Parser::COMMIT_HEADER_SEPARATOR
57
+ end
96
58
  end
97
59
  rescue Errno::EIO
98
60
  # The command produced no output.
99
61
  end
62
+
63
+ remaining_commits -= commits_printed if remaining_commits
100
64
  end
101
65
  end
102
- # rubocop:enable Metrics/MethodLength
103
- # rubocop:enable Metrics/PerceivedComplexity
104
66
 
105
67
  private
106
68
 
69
+ def query_command(commit, path_at_commit, expression_to_match, quote, commits_limit)
70
+ commit_without_caret = commit.first(40)
71
+
72
+ start_of_log =
73
+ filtered_renames.
74
+ drop_while { it.first != commit_without_caret }.
75
+ detect { it.last == path_at_commit }&.
76
+ first ||
77
+ first_commit_sha
78
+
79
+ <<~COMMAND.squish
80
+ git rev-list #{start_of_log} #{commit} |
81
+
82
+ git log
83
+ --format="commit %s|%H|%an|%cr (%ci)"
84
+ --patch
85
+ --full-diff
86
+ --diff-algorithm=default
87
+ --topo-order
88
+ --no-textconv
89
+ --stdin
90
+ #{%(--author="#{author}") if author}
91
+ #{days_limiter}
92
+ --
93
+ #{path_at_commit}
94
+ |
95
+
96
+ rg #{quote}(#{expression_to_match})|(^commit )|(^diff )#{quote}
97
+ --color never
98
+ #{'--ignore-case' if ignore_case?}
99
+ #{@options[:rg_options]}
100
+ |
101
+
102
+ #{File.join(__dir__, '../../exe/') if development?}fcom #{quote}#{search_string}#{quote}
103
+ #{"--days #{days}" if days}
104
+ #{"--commits #{commits_limit}" if commits_limit}
105
+ #{'--regex' if regex_mode?}
106
+ #{'--debug' if debug?}
107
+ #{'--ignore-case' if ignore_case?}
108
+ --path #{path_at_commit}
109
+ --parse-mode
110
+ --repo #{repo}
111
+ COMMAND
112
+ end
113
+
107
114
  memo_wise \
108
115
  def filename_by_most_recent_containing_commit
109
116
  [
@@ -122,7 +129,6 @@ class Fcom::Querier
122
129
  end
123
130
  end
124
131
 
125
- # rubocop:disable Metrics/PerceivedComplexity
126
132
  memo_wise \
127
133
  def filtered_renames
128
134
  filtered_renames =
@@ -160,7 +166,6 @@ class Fcom::Querier
160
166
 
161
167
  filtered_renames
162
168
  end
163
- # rubocop:enable Metrics/PerceivedComplexity
164
169
 
165
170
  def traced_back_renames(new_file_names)
166
171
  new_file_names_of_interest = Set.new(new_file_names)
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.14.4'
5
+ VERSION = '0.15.0'
6
6
  end
7
7
  # rubocop:enable Style/StaticClass
data/lib/fcom.rb CHANGED
@@ -54,6 +54,7 @@ class Fcom
54
54
 
55
55
  options.string('--repo', 'GitHub repo (in form `username/repo`)', default: default_repo)
56
56
  options.integer('-d', '--days', 'number of days to search back')
57
+ options.integer('-c', '--commits', 'maximum number of commits to show')
57
58
  options.bool(
58
59
  '-r',
59
60
  '--regex',
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fcom
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.4
4
+ version: 0.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Runger
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-02-25 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: activesupport
@@ -119,14 +119,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
119
119
  requirements:
120
120
  - - ">="
121
121
  - !ruby/object:Gem::Version
122
- version: 3.4.0
122
+ version: 4.0.0
123
123
  required_rubygems_version: !ruby/object:Gem::Requirement
124
124
  requirements:
125
125
  - - ">="
126
126
  - !ruby/object:Gem::Version
127
127
  version: '0'
128
128
  requirements: []
129
- rubygems_version: 3.6.3
129
+ rubygems_version: 4.0.17
130
130
  specification_version: 4
131
131
  summary: CLI tool for parsing git history
132
132
  test_files: []