net-ssh-multi 1.0.0 → 1.0.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/CHANGELOG.rdoc +7 -0
- data/lib/net/ssh/multi/channel.rb +14 -0
- data/lib/net/ssh/multi/session.rb +8 -3
- data/lib/net/ssh/multi/version.rb +1 -1
- data/net-ssh-multi.gemspec +24 -44
- metadata +37 -8
    
        data/CHANGELOG.rdoc
    CHANGED
    
    
| @@ -199,6 +199,20 @@ module Net; module SSH; module Multi | |
| 199 199 | 
             
                  self
         | 
| 200 200 | 
             
                end
         | 
| 201 201 |  | 
| 202 | 
            +
                # Registers a callback on all component channels, to be invoked when the
         | 
| 203 | 
            +
                # remote server is unable to open the channel. The callback will be
         | 
| 204 | 
            +
                # invoked with three arguments: the channel object that couldn't be
         | 
| 205 | 
            +
                # opened, a description of the error (as a string), and an integer code
         | 
| 206 | 
            +
                # representing the error.
         | 
| 207 | 
            +
                #
         | 
| 208 | 
            +
                #   channel.on_open_failed do |ch, description, code|
         | 
| 209 | 
            +
                #     # ...
         | 
| 210 | 
            +
                #   end
         | 
| 211 | 
            +
                def on_open_failed(&block)
         | 
| 212 | 
            +
                  channels.each { |channel| channel.on_open_failed(&block) }
         | 
| 213 | 
            +
                  self
         | 
| 214 | 
            +
                end
         | 
| 215 | 
            +
             | 
| 202 216 | 
             
                # Registers a callback on all component channels, to be invoked when the
         | 
| 203 217 | 
             
                # remote server sends a channel request of the given +type+. The callback
         | 
| 204 218 | 
             
                # will be invoked with two arguments: the specific channel object receiving
         | 
| @@ -219,7 +219,7 @@ module Net; module SSH; module Multi | |
| 219 219 | 
             
                    begin
         | 
| 220 220 | 
             
                      saved_groups = open_groups.dup
         | 
| 221 221 | 
             
                      open_groups.concat(args.map { |a| a.to_sym }).uniq!
         | 
| 222 | 
            -
                      yield self | 
| 222 | 
            +
                      yield self
         | 
| 223 223 | 
             
                    ensure
         | 
| 224 224 | 
             
                      open_groups.replace(saved_groups)
         | 
| 225 225 | 
             
                    end
         | 
| @@ -481,7 +481,12 @@ module Net; module SSH; module Multi | |
| 481 481 |  | 
| 482 482 | 
             
                  begin
         | 
| 483 483 | 
             
                    server.new_session
         | 
| 484 | 
            -
             | 
| 484 | 
            +
             | 
| 485 | 
            +
                  # I don't understand why this should be necessary--StandardError is a
         | 
| 486 | 
            +
                  # subclass of Exception, after all--but without explicitly rescuing
         | 
| 487 | 
            +
                  # StandardError, things like Errno::* and SocketError don't get caught
         | 
| 488 | 
            +
                  # here!
         | 
| 489 | 
            +
                  rescue Exception, StandardError => e
         | 
| 485 490 | 
             
                    server.fail!
         | 
| 486 491 | 
             
                    @session_mutex.synchronize { @open_connections -= 1 }
         | 
| 487 492 |  | 
| @@ -543,4 +548,4 @@ module Net; module SSH; module Multi | |
| 543 548 | 
             
                  end
         | 
| 544 549 | 
             
                end
         | 
| 545 550 | 
             
              end
         | 
| 546 | 
            -
            end; end; end
         | 
| 551 | 
            +
            end; end; end
         | 
    
        data/net-ssh-multi.gemspec
    CHANGED
    
    | @@ -1,59 +1,39 @@ | |
| 1 | 
            -
             | 
| 2 | 
            -
            # Gem::Specification for Net-ssh-multi-1.0.0
         | 
| 3 | 
            -
            # Originally generated by Echoe
         | 
| 4 | 
            -
             | 
| 5 1 | 
             
            Gem::Specification.new do |s|
         | 
| 6 2 | 
             
              s.name = %q{net-ssh-multi}
         | 
| 7 | 
            -
              s.version = "1.0. | 
| 8 | 
            -
             | 
| 9 | 
            -
              s.specification_version = 2 if s.respond_to? :specification_version=
         | 
| 3 | 
            +
              s.version = "1.0.1"
         | 
| 10 4 |  | 
| 11 | 
            -
              s.required_rubygems_version = Gem::Requirement.new(">=  | 
| 5 | 
            +
              s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
         | 
| 12 6 | 
             
              s.authors = ["Jamis Buck"]
         | 
| 13 | 
            -
              s.date = %q{ | 
| 7 | 
            +
              s.date = %q{2009-02-01}
         | 
| 14 8 | 
             
              s.description = %q{Control multiple Net::SSH connections via a single interface}
         | 
| 15 9 | 
             
              s.email = %q{jamis@jamisbuck.org}
         | 
| 10 | 
            +
              s.extra_rdoc_files = ["CHANGELOG.rdoc", "lib/net/ssh/multi/channel.rb", "lib/net/ssh/multi/channel_proxy.rb", "lib/net/ssh/multi/dynamic_server.rb", "lib/net/ssh/multi/pending_connection.rb", "lib/net/ssh/multi/server.rb", "lib/net/ssh/multi/server_list.rb", "lib/net/ssh/multi/session.rb", "lib/net/ssh/multi/session_actions.rb", "lib/net/ssh/multi/subsession.rb", "lib/net/ssh/multi/version.rb", "lib/net/ssh/multi.rb", "README.rdoc"]
         | 
| 16 11 | 
             
              s.files = ["CHANGELOG.rdoc", "lib/net/ssh/multi/channel.rb", "lib/net/ssh/multi/channel_proxy.rb", "lib/net/ssh/multi/dynamic_server.rb", "lib/net/ssh/multi/pending_connection.rb", "lib/net/ssh/multi/server.rb", "lib/net/ssh/multi/server_list.rb", "lib/net/ssh/multi/session.rb", "lib/net/ssh/multi/session_actions.rb", "lib/net/ssh/multi/subsession.rb", "lib/net/ssh/multi/version.rb", "lib/net/ssh/multi.rb", "Manifest", "Rakefile", "README.rdoc", "setup.rb", "test/channel_test.rb", "test/common.rb", "test/multi_test.rb", "test/server_test.rb", "test/session_actions_test.rb", "test/session_test.rb", "test/test_all.rb", "net-ssh-multi.gemspec"]
         | 
| 17 12 | 
             
              s.has_rdoc = true
         | 
| 18 13 | 
             
              s.homepage = %q{http://net-ssh.rubyforge.org/multi}
         | 
| 14 | 
            +
              s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Net-ssh-multi", "--main", "README.rdoc"]
         | 
| 19 15 | 
             
              s.require_paths = ["lib"]
         | 
| 20 16 | 
             
              s.rubyforge_project = %q{net-ssh-multi}
         | 
| 21 | 
            -
              s.rubygems_version = %q{1. | 
| 17 | 
            +
              s.rubygems_version = %q{1.2.0}
         | 
| 22 18 | 
             
              s.summary = %q{Control multiple Net::SSH connections via a single interface}
         | 
| 23 19 | 
             
              s.test_files = ["test/test_all.rb"]
         | 
| 24 20 |  | 
| 25 | 
            -
              s. | 
| 26 | 
            -
             | 
| 27 | 
            -
             | 
| 28 | 
            -
             | 
| 21 | 
            +
              if s.respond_to? :specification_version then
         | 
| 22 | 
            +
                current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
         | 
| 23 | 
            +
                s.specification_version = 2
         | 
| 29 24 |  | 
| 30 | 
            -
             | 
| 31 | 
            -
             | 
| 32 | 
            -
             | 
| 33 | 
            -
             | 
| 34 | 
            -
             | 
| 35 | 
            -
             | 
| 36 | 
            -
             | 
| 37 | 
            -
             | 
| 38 | 
            -
             | 
| 39 | 
            -
             | 
| 40 | 
            -
             | 
| 41 | 
            -
             | 
| 42 | 
            -
             | 
| 43 | 
            -
             | 
| 44 | 
            -
             | 
| 45 | 
            -
            # Echoe.new('net-ssh-multi', version) do |p|
         | 
| 46 | 
            -
            #   p.changelog        = "CHANGELOG.rdoc"
         | 
| 47 | 
            -
            # 
         | 
| 48 | 
            -
            #   p.author           = "Jamis Buck"
         | 
| 49 | 
            -
            #   p.email            = "jamis@jamisbuck.org"
         | 
| 50 | 
            -
            #   p.summary          = "Control multiple Net::SSH connections via a single interface"
         | 
| 51 | 
            -
            #   p.url              = "http://net-ssh.rubyforge.org/multi"
         | 
| 52 | 
            -
            # 
         | 
| 53 | 
            -
            #   p.dependencies     = ["net-ssh >=1.99.2", "net-ssh-gateway >=0.99.0"]
         | 
| 54 | 
            -
            # 
         | 
| 55 | 
            -
            #   p.need_zip         = true
         | 
| 56 | 
            -
            #   p.include_rakefile = true
         | 
| 57 | 
            -
            # 
         | 
| 58 | 
            -
            #   p.rdoc_pattern     = /^(lib|README.rdoc|CHANGELOG.rdoc)/
         | 
| 59 | 
            -
            # end
         | 
| 25 | 
            +
                if current_version >= 3 then
         | 
| 26 | 
            +
                  s.add_runtime_dependency(%q<net-ssh>, [">= 1.99.2"])
         | 
| 27 | 
            +
                  s.add_runtime_dependency(%q<net-ssh-gateway>, [">= 0.99.0"])
         | 
| 28 | 
            +
                  s.add_development_dependency(%q<echoe>, [">= 0"])
         | 
| 29 | 
            +
                else
         | 
| 30 | 
            +
                  s.add_dependency(%q<net-ssh>, [">= 1.99.2"])
         | 
| 31 | 
            +
                  s.add_dependency(%q<net-ssh-gateway>, [">= 0.99.0"])
         | 
| 32 | 
            +
                  s.add_dependency(%q<echoe>, [">= 0"])
         | 
| 33 | 
            +
                end
         | 
| 34 | 
            +
              else
         | 
| 35 | 
            +
                s.add_dependency(%q<net-ssh>, [">= 1.99.2"])
         | 
| 36 | 
            +
                s.add_dependency(%q<net-ssh-gateway>, [">= 0.99.0"])
         | 
| 37 | 
            +
                s.add_dependency(%q<echoe>, [">= 0"])
         | 
| 38 | 
            +
              end
         | 
| 39 | 
            +
            end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification 
         | 
| 2 2 | 
             
            name: net-ssh-multi
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version 
         | 
| 4 | 
            -
              version: 1.0. | 
| 4 | 
            +
              version: 1.0.1
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors: 
         | 
| 7 7 | 
             
            - Jamis Buck
         | 
| @@ -9,11 +9,12 @@ autorequire: | |
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 11 |  | 
| 12 | 
            -
            date:  | 
| 12 | 
            +
            date: 2009-02-01 00:00:00 -07:00
         | 
| 13 13 | 
             
            default_executable: 
         | 
| 14 14 | 
             
            dependencies: 
         | 
| 15 15 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| 16 16 | 
             
              name: net-ssh
         | 
| 17 | 
            +
              type: :runtime
         | 
| 17 18 | 
             
              version_requirement: 
         | 
| 18 19 | 
             
              version_requirements: !ruby/object:Gem::Requirement 
         | 
| 19 20 | 
             
                requirements: 
         | 
| @@ -23,6 +24,7 @@ dependencies: | |
| 23 24 | 
             
                version: 
         | 
| 24 25 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| 25 26 | 
             
              name: net-ssh-gateway
         | 
| 27 | 
            +
              type: :runtime
         | 
| 26 28 | 
             
              version_requirement: 
         | 
| 27 29 | 
             
              version_requirements: !ruby/object:Gem::Requirement 
         | 
| 28 30 | 
             
                requirements: 
         | 
| @@ -30,14 +32,36 @@ dependencies: | |
| 30 32 | 
             
                  - !ruby/object:Gem::Version 
         | 
| 31 33 | 
             
                    version: 0.99.0
         | 
| 32 34 | 
             
                version: 
         | 
| 35 | 
            +
            - !ruby/object:Gem::Dependency 
         | 
| 36 | 
            +
              name: echoe
         | 
| 37 | 
            +
              type: :development
         | 
| 38 | 
            +
              version_requirement: 
         | 
| 39 | 
            +
              version_requirements: !ruby/object:Gem::Requirement 
         | 
| 40 | 
            +
                requirements: 
         | 
| 41 | 
            +
                - - ">="
         | 
| 42 | 
            +
                  - !ruby/object:Gem::Version 
         | 
| 43 | 
            +
                    version: "0"
         | 
| 44 | 
            +
                version: 
         | 
| 33 45 | 
             
            description: Control multiple Net::SSH connections via a single interface
         | 
| 34 46 | 
             
            email: jamis@jamisbuck.org
         | 
| 35 47 | 
             
            executables: []
         | 
| 36 48 |  | 
| 37 49 | 
             
            extensions: []
         | 
| 38 50 |  | 
| 39 | 
            -
            extra_rdoc_files:  | 
| 40 | 
            -
             | 
| 51 | 
            +
            extra_rdoc_files: 
         | 
| 52 | 
            +
            - CHANGELOG.rdoc
         | 
| 53 | 
            +
            - lib/net/ssh/multi/channel.rb
         | 
| 54 | 
            +
            - lib/net/ssh/multi/channel_proxy.rb
         | 
| 55 | 
            +
            - lib/net/ssh/multi/dynamic_server.rb
         | 
| 56 | 
            +
            - lib/net/ssh/multi/pending_connection.rb
         | 
| 57 | 
            +
            - lib/net/ssh/multi/server.rb
         | 
| 58 | 
            +
            - lib/net/ssh/multi/server_list.rb
         | 
| 59 | 
            +
            - lib/net/ssh/multi/session.rb
         | 
| 60 | 
            +
            - lib/net/ssh/multi/session_actions.rb
         | 
| 61 | 
            +
            - lib/net/ssh/multi/subsession.rb
         | 
| 62 | 
            +
            - lib/net/ssh/multi/version.rb
         | 
| 63 | 
            +
            - lib/net/ssh/multi.rb
         | 
| 64 | 
            +
            - README.rdoc
         | 
| 41 65 | 
             
            files: 
         | 
| 42 66 | 
             
            - CHANGELOG.rdoc
         | 
| 43 67 | 
             
            - lib/net/ssh/multi/channel.rb
         | 
| @@ -66,8 +90,13 @@ files: | |
| 66 90 | 
             
            has_rdoc: true
         | 
| 67 91 | 
             
            homepage: http://net-ssh.rubyforge.org/multi
         | 
| 68 92 | 
             
            post_install_message: 
         | 
| 69 | 
            -
            rdoc_options:  | 
| 70 | 
            -
             | 
| 93 | 
            +
            rdoc_options: 
         | 
| 94 | 
            +
            - --line-numbers
         | 
| 95 | 
            +
            - --inline-source
         | 
| 96 | 
            +
            - --title
         | 
| 97 | 
            +
            - Net-ssh-multi
         | 
| 98 | 
            +
            - --main
         | 
| 99 | 
            +
            - README.rdoc
         | 
| 71 100 | 
             
            require_paths: 
         | 
| 72 101 | 
             
            - lib
         | 
| 73 102 | 
             
            required_ruby_version: !ruby/object:Gem::Requirement 
         | 
| @@ -80,12 +109,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 80 109 | 
             
              requirements: 
         | 
| 81 110 | 
             
              - - ">="
         | 
| 82 111 | 
             
                - !ruby/object:Gem::Version 
         | 
| 83 | 
            -
                  version: " | 
| 112 | 
            +
                  version: "1.2"
         | 
| 84 113 | 
             
              version: 
         | 
| 85 114 | 
             
            requirements: []
         | 
| 86 115 |  | 
| 87 116 | 
             
            rubyforge_project: net-ssh-multi
         | 
| 88 | 
            -
            rubygems_version: 1. | 
| 117 | 
            +
            rubygems_version: 1.2.0
         | 
| 89 118 | 
             
            signing_key: 
         | 
| 90 119 | 
             
            specification_version: 2
         | 
| 91 120 | 
             
            summary: Control multiple Net::SSH connections via a single interface
         |