josephine 0.3.4 → 0.3.5
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/josephine.rb +5 -7
 - metadata +2 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: b74a27f60359cf15c4a159f752f8b09842bd4203
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 90620c631ee298c2428f81c15668327a471ce1b2
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 44a5935066507286078dd9f4f1926291c6de606f78fb63632d42e098eb75b77fd6ca2b53f0d7a9d4a0b1b82d0910e6b2326ced3ee4cd7179036f0e485c16c35a
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: afebf0991e06fced7bec812270f572b422f79e33fc2c2b02c33caf9e9e40d4f0fb4d77ae4e6a716dc8322922520a6940090ed9e3b1707883f61613145f0f24dc
         
     | 
    
        data/lib/josephine.rb
    CHANGED
    
    | 
         @@ -17,10 +17,7 @@ class Josephine 
     | 
|
| 
       17 
17 
     | 
    
         
             
              end
         
     | 
| 
       18 
18 
     | 
    
         | 
| 
       19 
19 
     | 
    
         
             
              def count_lines
         
     | 
| 
       20 
     | 
    
         
            -
                num_files = 0  
     | 
| 
       21 
     | 
    
         
            -
                line_count = 0 # Number of lines of code
         
     | 
| 
       22 
     | 
    
         
            -
                line_com = 0 # Number of lines of comments
         
     | 
| 
       23 
     | 
    
         
            -
                space = 0
         
     | 
| 
      
 20 
     | 
    
         
            +
                num_files, line_count, line_com, space = 0, 0, 0, 0
         
     | 
| 
       24 
21 
     | 
    
         
             
                extension_file.each do |f|
         
     | 
| 
       25 
22 
     | 
    
         
             
                  next if f.index('vendor')
         
     | 
| 
       26 
23 
     | 
    
         
             
                  next if FileTest.directory?(f)
         
     | 
| 
         @@ -39,10 +36,12 @@ class Josephine 
     | 
|
| 
       39 
36 
     | 
    
         | 
| 
       40 
37 
     | 
    
         
             
                    i += 1
         
     | 
| 
       41 
38 
     | 
    
         
             
                  end
         
     | 
| 
       42 
     | 
    
         
            -
             
     | 
| 
       43 
     | 
    
         
            -
                  # binding.pry
         
     | 
| 
       44 
39 
     | 
    
         
             
                  line_count += i
         
     | 
| 
       45 
40 
     | 
    
         
             
                end
         
     | 
| 
      
 41 
     | 
    
         
            +
                display_stat(num_files, line_count, line_com, space)
         
     | 
| 
      
 42 
     | 
    
         
            +
              end
         
     | 
| 
      
 43 
     | 
    
         
            +
             
     | 
| 
      
 44 
     | 
    
         
            +
              def display_stat(num_files, line_count, line_com, space)
         
     | 
| 
       46 
45 
     | 
    
         
             
                puts ""
         
     | 
| 
       47 
46 
     | 
    
         
             
                puts "------------------------------"
         
     | 
| 
       48 
47 
     | 
    
         
             
                if @extension == "-all"
         
     | 
| 
         @@ -55,7 +54,6 @@ class Josephine 
     | 
|
| 
       55 
54 
     | 
    
         
             
                puts "#{line_com.to_s} lines of comments."
         
     | 
| 
       56 
55 
     | 
    
         
             
                puts "#{space.to_s} line spacing."
         
     | 
| 
       57 
56 
     | 
    
         
             
                 puts "#{(space.to_f / num_files.to_f).round(2)} average line space / file."
         
     | 
| 
       58 
     | 
    
         
            -
             
     | 
| 
       59 
57 
     | 
    
         
             
              end
         
     | 
| 
       60 
58 
     | 
    
         | 
| 
       61 
59 
     | 
    
         | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: josephine
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.3. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.3.5
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Cyrus Ghazanfar
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2015-04- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2015-04-13 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies: []
         
     | 
| 
       13 
13 
     | 
    
         
             
            description: count the number of lines of code in your project files
         
     | 
| 
       14 
14 
     | 
    
         
             
            email: cghazanfar10@gmail.com
         
     |