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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c0c255b21dd2c8b70a5c77a0a129376d6d06be8d
4
- data.tar.gz: 34c4e71f516bb23d9fa95cacfbfd32749c2b03e7
3
+ metadata.gz: 31dafd53ad29901929b5fa89d24731bffb430d03
4
+ data.tar.gz: 9740cac7a9af58140c916ec4023df2c22064609f
5
5
  SHA512:
6
- metadata.gz: e8bbefd140c69b766b55e75a320031f36163e2c23a0756dda1cd1ec2809161d35370e30a2c8191701c9178fd85f7f4d5c5b359233a40613bad3cb77d1841264c
7
- data.tar.gz: dfe561aaef0c7456aaf06e1e961ece322ecc4d35dabaca1a54efa7b83a7a1e0dce56f624248c306fbdc56bb46545f1a4d7a27e75dd56c39728cf9e573cd4e4e7
6
+ metadata.gz: bdc9a523c5cf02582c5f6e06015fedd3479e355417bf9afb136c261237bb1faf5f4f4038b35b4a94aba0a9899d81ab65f9b296ceb8961178327d567a4bc0ba42
7
+ data.tar.gz: a3939c03be509d5249b9e634e7b7bc8fb5331252a31e622323d70a9a8f72885ea51e63def9691a6a129a15de77f6f7ddeb41262fc6e7043853c7a7751c17e8ac
data/bin/vundle CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  require 'rubygems'
4
4
  require 'commander/import'
5
- $:.unshift(File.expand_path('../../lib', __FILE__))
5
+ $LOAD_PATH.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
6
6
  require 'vundle_cli'
7
7
 
8
8
  program :version, VundleCli::VERSION
@@ -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
@@ -1,3 +1,3 @@
1
1
  module VundleCli
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
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.2
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