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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/rak +19 -9
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: de1e283c5441a983d918e42b0757f1e1ede66537
4
- data.tar.gz: d91542dfe592939e1f958c6bd99b5160c439719b
3
+ metadata.gz: fdba659eb8c4a33a85af0a182c9a23b865b168e3
4
+ data.tar.gz: 72d45648d9950e9a86c9dc0c31f2ea83efc686b5
5
5
  SHA512:
6
- metadata.gz: 9789667d61145c893bf0e93db5c8cff5465aa404e67f1c5a601100077205fbd0e28d80483f81a7ebcb6fb221e1e3ce300f4c3c94a96724d51603cea54f26665e
7
- data.tar.gz: 34ccf2c079cf20f89f75dad7d068faa3a97581ed5b1fc3a0f3e66f010a0edf9babcb3f4c38cf1828e9db412bb9e962244686d2685f04edd077c097fbbec76024
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 I feel that such a case is more common.
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
- if RUBY_PLATFORM =~ /mswin|mingw/
39
- begin
40
- require 'win32console'
41
- rescue LoadError
42
- # ARGV << "--nocolour"
43
- end
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] = false
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.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rak-eugeneching
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eugene Ching