orthrus-ssh 0.5.0 → 0.5.1
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.
- data/lib/orthrus/ssh.rb +2 -2
 - data/lib/orthrus/ssh/buffer.rb +5 -0
 - data/lib/orthrus/ssh/utils.rb +1 -1
 - data/test/test_orthrus_ssh_agent.rb +0 -2
 - data/test/test_orthrus_ssh_http_agent.rb +3 -1
 - metadata +12 -11
 
    
        data/lib/orthrus/ssh.rb
    CHANGED
    
    | 
         @@ -7,7 +7,7 @@ require 'orthrus/ssh/dsa' 
     | 
|
| 
       7 
7 
     | 
    
         
             
            require 'orthrus/ssh/utils'
         
     | 
| 
       8 
8 
     | 
    
         | 
| 
       9 
9 
     | 
    
         
             
            module Orthrus::SSH
         
     | 
| 
       10 
     | 
    
         
            -
              VERSION = '0.5. 
     | 
| 
      
 10 
     | 
    
         
            +
              VERSION = '0.5.1'
         
     | 
| 
       11 
11 
     | 
    
         | 
| 
       12 
12 
     | 
    
         
             
              def self.load_private(path)
         
     | 
| 
       13 
13 
     | 
    
         
             
                data = File.read(path)
         
     | 
| 
         @@ -43,7 +43,7 @@ end 
     | 
|
| 
       43 
43 
     | 
    
         | 
| 
       44 
44 
     | 
    
         
             
            # For 1.8/1.9 compat
         
     | 
| 
       45 
45 
     | 
    
         
             
            class String
         
     | 
| 
       46 
     | 
    
         
            -
              unless method_defined? : 
     | 
| 
      
 46 
     | 
    
         
            +
              unless method_defined? :getbyte
         
     | 
| 
       47 
47 
     | 
    
         
             
                alias_method :getbyte, :[]
         
     | 
| 
       48 
48 
     | 
    
         
             
              end
         
     | 
| 
       49 
49 
     | 
    
         
             
            end
         
     | 
    
        data/lib/orthrus/ssh/buffer.rb
    CHANGED
    
    | 
         @@ -72,6 +72,7 @@ module Orthrus::SSH 
     | 
|
| 
       72 
72 
     | 
    
         
             
                # is initialized to the beginning of the buffer.
         
     | 
| 
       73 
73 
     | 
    
         
             
                def initialize(content="")
         
     | 
| 
       74 
74 
     | 
    
         
             
                  @content = content.to_s
         
     | 
| 
      
 75 
     | 
    
         
            +
                  @content.force_encoding "ASCII-8BIT" if @content.respond_to? :force_encoding
         
     | 
| 
       75 
76 
     | 
    
         
             
                  @position = 0
         
     | 
| 
       76 
77 
     | 
    
         
             
                end
         
     | 
| 
       77 
78 
     | 
    
         | 
| 
         @@ -91,6 +92,10 @@ module Orthrus::SSH 
     | 
|
| 
       91 
92 
     | 
    
         
             
                  (@content || "").dup
         
     | 
| 
       92 
93 
     | 
    
         
             
                end
         
     | 
| 
       93 
94 
     | 
    
         | 
| 
      
 95 
     | 
    
         
            +
                def inspect
         
     | 
| 
      
 96 
     | 
    
         
            +
                  "#<#{self.class} #{@content.size} bytes>"
         
     | 
| 
      
 97 
     | 
    
         
            +
                end
         
     | 
| 
      
 98 
     | 
    
         
            +
             
     | 
| 
       94 
99 
     | 
    
         
             
                # Compares the contents of the two buffers, returning +true+ only if they
         
     | 
| 
       95 
100 
     | 
    
         
             
                # are identical in size and content.
         
     | 
| 
       96 
101 
     | 
    
         
             
                def ==(buffer)
         
     | 
    
        data/lib/orthrus/ssh/utils.rb
    CHANGED
    
    
| 
         @@ -52,7 +52,9 @@ class TestOrthrusSSHHTTPAgent < MiniTest::Unit::TestCase 
     | 
|
| 
       52 
52 
     | 
    
         
             
                skip unless Orthrus::SSH::Agent.available?
         
     | 
| 
       53 
53 
     | 
    
         | 
| 
       54 
54 
     | 
    
         
             
                begin
         
     | 
| 
       55 
     | 
    
         
            -
                  `ssh-add #{@id_rsa} 2>&1`
         
     | 
| 
      
 55 
     | 
    
         
            +
                  `chmod 0600 #{@id_rsa}; ssh-add #{@id_rsa} 2>&1`
         
     | 
| 
      
 56 
     | 
    
         
            +
             
     | 
| 
      
 57 
     | 
    
         
            +
                  fail unless $?.exitstatus == 0
         
     | 
| 
       56 
58 
     | 
    
         | 
| 
       57 
59 
     | 
    
         
             
                  assert Orthrus::SSH::Agent.connect.identities.any? { |id|
         
     | 
| 
       58 
60 
     | 
    
         
             
                           id.public_identity == @rsa_pub.public_identity
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,13 +1,13 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification 
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: orthrus-ssh
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version 
         
     | 
| 
       4 
     | 
    
         
            -
              hash:  
     | 
| 
      
 4 
     | 
    
         
            +
              hash: 9
         
     | 
| 
       5 
5 
     | 
    
         
             
              prerelease: 
         
     | 
| 
       6 
6 
     | 
    
         
             
              segments: 
         
     | 
| 
       7 
7 
     | 
    
         
             
              - 0
         
     | 
| 
       8 
8 
     | 
    
         
             
              - 5
         
     | 
| 
       9 
     | 
    
         
            -
              -  
     | 
| 
       10 
     | 
    
         
            -
              version: 0.5. 
     | 
| 
      
 9 
     | 
    
         
            +
              - 1
         
     | 
| 
      
 10 
     | 
    
         
            +
              version: 0.5.1
         
     | 
| 
       11 
11 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       12 
12 
     | 
    
         
             
            authors: 
         
     | 
| 
       13 
13 
     | 
    
         
             
            - Evan Phoenix
         
     | 
| 
         @@ -15,7 +15,7 @@ autorequire: 
     | 
|
| 
       15 
15 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       16 
16 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       17 
17 
     | 
    
         | 
| 
       18 
     | 
    
         
            -
            date: 2012-03- 
     | 
| 
      
 18 
     | 
    
         
            +
            date: 2012-03-27 00:00:00 Z
         
     | 
| 
       19 
19 
     | 
    
         
             
            dependencies: 
         
     | 
| 
       20 
20 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     | 
| 
       21 
21 
     | 
    
         
             
              name: minitest
         
     | 
| 
         @@ -23,13 +23,14 @@ dependencies: 
     | 
|
| 
       23 
23 
     | 
    
         
             
              requirement: &id001 !ruby/object:Gem::Requirement 
         
     | 
| 
       24 
24 
     | 
    
         
             
                none: false
         
     | 
| 
       25 
25 
     | 
    
         
             
                requirements: 
         
     | 
| 
       26 
     | 
    
         
            -
                - -  
     | 
| 
      
 26 
     | 
    
         
            +
                - - ">="
         
     | 
| 
       27 
27 
     | 
    
         
             
                  - !ruby/object:Gem::Version 
         
     | 
| 
       28 
     | 
    
         
            -
                    hash:  
     | 
| 
      
 28 
     | 
    
         
            +
                    hash: 43
         
     | 
| 
       29 
29 
     | 
    
         
             
                    segments: 
         
     | 
| 
       30 
30 
     | 
    
         
             
                    - 2
         
     | 
| 
       31 
31 
     | 
    
         
             
                    - 11
         
     | 
| 
       32 
     | 
    
         
            -
                     
     | 
| 
      
 32 
     | 
    
         
            +
                    - 4
         
     | 
| 
      
 33 
     | 
    
         
            +
                    version: 2.11.4
         
     | 
| 
       33 
34 
     | 
    
         
             
              type: :development
         
     | 
| 
       34 
35 
     | 
    
         
             
              version_requirements: *id001
         
     | 
| 
       35 
36 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     | 
| 
         @@ -55,11 +56,11 @@ dependencies: 
     | 
|
| 
       55 
56 
     | 
    
         
             
                requirements: 
         
     | 
| 
       56 
57 
     | 
    
         
             
                - - ~>
         
     | 
| 
       57 
58 
     | 
    
         
             
                  - !ruby/object:Gem::Version 
         
     | 
| 
       58 
     | 
    
         
            -
                    hash:  
     | 
| 
      
 59 
     | 
    
         
            +
                    hash: 35
         
     | 
| 
       59 
60 
     | 
    
         
             
                    segments: 
         
     | 
| 
       60 
61 
     | 
    
         
             
                    - 2
         
     | 
| 
       61 
     | 
    
         
            -
                    -  
     | 
| 
       62 
     | 
    
         
            -
                    version: "2. 
     | 
| 
      
 62 
     | 
    
         
            +
                    - 16
         
     | 
| 
      
 63 
     | 
    
         
            +
                    version: "2.16"
         
     | 
| 
       63 
64 
     | 
    
         
             
              type: :development
         
     | 
| 
       64 
65 
     | 
    
         
             
              version_requirements: *id003
         
     | 
| 
       65 
66 
     | 
    
         
             
            description: A user authentication system built on SSH's key
         
     | 
| 
         @@ -136,7 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       136 
137 
     | 
    
         
             
            requirements: []
         
     | 
| 
       137 
138 
     | 
    
         | 
| 
       138 
139 
     | 
    
         
             
            rubyforge_project: orthrus-ssh
         
     | 
| 
       139 
     | 
    
         
            -
            rubygems_version: 1.8. 
     | 
| 
      
 140 
     | 
    
         
            +
            rubygems_version: 1.8.21
         
     | 
| 
       140 
141 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       141 
142 
     | 
    
         
             
            specification_version: 3
         
     | 
| 
       142 
143 
     | 
    
         
             
            summary: A user authentication system built on SSH's key
         
     |