forte 0.0.2 → 0.0.4
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/forte.rb +3 -1
- data/lib/forte/base.rb +4 -3
- data/lib/forte/repo_location.rb +14 -0
- metadata +35 -6
- data/lib/forte/git.rb +0 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58d433c71298a72b1720bfbf938efaa6dea5c913
|
4
|
+
data.tar.gz: 595e45330f7cd8d022ce9717cc5b25877f8d484a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c9916214685f5334bfef7495ef8af861b035432b9367bde998e3e14a84423a584d8b255b598d3acb25841f80665629b7dc24914574a95145715d4ed40ad296d
|
7
|
+
data.tar.gz: c6401450d0e0a85ed1a68e1d608f78a036b7903de22f711468076e317c43a3fb326319f87351622608880e29e3b6b8816bb5d8373bb687a0f34c074bfa3e868f
|
data/lib/forte.rb
CHANGED
data/lib/forte/base.rb
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
class Base < Thor
|
2
2
|
desc "print", "Prints the public keys to STDOUT"
|
3
3
|
def print(uri)
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
loc = RepoLocation.new(uri)
|
5
|
+
repo = Git.clone(loc.uri, File.join(Dir.pwd, './.tmp'))
|
6
|
+
puts AuthorizedKeys.build(repo.dir.path)
|
7
|
+
FileUtils.rm_rf(repo.dir.path)
|
7
8
|
end
|
8
9
|
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.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Yockey
|
@@ -9,9 +9,38 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-01-
|
13
|
-
dependencies:
|
14
|
-
|
12
|
+
date: 2014-01-14 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: thor
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - ~>
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: '0.18'
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ~>
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '0.18'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: git
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - ~>
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '1.2'
|
35
|
+
type: :runtime
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ~>
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '1.2'
|
42
|
+
description: 'Create an authorized_keys file for a shared shell account from a repository
|
43
|
+
of public key files '
|
15
44
|
email:
|
16
45
|
- mike@heysparkbox.com
|
17
46
|
- ryan@heysparkbox.com
|
@@ -24,9 +53,9 @@ files:
|
|
24
53
|
- lib/forte.rb
|
25
54
|
- lib/forte/authorized_keys.rb
|
26
55
|
- lib/forte/base.rb
|
27
|
-
- lib/forte/git.rb
|
28
56
|
- lib/forte/keyfile.rb
|
29
|
-
|
57
|
+
- lib/forte/repo_location.rb
|
58
|
+
homepage: https://github.com/yock/forte
|
30
59
|
licenses:
|
31
60
|
- MIT
|
32
61
|
metadata: {}
|
data/lib/forte/git.rb
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
require 'fileutils'
|
2
|
-
class Git
|
3
|
-
class << self
|
4
|
-
TMP_DIR = File.join(Dir.pwd, '.forte')
|
5
|
-
|
6
|
-
def clone(uri)
|
7
|
-
FileUtils.mkdir_p(TMP_DIR)
|
8
|
-
cmd = "git clone -q #{complete_uri(uri)} #{TMP_DIR}"
|
9
|
-
system(cmd)
|
10
|
-
TMP_DIR
|
11
|
-
end
|
12
|
-
|
13
|
-
def cleanup
|
14
|
-
FileUtils.rm_rf(TMP_DIR)
|
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
|
24
|
-
end
|
25
|
-
end
|