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 +4 -4
- data/.github/dependabot.yml +2 -2
- data/.github/workflows/ruby.yml +3 -2
- data/.ruby-version +1 -1
- data/CHANGELOG.md +9 -0
- data/Gemfile +0 -1
- data/Gemfile.lock +116 -102
- data/README.md +1 -0
- data/bin/githooks/pre-push +1 -1
- data/lib/fcom/options_helpers.rb +4 -0
- data/lib/fcom/parser.rb +11 -5
- data/lib/fcom/querier.rb +57 -52
- data/lib/fcom/version.rb +1 -1
- data/lib/fcom.rb +1 -0
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1157b4eea9ea164c7298ea5836b988d86faabee8325c43653c91af5324b039d1
|
|
4
|
+
data.tar.gz: d9c17d1aaf8872659f7871a0117bf154d13bbdfce57692bd075e09c35f947f81
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ec64b4517a72e615d29107c9e051e43d81b5529b996ccfb7bb8d211013bbdee64315c78246d63ede4411695d3aca000436e9293295c27b2640b4b28711cfd149
|
|
7
|
+
data.tar.gz: 5ba5c4c4aaa9cb3626fdc33f28c92621ec6ac9c95c4f90db42ef42b53b61ce868aa5ac291f29f02f76ad4634d95cd6a0467794bd33f52a48b1fad85f625a1c87
|
data/.github/dependabot.yml
CHANGED
data/.github/workflows/ruby.yml
CHANGED
|
@@ -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
|
-
|
|
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:
|
|
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.
|
|
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.
|
|
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.
|
|
35
|
-
base64 (0.
|
|
36
|
-
|
|
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.
|
|
40
|
-
connection_pool (
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
i18n (1.
|
|
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.
|
|
47
|
-
irb (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.
|
|
52
|
-
language_server-protocol (3.17.0.
|
|
52
|
+
json (2.21.2)
|
|
53
|
+
language_server-protocol (3.17.0.6)
|
|
53
54
|
lint_roller (1.1.0)
|
|
54
|
-
logger (1.
|
|
55
|
-
memo_wise (1.
|
|
55
|
+
logger (1.7.0)
|
|
56
|
+
memo_wise (1.13.0)
|
|
56
57
|
method_source (1.1.0)
|
|
57
|
-
minitest (
|
|
58
|
-
|
|
59
|
-
|
|
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.
|
|
65
|
+
pp (0.6.4)
|
|
63
66
|
prettyprint
|
|
64
67
|
prettyprint (0.2.0)
|
|
65
|
-
prism (1.
|
|
66
|
-
pry (0.
|
|
68
|
+
prism (1.9.0)
|
|
69
|
+
pry (0.16.0)
|
|
67
70
|
coderay (~> 1.1)
|
|
68
71
|
method_source (~> 1.0)
|
|
69
|
-
|
|
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
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
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.
|
|
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.
|
|
94
|
+
rspec-core (3.13.6)
|
|
85
95
|
rspec-support (~> 3.13.0)
|
|
86
|
-
rspec-expectations (3.13.
|
|
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.
|
|
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.
|
|
93
|
-
rubocop (1.
|
|
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 (
|
|
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.
|
|
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.
|
|
105
|
-
parser (>= 3.3.
|
|
106
|
-
|
|
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.
|
|
109
|
-
rubocop-ast (>= 1.
|
|
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.
|
|
124
|
+
rubocop-rspec (3.10.2)
|
|
114
125
|
lint_roller (~> 1.1)
|
|
115
|
-
|
|
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 (
|
|
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.
|
|
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
|
-
|
|
143
|
+
tsort (0.2.0)
|
|
131
144
|
tzinfo (2.0.6)
|
|
132
145
|
concurrent-ruby (~> 1.0)
|
|
133
|
-
unicode-display_width (3.
|
|
134
|
-
unicode-emoji (~> 4.
|
|
135
|
-
unicode-emoji (4.0
|
|
136
|
-
uri (1.
|
|
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.
|
|
157
|
-
ast (2.4.
|
|
158
|
-
base64 (0.
|
|
159
|
-
|
|
160
|
-
|
|
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.
|
|
163
|
-
connection_pool (
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
fcom (0.
|
|
168
|
-
i18n (1.
|
|
169
|
-
io-console (0.8.
|
|
170
|
-
irb (1.
|
|
171
|
-
json (2.
|
|
172
|
-
language_server-protocol (3.17.0.
|
|
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.
|
|
175
|
-
memo_wise (1.
|
|
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 (
|
|
178
|
-
parallel (1.
|
|
179
|
-
parser (3.3.
|
|
180
|
-
pp (0.6.
|
|
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.
|
|
183
|
-
pry (0.
|
|
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
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
rspec
|
|
195
|
-
rspec-
|
|
196
|
-
rspec-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
rubocop
|
|
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.
|
|
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 (
|
|
205
|
-
runger_style (5.
|
|
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
|
-
|
|
222
|
+
tsort (0.2.0) sha256=9650a793f6859a43b6641671278f79cfead60ac714148aabe4e3f0060480089f
|
|
209
223
|
tzinfo (2.0.6) sha256=8daf828cc77bcf7d63b0e3bdb6caa47e2272dcfaf4fbfe46f8c3a9df087a829b
|
|
210
|
-
unicode-display_width (3.
|
|
211
|
-
unicode-emoji (4.0
|
|
212
|
-
uri (1.
|
|
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
|
-
|
|
229
|
+
ruby 4.0.6
|
|
216
230
|
|
|
217
231
|
BUNDLED WITH
|
|
218
|
-
|
|
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
|
data/bin/githooks/pre-push
CHANGED
data/lib/fcom/options_helpers.rb
CHANGED
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
|
-
|
|
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
|
|
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
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.
|
|
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:
|
|
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:
|
|
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:
|
|
129
|
+
rubygems_version: 4.0.17
|
|
130
130
|
specification_version: 4
|
|
131
131
|
summary: CLI tool for parsing git history
|
|
132
132
|
test_files: []
|