forte 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/forte/base.rb +1 -0
- data/lib/forte/git.rb +10 -2
- 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: 877ec9d6eee6d9b7c328cdb1d7703446ebe39190
|
4
|
+
data.tar.gz: 97d852ccfdee9469fc78ac9fe28f2add71a0f69a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7cb46d4601cc855e86828e8b493d7609eb3602ecd0b2f42f887bd03a528c908940e14a57722e149450235ec3304ecf04b481eae48eac932878c5280b90c8558
|
7
|
+
data.tar.gz: 55a069eff3cf0e37028be4de61424a47bdd73a252840611c2a484fdf547adfc9dd2347b782ce05721bb8095d73667540305ef49e0957cf320dbb8a335d3a468f
|
data/lib/forte/base.rb
CHANGED
data/lib/forte/git.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
require 'fileutils'
|
2
2
|
class Git
|
3
3
|
class << self
|
4
|
-
TMP_DIR = File.join(Dir.pwd, '.
|
4
|
+
TMP_DIR = File.join(Dir.pwd, '.forte')
|
5
5
|
|
6
6
|
def clone(uri)
|
7
7
|
FileUtils.mkdir_p(TMP_DIR)
|
8
|
-
cmd = "git clone #{uri} #{TMP_DIR}"
|
8
|
+
cmd = "git clone -q #{complete_uri(uri)} #{TMP_DIR}"
|
9
9
|
system(cmd)
|
10
10
|
TMP_DIR
|
11
11
|
end
|
@@ -13,5 +13,13 @@ class Git
|
|
13
13
|
def cleanup
|
14
14
|
FileUtils.rm_rf(TMP_DIR)
|
15
15
|
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
def complete_uri(uri)
|
20
|
+
return uri if Dir.exist?("#{uri}/.git")
|
21
|
+
return uri if uri.start_with?('http')
|
22
|
+
"https://github.com/#{uri}.git"
|
23
|
+
end
|
16
24
|
end
|
17
25
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: forte
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Yockey
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-01-
|
12
|
+
date: 2014-01-10 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description:
|
15
15
|
email:
|