turnstyl 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +6 -14
- data/Gemfile +1 -1
- data/README.md +9 -12
- data/lib/turnstyl/client/client.rb +3 -3
- data/spec/turnstyl/client/client_spec.rb +1 -1
- data/turnstyl.gemspec +1 -1
- metadata +14 -14
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
MWQ3YjQwMWE0NzkxNjhiMzAwM2E3M2FhNTA3NjJmMjkyNTFmNjVkYmM1MDM2
|
10
|
-
YTJlYjhlZTk1MTQ5YTNkOGFkYjdlNWQzZGIyYzJlZGY0OGQzODgwMDhlOGUw
|
11
|
-
MGNiZGJhZWQyZGExZWFjZmM3OGZkMzNmODJjMzExOTA1ZDNiMzA=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
ZjI2MDY0NTkxZjNhYzAwNDNhZDgwY2EzZjZiYjJjMzE3NGUxNWFhZTIxZjZj
|
14
|
-
ZDVkYmJmZTg2MjQwYmJmZTExZTU0ODcxOTBhYTk1NGMzNmNiZjQ2ZWQxYmZh
|
15
|
-
NGVhY2U3MjdkZWJlY2RhMWE0MjBlNjI2MDRlN2FmYWNhNDk1NjA=
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 163b6768ad2a7bc095bf317fcf2bad4db510467a
|
4
|
+
data.tar.gz: f06e1ef11185205d9e7410ffb13cacc2bc48c549
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 20cd80b25fe91386615bd3d850567be5e556515de628fe1a4eb5467ff5234eb62b089133850ddca8d7e4e17bba20378265b9b0e9fac52ba12cce18238b02a131
|
7
|
+
data.tar.gz: 229cdcdd1adc716cc57107421d5330310a668b09f2d09315969a9b5d06cdf65d7c0545c15d11392138c50f1593f90147e8bcf1db077bd7348dcb5442534f8903
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,26 +1,23 @@
|
|
1
|
-
# Turnstyl
|
1
|
+
# Turnstyl
|
2
2
|
|
3
3
|
[![Build Status](https://travis-ci.org/Tranquility/turnstyl.png)](https://travis-ci.org/Tranquility/turnstyl)
|
4
4
|
|
5
|
-
Commandline utility for managing ssh access
|
5
|
+
Commandline utility for managing ssh access. At the moment turnstyl uses the github API to add the github users' public keys to your ```~/.ssh/authorized_keys``` file. It does this for each of the users listed in your ```.turnstylrc``` file. It won't overwrite your existing file. If an ```~/.ssh/authorized_keys``` file already exists it asks you whether you want to overwrite it or backup the old one.
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
9
|
-
$ gem install turnstyl
|
9
|
+
$ gem install turnstyl
|
10
10
|
|
11
11
|
## Usage
|
12
12
|
|
13
|
-
|
14
|
-
in which you list the github users that are allowed
|
15
|
-
|
13
|
+
The turnstyl command expects a config file in your home folder named
|
14
|
+
".turnstylrc" in which you list the github users that are allowed
|
15
|
+
to access your system.
|
16
16
|
|
17
17
|
userlist = [ "githubuser1", "githubuser2", "...", "githubuser99" ]
|
18
18
|
|
19
19
|
|
20
|
-
##
|
20
|
+
## Future
|
21
21
|
|
22
|
-
|
23
|
-
|
24
|
-
3. Commit your changes (`git commit -am 'Add some feature'`)
|
25
|
-
4. Push to the branch (`git push origin my-new-feature`)
|
26
|
-
5. Create new Pull Request
|
22
|
+
- multiple host/server support
|
23
|
+
- support for non-github service
|
@@ -8,13 +8,13 @@ module Turnstyl
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def initialize
|
11
|
-
@config_path = File.expand_path(Client.home_folder+"/.
|
11
|
+
@config_path = File.expand_path(Client.home_folder+"/.turnstylrc")
|
12
12
|
if config_file_missing?
|
13
13
|
puts <<-TEXT
|
14
14
|
|
15
15
|
Unable to run without a config file.
|
16
16
|
|
17
|
-
Try something like this in ~/.
|
17
|
+
Try something like this in ~/.turnstylrc
|
18
18
|
|
19
19
|
userlist = [ "githubuser1", "githubuser2", "...", "githubuser99" ]
|
20
20
|
|
@@ -74,7 +74,7 @@ Try something like this in ~/.turnstyl_config
|
|
74
74
|
end
|
75
75
|
|
76
76
|
def config_file_missing?
|
77
|
-
!File.exist? Client.home_folder+"/.
|
77
|
+
!File.exist? Client.home_folder+"/.turnstylrc"
|
78
78
|
end
|
79
79
|
|
80
80
|
def config_changed?
|
@@ -5,7 +5,7 @@ module Turnstyl
|
|
5
5
|
describe Client do
|
6
6
|
let(:dummy_home) { base_path+'/spec/dummy_home_folder' }
|
7
7
|
let(:key_file) { dummy_home+'/.ssh/authorized_keys' }
|
8
|
-
let(:config_file) { dummy_home+'/.
|
8
|
+
let(:config_file) { dummy_home+'/.turnstylrc' }
|
9
9
|
let(:turnstyl_client) {Client.new}
|
10
10
|
|
11
11
|
before do
|
data/turnstyl.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "turnstyl"
|
7
|
-
spec.version = "0.
|
7
|
+
spec.version = "0.2.0"
|
8
8
|
spec.authors = ["Ole Reifschneider", "Chris Floess"]
|
9
9
|
spec.email = ["mail@ole-reifschneider.de", "skeptikos@gmail.com"]
|
10
10
|
spec.description = %q{Commandline utility for managing ssh access}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: turnstyl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ole Reifschneider
|
@@ -9,48 +9,48 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-09-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rest-client
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- -
|
18
|
+
- - '>='
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: '0'
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- -
|
25
|
+
- - '>='
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '0'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: json
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- -
|
32
|
+
- - '>='
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: '0'
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- -
|
39
|
+
- - '>='
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '0'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: toml-rb
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- -
|
46
|
+
- - '>='
|
47
47
|
- !ruby/object:Gem::Version
|
48
48
|
version: '0'
|
49
49
|
type: :runtime
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
|
-
- -
|
53
|
+
- - '>='
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: '0'
|
56
56
|
- !ruby/object:Gem::Dependency
|
@@ -71,28 +71,28 @@ dependencies:
|
|
71
71
|
name: rake
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
|
-
- -
|
74
|
+
- - '>='
|
75
75
|
- !ruby/object:Gem::Version
|
76
76
|
version: '0'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
79
|
version_requirements: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
|
-
- -
|
81
|
+
- - '>='
|
82
82
|
- !ruby/object:Gem::Version
|
83
83
|
version: '0'
|
84
84
|
- !ruby/object:Gem::Dependency
|
85
85
|
name: rspec
|
86
86
|
requirement: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
|
-
- -
|
88
|
+
- - '>='
|
89
89
|
- !ruby/object:Gem::Version
|
90
90
|
version: '0'
|
91
91
|
type: :development
|
92
92
|
prerelease: false
|
93
93
|
version_requirements: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
|
-
- -
|
95
|
+
- - '>='
|
96
96
|
- !ruby/object:Gem::Version
|
97
97
|
version: '0'
|
98
98
|
description: Commandline utility for managing ssh access
|
@@ -128,12 +128,12 @@ require_paths:
|
|
128
128
|
- lib
|
129
129
|
required_ruby_version: !ruby/object:Gem::Requirement
|
130
130
|
requirements:
|
131
|
-
- -
|
131
|
+
- - '>='
|
132
132
|
- !ruby/object:Gem::Version
|
133
133
|
version: '0'
|
134
134
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- -
|
136
|
+
- - '>='
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
139
|
requirements: []
|