hadoop-find 0.1.0-java → 0.1.1-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/CHANGELOG +1 -0
  2. data/bin/hfind.rb +11 -0
  3. metadata +2 -2
data/CHANGELOG CHANGED
@@ -2,6 +2,7 @@
2
2
  - new: added --no-hidden (-D) option to not display or follow hidden
3
3
  files and directories (_ for hdfs, . for unix)
4
4
  - new: added --name (-n) regular expression filter for path matching
5
+ - new: added --version (-v) option
5
6
 
6
7
  * 2011-07-02 - fsf
7
8
  - initial import
@@ -3,6 +3,8 @@
3
3
  require 'java'
4
4
  require 'getoptlong'
5
5
 
6
+ APP_VERSION = '0.1.1'
7
+
6
8
  class HadoopFSFinder
7
9
  def initialize uri, opts = {}
8
10
  @opts = opts
@@ -227,6 +229,10 @@ class HadoopFSFinder
227
229
  end
228
230
  end
229
231
 
232
+ def version
233
+ puts APP_VERSION
234
+ end
235
+
230
236
  def usage
231
237
  puts <<-EOF
232
238
  usage: hfind [options] path
@@ -243,6 +249,7 @@ usage: hfind [options] path
243
249
  -h, --human # show human readable file sizes
244
250
  -D, --no-hidden # do not show hidden files
245
251
  -u, --uri # show full uri for path
252
+ -v, --version
246
253
  -H, --help
247
254
  EOF
248
255
  end
@@ -265,6 +272,7 @@ gopts = GetoptLong.new(
265
272
  [ '--under', '-U', GetoptLong::NO_ARGUMENT ],
266
273
  [ '--human', '-h', GetoptLong::NO_ARGUMENT ],
267
274
  [ '--no-hidden', '-D', GetoptLong::NO_ARGUMENT ],
275
+ [ '--version', '-v', GetoptLong::NO_ARGUMENT ],
268
276
  [ '--help', '-H', GetoptLong::NO_ARGUMENT ],
269
277
  )
270
278
 
@@ -296,6 +304,9 @@ gopts.each do |opt, arg|
296
304
  opts[:uri] = true
297
305
  when '--no-hidden'
298
306
  opts[:no_hidden] = true
307
+ when '--version'
308
+ version
309
+ exit 0
299
310
  else
300
311
  usage
301
312
  exit 1
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 0
9
- version: 0.1.0
8
+ - 1
9
+ version: 0.1.1
10
10
  platform: java
11
11
  authors:
12
12
  - Frank Fejes