ding 1.0.0 → 1.0.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 04e92ee8a732f0ef2129453db6ff013a7ee13cf5
4
- data.tar.gz: ee7f8df5dcb0f7ad17638a10b73613acbfc54098
3
+ metadata.gz: f6a044bdc079222fb78841ee173ce3f0b875ba13
4
+ data.tar.gz: 60ad64ebb2840b4a89186966a0d64ff425e222c0
5
5
  SHA512:
6
- metadata.gz: 61ff465ab0358cdb2e25618f4b47fcec61cff4ea5a22d506aca1202980c787dc3792892b85264cbc54a67d6401c502739b77a0e994749ebffe323edabfbe376e
7
- data.tar.gz: 75ba13e9398eca7ed442acf148210d066fca51ab0955d7679a490d5c5d8b29c7b2d3c2997f437d95385f6d676d5004110549500d5130895c31e66cff0c76d6ca
6
+ metadata.gz: 25449623b612bddf336e2d7d5655487c7105fcffc98a0a6128f8e48b5bf842f26e47308abcb58d62e92577ba440d44823b1a42fc49d841f048a3eba0e9311758
7
+ data.tar.gz: ece7668c1d1853340daa84096ef67718bb2dc34b3fd8cc3f23b0f66d614fbfff7aa68052bca302e1c59d48b8a62d2ac6531de2b924dd390ea0f1515db9bcfd01
data/lib/ding/cli.rb CHANGED
@@ -139,7 +139,7 @@ module Ding
139
139
  end
140
140
 
141
141
  # presents a list of choices and allows either a single or multiple selection
142
- # returns the selected choices in an array or exist if selection is invalid
142
+ # returns the selected choices in an array or exits if selection is invalid
143
143
  def ask_which_item(items, prompt, mode=:single)
144
144
  return Array(items.first) if items.size == 1
145
145
  str_format = "\n %#{items.count.to_s.size}s: %s"
@@ -96,7 +96,7 @@ module Ding
96
96
  end
97
97
 
98
98
  def remote_name
99
- @remote_name || %x(git remote).chomp
99
+ @remote_name ||= %x(git remote).chomp
100
100
  end
101
101
 
102
102
  def remote_prefix
@@ -20,7 +20,7 @@ module Ding
20
20
  end
21
21
 
22
22
  def delete_ssh_key(name)
23
- raise "ssh key #{name} does not exist!" if ssh_key_exists? name
23
+ raise "ssh key #{name} does not exist!" unless ssh_key_exists? name
24
24
  File.delete ssh_public_key_file(name), ssh_private_key_file(name)
25
25
  end
26
26
 
@@ -59,11 +59,11 @@ module Ding
59
59
  end
60
60
 
61
61
  def ssh_config_path
62
- @ssh_config_path || options[:ssh_config_path] || File.join(ENV['HOME'], '.ssh')
62
+ @ssh_config_path ||= options[:ssh_config_path] || File.join(ENV['HOME'], '.ssh')
63
63
  end
64
64
 
65
65
  def ssh_config_file
66
- @ssh_config_file || options[:ssh_config_file] || File.join(ssh_config_path, 'config')
66
+ @ssh_config_file ||= options[:ssh_config_file] || File.join(ssh_config_path, 'config')
67
67
  end
68
68
  end
69
69
  end
data/lib/ding/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ding
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
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: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Warren Bain