utils 0.51.0 → 0.52.0

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: 4e185acac664741314fb5a1f58266668dbb52aa2658d1ded38fd81c28de31871
4
- data.tar.gz: 45275a54c3ae135e6414093aeb3b954b5bcc2eb5bfcfe34aecbb624a8d7c79a9
3
+ metadata.gz: dfade6a59e0995d7ee7477ccdafdbda0c14e9797a37c55d4d112f30b31fc2e76
4
+ data.tar.gz: c449da7722535dfa051df409388554840e5c146249a06f4bf2b758aada7d492c
5
5
  SHA512:
6
- metadata.gz: f10fced5595d91ec7f9dd873cfb94634f13e1871c428a7ea8f25e63ea71e054946600aa042e1a2739e99a57bee6d2cae79b3cb4e9f2722aa788e0b7c6c695123
7
- data.tar.gz: c5f1327f9b910cfe137835356c7e42736e88c01348861a3962e333519040b7783fd01672473ac697f4e43ea612fba539b6db85df501474f51999496056acae3a
6
+ metadata.gz: 588351709d351fe808643d54adf8afa17f89235650bbd54d645fe7a4977c6a31eaedd6fe3b4d0c84907d487e019b098ed6020307c08f327fe5f249c3c6298e6e
7
+ data.tar.gz: 04ea3235073f97bf229be082680eadfa366315bc8ea4bba8230808bc87679e82ea40b9b63575f5a7a90e39f2c3ad817e41f00717c8fbccd12959ecd9c98d6af4
data/bin/discover CHANGED
@@ -6,6 +6,7 @@ require 'tins/xt'
6
6
  include Tins::GO
7
7
  require 'search_ui'
8
8
  include SearchUI
9
+ require 'pathname'
9
10
 
10
11
  def edit_files(*paths, pick: false, wait: true)
11
12
  editor = Utils::Editor.new
@@ -46,6 +47,8 @@ Options are
46
47
  -v be verbose
47
48
  -n NUMBER the first NUMBER of matches is returned
48
49
  -s search by interactively inputting PATTERN
50
+ -l list all paths in cache relative to current directory
51
+ -L list all paths in cahce as absolute pathes from root
49
52
  -h display this help
50
53
 
51
54
  Version is #{File.basename($0)} #{Utils::VERSION}.
@@ -53,7 +56,7 @@ Version is #{File.basename($0)} #{Utils::VERSION}.
53
56
  exit 1
54
57
  end
55
58
 
56
- args = go 'n:I:i:a:p:lcreEvdsDh', defaults: { ?a => '\\w' }
59
+ args = go 'n:I:i:a:p:lLcreEvdsDh', defaults: { ?a => '\\w' }
57
60
  args[?h] and usage
58
61
 
59
62
  Term::ANSIColor.coloring = (STDIN.tty? && ENV['TERM'] !~ /dumb/) && !args[?c]
@@ -112,7 +115,11 @@ search = -> * {
112
115
 
113
116
  case
114
117
  when args[?l]
115
- puts finder.().search_index.output
118
+ puts finder.().search_index.paths.map {
119
+ Pathname.new(_1).expand_path.relative_path_from(Dir.pwd)
120
+ }
121
+ when args[?L]
122
+ puts finder.().search_index.paths
116
123
  when args[?s]
117
124
  search.()
118
125
  when args[?E]
data/lib/utils/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Utils
2
2
  # Utils version
3
- VERSION = '0.51.0'
3
+ VERSION = '0.52.0'
4
4
  VERSION_ARRAY = VERSION.split('.').map(&:to_i) # :nodoc:
5
5
  VERSION_MAJOR = VERSION_ARRAY[0] # :nodoc:
6
6
  VERSION_MINOR = VERSION_ARRAY[1] # :nodoc:
data/utils.gemspec CHANGED
@@ -1,9 +1,9 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: utils 0.51.0 ruby lib
2
+ # stub: utils 0.52.0 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "utils".freeze
6
- s.version = "0.51.0".freeze
6
+ s.version = "0.52.0".freeze
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
9
9
  s.require_paths = ["lib".freeze]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.51.0
4
+ version: 0.52.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Frank