csexton-ssh-keyput 0.3.2 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.markdown CHANGED
@@ -7,7 +7,7 @@ Because <i>ssh user@hostname "echo `cat ~/.ssh/id_dsa.pub` >> ~/.ssh/authorized_
7
7
 
8
8
  Since OS X does not have the handy "ssh-copy-id" bash script by default I wanted to add a gem that I could install easily to perform the same task.
9
9
 
10
- Currently I depend on a number of unix commands (like ssh and ssh-keygen), but I am sure that much of this could be replace by ruby libraries (and then we could make this gem dependent on those) but this does what I need it to and I don't have to remember complicated command lines.
10
+ Currently this is no more than a sh script, as it depends on a number of unix commands (like ssh and ssh-keygen). I am sure that much of this could be replace by pure ruby libraries (and then be made dependencies) but this does what I need it to and I don't have to remember complicated commands.
11
11
 
12
12
  It is pronounced "ssssh-kaput."
13
13
 
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
- :minor: 3
3
- :patch: 2
2
+ :minor: 4
3
+ :patch: 0
4
4
  :major: 0
data/bin/ssh-keyput CHANGED
@@ -30,10 +30,17 @@ o = OptionParser.new do |opts|
30
30
  puts "#{opts}\n"
31
31
  exit
32
32
  end
33
- opts.on('-G', '--generate', "Generate an rsa key by running 'ssh-keygen -t rsa'") do
33
+ opts.on('-d', '--dsa', "Use the dsa cert instead of the rsa") do
34
+ kp.key_file = "#{ENV["HOME"]}/.ssh/id_dsa.pub"
35
+ end
36
+ opts.on('-G', '--generate-rsa', "Generate an rsa key by running 'ssh-keygen -t rsa'") do
34
37
  system "ssh-keygen -t rsa"
35
38
  exit
36
39
  end
40
+ opts.on('-D', '--generate-dsa', "Generate a dsa key by running 'ssh-keygen -t dsa'") do
41
+ system "ssh-keygen -t dsa"
42
+ exit
43
+ end
37
44
  opts.on('-KFILE', '--key-file FILE', "Use a specific key file. Default #{kp.key_file}") do |file|
38
45
  kp.key_file = file
39
46
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: csexton-ssh-keyput
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher Sexton
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-01-24 00:00:00 -08:00
12
+ date: 2009-02-09 00:00:00 -08:00
13
13
  default_executable: ssh-keyput
14
14
  dependencies: []
15
15
 
@@ -25,7 +25,6 @@ files:
25
25
  - README.markdown
26
26
  - VERSION.yml
27
27
  - bin/ssh-keyput
28
- - lib/runner.rb
29
28
  - lib/ssh_keyput.rb
30
29
  - test/ssh_keyput_test.rb
31
30
  - test/test_helper.rb
data/lib/runner.rb DELETED
@@ -1,58 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- # == Synopsis
4
- # SSH Key Put Utility
5
- #
6
- # == Usage
7
- # ssh-keyput [options]
8
- #
9
- # For help see http://github.com/csexton/ssh-keyput
10
-
11
- require 'optparse'
12
-
13
- module SshKeyPut
14
- VERSION = "0.0.1"
15
-
16
- class Runner
17
- def self.runner
18
- #@keyput = SshKeyPut::Base.new
19
-
20
- self.parse_options
21
-
22
-
23
- end
24
-
25
- def self.parse_options
26
- OptionParser.new do |opts|
27
-
28
- opts.summary_width = 25
29
-
30
- opts.banner = "ssh-keyput (#{SshKeyPut::VERSION})\n\n",
31
- "usage: ssh-keyput [options...]\n",
32
-
33
- opts.separator ""
34
- opts.separator "Configuration:"
35
-
36
- opts.on('-v', '--version') do
37
- puts "ssh-keyput version (#{SshKeyPut::VERSION})\n\n"
38
- exit
39
- end
40
- opts.on('-h', '--help') do
41
- #RDoc::usage() #exits app
42
- puts "#{opts}\n"
43
- exit
44
- end
45
- opts.on('-V', '--verbose') do
46
- puts "Verbose!"
47
- end
48
- opts.on('-r', '--generate') do
49
- puts "Installing example .twitter_archive.yml to your home directory"
50
- exit
51
- end
52
-
53
- end.parse!
54
- end
55
- end
56
- end
57
-
58
- SshKeyPut::Runner.runner