Sha256: d6f192695cf0e998656d3acfe16c32863c2302a544a144b6e3b8fa23b731db95

Contents?: true

Size: 1.51 KB

Versions: 5

Compression:

Stored size: 1.51 KB

Contents

remote-session [![Build Status](https://secure.travis-ci.org/joeyates/remote-session.png)][Continuous Integration]
==============

*Run user, and sudo, commands over an SSH connection*

  * [Source Code]
  * [API documentation]
  * [Rubygem]
  * [Continuous Integration]

[Source Code]: https://github.com/joeyates/remote-session "Source code at GitHub"
[API documentation]: http://rubydoc.info/gems/remote-session/frames "RDoc API Documentation at Rubydoc.info"
[Rubygem]: http://rubygems.org/gems/remote-session "Ruby gem at rubygems.org"
[Continuous Integration]: http://travis-ci.org/joeyates/remote-session "Build status by Travis-CI"

## Installation

Add this line to your application's Gemfile:

    gem 'remote/session'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install remote-session

## Usage

```ruby
require 'remote/session'

r = Remote::Session.new( 'host.example.com' )
puts r.run( 'pwd' )
puts r.sudo( 'apt-get update' )
r.close
```

In a block:
```ruby
Remote::Session.new( 'host.example.com', :user => 'user' ) | r | do
  puts r.run( 'pwd' )
  puts r.sudo( 'apt-get update' )
end
```

Options:
```ruby
Remote::Session.new( 'host.example.com', :user => 'user', :password => 'password' ) | r | do
  puts r.run( 'pwd' )
  puts r.sudo( 'apt-get update' )
end
```

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Added some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
remote-session-0.0.6 README.md
remote-session-0.0.5 README.md
remote-session-0.0.4 README.md
remote-session-0.0.3 README.md
remote-session-0.0.2 README.md