warp-dir 1.1.5 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/Rakefile +12 -7
- data/bin/warp-dir.bash +23 -4
- data/lib/warp/dir/app/cli.rb +0 -1
- data/lib/warp/dir/version.rb +1 -1
- data/warp-dir.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce99a9d0405623c7ea50b88e363f95309c9b1773
|
4
|
+
data.tar.gz: 149746d9e2645ffaff1cb7abc422a7e3b508aafc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47407f8fe071a1d127137f358aadb7a19c626522cf3bc21bf96592fe2bb378023de3a224080f5165a28f59c209d49f0fdde3575604fe12adcd0738f9eafee2f1
|
7
|
+
data.tar.gz: a67e48b9e831686f47853d14ce8b4bacf158fa8091cfafb9c7ebd574772054ef4c42c494ad4da7ae5c0b2e019b6ed69f89b074d72edf932a4d5a9e07e6f4e75c
|
data/.travis.yml
CHANGED
data/Rakefile
CHANGED
@@ -19,10 +19,11 @@ task :reinstall do
|
|
19
19
|
EOF
|
20
20
|
end
|
21
21
|
|
22
|
-
namespace :
|
23
|
-
desc '
|
22
|
+
namespace :development do
|
23
|
+
desc 'Setup temporary Gemfile, install all dependencies, and remove Gemfile'
|
24
24
|
task :install => [:setup, :cleanup]
|
25
25
|
|
26
|
+
desc 'Setup temporary Gemfile and install all dependencies.'
|
26
27
|
task :setup do
|
27
28
|
sh %q{
|
28
29
|
echo "source 'https://rubygems.org'; gemspec" > Gemfile
|
@@ -42,14 +43,14 @@ namespace :gemfile do
|
|
42
43
|
end
|
43
44
|
desc "Invoke Bundler's 'release' task to push the gem to RubyGems.org"
|
44
45
|
task :release => [ :setup, :load ] do
|
45
|
-
Rake::Task[
|
46
|
-
Rake::Task[
|
46
|
+
Rake::Task['release'].invoke
|
47
|
+
Rake::Task['development:cleanup'].invoke
|
47
48
|
end
|
48
49
|
|
49
|
-
desc
|
50
|
+
desc 'Package and install the gem locally'
|
50
51
|
task :install => [ :setup, :load ] do
|
51
|
-
Rake::Task[
|
52
|
-
Rake::Task[
|
52
|
+
Rake::Task['install:local'].invoke
|
53
|
+
Rake::Task['development:cleanup'].invoke
|
53
54
|
end
|
54
55
|
end
|
55
56
|
end
|
@@ -63,4 +64,8 @@ begin
|
|
63
64
|
rescue LoadError
|
64
65
|
end
|
65
66
|
|
67
|
+
task :spec => [ 'development:setup' ] do
|
68
|
+
Rake::Task['development:cleanup'].invoke
|
69
|
+
end
|
70
|
+
|
66
71
|
task :default => [:spec]
|
data/bin/warp-dir.bash
CHANGED
@@ -34,13 +34,32 @@ wd_not_found() {
|
|
34
34
|
}
|
35
35
|
|
36
36
|
_wd() {
|
37
|
-
local
|
37
|
+
local WD_OPTS WD_POINTS cur prev
|
38
|
+
|
39
|
+
cur="${COMP_WORDS[COMP_CWORD]}"
|
40
|
+
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
38
41
|
|
39
42
|
COMPREPLY=()
|
40
|
-
_get_comp_words_by_ref cur
|
41
43
|
|
42
|
-
|
43
|
-
|
44
|
+
# Only perform completion if the current word starts with a dash ('-'),
|
45
|
+
# meaning that the user is trying to complete an option.
|
46
|
+
if [[ ${cur} == -* ]] ; then
|
47
|
+
# COMPREPLY is the array of possible completions, generated with
|
48
|
+
WD_COMP_OPTIONS=$(wd --help | awk 'BEGIN{FS="--"}{print "--" $2}' | sed -E '/^--$/d' | egrep -v ']|help' | egrep -- "${cur}" | awk '{if ($1 != "") { printf "%s\n", $1} } ')
|
49
|
+
else
|
50
|
+
WD_COMMANDS="add ls remove warp install help list"
|
51
|
+
if [[ -z "${cur}" ]] ; then
|
52
|
+
WD_POINTS=$(wd list --no-color | awk '{ print $1 }')
|
53
|
+
WD_DIRS=$(ls -1p | grep '/')
|
54
|
+
else
|
55
|
+
WD_POINTS=$(wd list --no-color | awk '{ print $1 }' | egrep -e "^${cur}")
|
56
|
+
WD_DIRS=$(ls -1p | grep '/' | egrep -e "^${cur}")
|
57
|
+
fi
|
58
|
+
WD_COMP_OPTIONS="$WD_POINTS $WD_DIRS"
|
59
|
+
fi
|
60
|
+
[[ $COMP_CWORD == 1 ]] && WD_COMP_OPTIONS="${WD_COMP_OPTIONS} ${WD_COMMANDS}"
|
61
|
+
COMPREPLY=( $(compgen -W "${WD_COMP_OPTIONS}" -- ${cur}) )
|
62
|
+
return 0
|
44
63
|
}
|
45
64
|
|
46
65
|
complete -F _wd wd
|
data/lib/warp/dir/app/cli.rb
CHANGED
data/lib/warp/dir/version.rb
CHANGED
data/warp-dir.gemspec
CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
|
|
23
23
|
s.required_ruby_version = '>= 2.0.0'
|
24
24
|
s.required_rubygems_version = '>= 1.3.6'
|
25
25
|
|
26
|
-
s.
|
26
|
+
s.add_dependency('slop', '~> 4.2')
|
27
27
|
|
28
28
|
s.add_development_dependency 'codeclimate-test-reporter', '~> 0.5'
|
29
29
|
s.add_development_dependency 'bundler', '~> 1.11'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: warp-dir
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Konstantin Gredeskoul
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-04-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: slop
|