sshort 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +5 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +42 -0
- data/lib/sshort/version.rb +3 -0
- data/lib/sshort.rb +1 -0
- data/lib/tasks/ssh.rake +8 -0
- data/sshort.gemspec +21 -0
- metadata +68 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: dabf7a8478df3ca1efdb86607116e9c9cf2fd2f5
|
4
|
+
data.tar.gz: df644cbab1977821e2a203b7b14c175deb1e4980
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 979d69f21733aa516ed768d1b6127857aea38f47ff707ef6b08df1f206f312aabce6cc60ba70f3f778c6c96803b12c9cdddfaa9b38ab88b0e1e6f1f016294a8d
|
7
|
+
data.tar.gz: 69669b38427b8c75aba0e8296e52b8eb85e06e83c2ac5419ce4c184cd1ff0b0dcbd1426a5c283fa5dfd4dd2444c3a774b7ae2356e2575ea3b1ad4de6fa888f86
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 RailsMuffin LLC.
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
# Sshort
|
2
|
+
|
3
|
+
Initiate an SSH connection to your Capistrano configured server
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
```ruby
|
8
|
+
gem 'sshort'
|
9
|
+
```
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
```
|
14
|
+
bundle
|
15
|
+
```
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
```
|
20
|
+
gem install sshort
|
21
|
+
```
|
22
|
+
|
23
|
+
## Configuration
|
24
|
+
|
25
|
+
Add the following line to `Capfile`
|
26
|
+
|
27
|
+
```ruby
|
28
|
+
require 'sshort'
|
29
|
+
```
|
30
|
+
|
31
|
+
## Usage
|
32
|
+
|
33
|
+
```
|
34
|
+
cap ssh
|
35
|
+
```
|
36
|
+
|
37
|
+
## License
|
38
|
+
|
39
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
40
|
+
|
41
|
+
|
42
|
+
|
data/lib/sshort.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
load File.expand_path('../tasks/ssh.rake', __FILE__)
|
data/lib/tasks/ssh.rake
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
desc 'Starts SSH connection to a remote server.'
|
2
|
+
task :ssh do
|
3
|
+
on roles((ENV['ROLE'] || :app).to_sym) do |server|
|
4
|
+
ssh_command = "ssh -p #{server.port || 22} #{server.user}@#{server.hostname}"
|
5
|
+
cd_command = "cd #{fetch(:deploy_to)}/current && bash"
|
6
|
+
system "#{ssh_command} -t \"#{cd_command}\""
|
7
|
+
end
|
8
|
+
end
|
data/sshort.gemspec
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'sshort/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'sshort'
|
8
|
+
spec.version = Sshort::VERSION
|
9
|
+
spec.authors = ['Railsmuffin LLC.']
|
10
|
+
spec.email = ['sergey@railsmuffin.com']
|
11
|
+
|
12
|
+
spec.summary = 'Capistrano SSH recipe to initiate an SSH connection to your Capistrano configured server'
|
13
|
+
spec.description = spec.summary
|
14
|
+
spec.homepage = 'http://github.com/railsmuffin/sshort'
|
15
|
+
spec.license = 'MIT'
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
+
spec.require_paths = ['lib']
|
19
|
+
|
20
|
+
spec.add_dependency 'capistrano', '~> 3.1'
|
21
|
+
end
|
metadata
ADDED
@@ -0,0 +1,68 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: sshort
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Railsmuffin LLC.
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-09-09 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: capistrano
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.1'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3.1'
|
27
|
+
description: Capistrano SSH recipe to initiate an SSH connection to your Capistrano
|
28
|
+
configured server
|
29
|
+
email:
|
30
|
+
- sergey@railsmuffin.com
|
31
|
+
executables: []
|
32
|
+
extensions: []
|
33
|
+
extra_rdoc_files: []
|
34
|
+
files:
|
35
|
+
- ".gitignore"
|
36
|
+
- Gemfile
|
37
|
+
- LICENSE.txt
|
38
|
+
- README.md
|
39
|
+
- lib/sshort.rb
|
40
|
+
- lib/sshort/version.rb
|
41
|
+
- lib/tasks/ssh.rake
|
42
|
+
- sshort.gemspec
|
43
|
+
homepage: http://github.com/railsmuffin/sshort
|
44
|
+
licenses:
|
45
|
+
- MIT
|
46
|
+
metadata: {}
|
47
|
+
post_install_message:
|
48
|
+
rdoc_options: []
|
49
|
+
require_paths:
|
50
|
+
- lib
|
51
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ">="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
56
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0'
|
61
|
+
requirements: []
|
62
|
+
rubyforge_project:
|
63
|
+
rubygems_version: 2.4.5.1
|
64
|
+
signing_key:
|
65
|
+
specification_version: 4
|
66
|
+
summary: Capistrano SSH recipe to initiate an SSH connection to your Capistrano configured
|
67
|
+
server
|
68
|
+
test_files: []
|