makit 0.0.19 → 0.0.21
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/makit/command_runner.rb +4 -2
 - data/lib/makit/humanize.rb +15 -2
 - data/lib/makit/version.rb +1 -1
 - metadata +1 -1
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 5a0c2a2e3b37f4f156c9a9f73c42659a6ff5a07cc9589ee2653f6bb3ce632599
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: c5c3e7980e0a50544295b262ac60d7032e781e86395c27de65e0bd61eea217a6
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 51df9a2a2a61614f1aa0ecd84d9c038398f448f4676bd00a3895c58498863b4d03452d81160d78c46ed54a01762a78aa878055a1d840bae717c49b9559128e72
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 5095904bc74245d33e697630b87bf91d8f0117505ae25bf1c57624dbfe28a412eee4df708da9c821a7f6a21e6715b248341d20a3bfce69af5e387c721f64ce3b
         
     | 
    
        data/lib/makit/command_runner.rb
    CHANGED
    
    | 
         @@ -43,8 +43,10 @@ module Makit 
     | 
|
| 
       43 
43 
     | 
    
         
             
                  # also replacing any path delimiters with an underscore
         
     | 
| 
       44 
44 
     | 
    
         
             
                  int_hash = command_request.to_hash
         
     | 
| 
       45 
45 
     | 
    
         
             
                  hash_string = "#{int_hash}"[0, 8]
         
     | 
| 
       46 
     | 
    
         
            -
                  cache_filename =  
     | 
| 
       47 
     | 
    
         
            -
             
     | 
| 
      
 46 
     | 
    
         
            +
                  cache_filename = get_cache_filename(command_request)
         
     | 
| 
      
 47 
     | 
    
         
            +
                  
         
     | 
| 
      
 48 
     | 
    
         
            +
                  #Makit::Directories::PROJECT_ARTIFACTS +
         
     | 
| 
      
 49 
     | 
    
         
            +
                  #                 "/commands/#{hash_string}.pb"
         
     | 
| 
       48 
50 
     | 
    
         
             
                  #puts "cache_filename: #{cache_filename}"
         
     | 
| 
       49 
51 
     | 
    
         | 
| 
       50 
52 
     | 
    
         
             
                  #cache_filename = Makit::Directories::PROJECT_ARTIFACTS + "/commands/#{command_request.name}.#{command_request.arguments.join("_")}.#{timestamp.seconds}.pb"
         
     | 
    
        data/lib/makit/humanize.rb
    CHANGED
    
    | 
         @@ -86,8 +86,21 @@ module Makit 
     | 
|
| 
       86 
86 
     | 
    
         
             
                  "#{hours}h #{minutes}m #{seconds}s"
         
     | 
| 
       87 
87 
     | 
    
         
             
                end
         
     | 
| 
       88 
88 
     | 
    
         | 
| 
       89 
     | 
    
         
            -
                def self.get_humanized_duration( 
     | 
| 
       90 
     | 
    
         
            -
                   
     | 
| 
      
 89 
     | 
    
         
            +
                def self.get_humanized_duration(seconds)
         
     | 
| 
      
 90 
     | 
    
         
            +
                  minutes = (seconds / 60).to_i
         
     | 
| 
      
 91 
     | 
    
         
            +
              seconds = (seconds % 60).to_i
         
     | 
| 
      
 92 
     | 
    
         
            +
              hours = (minutes / 60).to_i
         
     | 
| 
      
 93 
     | 
    
         
            +
              minutes = minutes % 60
         
     | 
| 
      
 94 
     | 
    
         
            +
              days = (hours / 24).to_i
         
     | 
| 
      
 95 
     | 
    
         
            +
              hours = hours % 24
         
     | 
| 
      
 96 
     | 
    
         
            +
             
     | 
| 
      
 97 
     | 
    
         
            +
              parts = []
         
     | 
| 
      
 98 
     | 
    
         
            +
              parts << "#{days} days" if days > 0
         
     | 
| 
      
 99 
     | 
    
         
            +
              parts << "#{hours} hours" if hours > 0
         
     | 
| 
      
 100 
     | 
    
         
            +
              parts << "#{minutes} minutes" if minutes > 0
         
     | 
| 
      
 101 
     | 
    
         
            +
              parts << "#{seconds} seconds" if seconds > 0
         
     | 
| 
      
 102 
     | 
    
         
            +
             
     | 
| 
      
 103 
     | 
    
         
            +
              parts.join(", ")
         
     | 
| 
       91 
104 
     | 
    
         
             
                end
         
     | 
| 
       92 
105 
     | 
    
         
             
              end
         
     | 
| 
       93 
106 
     | 
    
         
             
            end
         
     | 
    
        data/lib/makit/version.rb
    CHANGED