rak-eugeneching 1.5.1 → 1.5.3
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/bin/rak +19 -9
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fdba659eb8c4a33a85af0a182c9a23b865b168e3
|
4
|
+
data.tar.gz: 72d45648d9950e9a86c9dc0c31f2ea83efc686b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b24ef3e772feae6b33253873670aa6d660af0cd56546165267aaafbc508c24e20f699a41ea6bd3a9d3d17a5bcdbf9eda19cdf8955bfc9705e8512654abaa409
|
7
|
+
data.tar.gz: d02de245dcc75bd5b8fe891e6e36ba3bde56e5c76d4cdf514ef679d21590ddb3bc1d5c1efb754582591d991870ef685ae2659cc5a84eecbaa665c881feedf0b1
|
data/bin/rak
CHANGED
@@ -20,7 +20,10 @@
|
|
20
20
|
# matching word, if there are multiple, for a given line.
|
21
21
|
#
|
22
22
|
# Behaviour changes:
|
23
|
-
# - ignore-case mode is default, as
|
23
|
+
# - ignore-case mode is default, as such a is (presumably)
|
24
|
+
# a more common case
|
25
|
+
# - search in all files is the default, as opposed to only
|
26
|
+
# recognized files
|
24
27
|
#
|
25
28
|
# -- Author
|
26
29
|
#
|
@@ -32,15 +35,16 @@
|
|
32
35
|
# ------------------------------------------------------------------------------
|
33
36
|
|
34
37
|
require 'rubygems'
|
35
|
-
require 'colorize'
|
36
38
|
require "pathname"
|
37
39
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
40
|
+
# Require the colorize gem, if available
|
41
|
+
begin
|
42
|
+
require 'colorize'
|
43
|
+
rescue LoadError
|
44
|
+
puts 'Colorize gem not found. To display Rak results in color, please'
|
45
|
+
puts 'install it: gem install colorize'
|
46
|
+
puts ''
|
47
|
+
ARGV << "--nocolour"
|
44
48
|
end
|
45
49
|
|
46
50
|
require 'getoptlong'
|
@@ -78,6 +82,7 @@ END
|
|
78
82
|
FILE_TYPES = {
|
79
83
|
:actionscript => %w( .as .mxml ),
|
80
84
|
:ada => %w( .ada .adb .ads ),
|
85
|
+
:asp => %w( .asp .aspx ),
|
81
86
|
:asm => %w( .S .asm .s ),
|
82
87
|
:awk => %w( .awk ),
|
83
88
|
:batch => %w( .bat .cmd ),
|
@@ -190,6 +195,7 @@ END
|
|
190
195
|
[ '--nocolour', GetoptLong::NO_ARGUMENT ],
|
191
196
|
[ '--color', GetoptLong::NO_ARGUMENT ],
|
192
197
|
[ '--nocolor', GetoptLong::NO_ARGUMENT ],
|
198
|
+
[ '-j', '--noall', GetoptLong::NO_ARGUMENT ],
|
193
199
|
[ '-a', '--all', GetoptLong::NO_ARGUMENT ],
|
194
200
|
[ '--type', GetoptLong::REQUIRED_ARGUMENT ],
|
195
201
|
[ '--sort-files', GetoptLong::NO_ARGUMENT ],
|
@@ -227,7 +233,7 @@ END
|
|
227
233
|
opt[:print_file_if_no_match] = false
|
228
234
|
opt[:print_entire_line_if_no_match] = false
|
229
235
|
opt[:colour] = true
|
230
|
-
opt[:all_files] =
|
236
|
+
opt[:all_files] = true
|
231
237
|
opt[:sort_files] = false
|
232
238
|
opt[:follow_symlinks] = false
|
233
239
|
opt[:after_context] = 0
|
@@ -331,6 +337,8 @@ END
|
|
331
337
|
opt[:colour] = true
|
332
338
|
when '-a'
|
333
339
|
opt[:all_files] = true
|
340
|
+
when '-j'
|
341
|
+
opt[:all_files] = false
|
334
342
|
when '--type'
|
335
343
|
if arg[0..1] == "no"
|
336
344
|
type = arg[2..-1]
|
@@ -751,6 +759,7 @@ Example: rak -i select
|
|
751
759
|
|
752
760
|
Searching:
|
753
761
|
-i, --ignore-case Ignore case distinctions
|
762
|
+
-I, --case-sensitive Do not ignore case distinctions
|
754
763
|
-v, --invert-match Invert match: select non-matching lines
|
755
764
|
-w, --word-regexp Force PATTERN to match only whole words
|
756
765
|
-x, --line-regexp Force PATTERN to match only whole lines
|
@@ -803,6 +812,7 @@ File inclusion/exclusion:
|
|
803
812
|
-n No descending into subdirectories
|
804
813
|
-g REGEX Only search in files matching REGEX.
|
805
814
|
-k REGEX Only search in files not matching REGEX.
|
815
|
+
-j, --noall Only search in recognized files extensions
|
806
816
|
-a, --all All files, regardless of extension (but still skips
|
807
817
|
blib, pkg, CVS, _darcs, .git, .pc, RCS, SCCS and .svn dirs)
|
808
818
|
--ruby Include only Ruby files.
|