pocket-console 0.0.1 → 0.0.2
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/tagStats.rb +12 -12
 - metadata +3 -3
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 0e7c8cf4e1bf30798d53f2087d59828334e69466
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 845da1dd4aa9ac613f8c56c2f677282f20f65830
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 5467c9242c9a7e3fd79b1117d7a1be8da71a99b65e9739b8d09000a5011d31506ebe6ddfed9fa52e2f018724932ed4264ed688e10783b78bce12e43c7e719d52
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 561a376b24435953a7e48850c4ab26575ab33ac96ec2895f67b6e1d665b8cae8d7bad4a3c36efe1492d4b6e1e8342b2780eab093a0c181f7cd31d73b2e94cff8
         
     | 
    
        data/lib/tagStats.rb
    CHANGED
    
    | 
         @@ -12,36 +12,36 @@ class TagStats 
     | 
|
| 
       12 
12 
     | 
    
         | 
| 
       13 
13 
     | 
    
         
             
              def printMostUsed
         
     | 
| 
       14 
14 
     | 
    
         
             
                @tags = @tags.sort_by{|_key, stats| stats['count']}.reverse!
         
     | 
| 
       15 
     | 
    
         
            -
                puts ' 
     | 
| 
       16 
     | 
    
         
            -
                puts ' 
     | 
| 
       17 
     | 
    
         
            -
                puts ' 
     | 
| 
       18 
     | 
    
         
            -
                puts sprintf "%- 
     | 
| 
      
 15 
     | 
    
         
            +
                puts '================================='
         
     | 
| 
      
 16 
     | 
    
         
            +
                puts '      Tag Stats - Most Used      '
         
     | 
| 
      
 17 
     | 
    
         
            +
                puts '---------------------------------'
         
     | 
| 
      
 18 
     | 
    
         
            +
                puts sprintf "%-13s | %6s  | %7s", 'tag', 'total', 'unread'
         
     | 
| 
       19 
19 
     | 
    
         
             
                @tags.each do |tag, stats|
         
     | 
| 
       20 
20 
     | 
    
         
             
                  count = stats['count']
         
     | 
| 
       21 
21 
     | 
    
         
             
                  if count == 1
         
     | 
| 
       22 
22 
     | 
    
         
             
                    break
         
     | 
| 
       23 
23 
     | 
    
         
             
                  end
         
     | 
| 
       24 
24 
     | 
    
         
             
                  unread = stats['unread']
         
     | 
| 
       25 
     | 
    
         
            -
                  puts sprintf "%- 
     | 
| 
      
 25 
     | 
    
         
            +
                  puts sprintf "%-13s | %6d  | %7d", tag, count, unread
         
     | 
| 
       26 
26 
     | 
    
         
             
                end
         
     | 
| 
       27 
     | 
    
         
            -
                puts ' 
     | 
| 
      
 27 
     | 
    
         
            +
                puts '================================='
         
     | 
| 
       28 
28 
     | 
    
         
             
              end
         
     | 
| 
       29 
29 
     | 
    
         | 
| 
       30 
30 
     | 
    
         
             
              def printMostUnread
         
     | 
| 
       31 
31 
     | 
    
         
             
                @tags = @tags.sort_by{|_key, stats| stats['unread']}.reverse!
         
     | 
| 
       32 
     | 
    
         
            -
                puts ' 
     | 
| 
       33 
     | 
    
         
            -
                puts '     Tag Stats - Most Unread 
     | 
| 
       34 
     | 
    
         
            -
                puts ' 
     | 
| 
       35 
     | 
    
         
            -
                puts sprintf "%- 
     | 
| 
      
 32 
     | 
    
         
            +
                puts '================================='
         
     | 
| 
      
 33 
     | 
    
         
            +
                puts '     Tag Stats - Most Unread     '
         
     | 
| 
      
 34 
     | 
    
         
            +
                puts '---------------------------------'
         
     | 
| 
      
 35 
     | 
    
         
            +
                puts sprintf "%-13s | %7s  | %6s", 'tag', 'unread', 'total'
         
     | 
| 
       36 
36 
     | 
    
         
             
                @tags.each do |tag, stats|
         
     | 
| 
       37 
37 
     | 
    
         
             
                  unread = stats['unread']
         
     | 
| 
       38 
38 
     | 
    
         
             
                  if unread == 1
         
     | 
| 
       39 
39 
     | 
    
         
             
                    break
         
     | 
| 
       40 
40 
     | 
    
         
             
                  end
         
     | 
| 
       41 
41 
     | 
    
         
             
                  count = stats['count']
         
     | 
| 
       42 
     | 
    
         
            -
                  puts sprintf "%- 
     | 
| 
      
 42 
     | 
    
         
            +
                  puts sprintf "%-13s | %7d  | %6d", tag, unread, count
         
     | 
| 
       43 
43 
     | 
    
         
             
                end
         
     | 
| 
       44 
     | 
    
         
            -
                puts ' 
     | 
| 
      
 44 
     | 
    
         
            +
                puts '================================='
         
     | 
| 
       45 
45 
     | 
    
         
             
              end
         
     | 
| 
       46 
46 
     | 
    
         | 
| 
       47 
47 
     | 
    
         
             
            end
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: pocket-console
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.0.2
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Franco Cedillo
         
     | 
| 
         @@ -24,7 +24,7 @@ dependencies: 
     | 
|
| 
       24 
24 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       25 
25 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       26 
26 
     | 
    
         
             
                    version: 0.0.1
         
     | 
| 
       27 
     | 
    
         
            -
            description:  
     | 
| 
      
 27 
     | 
    
         
            +
            description: Stats about Pocket tags, on your console.
         
     | 
| 
       28 
28 
     | 
    
         
             
            email: franco.cedillo@gmail.com
         
     | 
| 
       29 
29 
     | 
    
         
             
            executables: []
         
     | 
| 
       30 
30 
     | 
    
         
             
            extensions: []
         
     | 
| 
         @@ -38,7 +38,7 @@ homepage: http://rubygems.org/gems/pocket-console 
     | 
|
| 
       38 
38 
     | 
    
         
             
            licenses:
         
     | 
| 
       39 
39 
     | 
    
         
             
            - MIT
         
     | 
| 
       40 
40 
     | 
    
         
             
            metadata: {}
         
     | 
| 
       41 
     | 
    
         
            -
            post_install_message: 
         
     | 
| 
      
 41 
     | 
    
         
            +
            post_install_message: Pocket Stats in your console
         
     | 
| 
       42 
42 
     | 
    
         
             
            rdoc_options: []
         
     | 
| 
       43 
43 
     | 
    
         
             
            require_paths:
         
     | 
| 
       44 
44 
     | 
    
         
             
            - lib
         
     |