pvim 0.0.1 → 0.0.2
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/lib/pvim/plugin.rb +6 -0
- data/lib/pvim/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e23421fa7550e9b6582975999ed19cf497191d0
|
4
|
+
data.tar.gz: b664311e10c23488c15a8a3a49a10afb062a89f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3376d67a9f779fd81e6ac358c0afa77a05087844bc1b7df69732f5078d422c7aa6ed955b14ce0f859a254ad805c8bc04d27347819dcbaa183fb22cb5795bbe5c
|
7
|
+
data.tar.gz: 953138d333a88c1bb74eb01574f9b6fc31c655eaed781b44b8f4fc661fbdfbf3d8dfe75cc4fad7a46537c17b52579614429d5cc40f919ef6b005e95e7ad2c994
|
data/lib/pvim/plugin.rb
CHANGED
@@ -29,6 +29,7 @@ module Pvim
|
|
29
29
|
|
30
30
|
desc 'add URL', 'Add vim plugins'
|
31
31
|
def add(url)
|
32
|
+
url = add_github_prefix(url)
|
32
33
|
check_url(url)
|
33
34
|
inside pvim do
|
34
35
|
empty_directory bundle_dir
|
@@ -38,6 +39,7 @@ module Pvim
|
|
38
39
|
|
39
40
|
desc 'remove URL', 'Remove vim plugins'
|
40
41
|
def remove(url)
|
42
|
+
url = add_github_prefix(url)
|
41
43
|
check_url(url)
|
42
44
|
if plugin = find_plugin(url)
|
43
45
|
inside pvim do
|
@@ -106,6 +108,10 @@ module Pvim
|
|
106
108
|
@plugins
|
107
109
|
end
|
108
110
|
|
111
|
+
def add_github_prefix(url)
|
112
|
+
return "https://github.com/#{url}" unless url.match(/^https?\:\/\/github\.com/)
|
113
|
+
end
|
114
|
+
|
109
115
|
def check_url(url)
|
110
116
|
unless is_github_url?(url)
|
111
117
|
say "URL must be a valid github url"
|
data/lib/pvim/version.rb
CHANGED