hss 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +46 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05cb1596ba74874d79d8012856ab780901210453
|
4
|
+
data.tar.gz: a3ec20fbaed54bda22105ace553c7efc60595a55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8319cd19c9c0d649ef075eb497a4ae9f94a9c61832bf7f1cd0da97a33d63fea9c075233e76d79d48bf906c2fb10847711f50de6087afb0f72f3a5898b3940a46
|
7
|
+
data.tar.gz: 37ea6162d3a58571edd00c78818b7e5363ea996acb376652a3e8cc239f5852f1dbd0572ca4911f9157aa532c42543a750f6772dd3a9b2fe8956f6b0d87119ee4
|
data/README.md
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
hss
|
2
|
+
=========
|
3
|
+
|
4
|
+
[![Gem Version](https://badge.fury.io/rb/hss.png)](http://badge.fury.io/rb/hss)
|
5
|
+
|
6
|
+
SSH helper that uses regex and fancy expansion to dynamically manage SSH shortcuts
|
7
|
+
|
8
|
+
## Usage
|
9
|
+
|
10
|
+
1. Install as per the Installation section below
|
11
|
+
2. Set your configuration yaml up as desired (See Configuration below)
|
12
|
+
3. Run `hss help` for a list of available commands
|
13
|
+
4. Run `hss $command` to do that thing
|
14
|
+
|
15
|
+
## Configuration
|
16
|
+
|
17
|
+
1. You can put your configuration in ~/.hss.yml or another file specified by the "HSS\_CONFIG" environment variable.
|
18
|
+
2. The only required configuration section is "patterns", which contains an array of hashes with the following attributes:
|
19
|
+
* note: Name of this pattern ("my servers")
|
20
|
+
* example: Shows how this is used ("jimbo -> root@jimbo.example.org")
|
21
|
+
* short: Regex for shortcut ("^(jimbo|bob|chuck)$")
|
22
|
+
* Use matching to collect things you want to use in the expanded form
|
23
|
+
* long: Expanded form of this shortcut ("root@#$1.example.org")
|
24
|
+
* This will be evaluated using Ruby's string interpolation, so you can use "#{var}", "#$1", "#{function()}", etc.
|
25
|
+
3. Other helpers are available for use in long forms
|
26
|
+
* expand(): Uses the "expansions" section of the comfig. Format for this section is a hash of lists, as such
|
27
|
+
expansions:
|
28
|
+
expanded_form:
|
29
|
+
- short_form1
|
30
|
+
- short_form2
|
31
|
+
- shrtfrm3
|
32
|
+
* shortcut(): Uses the "shortcuts" section of the config. Format for this section is a hash of strings, as such
|
33
|
+
shortcuts:
|
34
|
+
short1: expand to this
|
35
|
+
other_short: 'expand to something else!'
|
36
|
+
* command(): Runs the given string as a command and uses the output for the expanded form
|
37
|
+
|
38
|
+
## Installation
|
39
|
+
|
40
|
+
gem install hss
|
41
|
+
ln -s /path/to/your/config.yml ~/.hss.yml
|
42
|
+
|
43
|
+
## License
|
44
|
+
|
45
|
+
hss is released under the MIT License. See the bundled LICENSE file for details.
|
46
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hss
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Les Aker
|
@@ -15,8 +15,10 @@ email: me@lesaker.org
|
|
15
15
|
executables:
|
16
16
|
- hss
|
17
17
|
extensions: []
|
18
|
-
extra_rdoc_files:
|
18
|
+
extra_rdoc_files:
|
19
|
+
- README.md
|
19
20
|
files:
|
21
|
+
- README.md
|
20
22
|
- ./hss
|
21
23
|
homepage: https://github.com/akerl/hss
|
22
24
|
licenses:
|