ec2ssh 3.0.1 → 3.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2a75305a65aa96b48c53656fbb89c875afc885ba
4
- data.tar.gz: 5885b8f6f11a457a0ccdc3fa52179e6698fc182b
3
+ metadata.gz: 7a9fc26414d2229c5799e37e4c57d462a93fae33
4
+ data.tar.gz: da75a3f732e6422304d4146b983b5ce59aa1d8f1
5
5
  SHA512:
6
- metadata.gz: c7c74269f0d19158ad49c49fcfd549a1649f1c416de30e5345d51cbe5fe4da928d761a11103b009d9e93c6f999bffedd7ba365e629b9e03ac21e78c58ea9243d
7
- data.tar.gz: 7af6da18131dfbfe3654872587b0d57847a6cfc0959dc986dd76e379060e9afa79abc925c056196da7f1b1e39240ee05d83b3493aa2ef1a9e231baf175888b87
6
+ metadata.gz: 7f9ce9fa0b70be913f10f57dd9c7eefef819459681a1ab5fca2f474abb99c4eaa5b9f09159836bf7c36e384ad7d403083458b2ba2c1167d068429330e9481e2d
7
+ data.tar.gz: 9d594fbdb67366d832bed0c6b6633485d8481f765d4ab2bfd37c66c949477fe9a90675c85564da36698df2074f68a6a3e8237bafcc776f67ceb6d69cabf6ce79
data/.travis.yml CHANGED
@@ -1,5 +1,6 @@
1
1
  language: ruby
2
2
  rvm:
3
3
  - 2.0.0
4
- - 2.1.3
4
+ - 2.1.4
5
+ - 2.2.0
5
6
  script: 'bundle exec rspec spec'
data/ChangeLog.md CHANGED
@@ -1,4 +1,8 @@
1
1
  # Change Log
2
+ ## 3.0.2
3
+ * Add zsh completion file (#26)
4
+ Thanks to @hayamiz
5
+
2
6
  ## 3.0.1
3
7
  * Ignore unnamed instances as default (#22, #24, #25)
4
8
  Thanks to @r7kamura and @kainoku
data/README.md CHANGED
@@ -129,5 +129,8 @@ This command converts your existing `.ec2ssh` file into 3.x style.
129
129
  # Notice
130
130
  `ec2ssh` command updates your `.ssh/config` file default. You should make a backup of it.
131
131
 
132
+ # Zsh completion support
133
+ Use `zsh/_ec2ssh`.
134
+
132
135
  # License
133
136
  Copyright (c) 2014 Issei Naruta. ec2ssh is released under the MIT license.
@@ -1,3 +1,3 @@
1
1
  module Ec2ssh
2
- VERSION = '3.0.1'
2
+ VERSION = '3.0.2'
3
3
  end
data/zsh/_ec2ssh ADDED
@@ -0,0 +1,89 @@
1
+ #compdef ec2ssh
2
+
3
+ # main completion function
4
+ _ec2ssh-init() {
5
+ local ret
6
+ _call_function ret __ec2ssh_noarg_cmd
7
+ return $ret
8
+ }
9
+
10
+ _ec2ssh-migrate() {
11
+ local ret
12
+ _call_function ret __ec2ssh_noarg_cmd
13
+ return $ret
14
+ }
15
+
16
+ _ec2ssh-remove() {
17
+ local ret
18
+ _call_function ret __ec2ssh_noarg_cmd
19
+ return $ret
20
+ }
21
+
22
+ _ec2ssh-update() {
23
+ local curcontext context state line
24
+ declare -A opt_args
25
+
26
+ integer ret=1
27
+ _arguments -C -S \
28
+ '--aws-key:aws key name' \
29
+ '--dotfile:ec2ssh dotfile:_files' \
30
+ '--verbose' && return
31
+ return $ret
32
+ }
33
+
34
+ _ec2ssh-version() {
35
+ local ret
36
+ _call_function ret __ec2ssh_noarg_cmd
37
+ return $ret
38
+ }
39
+
40
+ __ec2ssh_noarg_cmd() {
41
+ local curcontext context state line
42
+ declare -A opt_args
43
+
44
+ integer ret=1
45
+ _arguments -C -S \
46
+ '--dotfile:ec2ssh dotfile:_files' \
47
+ '--verbose' && return
48
+ return $ret
49
+ }
50
+
51
+ _ec2ssh() {
52
+ local curcontext context state line
53
+ declare -A opt_args
54
+
55
+ integer ret=1
56
+
57
+ _arguments -C -S \
58
+ '--dotfile:ec2ssh dotfile:_files' \
59
+ '--verbose' \
60
+ '(-): :->commands' \
61
+ '(-)*:: :->option-or-argument' && return
62
+
63
+ case $state in
64
+ (commands)
65
+ _ec2ssh_commands && ret=0
66
+ ;;
67
+ (option-or-argument)
68
+ if (( $+functions[_ec2ssh-$words[1]] )); then
69
+ _call_function ret _ec2ssh-$words[1]
70
+ else
71
+ _message 'no completion'
72
+ fi
73
+ ;;
74
+ esac
75
+
76
+ return ret
77
+ }
78
+
79
+ _ec2ssh_commands() {
80
+ _values 'command' \
81
+ 'help[Describe available commands or one specific command]' \
82
+ 'init[Add ec2ssh mark to ssh_config]' \
83
+ 'migrate[Migrate dotfile from old versions]' \
84
+ 'remove[Remove ec2ssh mark from ssh_config]' \
85
+ 'update[Update ec2 hosts list in ssh_config]' \
86
+ 'version[Show version]'
87
+ }
88
+
89
+ compdef _ec2ssh ec2ssh
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ec2ssh
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Issei Naruta
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-08 00:00:00.000000000 Z
11
+ date: 2015-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -96,6 +96,7 @@ files:
96
96
  - spec/lib/ec2ssh/migrator_spec.rb
97
97
  - spec/lib/ec2ssh/ssh_config_spec.rb
98
98
  - spec/spec_helper.rb
99
+ - zsh/_ec2ssh
99
100
  homepage: http://github.com/mirakui/ec2ssh
100
101
  licenses: []
101
102
  metadata: {}
@@ -115,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
115
116
  version: '0'
116
117
  requirements: []
117
118
  rubyforge_project: ec2ssh
118
- rubygems_version: 2.2.2
119
+ rubygems_version: 2.4.5
119
120
  signing_key:
120
121
  specification_version: 4
121
122
  summary: A ssh_config manager for AWS EC2