tmbundle-manager 0.1.0.pre4 → 0.1.0.pre5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tmbundle/bundle_name.rb +14 -16
- data/lib/tmbundle/manager/version.rb +1 -1
- data/lib/tmbundle.rb +1 -0
- 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: c1094c1b3f2b72fe2132b3b3ff03a6099ff4c187
|
4
|
+
data.tar.gz: 18afd61f28a92d0706061e00bb7a3f7de4284de5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04b214c1fe8fe3904aca559fd8c046b327c063506e1414863c10c5b3965f46f18934f0e5e8981a3e2854588a8d218f19a2316b4d49907107c3bce908e3431479
|
7
|
+
data.tar.gz: da1dd1dd75bb2572ab4baad2651aafde2e3876edb5efc9349b341f18590604d5873dc6e5ec670a0b78f20c4117529500de1cf159870fc49f3d270a132cab8483
|
data/lib/tmbundle/bundle_name.rb
CHANGED
@@ -1,22 +1,20 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
end
|
1
|
+
class TMBundle::BundleName
|
2
|
+
def initialize(name)
|
3
|
+
@name = name
|
4
|
+
end
|
6
5
|
|
7
|
-
|
8
|
-
|
6
|
+
attr_reader :name
|
7
|
+
private :name
|
9
8
|
|
10
|
-
|
11
|
-
|
12
|
-
|
9
|
+
def install_name
|
10
|
+
File.basename(name.gsub(/([\.\-_]tmbundle)?$/i, '.tmbundle'))
|
11
|
+
end
|
13
12
|
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
def repo_name
|
14
|
+
name+'.tmbundle' unless name =~ /([\.\-_]tmbundle)$/i
|
15
|
+
end
|
17
16
|
|
18
|
-
|
19
|
-
|
20
|
-
end
|
17
|
+
def git_url
|
18
|
+
"https://github.com/#{repo_name}.git"
|
21
19
|
end
|
22
20
|
end
|
data/lib/tmbundle.rb
CHANGED
@@ -49,6 +49,7 @@ class TMBundle < Thor
|
|
49
49
|
|
50
50
|
desc 'install USER/BUNDLE', 'Install a bundle from GitHub (e.g. tmb install elia/bundler)'
|
51
51
|
def install name
|
52
|
+
require 'tmbundle/bundle_name'
|
52
53
|
name = BundleName.new(name)
|
53
54
|
install_path = bundles_dir.join(name.install_name).to_s
|
54
55
|
system('git', 'clone', name.git_url, install_path)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tmbundle-manager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0.
|
4
|
+
version: 0.1.0.pre5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elia Schito
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|