hss 0.1.15 → 0.1.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (8) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -0
  3. data/LICENSE +22 -0
  4. data/README.md +55 -0
  5. data/Rakefile +2 -0
  6. data/hss.gemspec +15 -0
  7. data/lib/hss +1 -1
  8. metadata +7 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d2152d05fe1edee8b07a7166f47e24c170adda81
4
- data.tar.gz: 005d4f257a2fb1f06d0930ef2608b456da9e26de
3
+ metadata.gz: fca621d44a6bedab2a40aaa00cc1cac389dce3b7
4
+ data.tar.gz: 1f3250f9a8bce1d4866bdcb5256bd65c7d4b36d7
5
5
  SHA512:
6
- metadata.gz: 0c6e0ef4ab34523f278d99d0670d8d99b94b55624c5a6e05738e807c5fab355a9e4b0d5d9100660a8844068109312a327a63759369afa417dd024811e7124c2c
7
- data.tar.gz: 2311a13814aacad0c47d9aeb788295391364423d66aef46f34d121b3bde14c55e0a1f41bc72e90afbb8a5e267c28cbaf675c676394f8313f401fad5e923270a9
6
+ metadata.gz: 692ecf2d9d2f1599506ed05417af409c9b5c28324f9307e658305689ffd1761ef0ec384fc385530e65f90e6c5414922380a0b6f8afee8ab47facc982231c10e6
7
+ data.tar.gz: c349036332ef4d159c5c6d1d3a14037cb979a194b6b73d903c9827cda61da00d368f934ce7585398812bae0e3891a2b0cae8f0a46d60ec3bd87ab9abef4c8d16
data/.gitignore ADDED
@@ -0,0 +1,2 @@
1
+ config.yml
2
+ *.gem
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2013 Les Aker
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.
22
+
data/README.md ADDED
@@ -0,0 +1,55 @@
1
+ hss
2
+ =========
3
+
4
+ [![Gem Version](https://badge.fury.io/rb/hss.png)](http://badge.fury.io/rb/hss)
5
+ [![Stories in Ready](https://badge.waffle.io/akerl/hss.png)](http://waffle.io/akerl/hss)
6
+
7
+ SSH helper that uses regex and fancy expansion to dynamically manage SSH shortcuts
8
+
9
+ ## Usage
10
+
11
+ 1. Install as per the Installation section below
12
+ 2. Set your configuration yaml up as desired (See Configuration below)
13
+ 3. Run `hss help` for a list of available commands
14
+ 4. Run `hss $command` to do that thing
15
+
16
+ ## Installation
17
+
18
+ gem install hss
19
+ ln -s /path/to/your/config.yml ~/.hss.yml
20
+
21
+ ## Configuration
22
+
23
+ 1. You can put your configuration in ~/.hss.yml or another file specified by the "HSS\_CONFIG" environment variable.
24
+ 2. The only required configuration section is "patterns", which contains an array of hashes with the following attributes:
25
+ * note: Name of this pattern ("my servers")
26
+ * example: Shows how this is used ("jimbo -> root@jimbo.example.org")
27
+ * short: Regex for shortcut ("^(jimbo|bob|chuck)$")
28
+ * Use matching to collect things you want to use in the expanded form
29
+ * long: Expanded form of this shortcut ("root@#$1.example.org")
30
+ * This will be evaluated using Ruby's string interpolation, so you can use "#{var}", "#$1", "#{function()}", etc.
31
+ 3. Other helpers are available for use in long forms
32
+ * expand(x): Uses the "expansions" section of the config. Format for this section is a hash of lists, as such
33
+ expansions:
34
+ expanded_form:
35
+ - short_form1
36
+ - short_form2
37
+ - shrtfrm3
38
+ * shortcut(x): Uses the "shortcuts" section of the config. Format for this section is a hash of strings, as such
39
+ shortcuts:
40
+ short1: expand to this
41
+ other_short: 'expand to something else!'
42
+ * command(x): Runs the given string as a command and uses the output for the expanded form
43
+ * default(x, y): If x is not nil, uses x. If it's nil, use y
44
+
45
+ ## Debugging
46
+
47
+ If you want hss to print the command it would have run rather than executing it, you just need to set the HSS\_DEBUG environment variable to something:
48
+
49
+ export HSS_DEBUG=foo
50
+ hss bar # will print rather than exec
51
+
52
+ ## License
53
+
54
+ hss is released under the MIT License. See the bundled LICENSE file for details.
55
+
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+
data/hss.gemspec ADDED
@@ -0,0 +1,15 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = 'hss'
3
+ s.version = IO.popen('./lib/hss version') { |cmd| cmd.read }
4
+ s.date = Time.now.strftime("%Y-%m-%d")
5
+ s.summary = 'SSH helper'
6
+ s.description = 'Regex-based SSH shortcut tool'
7
+ s.authors = ['Les Aker']
8
+ s.email = 'me@lesaker.org'
9
+ s.bindir = 'lib'
10
+ s.files = `git ls-files`.split
11
+ s.executables = ['hss']
12
+ s.homepage = 'https://github.com/akerl/hss'
13
+ s.license = 'MIT'
14
+ end
15
+
data/lib/hss CHANGED
@@ -3,7 +3,7 @@
3
3
  require 'yaml'
4
4
  require 'pathname'
5
5
 
6
- Version = '0.1.15'
6
+ Version = '0.1.16'
7
7
 
8
8
  if ARGV.length == 1 and ARGV[0] == 'version'
9
9
  puts Version
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hss
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.15
4
+ version: 0.1.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Les Aker
8
8
  autorequire:
9
9
  bindir: lib
10
10
  cert_chain: []
11
- date: 2013-09-25 00:00:00.000000000 Z
11
+ date: 2013-09-29 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Regex-based SSH shortcut tool
14
14
  email: me@lesaker.org
@@ -17,6 +17,11 @@ executables:
17
17
  extensions: []
18
18
  extra_rdoc_files: []
19
19
  files:
20
+ - .gitignore
21
+ - LICENSE
22
+ - README.md
23
+ - Rakefile
24
+ - hss.gemspec
20
25
  - lib/hss
21
26
  homepage: https://github.com/akerl/hss
22
27
  licenses: