ruby-zoom 5.4.0 → 5.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d301bb2829817c9b24659d6d0cbc3fed7a52b4935fee6dad807535e5644d5d5a
4
- data.tar.gz: 8d239791a5c6c86e374227f91637ddf266bc6b38f3f386d5af03a3de0fe05be4
3
+ metadata.gz: 312b87da6ce1330093d2675de39323809e5b0e635685142f97347da5716baeac
4
+ data.tar.gz: b0f161bee57690bc9634ea6bd91d667e3fff099912602ef1e46348e9a0a6f5eb
5
5
  SHA512:
6
- metadata.gz: 1e44a8a5f10f3b319ae0f4c610819781fea1cdfaa6c7dfebaebab266bdeb189335a8640892715c743d82e4f1cb5fd8301c21a48ae3cb92682bc2c6080086ec1b
7
- data.tar.gz: a939ba6fa4bb8593758ffde341d0591a8896ee24de27a5a71216ccd369c81d817ee93a7c80333513be3c96c5153e17eca38b11e0aac39668bf914570a666e45d
6
+ metadata.gz: c1618716661ada595846efa279c740449a8e3792952c63467a08e31249182a80a4ccd3eb767b398d67f216ad5b097ef4cd448ad02c54d4dcf5a7070214e1dfc1
7
+ data.tar.gz: c7c46c40ac4dc2db5d832a2cbd149dd2c8a5833547628cc3ae3a4f91d7c7ee8db20fe80b61c25221a0c99db762cc8b893b1c13d5df39d0853b5fd59b0d225d4a
data/bin/z CHANGED
@@ -138,7 +138,7 @@ def parse(args)
138
138
  end
139
139
 
140
140
  opts.on("-h", "--help", "Display this help message") do
141
- puts opts
141
+ puts(opts)
142
142
  exit ZoomExit::GOOD
143
143
  end
144
144
 
@@ -230,7 +230,7 @@ def parse(args)
230
230
 
231
231
  opts.on("--version", "Show version") do
232
232
  __FILE__.match(/ruby-zoom-(\d+\.\d+\.\d+)/) do |m|
233
- puts m[1]
233
+ puts(m[1])
234
234
  end
235
235
  exit ZoomExit::GOOD
236
236
  end
@@ -258,20 +258,20 @@ def parse(args)
258
258
  begin
259
259
  parser.parse!
260
260
  rescue OptionParser::InvalidOption => e
261
- puts e.message
262
- puts parser
261
+ puts(e.message)
262
+ puts(parser)
263
263
  exit ZoomExit::INVALID_OPTION
264
264
  rescue OptionParser::InvalidArgument => e
265
- puts e.message
266
- puts parser
265
+ puts(e.message)
266
+ puts(parser)
267
267
  exit ZoomExit::INVALID_ARGUMENT
268
268
  rescue OptionParser::MissingArgument => e
269
- puts e.message
270
- puts parser
269
+ puts(e.message)
270
+ puts(parser)
271
271
  exit ZoomExit::MISSING_ARGUMENT
272
272
  rescue OptionParser::AmbiguousOption => e
273
- puts e.message
274
- puts parser
273
+ puts(e.message)
274
+ puts(parser)
275
275
  exit ZoomExit::AMBIGUOUS_ARGUMENT
276
276
  end
277
277
 
@@ -362,15 +362,15 @@ begin
362
362
  lines = profiles[name].to_s.scan(
363
363
  /\S.{0,76}\S(?=\s|$)|\S+/
364
364
  )
365
- puts lines.delete_at(0)
365
+ puts(lines.delete_at(0))
366
366
  lines.each do |line|
367
- puts " #{line}"
367
+ puts(" #{line}")
368
368
  end
369
369
  end
370
370
  when "list_profile_names"
371
- puts zoom.config.get_profile_names
371
+ puts(zoom.config.get_profile_names)
372
372
  when "list_tags"
373
- puts zoom.cache.available_tags
373
+ puts(zoom.cache.available_tags)
374
374
  when "repeat"
375
375
  zoom.repeat
376
376
  when "rc"
@@ -383,9 +383,9 @@ begin
383
383
  profile = zoom.config.get_profile(name)
384
384
 
385
385
  lines = profile.to_s.scan(/\S.{0,76}\S(?=\s|$)|\S+/)
386
- puts lines.delete_at(0)
386
+ puts(lines.delete_at(0))
387
387
  lines.each do |line|
388
- puts " #{line}"
388
+ puts(" #{line}")
389
389
  end
390
390
  else
391
391
  # Search and cache results
@@ -402,10 +402,10 @@ rescue SystemExit
402
402
  # Quit from djinni
403
403
  # Exit gracefully
404
404
  rescue Zoom::Error => e
405
- $stderr.puts e.message
405
+ $stderr.puts(e.message)
406
406
  if (options["verbose"])
407
407
  e.backtrace.each do |line|
408
- $stderr.puts line.yellow
408
+ $stderr.puts(line.yellow)
409
409
  end
410
410
  end
411
411
  exit ZoomExit::EXCEPTION
@@ -416,25 +416,28 @@ rescue Errno::EPIPE
416
416
  # Do nothing. This can happen if piping to another program such as
417
417
  # less. Usually if less is closed before Zoom is done with STDOUT.
418
418
  rescue Exception => e
419
+ $stderr.puts(
420
+ [
421
+ "Oops! Looks like an error has occured! Try resetting",
422
+ "your config with \"z --rc\" and if the error persists,",
423
+ "file a bug at:"
424
+ ].join(" ").wrap
425
+ )
419
426
  $stderr.puts
420
- $stderr.puts "Oops! Looks like an error has occured! Try " \
421
- "resetting your configs with the"
422
- $stderr.puts "following comand:"
427
+ $stderr.puts(" https://gitlab.com/mjwhitta/zoom/issues")
423
428
  $stderr.puts
424
- $stderr.puts " z --rc"
429
+ $stderr.puts(
430
+ [
431
+ "Maybe the message below will help. If not, you can use",
432
+ "the --verbose flag to get a backtrace."
433
+ ].join(" ").wrap
434
+ )
425
435
  $stderr.puts
426
- $stderr.puts "If the error persists, file a bug at:"
427
- $stderr.puts
428
- $stderr.puts " https://gitlab.com/mjwhitta/zoom/issues"
429
- $stderr.puts
430
- $stderr.puts "Maybe the message below will help. If not, you " \
431
- "can use the --verbose flag to get"
432
- $stderr.puts "a backtrace."
433
436
 
434
- $stderr.puts e.message.white.on_red
437
+ $stderr.puts(e.message.white.on_red)
435
438
  if (options["verbose"])
436
439
  e.backtrace.each do |line|
437
- $stderr.puts line.yellow
440
+ $stderr.puts(line.light_yellow)
438
441
  end
439
442
  end
440
443
  exit ZoomExit::EXCEPTION
data/bin/zc CHANGED
@@ -138,7 +138,7 @@ def parse(args)
138
138
  end
139
139
 
140
140
  opts.on("-h", "--help", "Display this help message") do
141
- puts opts
141
+ puts(opts)
142
142
  exit ZoomExit::GOOD
143
143
  end
144
144
 
@@ -230,7 +230,7 @@ def parse(args)
230
230
 
231
231
  opts.on("--version", "Show version") do
232
232
  __FILE__.match(/ruby-zoom-(\d+\.\d+\.\d+)/) do |m|
233
- puts m[1]
233
+ puts(m[1])
234
234
  end
235
235
  exit ZoomExit::GOOD
236
236
  end
@@ -258,20 +258,20 @@ def parse(args)
258
258
  begin
259
259
  parser.parse!
260
260
  rescue OptionParser::InvalidOption => e
261
- puts e.message
262
- puts parser
261
+ puts(e.message)
262
+ puts(parser)
263
263
  exit ZoomExit::INVALID_OPTION
264
264
  rescue OptionParser::InvalidArgument => e
265
- puts e.message
266
- puts parser
265
+ puts(e.message)
266
+ puts(parser)
267
267
  exit ZoomExit::INVALID_ARGUMENT
268
268
  rescue OptionParser::MissingArgument => e
269
- puts e.message
270
- puts parser
269
+ puts(e.message)
270
+ puts(parser)
271
271
  exit ZoomExit::MISSING_ARGUMENT
272
272
  rescue OptionParser::AmbiguousOption => e
273
- puts e.message
274
- puts parser
273
+ puts(e.message)
274
+ puts(parser)
275
275
  exit ZoomExit::AMBIGUOUS_ARGUMENT
276
276
  end
277
277
 
@@ -362,15 +362,15 @@ begin
362
362
  lines = profiles[name].to_s.scan(
363
363
  /\S.{0,76}\S(?=\s|$)|\S+/
364
364
  )
365
- puts lines.delete_at(0)
365
+ puts(lines.delete_at(0))
366
366
  lines.each do |line|
367
- puts " #{line}"
367
+ puts(" #{line}")
368
368
  end
369
369
  end
370
370
  when "list_profile_names"
371
- puts zoom.config.get_profile_names
371
+ puts(zoom.config.get_profile_names)
372
372
  when "list_tags"
373
- puts zoom.cache.available_tags
373
+ puts(zoom.cache.available_tags)
374
374
  when "repeat"
375
375
  zoom.repeat
376
376
  when "rc"
@@ -383,9 +383,9 @@ begin
383
383
  profile = zoom.config.get_profile(name)
384
384
 
385
385
  lines = profile.to_s.scan(/\S.{0,76}\S(?=\s|$)|\S+/)
386
- puts lines.delete_at(0)
386
+ puts(lines.delete_at(0))
387
387
  lines.each do |line|
388
- puts " #{line}"
388
+ puts(" #{line}")
389
389
  end
390
390
  else
391
391
  # Search and cache results
@@ -402,10 +402,10 @@ rescue SystemExit
402
402
  # Quit from djinni
403
403
  # Exit gracefully
404
404
  rescue Zoom::Error => e
405
- $stderr.puts e.message
405
+ $stderr.puts(e.message)
406
406
  if (options["verbose"])
407
407
  e.backtrace.each do |line|
408
- $stderr.puts line.yellow
408
+ $stderr.puts(line.yellow)
409
409
  end
410
410
  end
411
411
  exit ZoomExit::EXCEPTION
@@ -416,25 +416,28 @@ rescue Errno::EPIPE
416
416
  # Do nothing. This can happen if piping to another program such as
417
417
  # less. Usually if less is closed before Zoom is done with STDOUT.
418
418
  rescue Exception => e
419
+ $stderr.puts(
420
+ [
421
+ "Oops! Looks like an error has occured! Try resetting",
422
+ "your config with \"z --rc\" and if the error persists,",
423
+ "file a bug at:"
424
+ ].join(" ").wrap
425
+ )
419
426
  $stderr.puts
420
- $stderr.puts "Oops! Looks like an error has occured! Try " \
421
- "resetting your configs with the"
422
- $stderr.puts "following comand:"
427
+ $stderr.puts(" https://gitlab.com/mjwhitta/zoom/issues")
423
428
  $stderr.puts
424
- $stderr.puts " z --rc"
429
+ $stderr.puts(
430
+ [
431
+ "Maybe the message below will help. If not, you can use",
432
+ "the --verbose flag to get a backtrace."
433
+ ].join(" ").wrap
434
+ )
425
435
  $stderr.puts
426
- $stderr.puts "If the error persists, file a bug at:"
427
- $stderr.puts
428
- $stderr.puts " https://gitlab.com/mjwhitta/zoom/issues"
429
- $stderr.puts
430
- $stderr.puts "Maybe the message below will help. If not, you " \
431
- "can use the --verbose flag to get"
432
- $stderr.puts "a backtrace."
433
436
 
434
- $stderr.puts e.message.white.on_red
437
+ $stderr.puts(e.message.white.on_red)
435
438
  if (options["verbose"])
436
439
  e.backtrace.each do |line|
437
- $stderr.puts line.yellow
440
+ $stderr.puts(line.light_yellow)
438
441
  end
439
442
  end
440
443
  exit ZoomExit::EXCEPTION
data/bin/zf CHANGED
@@ -138,7 +138,7 @@ def parse(args)
138
138
  end
139
139
 
140
140
  opts.on("-h", "--help", "Display this help message") do
141
- puts opts
141
+ puts(opts)
142
142
  exit ZoomExit::GOOD
143
143
  end
144
144
 
@@ -230,7 +230,7 @@ def parse(args)
230
230
 
231
231
  opts.on("--version", "Show version") do
232
232
  __FILE__.match(/ruby-zoom-(\d+\.\d+\.\d+)/) do |m|
233
- puts m[1]
233
+ puts(m[1])
234
234
  end
235
235
  exit ZoomExit::GOOD
236
236
  end
@@ -258,20 +258,20 @@ def parse(args)
258
258
  begin
259
259
  parser.parse!
260
260
  rescue OptionParser::InvalidOption => e
261
- puts e.message
262
- puts parser
261
+ puts(e.message)
262
+ puts(parser)
263
263
  exit ZoomExit::INVALID_OPTION
264
264
  rescue OptionParser::InvalidArgument => e
265
- puts e.message
266
- puts parser
265
+ puts(e.message)
266
+ puts(parser)
267
267
  exit ZoomExit::INVALID_ARGUMENT
268
268
  rescue OptionParser::MissingArgument => e
269
- puts e.message
270
- puts parser
269
+ puts(e.message)
270
+ puts(parser)
271
271
  exit ZoomExit::MISSING_ARGUMENT
272
272
  rescue OptionParser::AmbiguousOption => e
273
- puts e.message
274
- puts parser
273
+ puts(e.message)
274
+ puts(parser)
275
275
  exit ZoomExit::AMBIGUOUS_ARGUMENT
276
276
  end
277
277
 
@@ -362,15 +362,15 @@ begin
362
362
  lines = profiles[name].to_s.scan(
363
363
  /\S.{0,76}\S(?=\s|$)|\S+/
364
364
  )
365
- puts lines.delete_at(0)
365
+ puts(lines.delete_at(0))
366
366
  lines.each do |line|
367
- puts " #{line}"
367
+ puts(" #{line}")
368
368
  end
369
369
  end
370
370
  when "list_profile_names"
371
- puts zoom.config.get_profile_names
371
+ puts(zoom.config.get_profile_names)
372
372
  when "list_tags"
373
- puts zoom.cache.available_tags
373
+ puts(zoom.cache.available_tags)
374
374
  when "repeat"
375
375
  zoom.repeat
376
376
  when "rc"
@@ -383,9 +383,9 @@ begin
383
383
  profile = zoom.config.get_profile(name)
384
384
 
385
385
  lines = profile.to_s.scan(/\S.{0,76}\S(?=\s|$)|\S+/)
386
- puts lines.delete_at(0)
386
+ puts(lines.delete_at(0))
387
387
  lines.each do |line|
388
- puts " #{line}"
388
+ puts(" #{line}")
389
389
  end
390
390
  else
391
391
  # Search and cache results
@@ -402,10 +402,10 @@ rescue SystemExit
402
402
  # Quit from djinni
403
403
  # Exit gracefully
404
404
  rescue Zoom::Error => e
405
- $stderr.puts e.message
405
+ $stderr.puts(e.message)
406
406
  if (options["verbose"])
407
407
  e.backtrace.each do |line|
408
- $stderr.puts line.yellow
408
+ $stderr.puts(line.yellow)
409
409
  end
410
410
  end
411
411
  exit ZoomExit::EXCEPTION
@@ -416,25 +416,28 @@ rescue Errno::EPIPE
416
416
  # Do nothing. This can happen if piping to another program such as
417
417
  # less. Usually if less is closed before Zoom is done with STDOUT.
418
418
  rescue Exception => e
419
+ $stderr.puts(
420
+ [
421
+ "Oops! Looks like an error has occured! Try resetting",
422
+ "your config with \"z --rc\" and if the error persists,",
423
+ "file a bug at:"
424
+ ].join(" ").wrap
425
+ )
419
426
  $stderr.puts
420
- $stderr.puts "Oops! Looks like an error has occured! Try " \
421
- "resetting your configs with the"
422
- $stderr.puts "following comand:"
427
+ $stderr.puts(" https://gitlab.com/mjwhitta/zoom/issues")
423
428
  $stderr.puts
424
- $stderr.puts " z --rc"
429
+ $stderr.puts(
430
+ [
431
+ "Maybe the message below will help. If not, you can use",
432
+ "the --verbose flag to get a backtrace."
433
+ ].join(" ").wrap
434
+ )
425
435
  $stderr.puts
426
- $stderr.puts "If the error persists, file a bug at:"
427
- $stderr.puts
428
- $stderr.puts " https://gitlab.com/mjwhitta/zoom/issues"
429
- $stderr.puts
430
- $stderr.puts "Maybe the message below will help. If not, you " \
431
- "can use the --verbose flag to get"
432
- $stderr.puts "a backtrace."
433
436
 
434
- $stderr.puts e.message.white.on_red
437
+ $stderr.puts(e.message.white.on_red)
435
438
  if (options["verbose"])
436
439
  e.backtrace.each do |line|
437
- $stderr.puts line.yellow
440
+ $stderr.puts(line.light_yellow)
438
441
  end
439
442
  end
440
443
  exit ZoomExit::EXCEPTION
data/bin/zg CHANGED
@@ -138,7 +138,7 @@ def parse(args)
138
138
  end
139
139
 
140
140
  opts.on("-h", "--help", "Display this help message") do
141
- puts opts
141
+ puts(opts)
142
142
  exit ZoomExit::GOOD
143
143
  end
144
144
 
@@ -230,7 +230,7 @@ def parse(args)
230
230
 
231
231
  opts.on("--version", "Show version") do
232
232
  __FILE__.match(/ruby-zoom-(\d+\.\d+\.\d+)/) do |m|
233
- puts m[1]
233
+ puts(m[1])
234
234
  end
235
235
  exit ZoomExit::GOOD
236
236
  end
@@ -258,20 +258,20 @@ def parse(args)
258
258
  begin
259
259
  parser.parse!
260
260
  rescue OptionParser::InvalidOption => e
261
- puts e.message
262
- puts parser
261
+ puts(e.message)
262
+ puts(parser)
263
263
  exit ZoomExit::INVALID_OPTION
264
264
  rescue OptionParser::InvalidArgument => e
265
- puts e.message
266
- puts parser
265
+ puts(e.message)
266
+ puts(parser)
267
267
  exit ZoomExit::INVALID_ARGUMENT
268
268
  rescue OptionParser::MissingArgument => e
269
- puts e.message
270
- puts parser
269
+ puts(e.message)
270
+ puts(parser)
271
271
  exit ZoomExit::MISSING_ARGUMENT
272
272
  rescue OptionParser::AmbiguousOption => e
273
- puts e.message
274
- puts parser
273
+ puts(e.message)
274
+ puts(parser)
275
275
  exit ZoomExit::AMBIGUOUS_ARGUMENT
276
276
  end
277
277
 
@@ -362,15 +362,15 @@ begin
362
362
  lines = profiles[name].to_s.scan(
363
363
  /\S.{0,76}\S(?=\s|$)|\S+/
364
364
  )
365
- puts lines.delete_at(0)
365
+ puts(lines.delete_at(0))
366
366
  lines.each do |line|
367
- puts " #{line}"
367
+ puts(" #{line}")
368
368
  end
369
369
  end
370
370
  when "list_profile_names"
371
- puts zoom.config.get_profile_names
371
+ puts(zoom.config.get_profile_names)
372
372
  when "list_tags"
373
- puts zoom.cache.available_tags
373
+ puts(zoom.cache.available_tags)
374
374
  when "repeat"
375
375
  zoom.repeat
376
376
  when "rc"
@@ -383,9 +383,9 @@ begin
383
383
  profile = zoom.config.get_profile(name)
384
384
 
385
385
  lines = profile.to_s.scan(/\S.{0,76}\S(?=\s|$)|\S+/)
386
- puts lines.delete_at(0)
386
+ puts(lines.delete_at(0))
387
387
  lines.each do |line|
388
- puts " #{line}"
388
+ puts(" #{line}")
389
389
  end
390
390
  else
391
391
  # Search and cache results
@@ -402,10 +402,10 @@ rescue SystemExit
402
402
  # Quit from djinni
403
403
  # Exit gracefully
404
404
  rescue Zoom::Error => e
405
- $stderr.puts e.message
405
+ $stderr.puts(e.message)
406
406
  if (options["verbose"])
407
407
  e.backtrace.each do |line|
408
- $stderr.puts line.yellow
408
+ $stderr.puts(line.yellow)
409
409
  end
410
410
  end
411
411
  exit ZoomExit::EXCEPTION
@@ -416,25 +416,28 @@ rescue Errno::EPIPE
416
416
  # Do nothing. This can happen if piping to another program such as
417
417
  # less. Usually if less is closed before Zoom is done with STDOUT.
418
418
  rescue Exception => e
419
+ $stderr.puts(
420
+ [
421
+ "Oops! Looks like an error has occured! Try resetting",
422
+ "your config with \"z --rc\" and if the error persists,",
423
+ "file a bug at:"
424
+ ].join(" ").wrap
425
+ )
419
426
  $stderr.puts
420
- $stderr.puts "Oops! Looks like an error has occured! Try " \
421
- "resetting your configs with the"
422
- $stderr.puts "following comand:"
427
+ $stderr.puts(" https://gitlab.com/mjwhitta/zoom/issues")
423
428
  $stderr.puts
424
- $stderr.puts " z --rc"
429
+ $stderr.puts(
430
+ [
431
+ "Maybe the message below will help. If not, you can use",
432
+ "the --verbose flag to get a backtrace."
433
+ ].join(" ").wrap
434
+ )
425
435
  $stderr.puts
426
- $stderr.puts "If the error persists, file a bug at:"
427
- $stderr.puts
428
- $stderr.puts " https://gitlab.com/mjwhitta/zoom/issues"
429
- $stderr.puts
430
- $stderr.puts "Maybe the message below will help. If not, you " \
431
- "can use the --verbose flag to get"
432
- $stderr.puts "a backtrace."
433
436
 
434
- $stderr.puts e.message.white.on_red
437
+ $stderr.puts(e.message.white.on_red)
435
438
  if (options["verbose"])
436
439
  e.backtrace.each do |line|
437
- $stderr.puts line.yellow
440
+ $stderr.puts(line.light_yellow)
438
441
  end
439
442
  end
440
443
  exit ZoomExit::EXCEPTION
data/bin/zl CHANGED
@@ -138,7 +138,7 @@ def parse(args)
138
138
  end
139
139
 
140
140
  opts.on("-h", "--help", "Display this help message") do
141
- puts opts
141
+ puts(opts)
142
142
  exit ZoomExit::GOOD
143
143
  end
144
144
 
@@ -230,7 +230,7 @@ def parse(args)
230
230
 
231
231
  opts.on("--version", "Show version") do
232
232
  __FILE__.match(/ruby-zoom-(\d+\.\d+\.\d+)/) do |m|
233
- puts m[1]
233
+ puts(m[1])
234
234
  end
235
235
  exit ZoomExit::GOOD
236
236
  end
@@ -258,20 +258,20 @@ def parse(args)
258
258
  begin
259
259
  parser.parse!
260
260
  rescue OptionParser::InvalidOption => e
261
- puts e.message
262
- puts parser
261
+ puts(e.message)
262
+ puts(parser)
263
263
  exit ZoomExit::INVALID_OPTION
264
264
  rescue OptionParser::InvalidArgument => e
265
- puts e.message
266
- puts parser
265
+ puts(e.message)
266
+ puts(parser)
267
267
  exit ZoomExit::INVALID_ARGUMENT
268
268
  rescue OptionParser::MissingArgument => e
269
- puts e.message
270
- puts parser
269
+ puts(e.message)
270
+ puts(parser)
271
271
  exit ZoomExit::MISSING_ARGUMENT
272
272
  rescue OptionParser::AmbiguousOption => e
273
- puts e.message
274
- puts parser
273
+ puts(e.message)
274
+ puts(parser)
275
275
  exit ZoomExit::AMBIGUOUS_ARGUMENT
276
276
  end
277
277
 
@@ -362,15 +362,15 @@ begin
362
362
  lines = profiles[name].to_s.scan(
363
363
  /\S.{0,76}\S(?=\s|$)|\S+/
364
364
  )
365
- puts lines.delete_at(0)
365
+ puts(lines.delete_at(0))
366
366
  lines.each do |line|
367
- puts " #{line}"
367
+ puts(" #{line}")
368
368
  end
369
369
  end
370
370
  when "list_profile_names"
371
- puts zoom.config.get_profile_names
371
+ puts(zoom.config.get_profile_names)
372
372
  when "list_tags"
373
- puts zoom.cache.available_tags
373
+ puts(zoom.cache.available_tags)
374
374
  when "repeat"
375
375
  zoom.repeat
376
376
  when "rc"
@@ -383,9 +383,9 @@ begin
383
383
  profile = zoom.config.get_profile(name)
384
384
 
385
385
  lines = profile.to_s.scan(/\S.{0,76}\S(?=\s|$)|\S+/)
386
- puts lines.delete_at(0)
386
+ puts(lines.delete_at(0))
387
387
  lines.each do |line|
388
- puts " #{line}"
388
+ puts(" #{line}")
389
389
  end
390
390
  else
391
391
  # Search and cache results
@@ -402,10 +402,10 @@ rescue SystemExit
402
402
  # Quit from djinni
403
403
  # Exit gracefully
404
404
  rescue Zoom::Error => e
405
- $stderr.puts e.message
405
+ $stderr.puts(e.message)
406
406
  if (options["verbose"])
407
407
  e.backtrace.each do |line|
408
- $stderr.puts line.yellow
408
+ $stderr.puts(line.yellow)
409
409
  end
410
410
  end
411
411
  exit ZoomExit::EXCEPTION
@@ -416,25 +416,28 @@ rescue Errno::EPIPE
416
416
  # Do nothing. This can happen if piping to another program such as
417
417
  # less. Usually if less is closed before Zoom is done with STDOUT.
418
418
  rescue Exception => e
419
+ $stderr.puts(
420
+ [
421
+ "Oops! Looks like an error has occured! Try resetting",
422
+ "your config with \"z --rc\" and if the error persists,",
423
+ "file a bug at:"
424
+ ].join(" ").wrap
425
+ )
419
426
  $stderr.puts
420
- $stderr.puts "Oops! Looks like an error has occured! Try " \
421
- "resetting your configs with the"
422
- $stderr.puts "following comand:"
427
+ $stderr.puts(" https://gitlab.com/mjwhitta/zoom/issues")
423
428
  $stderr.puts
424
- $stderr.puts " z --rc"
429
+ $stderr.puts(
430
+ [
431
+ "Maybe the message below will help. If not, you can use",
432
+ "the --verbose flag to get a backtrace."
433
+ ].join(" ").wrap
434
+ )
425
435
  $stderr.puts
426
- $stderr.puts "If the error persists, file a bug at:"
427
- $stderr.puts
428
- $stderr.puts " https://gitlab.com/mjwhitta/zoom/issues"
429
- $stderr.puts
430
- $stderr.puts "Maybe the message below will help. If not, you " \
431
- "can use the --verbose flag to get"
432
- $stderr.puts "a backtrace."
433
436
 
434
- $stderr.puts e.message.white.on_red
437
+ $stderr.puts(e.message.white.on_red)
435
438
  if (options["verbose"])
436
439
  e.backtrace.each do |line|
437
- $stderr.puts line.yellow
440
+ $stderr.puts(line.light_yellow)
438
441
  end
439
442
  end
440
443
  exit ZoomExit::EXCEPTION
data/bin/zr CHANGED
@@ -138,7 +138,7 @@ def parse(args)
138
138
  end
139
139
 
140
140
  opts.on("-h", "--help", "Display this help message") do
141
- puts opts
141
+ puts(opts)
142
142
  exit ZoomExit::GOOD
143
143
  end
144
144
 
@@ -230,7 +230,7 @@ def parse(args)
230
230
 
231
231
  opts.on("--version", "Show version") do
232
232
  __FILE__.match(/ruby-zoom-(\d+\.\d+\.\d+)/) do |m|
233
- puts m[1]
233
+ puts(m[1])
234
234
  end
235
235
  exit ZoomExit::GOOD
236
236
  end
@@ -258,20 +258,20 @@ def parse(args)
258
258
  begin
259
259
  parser.parse!
260
260
  rescue OptionParser::InvalidOption => e
261
- puts e.message
262
- puts parser
261
+ puts(e.message)
262
+ puts(parser)
263
263
  exit ZoomExit::INVALID_OPTION
264
264
  rescue OptionParser::InvalidArgument => e
265
- puts e.message
266
- puts parser
265
+ puts(e.message)
266
+ puts(parser)
267
267
  exit ZoomExit::INVALID_ARGUMENT
268
268
  rescue OptionParser::MissingArgument => e
269
- puts e.message
270
- puts parser
269
+ puts(e.message)
270
+ puts(parser)
271
271
  exit ZoomExit::MISSING_ARGUMENT
272
272
  rescue OptionParser::AmbiguousOption => e
273
- puts e.message
274
- puts parser
273
+ puts(e.message)
274
+ puts(parser)
275
275
  exit ZoomExit::AMBIGUOUS_ARGUMENT
276
276
  end
277
277
 
@@ -362,15 +362,15 @@ begin
362
362
  lines = profiles[name].to_s.scan(
363
363
  /\S.{0,76}\S(?=\s|$)|\S+/
364
364
  )
365
- puts lines.delete_at(0)
365
+ puts(lines.delete_at(0))
366
366
  lines.each do |line|
367
- puts " #{line}"
367
+ puts(" #{line}")
368
368
  end
369
369
  end
370
370
  when "list_profile_names"
371
- puts zoom.config.get_profile_names
371
+ puts(zoom.config.get_profile_names)
372
372
  when "list_tags"
373
- puts zoom.cache.available_tags
373
+ puts(zoom.cache.available_tags)
374
374
  when "repeat"
375
375
  zoom.repeat
376
376
  when "rc"
@@ -383,9 +383,9 @@ begin
383
383
  profile = zoom.config.get_profile(name)
384
384
 
385
385
  lines = profile.to_s.scan(/\S.{0,76}\S(?=\s|$)|\S+/)
386
- puts lines.delete_at(0)
386
+ puts(lines.delete_at(0))
387
387
  lines.each do |line|
388
- puts " #{line}"
388
+ puts(" #{line}")
389
389
  end
390
390
  else
391
391
  # Search and cache results
@@ -402,10 +402,10 @@ rescue SystemExit
402
402
  # Quit from djinni
403
403
  # Exit gracefully
404
404
  rescue Zoom::Error => e
405
- $stderr.puts e.message
405
+ $stderr.puts(e.message)
406
406
  if (options["verbose"])
407
407
  e.backtrace.each do |line|
408
- $stderr.puts line.yellow
408
+ $stderr.puts(line.yellow)
409
409
  end
410
410
  end
411
411
  exit ZoomExit::EXCEPTION
@@ -416,25 +416,28 @@ rescue Errno::EPIPE
416
416
  # Do nothing. This can happen if piping to another program such as
417
417
  # less. Usually if less is closed before Zoom is done with STDOUT.
418
418
  rescue Exception => e
419
+ $stderr.puts(
420
+ [
421
+ "Oops! Looks like an error has occured! Try resetting",
422
+ "your config with \"z --rc\" and if the error persists,",
423
+ "file a bug at:"
424
+ ].join(" ").wrap
425
+ )
419
426
  $stderr.puts
420
- $stderr.puts "Oops! Looks like an error has occured! Try " \
421
- "resetting your configs with the"
422
- $stderr.puts "following comand:"
427
+ $stderr.puts(" https://gitlab.com/mjwhitta/zoom/issues")
423
428
  $stderr.puts
424
- $stderr.puts " z --rc"
429
+ $stderr.puts(
430
+ [
431
+ "Maybe the message below will help. If not, you can use",
432
+ "the --verbose flag to get a backtrace."
433
+ ].join(" ").wrap
434
+ )
425
435
  $stderr.puts
426
- $stderr.puts "If the error persists, file a bug at:"
427
- $stderr.puts
428
- $stderr.puts " https://gitlab.com/mjwhitta/zoom/issues"
429
- $stderr.puts
430
- $stderr.puts "Maybe the message below will help. If not, you " \
431
- "can use the --verbose flag to get"
432
- $stderr.puts "a backtrace."
433
436
 
434
- $stderr.puts e.message.white.on_red
437
+ $stderr.puts(e.message.white.on_red)
435
438
  if (options["verbose"])
436
439
  e.backtrace.each do |line|
437
- $stderr.puts line.yellow
440
+ $stderr.puts(line.light_yellow)
438
441
  end
439
442
  end
440
443
  exit ZoomExit::EXCEPTION
@@ -185,7 +185,7 @@ class Zoom::Cache
185
185
  profile = @config.get_profile(profile_name)
186
186
  if (!profile.taggable)
187
187
  get_results.each do |result|
188
- puts result.contents
188
+ puts(result.contents)
189
189
  end
190
190
  return
191
191
  end
@@ -195,30 +195,39 @@ class Zoom::Cache
195
195
  if (result.grep_like?)
196
196
  if (result.filename != curr_filename)
197
197
  puts if (curr_filename)
198
- puts @config.hilight_filename(result.filename)
198
+ puts(@config.hilight_filename(result.filename))
199
199
  curr_filename = result.filename
200
200
  end
201
201
 
202
- puts [
203
- @config.hilight_tag("[#{result.tag}]"),
204
- "#{@config.hilight_lineno(result.lineno)}:",
205
- result.match.gsub(
206
- /(#{regex})/i,
207
- @config.hilight_match("\\1")
208
- )
209
- ].join(" ")
202
+ puts(
203
+ [
204
+ @config.hilight_tag("[#{result.tag}]"),
205
+ "#{@config.hilight_lineno(result.lineno)}:",
206
+ result.match.gsub(
207
+ /(#{regex})/i,
208
+ @config.hilight_match("\\1")
209
+ )
210
+ ].join(" ")
211
+ )
210
212
  else
211
213
  if (result.filename)
212
214
  if (result.filename != curr_filename)
213
215
  puts if (curr_filename)
214
- puts @config.hilight_filename(result.filename)
216
+ puts(
217
+ @config.hilight_filename(result.filename)
218
+ )
215
219
  curr_filename = result.filename
216
220
  end
217
221
  end
218
222
 
219
223
  tag = result.tag
220
224
  line = result.contents
221
- puts [@config.hilight_tag("[#{tag}]"), line].join(" ")
225
+ puts(
226
+ [
227
+ @config.hilight_tag("[#{tag}]"),
228
+ line
229
+ ].join(" ")
230
+ )
222
231
  end
223
232
  end
224
233
  end
@@ -79,7 +79,7 @@ class Zoom::Config < JSONConfig
79
79
  begin
80
80
  profiles[name] = Zoom::Profile.from_json(prof)
81
81
  rescue Zoom::Error => e
82
- puts e.message if (display_error)
82
+ puts(e.message) if (display_error)
83
83
  end
84
84
  end
85
85
  return profiles
@@ -52,7 +52,7 @@ class Zoom::Profile < Hash
52
52
  ].join(" ").strip
53
53
 
54
54
  if (header.has_key?("debug") && header["debug"])
55
- puts cmd
55
+ puts(cmd)
56
56
  return ""
57
57
  else
58
58
  return %x(#{cmd})
@@ -14,7 +14,7 @@ class Zoom::Profile::Find < Zoom::Profile
14
14
  ].join(" ").strip
15
15
 
16
16
  if (header.has_key?("debug") && header["debug"])
17
- puts cmd
17
+ puts(cmd)
18
18
  return ""
19
19
  else
20
20
  return %x(#{cmd})
@@ -19,9 +19,9 @@ class AddWish < Djinni::Wish
19
19
  c, n = args.split(" ")
20
20
 
21
21
  if (config.has_profile?(n))
22
- puts "Profile already exists: #{n}"
22
+ puts("Profile already exists: #{n}")
23
23
  elsif (!@classes.has_key?(c))
24
- puts "Class does not exist: #{c}"
24
+ puts("Class does not exist: #{c}")
25
25
  else
26
26
  profiles = config.parse_profiles
27
27
  profiles[n] = Zoom::Profile.profile_by_name(c).new(n)
@@ -47,12 +47,12 @@ class AddWish < Djinni::Wish
47
47
  end
48
48
 
49
49
  def usage
50
- puts "#{aliases.join(", ")} <class> <name>"
51
- puts " #{description}."
50
+ puts("#{aliases.join(", ")} <class> <name>")
51
+ puts(" #{description}.")
52
52
  puts
53
- puts "CLASSES"
53
+ puts("CLASSES")
54
54
  @classes.each do |clas, desc|
55
- puts " #{clas}"
55
+ puts(" #{clas}")
56
56
  end
57
57
  end
58
58
  end
@@ -39,7 +39,7 @@ class ColorWish < Djinni::Wish
39
39
  else
40
40
  c.split(".").each do |color|
41
41
  if (!@colors.include?(color))
42
- puts "Invalid color: #{color}"
42
+ puts("Invalid color: #{color}")
43
43
  return
44
44
  end
45
45
  end
@@ -131,17 +131,17 @@ class ColorWish < Djinni::Wish
131
131
  end
132
132
 
133
133
  def usage
134
- puts "#{aliases.join(", ")} <field> [color]"
135
- puts " #{description}."
134
+ puts("#{aliases.join(", ")} <field> [color]")
135
+ puts(" #{description}.")
136
136
  puts
137
- puts "FIELDS"
137
+ puts("FIELDS")
138
138
  @fields.each do |field, desc|
139
- puts " #{field}"
139
+ puts(" #{field}")
140
140
  end
141
141
  puts
142
- puts "COLORS"
142
+ puts("COLORS")
143
143
  @colors.each do |color|
144
- puts " #{color}"
144
+ puts(" #{color}")
145
145
  end
146
146
  end
147
147
  end
@@ -19,9 +19,9 @@ class CopyWish < Djinni::Wish
19
19
 
20
20
  name, new = args.split(" ")
21
21
  if (!config.has_profile?(name))
22
- puts "Profile does not exist: #{name}"
22
+ puts("Profile does not exist: #{name}")
23
23
  elsif (config.has_profile?(new))
24
- puts "Profile already exists: #{new}"
24
+ puts("Profile already exists: #{new}")
25
25
  else
26
26
  profiles = config.parse_profiles
27
27
  profiles[new] = profiles[name].clone
@@ -51,7 +51,7 @@ class CopyWish < Djinni::Wish
51
51
  end
52
52
 
53
53
  def usage
54
- puts "#{aliases.join(", ")} <name> <new_name>"
55
- puts " #{description}."
54
+ puts("#{aliases.join(", ")} <name> <new_name>")
55
+ puts(" #{description}.")
56
56
  end
57
57
  end
@@ -14,9 +14,9 @@ class DeleteWish < Djinni::Wish
14
14
  profiles = config.parse_profiles
15
15
  args.split(" ").each do |arg|
16
16
  if (!config.has_profile?(arg))
17
- puts "Profile does not exist: #{arg}"
17
+ puts("Profile does not exist: #{arg}")
18
18
  elsif (config.get_current_profile_name == arg)
19
- puts "Can't delete current profile: #{arg}"
19
+ puts("Can't delete current profile: #{arg}")
20
20
  else
21
21
  profiles.delete(arg)
22
22
  end
@@ -45,7 +45,7 @@ class DeleteWish < Djinni::Wish
45
45
  end
46
46
 
47
47
  def usage
48
- puts "#{aliases.join(", ")} <name>...[name]"
49
- puts " #{description}."
48
+ puts("#{aliases.join(", ")} <name>...[name]")
49
+ puts(" #{description}.")
50
50
  end
51
51
  end
@@ -19,7 +19,7 @@ class EditWish < Djinni::Wish
19
19
 
20
20
  config = djinni_env["config"]
21
21
  if (!config.has_profile?(n))
22
- puts "Profile does not exist: #{n}"
22
+ puts("Profile does not exist: #{n}")
23
23
  return
24
24
  end
25
25
 
@@ -43,7 +43,7 @@ class EditWish < Djinni::Wish
43
43
  profile.before(v)
44
44
  when "class"
45
45
  if (!@classes.has_key?(v))
46
- puts "Class does not exist: #{v}"
46
+ puts("Class does not exist: #{v}")
47
47
  return
48
48
  end
49
49
 
@@ -119,12 +119,12 @@ class EditWish < Djinni::Wish
119
119
  end
120
120
 
121
121
  def usage
122
- puts "#{aliases.join(", ")} <name> <field> <value>"
123
- puts " #{description}."
122
+ puts("#{aliases.join(", ")} <name> <field> <value>")
123
+ puts(" #{description}.")
124
124
  puts
125
- puts "FIELDS"
125
+ puts("FIELDS")
126
126
  @fields.each do |field, desc|
127
- puts " #{field}"
127
+ puts(" #{field}")
128
128
  end
129
129
  end
130
130
  end
@@ -19,7 +19,7 @@ class EditorWish < Djinni::Wish
19
19
  end
20
20
 
21
21
  def usage
22
- puts "#{aliases.join(", ")} <value>"
23
- puts " #{description}."
22
+ puts("#{aliases.join(", ")} <value>")
23
+ puts(" #{description}.")
24
24
  end
25
25
  end
@@ -39,10 +39,10 @@ class ListWish < Djinni::Wish
39
39
  first = true
40
40
  profile.to_s.scan(/\S.{0,76}\S(?=\s|$)|\S+/).each do |line|
41
41
  if (first)
42
- puts line
42
+ puts(line)
43
43
  first = false
44
44
  else
45
- puts " #{line}"
45
+ puts(" #{line}")
46
46
  end
47
47
  end
48
48
  end
@@ -54,7 +54,7 @@ class ListWish < Djinni::Wish
54
54
  end
55
55
 
56
56
  def usage
57
- puts "#{aliases.join(", ")} [all]"
58
- puts " #{description}."
57
+ puts("#{aliases.join(", ")} [all]")
58
+ puts(" #{description}.")
59
59
  end
60
60
  end
@@ -19,9 +19,9 @@ class RenameWish < Djinni::Wish
19
19
 
20
20
  old, new = args.split(" ")
21
21
  if (!config.has_profile?(old))
22
- puts "Profile does not exist: #{old}"
22
+ puts("Profile does not exist: #{old}")
23
23
  elsif (config.has_profile?(new))
24
- puts "Profile already exists: #{new}"
24
+ puts("Profile already exists: #{new}")
25
25
  else
26
26
  profiles = config.parse_profiles
27
27
  profiles[new] = profiles.delete(old)
@@ -63,7 +63,7 @@ class RenameWish < Djinni::Wish
63
63
  end
64
64
 
65
65
  def usage
66
- puts "#{aliases.join(", ")} <old_name> <new_name>"
67
- puts " #{description}."
66
+ puts("#{aliases.join(", ")} <old_name> <new_name>")
67
+ puts(" #{description}.")
68
68
  end
69
69
  end
@@ -34,7 +34,7 @@ class ResetWish < Djinni::Wish
34
34
  end
35
35
 
36
36
  def usage
37
- puts "#{aliases.join(", ")}"
38
- puts " #{description}."
37
+ puts("#{aliases.join(", ")}")
38
+ puts(" #{description}.")
39
39
  end
40
40
  end
@@ -18,7 +18,7 @@ class UseWish < Djinni::Wish
18
18
  config = djinni_env["config"]
19
19
 
20
20
  if (!config.has_profile?(args))
21
- puts "Profile does not exist: #{args}"
21
+ puts("Profile does not exist: #{args}")
22
22
  return
23
23
  end
24
24
 
@@ -55,7 +55,7 @@ class UseWish < Djinni::Wish
55
55
  end
56
56
 
57
57
  def usage
58
- puts "#{aliases.join(", ")} <name>"
59
- puts " #{description}."
58
+ puts("#{aliases.join(", ")} <name>")
59
+ puts(" #{description}.")
60
60
  end
61
61
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-zoom
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.4.0
4
+ version: 5.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Whittaker