fcom 0.14.5 → 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/.ruby-version +1 -1
- data/CHANGELOG.md +3 -0
- data/Gemfile.lock +108 -96
- 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 -1
- data/lib/fcom/querier.rb +57 -47
- 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/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
4.0.6
|
data/CHANGELOG.md
CHANGED
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,102 +19,112 @@ 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
35
|
ast (2.4.3)
|
|
35
|
-
base64 (0.
|
|
36
|
-
|
|
37
|
-
bigdecimal (3.1.9)
|
|
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
55
|
logger (1.7.0)
|
|
55
|
-
memo_wise (1.
|
|
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.
|
|
114
|
+
rubocop-ast (1.50.0)
|
|
105
115
|
parser (>= 3.3.7.2)
|
|
106
|
-
prism (~> 1.
|
|
107
|
-
rubocop-performance (1.
|
|
116
|
+
prism (~> 1.7)
|
|
117
|
+
rubocop-performance (1.26.1)
|
|
108
118
|
lint_roller (~> 1.1)
|
|
109
|
-
rubocop (>= 1.
|
|
110
|
-
rubocop-ast (>= 1.
|
|
119
|
+
rubocop (>= 1.75.0, < 2.0)
|
|
120
|
+
rubocop-ast (>= 1.47.1, < 2.0)
|
|
111
121
|
rubocop-rake (0.7.1)
|
|
112
122
|
lint_roller (~> 1.1)
|
|
113
123
|
rubocop (>= 1.72.1)
|
|
114
|
-
rubocop-rspec (3.
|
|
124
|
+
rubocop-rspec (3.10.2)
|
|
115
125
|
lint_roller (~> 1.1)
|
|
116
|
-
|
|
126
|
+
regexp_parser (>= 2.0)
|
|
127
|
+
rubocop (~> 1.86, >= 1.86.2)
|
|
117
128
|
ruby-progressbar (1.13.0)
|
|
118
129
|
runger_byebug (11.4.0)
|
|
119
130
|
irb
|
|
@@ -124,18 +135,18 @@ GEM
|
|
|
124
135
|
rainbow (>= 3.0)
|
|
125
136
|
rake (>= 13.2.1)
|
|
126
137
|
slop (~> 4.8)
|
|
127
|
-
runger_style (5.
|
|
138
|
+
runger_style (5.13.2)
|
|
128
139
|
prism (>= 0.24.0)
|
|
129
140
|
rubocop (>= 1.72.0)
|
|
130
141
|
securerandom (0.4.1)
|
|
131
142
|
slop (4.10.1)
|
|
132
|
-
|
|
143
|
+
tsort (0.2.0)
|
|
133
144
|
tzinfo (2.0.6)
|
|
134
145
|
concurrent-ruby (~> 1.0)
|
|
135
|
-
unicode-display_width (3.
|
|
136
|
-
unicode-emoji (~> 4.
|
|
137
|
-
unicode-emoji (4.0
|
|
138
|
-
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)
|
|
139
150
|
|
|
140
151
|
PLATFORMS
|
|
141
152
|
ruby
|
|
@@ -155,66 +166,67 @@ DEPENDENCIES
|
|
|
155
166
|
runger_style
|
|
156
167
|
|
|
157
168
|
CHECKSUMS
|
|
158
|
-
activesupport (8.
|
|
169
|
+
activesupport (8.1.3.1) sha256=85458765f25ea48b9019c46b6bb3fa5683197bf4280d9f06710a6e8d7a831376
|
|
159
170
|
ast (2.4.3) sha256=954615157c1d6a382bc27d690d973195e79db7f55e9765ac7c481c60bdb4d383
|
|
160
|
-
base64 (0.
|
|
161
|
-
|
|
162
|
-
|
|
171
|
+
base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b
|
|
172
|
+
bigdecimal (4.1.2) sha256=53d217666027eab4280346fba98e7d5b66baaae1b9c3c1c0ffe89d48188a3fbd
|
|
173
|
+
bundler (4.0.16) sha256=d6ca5dd440c24f9abce9844cf44cc8e18c6a553de65a47efb4544137af92c47d
|
|
163
174
|
coderay (1.1.3) sha256=dc530018a4684512f8f38143cd2a096c9f02a1fc2459edcfe534787a7fc77d4b
|
|
164
|
-
concurrent-ruby (1.3.
|
|
165
|
-
connection_pool (
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
fcom (0.
|
|
170
|
-
i18n (1.
|
|
171
|
-
io-console (0.8.
|
|
172
|
-
irb (1.
|
|
173
|
-
json (2.
|
|
174
|
-
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
|
|
175
186
|
lint_roller (1.1.0) sha256=2c0c845b632a7d172cb849cc90c1bce937a28c5c8ccccb50dfd46a485003cc87
|
|
176
187
|
logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
|
|
177
|
-
memo_wise (1.
|
|
188
|
+
memo_wise (1.13.0) sha256=30220c38c4cef410849bc73553c58664dc2c91c6379e4a1df22aea02358b716b
|
|
178
189
|
method_source (1.1.0) sha256=181301c9c45b731b4769bc81e8860e72f9161ad7d66dd99103c9ab84f560f5c5
|
|
179
|
-
minitest (
|
|
180
|
-
parallel (1.
|
|
181
|
-
parser (3.3.
|
|
182
|
-
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
|
|
183
194
|
prettyprint (0.2.0) sha256=2bc9e15581a94742064a3cc8b0fb9d45aae3d03a1baa6ef80922627a0766f193
|
|
184
|
-
prism (1.
|
|
185
|
-
pry (0.
|
|
195
|
+
prism (1.9.0) sha256=7b530c6a9f92c24300014919c9dcbc055bf4cdf51ec30aed099b06cd6674ef85
|
|
196
|
+
pry (0.16.0) sha256=d76c69065698ed1f85e717bd33d7942c38a50868f6b0673c636192b3d1b6054e
|
|
186
197
|
pry-byebug (3.10.1)
|
|
187
|
-
psych (5.2.3) sha256=84a54bb952d14604fea22d99938348814678782f58b12648fcdfa4d2fce859ee
|
|
188
198
|
racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f
|
|
189
199
|
rainbow (3.1.1) sha256=039491aa3a89f42efa1d6dec2fc4e62ede96eb6acd95e52f1ad581182b79bc6a
|
|
190
|
-
rake (13.2
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
rspec
|
|
197
|
-
rspec-
|
|
198
|
-
rspec-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
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
|
|
202
214
|
rubocop-rake (0.7.1) sha256=3797f2b6810c3e9df7376c26d5f44f3475eda59eb1adc38e6f62ecf027cbae4d
|
|
203
|
-
rubocop-rspec (3.
|
|
215
|
+
rubocop-rspec (3.10.2) sha256=0b3e2ecc592cd10ecbf0095bb58d1e357905276e069643523cc19eb7495f65e2
|
|
204
216
|
ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33
|
|
205
217
|
runger_byebug (11.4.0) sha256=569e22ba2215f57e7f69e145fcb63be401e29fcd312f7936d813e12d0c7bbee6
|
|
206
218
|
runger_release_assistant (4.3.1) sha256=3246c925240739eb12b9e6b9526a77ea00fcf0a0941441ff5ffacefb7e3e4d83
|
|
207
|
-
runger_style (5.
|
|
219
|
+
runger_style (5.13.2) sha256=7f01c78726399bed399dc7b9d520c747c021ea4e2b2dfa0dabf622a84d47a576
|
|
208
220
|
securerandom (0.4.1) sha256=cc5193d414a4341b6e225f0cb4446aceca8e50d5e1888743fac16987638ea0b1
|
|
209
221
|
slop (4.10.1) sha256=844322b5ffcf17ed4815fdb173b04a20dd82b4fd93e3744c88c8fafea696d9c7
|
|
210
|
-
|
|
222
|
+
tsort (0.2.0) sha256=9650a793f6859a43b6641671278f79cfead60ac714148aabe4e3f0060480089f
|
|
211
223
|
tzinfo (2.0.6) sha256=8daf828cc77bcf7d63b0e3bdb6caa47e2272dcfaf4fbfe46f8c3a9df087a829b
|
|
212
|
-
unicode-display_width (3.
|
|
213
|
-
unicode-emoji (4.0
|
|
214
|
-
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
|
|
215
227
|
|
|
216
228
|
RUBY VERSION
|
|
217
|
-
|
|
229
|
+
ruby 4.0.6
|
|
218
230
|
|
|
219
231
|
BUNDLED WITH
|
|
220
|
-
|
|
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,8 +6,11 @@ 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
16
|
def parse
|
|
@@ -25,6 +28,8 @@ class Fcom::Parser
|
|
|
25
28
|
$stdin.each do |line|
|
|
26
29
|
line.chomp!
|
|
27
30
|
if (match = line.match(/^commit (.*)/)&.[](1))
|
|
31
|
+
break if commit_limit_reached?
|
|
32
|
+
|
|
28
33
|
previous_commit = match
|
|
29
34
|
elsif line.match?(/^diff /)
|
|
30
35
|
old_filename = line.match(%r{ a/(\S+)})&.[](1) || '[weird filename]'
|
|
@@ -42,10 +47,11 @@ class Fcom::Parser
|
|
|
42
47
|
|
|
43
48
|
puts("\n\n") if a_commit_has_matched # print commit separator, if needed
|
|
44
49
|
puts([title, sha_with_url, author, date])
|
|
45
|
-
puts(
|
|
50
|
+
puts(COMMIT_HEADER_SEPARATOR)
|
|
46
51
|
|
|
47
52
|
previous_commit = nil
|
|
48
53
|
a_commit_has_matched = true
|
|
54
|
+
@matching_commits += 1
|
|
49
55
|
end
|
|
50
56
|
|
|
51
57
|
if filename
|
|
@@ -66,6 +72,10 @@ class Fcom::Parser
|
|
|
66
72
|
|
|
67
73
|
private
|
|
68
74
|
|
|
75
|
+
def commit_limit_reached?
|
|
76
|
+
commits && @matching_commits >= commits
|
|
77
|
+
end
|
|
78
|
+
|
|
69
79
|
def path_match?(filename)
|
|
70
80
|
return true if path == Fcom::ROOT_PATH
|
|
71
81
|
|
data/lib/fcom/querier.rb
CHANGED
|
@@ -26,56 +26,16 @@ class Fcom::Querier
|
|
|
26
26
|
|
|
27
27
|
quote = expression_to_match.include?('"') ? "'" : '"'
|
|
28
28
|
|
|
29
|
-
commands =
|
|
30
|
-
filename_by_most_recent_containing_commit.map do |commit, path_at_commit|
|
|
31
|
-
commit_without_caret = commit.first(40)
|
|
32
|
-
|
|
33
|
-
start_of_log =
|
|
34
|
-
filtered_renames.
|
|
35
|
-
drop_while { it.first != commit_without_caret }.
|
|
36
|
-
detect { it.last == path_at_commit }&.
|
|
37
|
-
first ||
|
|
38
|
-
first_commit_sha
|
|
39
|
-
|
|
40
|
-
<<~COMMAND.squish
|
|
41
|
-
git rev-list #{start_of_log} #{commit} |
|
|
42
|
-
|
|
43
|
-
git log
|
|
44
|
-
--format="commit %s|%H|%an|%cr (%ci)"
|
|
45
|
-
--patch
|
|
46
|
-
--full-diff
|
|
47
|
-
--diff-algorithm=default
|
|
48
|
-
--topo-order
|
|
49
|
-
--no-textconv
|
|
50
|
-
--stdin
|
|
51
|
-
#{%(--author="#{author}") if author}
|
|
52
|
-
#{days_limiter}
|
|
53
|
-
--
|
|
54
|
-
#{path_at_commit}
|
|
55
|
-
|
|
|
56
|
-
|
|
57
|
-
rg #{quote}(#{expression_to_match})|(^commit )|(^diff )#{quote}
|
|
58
|
-
--color never
|
|
59
|
-
#{'--ignore-case' if ignore_case?}
|
|
60
|
-
#{@options[:rg_options]}
|
|
61
|
-
|
|
|
62
|
-
|
|
63
|
-
#{File.join(__dir__, '../../exe/') if development?}fcom #{quote}#{search_string}#{quote}
|
|
64
|
-
#{"--days #{days}" if days}
|
|
65
|
-
#{'--regex' if regex_mode?}
|
|
66
|
-
#{'--debug' if debug?}
|
|
67
|
-
#{'--ignore-case' if ignore_case?}
|
|
68
|
-
--path #{path_at_commit}
|
|
69
|
-
--parse-mode
|
|
70
|
-
--repo #{repo}
|
|
71
|
-
COMMAND
|
|
72
|
-
end
|
|
73
|
-
|
|
74
29
|
a_previous_command_generated_output_not_yet_spaced = false
|
|
30
|
+
remaining_commits = commits
|
|
75
31
|
|
|
76
|
-
|
|
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)
|
|
77
36
|
Fcom.logger.debug("Executing command: #{command}")
|
|
78
37
|
|
|
38
|
+
commits_printed = 0
|
|
79
39
|
PTY.spawn(command) do |stdout, _stdin, _pid|
|
|
80
40
|
# Read first byte to detect any output
|
|
81
41
|
first_byte = stdout.read(1)
|
|
@@ -91,16 +51,66 @@ class Fcom::Querier
|
|
|
91
51
|
print(first_byte)
|
|
92
52
|
|
|
93
53
|
# Now read the rest line by line
|
|
94
|
-
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
|
|
95
58
|
end
|
|
96
59
|
rescue Errno::EIO
|
|
97
60
|
# The command produced no output.
|
|
98
61
|
end
|
|
62
|
+
|
|
63
|
+
remaining_commits -= commits_printed if remaining_commits
|
|
99
64
|
end
|
|
100
65
|
end
|
|
101
66
|
|
|
102
67
|
private
|
|
103
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
|
+
|
|
104
114
|
memo_wise \
|
|
105
115
|
def filename_by_most_recent_containing_commit
|
|
106
116
|
[
|
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: []
|