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 +4 -4
 - data/lib/ding/cli.rb +1 -1
 - data/lib/ding/models/git.rb +1 -1
 - data/lib/ding/models/ssh.rb +3 -3
 - data/lib/ding/version.rb +1 -1
 - metadata +1 -1
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: f6a044bdc079222fb78841ee173ce3f0b875ba13
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 60ad64ebb2840b4a89186966a0d64ff425e222c0
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 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  
     | 
| 
      
 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"
         
     | 
    
        data/lib/ding/models/git.rb
    CHANGED
    
    
    
        data/lib/ding/models/ssh.rb
    CHANGED
    
    | 
         @@ -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!"  
     | 
| 
      
 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  
     | 
| 
      
 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  
     | 
| 
      
 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