ding 0.4.0 → 0.5.0

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: 152cdf9f3aabb65b05c06221910c6260db5f1034
4
- data.tar.gz: d687eb4faa485a64a53521a68613f32f4c29bee5
3
+ metadata.gz: 2c57976d3748113f6f807069cc044723d7a9c1f8
4
+ data.tar.gz: ea136b13097e3e23c9a89f964c2685e9abb60913
5
5
  SHA512:
6
- metadata.gz: 37a8445e13983b973f6017ef464af96e8363f854aa3bec7fdf066a819db1ff867f32a2d1a301b4645d117a4311eec3ddc7ef15b3943d1f23d0113dfb6b9b32cd
7
- data.tar.gz: d8e834a7f6aed324918085c708e879d3fbd570c611d47bc96cfc75ea99f9a49a4e89e2514045b6b3ebaece22330982067368dfc0940dfdcf88459578acd53cf7
6
+ metadata.gz: 0e9fdc09785778e88935c58de290e5072ca1720e54cc2b28f8065f610d061a1496196b4cb6ce5191aa87489e0daa8b90ffe8d5e1892afca03a510c3834b2680b
7
+ data.tar.gz: 1612791cb5c731e7bd05a04cb39013a351a3a9eccced61cb0d88c7d0fefe6676e8d16d3baa9cd23c4e2a798504a150a4c889bbb0b86b0fe12d721b6362cae851
data/README.md CHANGED
@@ -74,6 +74,7 @@ it can be pasted into the users account on bitbucket.org.
74
74
  # Default: bitbucket.org
75
75
  -n, [--name=NAME] # name for key, defaults to host name
76
76
  -p, [--passphrase=PASSPHRASE] # optional passphrase for key
77
+ -s, [--secure], [--no-secure] # secure hosts do not need strict host key checking
77
78
  -t, [--type=TYPE] # type of key to create per -t option on ssh-keygen
78
79
  # Default: rsa
79
80
 
data/lib/ding/cli.rb CHANGED
@@ -46,10 +46,11 @@ module Ding
46
46
  end
47
47
 
48
48
  desc "key-gen", "Create a new private/public key pair and associated ssh config"
49
- option :host, type: 'string', aliases: '-h', default: 'bitbucket.org', desc: 'specify repository host for ssh config'
50
- option :name, type: 'string', aliases: '-n', default: nil, desc: 'name for key, defaults to host name'
51
- option :passphrase, type: 'string', aliases: '-p', default: '', desc: 'optional passphrase for key'
52
- option :type, type: 'string', aliases: '-t', default: 'rsa', desc: 'type of key to create per -t option on ssh-keygen'
49
+ option :host, type: 'string', aliases: '-h', default: 'bitbucket.org', desc: 'specify repository host for ssh config'
50
+ option :name, type: 'string', aliases: '-n', default: nil, desc: 'name for key, defaults to host name'
51
+ option :passphrase, type: 'string', aliases: '-p', default: '', desc: 'optional passphrase for key'
52
+ option :secure, type: 'boolean', aliases: '-s', default: true, desc: 'secure hosts do not need strict host key checking'
53
+ option :type, type: 'string', aliases: '-t', default: 'rsa', desc: 'type of key to create per -t option on ssh-keygen'
53
54
  def key_gen
54
55
  key_name = options[:name] || "#{options[:host]}_#{options[:type]}"
55
56
  say "\nDing ding ding: let's create and configure a new ssh key #{key_name}...\n\n", :green
@@ -32,6 +32,7 @@ module Ding
32
32
  File.open(ssh_config_file, 'a') do |f|
33
33
  f.puts "Host #{host}"
34
34
  f.puts " IdentityFile #{ssh_private_key_file name}"
35
+ f.puts " StrictHostKeyChecking no" if options[:secure_host]
35
36
  end
36
37
  end
37
38
 
data/lib/ding/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ding
2
- VERSION = "0.4.0"
2
+ VERSION = "0.5.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ding
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Warren Bain