hss 0.2.6 → 0.2.8
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 +4 -4
- data/Gemfile.lock +11 -13
- data/README.md +14 -1
- data/Rakefile +6 -1
- data/bin/hss +6 -1
- data/hss.gemspec +1 -1
- data/lib/hss.rb +1 -1
- data/lib/version.rb +1 -1
- data/spec/hss_spec.rb +1 -1
- data/vendor/cache/docile-1.1.1.gem +0 -0
- data/vendor/cache/fuubar-1.3.2.gem +0 -0
- data/vendor/cache/parser-2.1.1.gem +0 -0
- data/vendor/cache/rake-10.1.1.gem +0 -0
- data/vendor/cache/rubocop-0.16.0.gem +0 -0
- data/vendor/cache/ruby-progressbar-1.3.2.gem +0 -0
- metadata +31 -31
- data/vendor/cache/docile-1.1.0.gem +0 -0
- data/vendor/cache/fuubar-1.2.1.gem +0 -0
- data/vendor/cache/parser-2.1.0.pre1.gem +0 -0
- data/vendor/cache/rake-10.1.0.gem +0 -0
- data/vendor/cache/rspec-instafail-0.2.4.gem +0 -0
- data/vendor/cache/rubocop-0.15.0.gem +0 -0
- data/vendor/cache/ruby-progressbar-1.2.0.gem +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7de0f7377bbf2146c440d1887801387de8fc962b
|
|
4
|
+
data.tar.gz: 22d69611fc2b3ef0b390870956e997c1176b9fd9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6fb132254e0eb4009d4c533f61093bef8d8d7cb068eac18ca1a4ef9df1e24c971c08fb1b299bc8f79a9d6fc582deac537df55a6ab29929c8ef36224ac27bc9bc
|
|
7
|
+
data.tar.gz: 1c9ca1115b1f0a65324ebc710f89589c1ddd0773c65d3ffafbafd78071029e073e2e032ca357b1192e1cd103f657da6f104157c5fe2373bd361fad2865f763e4
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
hss (0.2.
|
|
4
|
+
hss (0.2.8)
|
|
5
5
|
|
|
6
6
|
GEM
|
|
7
7
|
remote: https://rubygems.org/
|
|
@@ -14,20 +14,19 @@ GEM
|
|
|
14
14
|
term-ansicolor
|
|
15
15
|
thor
|
|
16
16
|
diff-lcs (1.2.5)
|
|
17
|
-
docile (1.1.
|
|
18
|
-
fuubar (1.2
|
|
19
|
-
rspec (
|
|
20
|
-
|
|
21
|
-
ruby-progressbar (~> 1.0)
|
|
17
|
+
docile (1.1.1)
|
|
18
|
+
fuubar (1.3.2)
|
|
19
|
+
rspec (>= 2.14.0, < 3.1.0)
|
|
20
|
+
ruby-progressbar (~> 1.3)
|
|
22
21
|
hashr (0.0.22)
|
|
23
22
|
mime-types (2.0)
|
|
24
23
|
multi_json (1.8.2)
|
|
25
|
-
parser (2.1.
|
|
24
|
+
parser (2.1.1)
|
|
26
25
|
ast (~> 1.1)
|
|
27
26
|
slop (~> 3.4, >= 3.4.5)
|
|
28
27
|
powerpack (0.0.9)
|
|
29
28
|
rainbow (1.1.4)
|
|
30
|
-
rake (10.1.
|
|
29
|
+
rake (10.1.1)
|
|
31
30
|
rest-client (1.6.7)
|
|
32
31
|
mime-types (>= 1.16)
|
|
33
32
|
rspec (2.14.1)
|
|
@@ -37,13 +36,12 @@ GEM
|
|
|
37
36
|
rspec-core (2.14.7)
|
|
38
37
|
rspec-expectations (2.14.4)
|
|
39
38
|
diff-lcs (>= 1.1.3, < 2.0)
|
|
40
|
-
rspec-instafail (0.2.4)
|
|
41
39
|
rspec-mocks (2.14.4)
|
|
42
|
-
rubocop (0.
|
|
43
|
-
parser (~> 2.
|
|
40
|
+
rubocop (0.16.0)
|
|
41
|
+
parser (~> 2.1)
|
|
44
42
|
powerpack (~> 0.0.6)
|
|
45
43
|
rainbow (>= 1.1.4)
|
|
46
|
-
ruby-progressbar (1.2
|
|
44
|
+
ruby-progressbar (1.3.2)
|
|
47
45
|
simplecov (0.8.2)
|
|
48
46
|
docile (~> 1.1.0)
|
|
49
47
|
multi_json
|
|
@@ -64,7 +62,7 @@ DEPENDENCIES
|
|
|
64
62
|
coveralls
|
|
65
63
|
fuubar
|
|
66
64
|
hss!
|
|
67
|
-
parser
|
|
65
|
+
parser
|
|
68
66
|
rake
|
|
69
67
|
rspec
|
|
70
68
|
rubocop
|
data/README.md
CHANGED
|
@@ -18,7 +18,7 @@ ln -s /path/to/your/config.yml ~/.hss.yml
|
|
|
18
18
|
|
|
19
19
|
### SCP usage
|
|
20
20
|
|
|
21
|
-
This script can be used by SCP and other things that use SSH as a transport. To use it with
|
|
21
|
+
This script can be used by SCP and other things that use SSH as a transport. To use it with SCP, just specify hss for the -S flag:
|
|
22
22
|
|
|
23
23
|
```
|
|
24
24
|
scp -S hss host:files/ other_host:location/
|
|
@@ -76,6 +76,19 @@ fish:
|
|
|
76
76
|
1. Run `hss help` for a list of available commands
|
|
77
77
|
2. Run `hss $command` to do that thing
|
|
78
78
|
|
|
79
|
+
## Falling back to another command
|
|
80
|
+
|
|
81
|
+
If you define the environment variable "HSS_PASS", hss will fall back to that command if it fails to find a match:
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
# export HSS_PASS='ssh'
|
|
85
|
+
|
|
86
|
+
# hss git@github.com
|
|
87
|
+
PTY allocation request failed on channel 0
|
|
88
|
+
Hi akerl! You've successfully authenticated, but GitHub does not provide shell access.
|
|
89
|
+
Connection to github.com closed.
|
|
90
|
+
```
|
|
91
|
+
|
|
79
92
|
## Debugging
|
|
80
93
|
|
|
81
94
|
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:
|
data/Rakefile
CHANGED
|
@@ -2,6 +2,11 @@ require 'bundler/gem_tasks'
|
|
|
2
2
|
require 'rspec/core/rake_task'
|
|
3
3
|
require 'rubocop/rake_task'
|
|
4
4
|
|
|
5
|
+
desc 'Update bundle'
|
|
6
|
+
task :bundle do
|
|
7
|
+
`bundle update`
|
|
8
|
+
end
|
|
9
|
+
|
|
5
10
|
desc 'Run tests'
|
|
6
11
|
RSpec::Core::RakeTask.new(:spec)
|
|
7
12
|
|
|
@@ -17,4 +22,4 @@ task :travislint do
|
|
|
17
22
|
end
|
|
18
23
|
|
|
19
24
|
task default: [:spec, :travislint, :rubocop, :build, :install]
|
|
20
|
-
|
|
25
|
+
task release: [:bundle]
|
data/bin/hss
CHANGED
|
@@ -18,7 +18,12 @@ short_host = ARGV.delete_at(ARGV.find_index { |x| x[0, 1] != '-' } || 0)
|
|
|
18
18
|
args = ARGV.reduce('') { |a, e| a + " '" + e.gsub(/([$"])/, '\1') + "'" }
|
|
19
19
|
command = ENV.include?('HSS_DEBUG') ? 'echo ssh' : 'ssh'
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
begin
|
|
22
|
+
long_host = My_Handler.handle short_host
|
|
23
|
+
rescue NameError
|
|
24
|
+
exec "#{ENV['HSS_PASS']} #{args} #{short_host}" if ENV.include? 'HSS_PASS'
|
|
25
|
+
raise
|
|
26
|
+
end
|
|
22
27
|
|
|
23
28
|
$stdout.syswrite "\033]0;#{short_host}\007" if $stdout.tty? && $stdin.tty?
|
|
24
29
|
exec "#{command} #{long_host} #{args}"
|
data/hss.gemspec
CHANGED
|
@@ -22,6 +22,6 @@ Gem::Specification.new do |s|
|
|
|
22
22
|
s.add_development_dependency 'coveralls'
|
|
23
23
|
s.add_development_dependency 'rspec'
|
|
24
24
|
s.add_development_dependency 'fuubar'
|
|
25
|
-
s.add_development_dependency 'parser'
|
|
25
|
+
s.add_development_dependency 'parser'
|
|
26
26
|
end
|
|
27
27
|
|
data/lib/hss.rb
CHANGED
data/lib/version.rb
CHANGED
data/spec/hss_spec.rb
CHANGED
|
@@ -76,7 +76,7 @@ describe HSS do
|
|
|
76
76
|
expect(handler.handle 'name_a').to eql 'name_ALPHA'
|
|
77
77
|
end
|
|
78
78
|
it 'raises an error if no match is found' do
|
|
79
|
-
expect { handler.handle 'x' }.to raise_exception
|
|
79
|
+
expect { handler.handle 'x' }.to raise_exception NameError
|
|
80
80
|
end
|
|
81
81
|
it 'supports combination of helpers' do
|
|
82
82
|
expect(handler.handle 'bar__1_b').to eql 'bar_9_alpha_BETA'
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
metadata
CHANGED
|
@@ -1,113 +1,113 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: hss
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Les Aker
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2013-12-
|
|
11
|
+
date: 2013-12-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rubocop
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
|
-
- -
|
|
17
|
+
- - ">="
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
19
|
version: '0'
|
|
20
20
|
type: :development
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
|
-
- -
|
|
24
|
+
- - ">="
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
26
|
version: '0'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: travis-lint
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
|
-
- -
|
|
31
|
+
- - ">="
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
33
|
version: '0'
|
|
34
34
|
type: :development
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
|
-
- -
|
|
38
|
+
- - ">="
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
40
|
version: '0'
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: rake
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
44
44
|
requirements:
|
|
45
|
-
- -
|
|
45
|
+
- - ">="
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
47
|
version: '0'
|
|
48
48
|
type: :development
|
|
49
49
|
prerelease: false
|
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
|
52
|
-
- -
|
|
52
|
+
- - ">="
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
54
|
version: '0'
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
56
|
name: coveralls
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
58
58
|
requirements:
|
|
59
|
-
- -
|
|
59
|
+
- - ">="
|
|
60
60
|
- !ruby/object:Gem::Version
|
|
61
61
|
version: '0'
|
|
62
62
|
type: :development
|
|
63
63
|
prerelease: false
|
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
65
|
requirements:
|
|
66
|
-
- -
|
|
66
|
+
- - ">="
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
68
|
version: '0'
|
|
69
69
|
- !ruby/object:Gem::Dependency
|
|
70
70
|
name: rspec
|
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
|
72
72
|
requirements:
|
|
73
|
-
- -
|
|
73
|
+
- - ">="
|
|
74
74
|
- !ruby/object:Gem::Version
|
|
75
75
|
version: '0'
|
|
76
76
|
type: :development
|
|
77
77
|
prerelease: false
|
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
|
79
79
|
requirements:
|
|
80
|
-
- -
|
|
80
|
+
- - ">="
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
82
|
version: '0'
|
|
83
83
|
- !ruby/object:Gem::Dependency
|
|
84
84
|
name: fuubar
|
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
|
86
86
|
requirements:
|
|
87
|
-
- -
|
|
87
|
+
- - ">="
|
|
88
88
|
- !ruby/object:Gem::Version
|
|
89
89
|
version: '0'
|
|
90
90
|
type: :development
|
|
91
91
|
prerelease: false
|
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
|
93
93
|
requirements:
|
|
94
|
-
- -
|
|
94
|
+
- - ">="
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
96
|
version: '0'
|
|
97
97
|
- !ruby/object:Gem::Dependency
|
|
98
98
|
name: parser
|
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
|
100
100
|
requirements:
|
|
101
|
-
- -
|
|
101
|
+
- - ">="
|
|
102
102
|
- !ruby/object:Gem::Version
|
|
103
|
-
version:
|
|
103
|
+
version: '0'
|
|
104
104
|
type: :development
|
|
105
105
|
prerelease: false
|
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
|
107
107
|
requirements:
|
|
108
|
-
- -
|
|
108
|
+
- - ">="
|
|
109
109
|
- !ruby/object:Gem::Version
|
|
110
|
-
version:
|
|
110
|
+
version: '0'
|
|
111
111
|
description: Regex-based SSH shortcut tool
|
|
112
112
|
email: me@lesaker.org
|
|
113
113
|
executables:
|
|
@@ -115,10 +115,10 @@ executables:
|
|
|
115
115
|
extensions: []
|
|
116
116
|
extra_rdoc_files: []
|
|
117
117
|
files:
|
|
118
|
-
- .gitignore
|
|
119
|
-
- .rspec
|
|
120
|
-
- .rubocop.yml
|
|
121
|
-
- .travis.yml
|
|
118
|
+
- ".gitignore"
|
|
119
|
+
- ".rspec"
|
|
120
|
+
- ".rubocop.yml"
|
|
121
|
+
- ".travis.yml"
|
|
122
122
|
- Gemfile
|
|
123
123
|
- Gemfile.lock
|
|
124
124
|
- LICENSE
|
|
@@ -151,23 +151,22 @@ files:
|
|
|
151
151
|
- vendor/cache/ast-1.1.0.gem
|
|
152
152
|
- vendor/cache/coveralls-0.7.0.gem
|
|
153
153
|
- vendor/cache/diff-lcs-1.2.5.gem
|
|
154
|
-
- vendor/cache/docile-1.1.
|
|
155
|
-
- vendor/cache/fuubar-1.2.
|
|
154
|
+
- vendor/cache/docile-1.1.1.gem
|
|
155
|
+
- vendor/cache/fuubar-1.3.2.gem
|
|
156
156
|
- vendor/cache/hashr-0.0.22.gem
|
|
157
157
|
- vendor/cache/mime-types-2.0.gem
|
|
158
158
|
- vendor/cache/multi_json-1.8.2.gem
|
|
159
|
-
- vendor/cache/parser-2.1.
|
|
159
|
+
- vendor/cache/parser-2.1.1.gem
|
|
160
160
|
- vendor/cache/powerpack-0.0.9.gem
|
|
161
161
|
- vendor/cache/rainbow-1.1.4.gem
|
|
162
|
-
- vendor/cache/rake-10.1.
|
|
162
|
+
- vendor/cache/rake-10.1.1.gem
|
|
163
163
|
- vendor/cache/rest-client-1.6.7.gem
|
|
164
164
|
- vendor/cache/rspec-2.14.1.gem
|
|
165
165
|
- vendor/cache/rspec-core-2.14.7.gem
|
|
166
166
|
- vendor/cache/rspec-expectations-2.14.4.gem
|
|
167
|
-
- vendor/cache/rspec-instafail-0.2.4.gem
|
|
168
167
|
- vendor/cache/rspec-mocks-2.14.4.gem
|
|
169
|
-
- vendor/cache/rubocop-0.
|
|
170
|
-
- vendor/cache/ruby-progressbar-1.2.
|
|
168
|
+
- vendor/cache/rubocop-0.16.0.gem
|
|
169
|
+
- vendor/cache/ruby-progressbar-1.3.2.gem
|
|
171
170
|
- vendor/cache/simplecov-0.8.2.gem
|
|
172
171
|
- vendor/cache/simplecov-html-0.8.0.gem
|
|
173
172
|
- vendor/cache/slop-3.4.7.gem
|
|
@@ -185,12 +184,12 @@ require_paths:
|
|
|
185
184
|
- lib
|
|
186
185
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
187
186
|
requirements:
|
|
188
|
-
- -
|
|
187
|
+
- - ">="
|
|
189
188
|
- !ruby/object:Gem::Version
|
|
190
189
|
version: '0'
|
|
191
190
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
192
191
|
requirements:
|
|
193
|
-
- -
|
|
192
|
+
- - ">="
|
|
194
193
|
- !ruby/object:Gem::Version
|
|
195
194
|
version: '0'
|
|
196
195
|
requirements: []
|
|
@@ -215,3 +214,4 @@ test_files:
|
|
|
215
214
|
- spec/test/good_helpers/shortcut.rb
|
|
216
215
|
- spec/test/incomplete.yml
|
|
217
216
|
- spec/test/invalid.yml
|
|
217
|
+
has_rdoc:
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|