sshkg 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/lib/sshkg/version.rb CHANGED
@@ -3,7 +3,7 @@ module SSHKeyGenerator
3
3
  INFO = {
4
4
  :major =>0,
5
5
  :minor =>2,
6
- :patch =>0
6
+ :patch =>1
7
7
  }
8
8
 
9
9
  NAME = 'sshkg'
@@ -48,7 +48,8 @@ class TestSSHKeyGenerator < Test::Unit::TestCase
48
48
 
49
49
  SSHKeyGenerator.generate( :user=>@test_dsa_user )
50
50
 
51
- assert( File.exist?( @test_dsa_key_file_name ) )
51
+ assert( File.exist?( @test_dsa_key_file_name ) )
52
+ assert( File.read( @test_dsa_key_file_name ).delete( "\n") =~/^-----BEGIN DSA PRIVATE KEY-----(.+)-----END DSA PRIVATE KEY-----$/ )
52
53
 
53
54
  assert( File.exist?( @test_dsa_public_key_file_name ) )
54
55
  assert( File.read( @test_dsa_public_key_file_name ) =~ /^ssh-dss (.+) #{@test_dsa_user}\@example.com$/ )
@@ -62,6 +63,9 @@ class TestSSHKeyGenerator < Test::Unit::TestCase
62
63
 
63
64
  SSHKeyGenerator.generate( :user=>@test_dsa_user, :type=>:dsa, :bits=>1024, :comment=>@test_dsa_comment )
64
65
 
66
+ assert( File.exist?( @test_dsa_key_file_name ) )
67
+ assert( File.read( @test_dsa_key_file_name ).delete( "\n") =~/^-----BEGIN DSA PRIVATE KEY-----(.+)-----END DSA PRIVATE KEY-----$/ )
68
+
65
69
  assert( File.exist?( @test_dsa_public_key_file_name ) )
66
70
  assert( File.read( @test_dsa_public_key_file_name ) =~ /^ssh-dss (.+) #{@test_dsa_user}\@#{@test_dsa_comment}$/ )
67
71
  end
@@ -71,6 +75,9 @@ class TestSSHKeyGenerator < Test::Unit::TestCase
71
75
 
72
76
  SSHKeyGenerator.generate( :user=>@test_rsa_user, :type=>:rsa, :bits=>2048, :comment=>@test_rsa_comment )
73
77
 
78
+ assert( File.exist?( @test_rsa_key_file_name ) )
79
+ assert( File.read( @test_rsa_key_file_name ).delete( "\n") =~/^-----BEGIN RSA PRIVATE KEY-----(.+)-----END RSA PRIVATE KEY-----$/ )
80
+
74
81
  assert( File.exist?( @test_rsa_public_key_file_name ) )
75
82
  assert( File.read( @test_rsa_public_key_file_name ) =~ /ssh-rsa (.+) #{@test_rsa_user}\@#{@test_rsa_comment}$/ )
76
83
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: sshkg
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.0
5
+ version: 0.2.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Javier Juarez
@@ -10,8 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-03-31 00:00:00 +02:00
14
- default_executable: sshkg
13
+ date: 2011-04-02 00:00:00 Z
15
14
  dependencies:
16
15
  - !ruby/object:Gem::Dependency
17
16
  name: choice
@@ -73,7 +72,6 @@ files:
73
72
  - lib/sshkg/version.rb
74
73
  - test/unit/tc_generator.rb
75
74
  - README.rdoc
76
- has_rdoc: true
77
75
  homepage: http://github.com/jjuarez/sshkg
78
76
  licenses: []
79
77
 
@@ -97,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
97
95
  requirements: []
98
96
 
99
97
  rubyforge_project: http://github.com/jjuarez/sshkg
100
- rubygems_version: 1.6.2
98
+ rubygems_version: 1.7.1
101
99
  signing_key:
102
100
  specification_version: 3
103
101
  summary: A very simple gem that helps to automate the generation of SSH Keys