capistrano_ssh_tool 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.
- checksums.yaml +7 -0
- data/README.rdoc +34 -0
- data/capistrano_quick_ssh.gemspec +49 -0
- data/lib/capistrano/quick_ssh.rb +1 -0
- data/lib/capistrano/quick_ssh/version.rb +10 -0
- data/lib/capistrano/tasks/quick_ssh.rake +20 -0
- metadata +66 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 0c8fe196239d0efff7bce361a84d87d16613a0b7
|
4
|
+
data.tar.gz: df9ad8f5f46a96cad2a849212f1d2716101664b6
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: fe76b550c2e67d3722fe81cc37229c533825bfe955fcee1b48d9e3c87e1387ef26272cb303b045031b4b7d54e74a75464771bb5dc5bb916d614315917d6b2282
|
7
|
+
data.tar.gz: 97b1f75beda5dc19fcbb5dbc523fa06d50cb5fd535a4d131954d3bb84f2012fdae65dde4142c28d4149006256d3c9de565e14a3d3bc2f70bb688002716c33600
|
data/README.rdoc
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
== Capistrano quick SSH
|
2
|
+
|
3
|
+
Adds a capistrano task which allows you to easily ssh into your different environments machines
|
4
|
+
|
5
|
+
=== Installation
|
6
|
+
|
7
|
+
In your Gemfile:
|
8
|
+
|
9
|
+
group :development do
|
10
|
+
gem 'capistrano_quick_ssh'
|
11
|
+
end
|
12
|
+
|
13
|
+
And in your config/deploy.rb:
|
14
|
+
|
15
|
+
require 'capistrano/quick_ssh'
|
16
|
+
|
17
|
+
|
18
|
+
=== How to use
|
19
|
+
|
20
|
+
Simply run:
|
21
|
+
|
22
|
+
capistrano [environment] ssh
|
23
|
+
|
24
|
+
and you will be logged in or prompted (if more than one machine)
|
25
|
+
|
26
|
+
Example:
|
27
|
+
|
28
|
+
capistrano production ssh
|
29
|
+
|
30
|
+
== License
|
31
|
+
|
32
|
+
@copy; Copyright Yossi Shemesh
|
33
|
+
|
34
|
+
Released under an MIT License.
|
@@ -0,0 +1,49 @@
|
|
1
|
+
require File.expand_path('./lib/capistrano/quick_ssh/version.rb')
|
2
|
+
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.specification_version = 2 if s.respond_to? :specification_version=
|
5
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
6
|
+
|
7
|
+
## Leave these as is they will be modified for you by the rake gemspec task.
|
8
|
+
## If your rubyforge_project name is different, then edit it and comment out
|
9
|
+
## the sub! line in the Rakefile
|
10
|
+
s.name = 'capistrano_ssh_tool'
|
11
|
+
s.version = CapistranoEasySSH::Version.to_s
|
12
|
+
s.date = Time.now.strftime("%Y-%m-%d")
|
13
|
+
s.license = 'MIT'
|
14
|
+
|
15
|
+
## Make sure your summary is short. The description may be as long
|
16
|
+
## as you like.
|
17
|
+
s.summary = "Capistrano extension for easy ssh access into a specific environment's machines"
|
18
|
+
s.description = "Capistrano extension for easy ssh access into a specific environment's machines"
|
19
|
+
|
20
|
+
## List the primary authors. If there are a bunch of authors, it's probably
|
21
|
+
## better to set the email to an email list or something. If you don't have
|
22
|
+
## a custom homepage, consider using your GitHub URL or the like.
|
23
|
+
s.authors = ["Yossi Shemesh"]
|
24
|
+
s.email = 'yossi@yshemesh.com'
|
25
|
+
s.homepage = 'https://github.com/yosefsun/capistrano_quick_ssh'
|
26
|
+
|
27
|
+
## This sections is only necessary if you have C extensions.
|
28
|
+
# s.require_paths << 'ext'
|
29
|
+
# s.extensions = %w[ext/extconf.rb]
|
30
|
+
|
31
|
+
## If your gem includes any executables, list them here.
|
32
|
+
s.executables = []
|
33
|
+
|
34
|
+
## Specify any RDoc options here. You'll want to add your README and
|
35
|
+
## LICENSE files to the extra_rdoc_files list.
|
36
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
37
|
+
s.extra_rdoc_files = %w[README.rdoc]
|
38
|
+
|
39
|
+
## List your runtime dependencies here. Runtime dependencies are those
|
40
|
+
## that are needed for an end user to actually USE your code.
|
41
|
+
s.add_dependency('capistrano', '>= 3.0.0')
|
42
|
+
|
43
|
+
## List your development dependencies here. Development dependencies are
|
44
|
+
## those that are only needed during development
|
45
|
+
#s.add_development_dependency('rake')
|
46
|
+
|
47
|
+
s.files = `git ls-files`.split("\n")
|
48
|
+
s.test_files = `git ls-files -- {spec,tests}/*`.split("\n")
|
49
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
load File.expand_path('../tasks/quick_ssh.rake', __FILE__)
|
@@ -0,0 +1,20 @@
|
|
1
|
+
desc "SSH"
|
2
|
+
task :ssh do
|
3
|
+
run_locally do
|
4
|
+
if (roles(:all).count == 1)
|
5
|
+
host = roles(:all).last
|
6
|
+
else
|
7
|
+
puts 'Pick a server you would like to SSH into :'
|
8
|
+
roles(:all).each_with_index do |host, index|
|
9
|
+
puts "#{index+1}) #{host.user}@#{host.hostname} (#{host.roles.to_a.join(',')})"
|
10
|
+
end
|
11
|
+
|
12
|
+
print '> '
|
13
|
+
line = $stdin.gets
|
14
|
+
host = roles(:all)[line.to_i-1]
|
15
|
+
end
|
16
|
+
cmd = "ssh #{host.user}@#{host.hostname}"
|
17
|
+
puts "runing #{cmd}"
|
18
|
+
system(cmd)
|
19
|
+
end
|
20
|
+
end
|
metadata
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: capistrano_ssh_tool
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Yossi Shemesh
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-11-16 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.0.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 3.0.0
|
27
|
+
description: Capistrano extension for easy ssh access into a specific environment's
|
28
|
+
machines
|
29
|
+
email: yossi@yshemesh.com
|
30
|
+
executables: []
|
31
|
+
extensions: []
|
32
|
+
extra_rdoc_files:
|
33
|
+
- README.rdoc
|
34
|
+
files:
|
35
|
+
- README.rdoc
|
36
|
+
- capistrano_quick_ssh.gemspec
|
37
|
+
- lib/capistrano/quick_ssh.rb
|
38
|
+
- lib/capistrano/quick_ssh/version.rb
|
39
|
+
- lib/capistrano/tasks/quick_ssh.rake
|
40
|
+
homepage: https://github.com/yosefsun/capistrano_quick_ssh
|
41
|
+
licenses:
|
42
|
+
- MIT
|
43
|
+
metadata: {}
|
44
|
+
post_install_message:
|
45
|
+
rdoc_options:
|
46
|
+
- "--charset=UTF-8"
|
47
|
+
require_paths:
|
48
|
+
- lib
|
49
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
55
|
+
requirements:
|
56
|
+
- - ">="
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
version: '0'
|
59
|
+
requirements: []
|
60
|
+
rubyforge_project:
|
61
|
+
rubygems_version: 2.4.6
|
62
|
+
signing_key:
|
63
|
+
specification_version: 2
|
64
|
+
summary: Capistrano extension for easy ssh access into a specific environment's machines
|
65
|
+
test_files: []
|
66
|
+
has_rdoc:
|