vete 1.0.1 → 1.0.3
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/vete.rb +7 -3
 - 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: b811e6c42a16fc7bcb8359b469f1ead827bac8727e54224cd0891d014c0ad491
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 0fc1990ae2a825c40790e31485819ac4bf92c10623abf696e279c30a4b7a7097
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 396ec4711449a42af83c911e8fa306c30949c70630ad97e1b37cd617ce0be0900b39814125c49a671f377b8af314e26abfd9aa8ea79c790bd449e07d5e764f7a
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: d4a829a061f96ac6cb0bc9eda2e4de38cff5babeb5692fc7e1355802af851344d11d0293f14114b6c41b8deccf00f8966fbb250d35bb3d669dffa43dc5edebad
         
     | 
    
        data/lib/vete.rb
    CHANGED
    
    | 
         @@ -19,8 +19,8 @@ trap("INT"  ) { print clear + go; abort "\n" } 
     | 
|
| 
       19 
19 
     | 
    
         
             
            trap("WINCH") { print clear or draw if @pid == Process.pid }
         
     | 
| 
       20 
20 
     | 
    
         | 
| 
       21 
21 
     | 
    
         
             
            OptionParser.new.instance_eval do
         
     | 
| 
       22 
     | 
    
         
            -
              @version = "1.0. 
     | 
| 
       23 
     | 
    
         
            -
              @banner  = "usage: #{program_name} [options]"
         
     | 
| 
      
 22 
     | 
    
         
            +
              @version = "1.0.3"
         
     | 
| 
      
 23 
     | 
    
         
            +
              @banner  = "usage: #{program_name} [options] [filename]"
         
     | 
| 
       24 
24 
     | 
    
         | 
| 
       25 
25 
     | 
    
         
             
              on "-b", "--bar <width>"            , "Progress bar width, in characters", Integer
         
     | 
| 
       26 
26 
     | 
    
         
             
              on "-c", "--char <character>"       , "Character to use for progress bar", String
         
     | 
| 
         @@ -151,7 +151,9 @@ def draw(live=0, done=0, died=0, jobs=0, info=nil) 
     | 
|
| 
       151 
151 
     | 
    
         
             
              print fg + bg
         
     | 
| 
       152 
152 
     | 
    
         
             
            end
         
     | 
| 
       153 
153 
     | 
    
         | 
| 
       154 
     | 
    
         
            -
            # ==[  
     | 
| 
      
 154 
     | 
    
         
            +
            # ==[ Let 'er rip! ]==========================================================
         
     | 
| 
      
 155 
     | 
    
         
            +
             
     | 
| 
      
 156 
     | 
    
         
            +
            load(ARGV.first) unless ARGV.empty?
         
     | 
| 
       155 
157 
     | 
    
         | 
| 
       156 
158 
     | 
    
         
             
            @len = @work.to_s.size
         
     | 
| 
       157 
159 
     | 
    
         
             
            @mtx = Mutex.new
         
     | 
| 
         @@ -195,6 +197,8 @@ defined?(perform) and list = Dir[File.join(@todo, "*")] and !list.empty? and beg 
     | 
|
| 
       195 
197 
     | 
    
         
             
                    when "task"  then sleep task
         
     | 
| 
       196 
198 
     | 
    
         
             
                    when Numeric then sleep task * @wait
         
     | 
| 
       197 
199 
     | 
    
         
             
                    end if task < @work
         
     | 
| 
      
 200 
     | 
    
         
            +
                    @slot = slot + 1
         
     | 
| 
      
 201 
     | 
    
         
            +
                    @task = path
         
     | 
| 
       198 
202 
     | 
    
         
             
                    perform(path)
         
     | 
| 
       199 
203 
     | 
    
         
             
                    exit
         
     | 
| 
       200 
204 
     | 
    
         
             
                  end
         
     |