authorized_keys 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.rspec +1 -0
- data/Gemfile +13 -0
- data/Gemfile.lock +28 -0
- data/LICENSE.txt +20 -0
- data/README.rdoc +26 -0
- data/Rakefile +49 -0
- data/VERSION +1 -0
- data/authorized_keys.gemspec +68 -0
- data/lib/authorized_keys/file.rb +40 -0
- data/lib/authorized_keys/key.rb +37 -0
- data/lib/authorized_keys.rb +2 -0
- data/spec/authorized_keys/file_spec.rb +79 -0
- data/spec/authorized_keys/key_spec.rb +82 -0
- data/spec/fixtures/keys/1.pub +1 -0
- data/spec/fixtures/keys/2.pub +1 -0
- data/spec/fixtures/keys/3.pub +1 -0
- data/spec/fixtures/keys/4.pub +1 -0
- data/spec/spec_helper.rb +12 -0
- data/spec/support/fixtures.rb +7 -0
- metadata +120 -0
data/.document
ADDED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/Gemfile
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
source "http://rubygems.org"
|
2
|
+
# Add dependencies required to use your gem here.
|
3
|
+
# Example:
|
4
|
+
# gem "activesupport", ">= 2.3.5"
|
5
|
+
|
6
|
+
# Add dependencies to develop your gem here.
|
7
|
+
# Include everything needed to run rake, tests, features, etc.
|
8
|
+
group :development do
|
9
|
+
gem "rspec", "~> 2.3.0"
|
10
|
+
gem "bundler", "~> 1.0.0"
|
11
|
+
gem "jeweler", "~> 1.6.4"
|
12
|
+
gem "rcov", ">= 0"
|
13
|
+
end
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
diff-lcs (1.1.3)
|
5
|
+
git (1.2.5)
|
6
|
+
jeweler (1.6.4)
|
7
|
+
bundler (~> 1.0)
|
8
|
+
git (>= 1.2.5)
|
9
|
+
rake
|
10
|
+
rake (0.9.2)
|
11
|
+
rcov (0.9.10)
|
12
|
+
rspec (2.3.0)
|
13
|
+
rspec-core (~> 2.3.0)
|
14
|
+
rspec-expectations (~> 2.3.0)
|
15
|
+
rspec-mocks (~> 2.3.0)
|
16
|
+
rspec-core (2.3.1)
|
17
|
+
rspec-expectations (2.3.0)
|
18
|
+
diff-lcs (~> 1.1.2)
|
19
|
+
rspec-mocks (2.3.0)
|
20
|
+
|
21
|
+
PLATFORMS
|
22
|
+
ruby
|
23
|
+
|
24
|
+
DEPENDENCIES
|
25
|
+
bundler (~> 1.0.0)
|
26
|
+
jeweler (~> 1.6.4)
|
27
|
+
rcov
|
28
|
+
rspec (~> 2.3.0)
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2011 Bodaniel Jeanes
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
= authorized_keys
|
2
|
+
|
3
|
+
Library for managing `authorized_keys` files.
|
4
|
+
|
5
|
+
I have several projects which all ended up needing to manage authorized_keys, so I decided to just write a separate OSS library to leverage instead of duplicating that logic everywhere.
|
6
|
+
|
7
|
+
Hopefully it's helpful to somebody else... Enjoy! :)
|
8
|
+
|
9
|
+
== Caveats
|
10
|
+
|
11
|
+
* It doesn't do anything special to lock modifications to the file, so you wouldn't want to have multiple processes trying to modify this file.
|
12
|
+
|
13
|
+
== Contributing to authorized_keys
|
14
|
+
|
15
|
+
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
|
16
|
+
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
|
17
|
+
* Fork the project
|
18
|
+
* Start a feature/bugfix branch
|
19
|
+
* Commit and push until you are happy with your contribution
|
20
|
+
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
21
|
+
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
22
|
+
|
23
|
+
== Copyright
|
24
|
+
|
25
|
+
Copyright (c) 2011 Bodaniel Jeanes. See LICENSE.txt for further details.
|
26
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'bundler'
|
5
|
+
begin
|
6
|
+
Bundler.setup(:default, :development)
|
7
|
+
rescue Bundler::BundlerError => e
|
8
|
+
$stderr.puts e.message
|
9
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
10
|
+
exit e.status_code
|
11
|
+
end
|
12
|
+
require 'rake'
|
13
|
+
|
14
|
+
require 'jeweler'
|
15
|
+
Jeweler::Tasks.new do |gem|
|
16
|
+
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
17
|
+
gem.name = "authorized_keys"
|
18
|
+
gem.homepage = "http://github.com/bjeanes/authorized_keys"
|
19
|
+
gem.license = "MIT"
|
20
|
+
gem.summary = %Q{Library to manage authorized_keys files}
|
21
|
+
gem.description = %Q{Library to manage authorized_keys files}
|
22
|
+
gem.email = "me@bjeanes.com"
|
23
|
+
gem.authors = ["Bodaniel Jeanes"]
|
24
|
+
# dependencies defined in Gemfile
|
25
|
+
end
|
26
|
+
Jeweler::RubygemsDotOrgTasks.new
|
27
|
+
|
28
|
+
require 'rspec/core'
|
29
|
+
require 'rspec/core/rake_task'
|
30
|
+
RSpec::Core::RakeTask.new(:spec) do |spec|
|
31
|
+
spec.pattern = FileList['spec/**/*_spec.rb']
|
32
|
+
end
|
33
|
+
|
34
|
+
RSpec::Core::RakeTask.new(:rcov) do |spec|
|
35
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
36
|
+
spec.rcov = true
|
37
|
+
end
|
38
|
+
|
39
|
+
task :default => :spec
|
40
|
+
|
41
|
+
require 'rake/rdoctask'
|
42
|
+
Rake::RDocTask.new do |rdoc|
|
43
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
44
|
+
|
45
|
+
rdoc.rdoc_dir = 'rdoc'
|
46
|
+
rdoc.title = "authorized_keys #{version}"
|
47
|
+
rdoc.rdoc_files.include('README*')
|
48
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
49
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
1.0.0
|
@@ -0,0 +1,68 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{authorized_keys}
|
8
|
+
s.version = "1.0.0"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = [%q{Bodaniel Jeanes}]
|
12
|
+
s.date = %q{2011-09-15}
|
13
|
+
s.description = %q{Library to manage authorized_keys files}
|
14
|
+
s.email = %q{me@bjeanes.com}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE.txt",
|
17
|
+
"README.rdoc"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".document",
|
21
|
+
".rspec",
|
22
|
+
"Gemfile",
|
23
|
+
"Gemfile.lock",
|
24
|
+
"LICENSE.txt",
|
25
|
+
"README.rdoc",
|
26
|
+
"Rakefile",
|
27
|
+
"VERSION",
|
28
|
+
"authorized_keys.gemspec",
|
29
|
+
"lib/authorized_keys.rb",
|
30
|
+
"lib/authorized_keys/file.rb",
|
31
|
+
"lib/authorized_keys/key.rb",
|
32
|
+
"spec/authorized_keys/file_spec.rb",
|
33
|
+
"spec/authorized_keys/key_spec.rb",
|
34
|
+
"spec/fixtures/keys/1.pub",
|
35
|
+
"spec/fixtures/keys/2.pub",
|
36
|
+
"spec/fixtures/keys/3.pub",
|
37
|
+
"spec/fixtures/keys/4.pub",
|
38
|
+
"spec/spec_helper.rb",
|
39
|
+
"spec/support/fixtures.rb"
|
40
|
+
]
|
41
|
+
s.homepage = %q{http://github.com/bjeanes/authorized_keys}
|
42
|
+
s.licenses = [%q{MIT}]
|
43
|
+
s.require_paths = [%q{lib}]
|
44
|
+
s.rubygems_version = %q{1.8.6}
|
45
|
+
s.summary = %q{Library to manage authorized_keys files}
|
46
|
+
|
47
|
+
if s.respond_to? :specification_version then
|
48
|
+
s.specification_version = 3
|
49
|
+
|
50
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
51
|
+
s.add_development_dependency(%q<rspec>, ["~> 2.3.0"])
|
52
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
53
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
|
54
|
+
s.add_development_dependency(%q<rcov>, [">= 0"])
|
55
|
+
else
|
56
|
+
s.add_dependency(%q<rspec>, ["~> 2.3.0"])
|
57
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
58
|
+
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
|
59
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
60
|
+
end
|
61
|
+
else
|
62
|
+
s.add_dependency(%q<rspec>, ["~> 2.3.0"])
|
63
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
64
|
+
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
|
65
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
@@ -0,0 +1,40 @@
|
|
1
|
+
require "authorized_keys"
|
2
|
+
|
3
|
+
module AuthorizedKeys
|
4
|
+
class File
|
5
|
+
attr_accessor :location
|
6
|
+
private :location=
|
7
|
+
|
8
|
+
def initialize(location=nil)
|
9
|
+
self.location = location || "#{ENV['HOME']}/.ssh/authorized_keys"
|
10
|
+
end
|
11
|
+
|
12
|
+
def add(key)
|
13
|
+
key = Key.new(key) if key.is_a?(String)
|
14
|
+
|
15
|
+
modify 'a+' do |file|
|
16
|
+
file.puts key
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
def remove(key)
|
21
|
+
key = Key.new(key) if key.is_a?(String)
|
22
|
+
|
23
|
+
modify 'r' do |file|
|
24
|
+
::File.unlink(location)
|
25
|
+
|
26
|
+
modify 'w' do |new_file|
|
27
|
+
file.each do |line|
|
28
|
+
new_file.puts line unless key == Key.new(line)
|
29
|
+
new_file.flush
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
private
|
36
|
+
def modify(mode, &block)
|
37
|
+
::File.open(location, mode, &block)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require "authorized_keys"
|
2
|
+
|
3
|
+
module AuthorizedKeys
|
4
|
+
class Key
|
5
|
+
attr_accessor :options, :content, :comment
|
6
|
+
|
7
|
+
def initialize(key_string)
|
8
|
+
options, self.content, self.comment = *Components.extract(key_string)
|
9
|
+
|
10
|
+
raise "Bad key" unless self.content
|
11
|
+
|
12
|
+
self.options = options.split(/,/)
|
13
|
+
end
|
14
|
+
|
15
|
+
def to_s
|
16
|
+
options = self.options.join(",") unless self.options.empty?
|
17
|
+
[options, content, comment].compact.join(" ")
|
18
|
+
end
|
19
|
+
|
20
|
+
def ==(key)
|
21
|
+
key = self.class.new(key) if key.is_a?(String)
|
22
|
+
content == key.content
|
23
|
+
end
|
24
|
+
|
25
|
+
private
|
26
|
+
|
27
|
+
module Components
|
28
|
+
OPTIONS = '(.*?)\\s*'
|
29
|
+
CONTENT = '(ssh-(?:[dr]sa)\\s.*?)'
|
30
|
+
COMMENT = '(?:\\s+(.*))?'
|
31
|
+
|
32
|
+
def self.extract(key_string)
|
33
|
+
key_string.scan(/^#{OPTIONS}#{CONTENT}#{COMMENT}$/).flatten.map(&:to_s)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,79 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
|
2
|
+
require 'authorized_keys/file'
|
3
|
+
require 'tempfile'
|
4
|
+
|
5
|
+
describe AuthorizedKeys::File do
|
6
|
+
let(:home) { "/home/user" }
|
7
|
+
|
8
|
+
before(:all) do
|
9
|
+
@backup_home = ENV['HOME']
|
10
|
+
ENV['HOME'] = home
|
11
|
+
end
|
12
|
+
|
13
|
+
after(:all) { ENV['HOME'] = @backup_home }
|
14
|
+
|
15
|
+
context "with no file location specified" do
|
16
|
+
subject { AuthorizedKeys::File.new }
|
17
|
+
|
18
|
+
it "defaults to $HOME/.ssh/authorized_keys" do
|
19
|
+
subject.location.should == "#{home}/.ssh/authorized_keys"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
context do
|
24
|
+
let(:file) { Tempfile.new('authorized_keys') }
|
25
|
+
before(:each) { file.close } # Close so our class can modify it
|
26
|
+
after(:each) { file.close } # Close after we check it for convenience
|
27
|
+
|
28
|
+
subject { AuthorizedKeys::File.new(file.path) }
|
29
|
+
|
30
|
+
context "with file location specified" do
|
31
|
+
its(:location) { should == file.path }
|
32
|
+
end
|
33
|
+
|
34
|
+
describe "#add" do
|
35
|
+
it "adds a valid key to the file" do
|
36
|
+
key = fixture_key(1)
|
37
|
+
subject.add(key)
|
38
|
+
|
39
|
+
file.open
|
40
|
+
file.rewind
|
41
|
+
file.read.should == key
|
42
|
+
end
|
43
|
+
|
44
|
+
it "appends the key to any existing keys" do
|
45
|
+
key1, key2 = fixture_key(1), fixture_key(2)
|
46
|
+
|
47
|
+
file.open
|
48
|
+
file.write(key1)
|
49
|
+
file.close
|
50
|
+
|
51
|
+
subject.add(key2)
|
52
|
+
|
53
|
+
file.open
|
54
|
+
file.rewind
|
55
|
+
file.read.should == [key1, key2].join("")
|
56
|
+
end
|
57
|
+
|
58
|
+
it "raises an exception for a bad key" do
|
59
|
+
lambda { subject.add("foo bar") }.should raise_error "Bad key"
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
describe "#remove" do
|
64
|
+
it "deletes the key from the file" do
|
65
|
+
key1, key2 = fixture_key(1), fixture_key(2)
|
66
|
+
|
67
|
+
file.open
|
68
|
+
file.puts [key1, key2]
|
69
|
+
file.close
|
70
|
+
|
71
|
+
subject.remove(key1)
|
72
|
+
|
73
|
+
new_file = File.open(file.path, 'r') # Need to get new handle
|
74
|
+
new_file.read.should == key2
|
75
|
+
new_file.close
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
@@ -0,0 +1,82 @@
|
|
1
|
+
require 'authorized_keys/key'
|
2
|
+
|
3
|
+
describe AuthorizedKeys::Key do
|
4
|
+
let(:options) do
|
5
|
+
%w[
|
6
|
+
command="/usr/local/bin/command\ argument"
|
7
|
+
no-port-forwarding
|
8
|
+
no-X11-forwarding
|
9
|
+
no-agent-forwarding
|
10
|
+
]
|
11
|
+
end
|
12
|
+
|
13
|
+
let(:options_string) { options.join(',') }
|
14
|
+
|
15
|
+
let(:content) do
|
16
|
+
'ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAzl2OUiWu4GzVdNXBwMCK460uEUZSvuIsccmr15d' +
|
17
|
+
'NrwfsHd3CSyTcSea/gMfJL6qFLA9WtM7DUTy6zSzydo3nz5PoFvLZDHV944tkhddGff5JnAAl' +
|
18
|
+
'GcoTDsGbAlqSWIfXLJur0jVsaEz9JJ7EbcApv13dkzii0WDE/61OJj2vlhZ/GdlQ6kNE2Zn7M' +
|
19
|
+
'1lw0mu8siULhXIxk8QBMZ5tiBVQeHSFq8/BucluOA9eyg38fPSnZxihoQfkC65wDhSy44VsAv' +
|
20
|
+
'wLl85eSFF2LJWNGB5NTb5Bfc6OlAWpi0C/XBAskjAeqMmPlBOx6IKwAjdKvbU7Xmuug/tLFu9' +
|
21
|
+
'PUKk+nTWExw=='
|
22
|
+
end
|
23
|
+
|
24
|
+
let(:comment) do
|
25
|
+
"user@host.com - 123"
|
26
|
+
end
|
27
|
+
|
28
|
+
let(:key) { [options_string, content, comment].compact.join(" ") }
|
29
|
+
|
30
|
+
subject { AuthorizedKeys::Key.new(key) }
|
31
|
+
|
32
|
+
describe '#initialize' do
|
33
|
+
|
34
|
+
its(:options) { should == options }
|
35
|
+
its(:content) { should == content }
|
36
|
+
its(:comment) { should == comment }
|
37
|
+
|
38
|
+
its(:to_s) { should == key }
|
39
|
+
|
40
|
+
context "with bad key content" do
|
41
|
+
let(:content) { "blah" }
|
42
|
+
it { lambda { subject }.should raise_error("Bad key") }
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
describe "#==" do
|
47
|
+
it "returns true for keys with the same content" do
|
48
|
+
should == AuthorizedKeys::Key.new(content)
|
49
|
+
end
|
50
|
+
|
51
|
+
it "returns true for a string that has the same key content" do
|
52
|
+
should == content
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
describe 'Components' do
|
57
|
+
describe '.extract' do
|
58
|
+
subject { AuthorizedKeys::Key::Components.extract(key) }
|
59
|
+
|
60
|
+
it { should == [options_string, content, comment] }
|
61
|
+
|
62
|
+
context "with missing options" do
|
63
|
+
let(:options) { [] }
|
64
|
+
it { should == ["", content, comment] }
|
65
|
+
|
66
|
+
its(:to_s) { should_not =~ /^\s|\s$/ }
|
67
|
+
end
|
68
|
+
|
69
|
+
context "with missing comment" do
|
70
|
+
let(:comment) { }
|
71
|
+
it { should == [options_string, content, ""] }
|
72
|
+
end
|
73
|
+
|
74
|
+
context "with missing content" do
|
75
|
+
let(:content) { }
|
76
|
+
it { should == [] }
|
77
|
+
|
78
|
+
its(:to_s) { should_not =~ /^\s|\s$/ }
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQD3NNV5PTG9kuhNtSz42rAC7hRjhE92i5AeEH4sGk3UpUSKZQIAHzdxR7sbH+yEC3iMOftH/d4Dk725OzpXh7j+qiEfOJfQapCjD6SeD1uHrd27ZrPsGPmM5D1DbYFRGKHeYXOGKCDsqN29E4kgITLnOFPNSYbQ0fdgZShFX1pERQ== bjeanes@Bos-MacBook-Pro.local
|
@@ -0,0 +1 @@
|
|
1
|
+
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD+IzNrHcgVMrQkVSAN66laLInCtCXbjFuwMPhVzngWTznxinJeKpJqynB9UogWmVwnU67qyJrk8JzFLUeTQMqCjr2l6Blx9YIgvIcII9TP2L/acfdconBM1cPcOGNVkjGfa1AncIdpD6QcAXpSmGCc08UCbjD9rtdWzRlr6U8tApBy1KybGTfH3k6oxj6x5nxtCKM/9VLjNN3X9jZPJh8i+k3qlL49jTnDh//eL8cfzr2ChEyeS5eUVeZNJVbAKm+fz2zRRfiMpB9MxxwbBNirbGeMvexD+5QNOKRRL9Xj0fZZ0dYJSD+g9vlOXsINASmXjApSScwQTyFnkXsr0i+5 bjeanes@Bos-MacBook-Pro.local
|
@@ -0,0 +1 @@
|
|
1
|
+
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCkctmh3WxfySWXlmXci9kNI2XLkPaNq7rIDuV4O0lVCbCInBDRmZZdxaMqxacmNgHQqy9Je3Tq++KDL4VxyvUeHy9xEaMNXRI1AITaWXbld1+MwjYX5uGFR3w8lmVLsI+sTDeg3OniZYQq3jukj3IbdlpH9L0iP8wIfoadloZ9vNw5NTo4h4osX7Q3MTKUh3NrrtaCpUA9ctRgerVBq/XF/nZbocquH5lcYDrDaQZTBgDmaIqC1WOyHlmgx/il0bfuwMrcsMrvlWSirzeDi1hmjGcPgTqbpuALa8eYOMXZ9nI1aPuZPAyUz5jR+cmUuOum26lQVwuTg2JN7tP/Ox7Sf2Mye85ZBAcUHy9zu+Js4KkyUzoQqd2RLEsqL7YN2B/EzGA2LRpPAPbD2RO8S13vrsb4nOcLPeJcsrVxuxYEN6xi4hF6dJKLe2dz7KABv0plTDBQNt1MtjwS9K1ZWD7ngEX6FbiUvGblwYz/veABMUTWaulH8iBDSQoaFGPaeIt1tx0OM81QNwJLFpZ2IXhbYpWsnbHpJE/BiNua3VRjNfzRpxWfAC6dKWa7VPginvNNbdIn1vl3/AnePdVImRj5eGJMonVV/G9PTWuBjg4PzHvl/n7NRyzSRHLrIst1vLUxWTmxc+91fTY+0KNQG17zOExKwwcWJXnP+3kS32lipQ== bjeanes@Bos-MacBook-Pro.local
|
@@ -0,0 +1 @@
|
|
1
|
+
ssh-dss AAAAB3NzaC1kc3MAAACBANKkn8X4sThKmvngQWLEUCrQdr4agXPEUuUgss2wig6uO0AQQYP7sWy0m9UPHWgBZgxJFgKXHei+qXXGlJNFLICKqMQ6X1p4G3r11d16f8clJhpgg72nN/4gtJYnyC5+DLcmq1nsLrCJpXB3JS/l7taGdqPKssDCb5KnpGYcIVIHAAAAFQCLJgM4C518FQd3ZRxBD+zpJRZLJwAAAIEAhXlIY2ILZ/DgQk8Arp62D9uRNEbU1XYSWEOhSL9X6diA80BREQ/1J2HAFKV/KUOVuXhIXvFiCq8CuttwmBah+gWzn51lZ+Evqg3s7wLVTP5Qb22Pt5AWFIJi+TTGfAIyMAEe6i8zrZJyrcSB5Bmjt+RlTUZybh+EXlHOj/TP4u4AAACAOE3QgktoiPz4Yf7C/0GHu/penfl+WqQz6ztBDaPHBXw9H6wmcc/Bp6hlIAb38juciF8ZyoWhbB/5B0Pa/sPZV+tPetaQKfNbiLc9FvyLbGv6UzFyy+cbR4OAcLPhsP/Yxaj3FnhzwYRfnwzdCIIY1fKqFtjAgoYEk6Jxx5LAC9w= bjeanes@Bos-MacBook-Pro.local
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
2
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
3
|
+
|
4
|
+
require 'rspec'
|
5
|
+
|
6
|
+
# Requires supporting files with custom matchers and macros, etc,
|
7
|
+
# in ./support/ and its subdirectories.
|
8
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
9
|
+
|
10
|
+
RSpec.configure do |config|
|
11
|
+
config.include Fixtures
|
12
|
+
end
|
metadata
ADDED
@@ -0,0 +1,120 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: authorized_keys
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease:
|
5
|
+
version: 1.0.0
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Bodaniel Jeanes
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
|
13
|
+
date: 2011-09-15 00:00:00 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: rspec
|
17
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
18
|
+
none: false
|
19
|
+
requirements:
|
20
|
+
- - ~>
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 2.3.0
|
23
|
+
type: :development
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: *id001
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: bundler
|
28
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
29
|
+
none: false
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.0.0
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: *id002
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: jeweler
|
39
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
40
|
+
none: false
|
41
|
+
requirements:
|
42
|
+
- - ~>
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: 1.6.4
|
45
|
+
type: :development
|
46
|
+
prerelease: false
|
47
|
+
version_requirements: *id003
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: rcov
|
50
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
51
|
+
none: false
|
52
|
+
requirements:
|
53
|
+
- - ">="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: "0"
|
56
|
+
type: :development
|
57
|
+
prerelease: false
|
58
|
+
version_requirements: *id004
|
59
|
+
description: Library to manage authorized_keys files
|
60
|
+
email: me@bjeanes.com
|
61
|
+
executables: []
|
62
|
+
|
63
|
+
extensions: []
|
64
|
+
|
65
|
+
extra_rdoc_files:
|
66
|
+
- LICENSE.txt
|
67
|
+
- README.rdoc
|
68
|
+
files:
|
69
|
+
- .document
|
70
|
+
- .rspec
|
71
|
+
- Gemfile
|
72
|
+
- Gemfile.lock
|
73
|
+
- LICENSE.txt
|
74
|
+
- README.rdoc
|
75
|
+
- Rakefile
|
76
|
+
- VERSION
|
77
|
+
- authorized_keys.gemspec
|
78
|
+
- lib/authorized_keys.rb
|
79
|
+
- lib/authorized_keys/file.rb
|
80
|
+
- lib/authorized_keys/key.rb
|
81
|
+
- spec/authorized_keys/file_spec.rb
|
82
|
+
- spec/authorized_keys/key_spec.rb
|
83
|
+
- spec/fixtures/keys/1.pub
|
84
|
+
- spec/fixtures/keys/2.pub
|
85
|
+
- spec/fixtures/keys/3.pub
|
86
|
+
- spec/fixtures/keys/4.pub
|
87
|
+
- spec/spec_helper.rb
|
88
|
+
- spec/support/fixtures.rb
|
89
|
+
homepage: http://github.com/bjeanes/authorized_keys
|
90
|
+
licenses:
|
91
|
+
- MIT
|
92
|
+
post_install_message:
|
93
|
+
rdoc_options: []
|
94
|
+
|
95
|
+
require_paths:
|
96
|
+
- lib
|
97
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
98
|
+
none: false
|
99
|
+
requirements:
|
100
|
+
- - ">="
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
hash: 3787903908874819864
|
103
|
+
segments:
|
104
|
+
- 0
|
105
|
+
version: "0"
|
106
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
107
|
+
none: false
|
108
|
+
requirements:
|
109
|
+
- - ">="
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: "0"
|
112
|
+
requirements: []
|
113
|
+
|
114
|
+
rubyforge_project:
|
115
|
+
rubygems_version: 1.8.6
|
116
|
+
signing_key:
|
117
|
+
specification_version: 3
|
118
|
+
summary: Library to manage authorized_keys files
|
119
|
+
test_files: []
|
120
|
+
|