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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/josephine.rb +5 -7
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 726171c31f5ecc1e840d3492be14e4b135f0300c
4
- data.tar.gz: 55fea699acd2823a03fc5fdd4f8666d56a07c2bf
3
+ metadata.gz: b74a27f60359cf15c4a159f752f8b09842bd4203
4
+ data.tar.gz: 90620c631ee298c2428f81c15668327a471ce1b2
5
5
  SHA512:
6
- metadata.gz: 3260c7fab0b4cdd4678ecfcfd9e8c28d983554070d8f5a280fc166422510c9a0530ef5b046a2920f99214f9e8fb3f2ee1e321b75dd57ac7bc2c742d82574effa
7
- data.tar.gz: 4c7e7f2ab5dcd435e91e1083396395a70e33a98e8cafa320ac5b6f1ac1c4935a097a59348382c6d591d2ee16ea68ba6dae29b31d36b976761d41fc2c1cf32838
6
+ metadata.gz: 44a5935066507286078dd9f4f1926291c6de606f78fb63632d42e098eb75b77fd6ca2b53f0d7a9d4a0b1b82d0910e6b2326ced3ee4cd7179036f0e485c16c35a
7
+ data.tar.gz: afebf0991e06fced7bec812270f572b422f79e33fc2c2b02c33caf9e9e40d4f0fb4d77ae4e6a716dc8322922520a6940090ed9e3b1707883f61613145f0f24dc
@@ -17,10 +17,7 @@ class Josephine
17
17
  end
18
18
 
19
19
  def count_lines
20
- num_files = 0 # Number of files
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
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-06 00:00:00.000000000 Z
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