vundle-cli 0.0.2 → 0.0.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.
- checksums.yaml +4 -4
- data/bin/vundle +1 -1
- data/lib/vundle_cli/helpers.rb +27 -0
- data/lib/vundle_cli/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 31dafd53ad29901929b5fa89d24731bffb430d03
|
4
|
+
data.tar.gz: 9740cac7a9af58140c916ec4023df2c22064609f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bdc9a523c5cf02582c5f6e06015fedd3479e355417bf9afb136c261237bb1faf5f4f4038b35b4a94aba0a9899d81ab65f9b296ceb8961178327d567a4bc0ba42
|
7
|
+
data.tar.gz: a3939c03be509d5249b9e634e7b7bc8fb5331252a31e622323d70a9a8f72885ea51e63def9691a6a129a15de77f6f7ddeb41262fc6e7043853c7a7751c17e8ac
|
data/bin/vundle
CHANGED
@@ -0,0 +1,27 @@
|
|
1
|
+
module VundleCli
|
2
|
+
module Helpers
|
3
|
+
module_function
|
4
|
+
|
5
|
+
def file_validate(fpath, check_dir = false)
|
6
|
+
fpath = File.expand_path(fpath)
|
7
|
+
|
8
|
+
unless File.exist?(fpath)
|
9
|
+
raise ArgumentError.new("#{fpath} does not exist")
|
10
|
+
end
|
11
|
+
|
12
|
+
fpath = File.readlink(fpath) if File.symlink?(fpath)
|
13
|
+
|
14
|
+
if check_dir
|
15
|
+
unless File.directory?(fpath)
|
16
|
+
raise ArgumentError.new("#{fpath} is not a directory")
|
17
|
+
end
|
18
|
+
else
|
19
|
+
unless File.file?(fpath)
|
20
|
+
raise ArgumentError.new("#{fpath} is not a valid file")
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
fpath
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
data/lib/vundle_cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vundle-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bao Pham
|
@@ -69,6 +69,7 @@ files:
|
|
69
69
|
- bin/vundle
|
70
70
|
- lib/vundle_cli.rb
|
71
71
|
- lib/vundle_cli/finder.rb
|
72
|
+
- lib/vundle_cli/helpers.rb
|
72
73
|
- lib/vundle_cli/uninstaller.rb
|
73
74
|
- lib/vundle_cli/version.rb
|
74
75
|
- vundle-cli.gemspec
|