josephine 0.2.0 → 0.3.0

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 (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/josephine +3 -1
  3. data/lib/josephine.rb +8 -4
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c8b569bed9ecb093d679a47268f118c72fadf3e5
4
- data.tar.gz: 83fbd82a63efde8514abae2183657cf6a5d7b494
3
+ metadata.gz: 86757a1afcb8a6ec56d9ac9e97c8307eca0631c8
4
+ data.tar.gz: afb174562e3f4ccb4f5ce6e195778481b2270acb
5
5
  SHA512:
6
- metadata.gz: e432ba549cb8435e3ee66f639b3b762bfa039cca89e2e949a2638649df27d5eb547af6e8a71209f96442efbc8ad5cb3d08c1a44488b6c57ecad769be64f26855
7
- data.tar.gz: 2c7640e0a3d32dd27ce801d9b0c4dc2e2658c1fc8ebf022c87dcafa1af8da6f20d89f0984339f1c10bab3358f4ab7247c365a31babe5791c7657e6a437eda992
6
+ metadata.gz: 2359b1cee253731ff1f87276bc1969b6d70094a69c5b7df5132eff9c80092ea71607c1e6800e41f6ee4557effa2ba999d3514b4e7023bc80acfcbc08e6dea7b4
7
+ data.tar.gz: 0aab69580103d76f1b67654f7a92b85b2c08639e44b6ef3624415f2da7f5405e6ba4c4d6210f86b4f96ba5b13f03f64bd432064b5d81b2c04f331e2104281a22
data/bin/josephine CHANGED
@@ -2,5 +2,7 @@
2
2
  require 'fileutils'
3
3
  require 'tempfile'
4
4
  require 'josephine'
5
- puts Josephine.new(ARGV[0])
5
+ ARGV.each do |ext|
6
+ puts Josephine.new(ext)
7
+ end
6
8
 
data/lib/josephine.rb CHANGED
@@ -12,14 +12,14 @@ class Josephine
12
12
  end
13
13
 
14
14
  def count_lines
15
- l = 0 # Number of files
15
+ num_files = 0 # Number of files
16
16
  line_count = 0 # Number of lines of code
17
17
  line_com = 0 # Number of lines of comments
18
18
  space = 0
19
19
  extension_file.each do |f|
20
20
  next if f.index('vendor')
21
21
  next if FileTest.directory?(f)
22
- l += 1
22
+ num_files += 1
23
23
  i = 0
24
24
  lines = []
25
25
  File.new(f).each_line do |line|
@@ -37,11 +37,15 @@ class Josephine
37
37
 
38
38
  line_count += i
39
39
  end
40
- puts "#{l.to_s} files."
40
+ puts ""
41
+ puts "------------------------------"
42
+ puts "#{num_files.to_s} files with #{@extension} extension."
41
43
  puts "#{line_count.to_s} lines of code."
42
- puts "#{(line_count.to_f/l.to_f).round(2)} LOC/file."
44
+ puts "#{(line_count.to_f/num_files.to_f).round(2)} LOC/file."
43
45
  puts "#{line_com.to_s} lines of comments."
44
46
  puts "#{space.to_s} line spacing."
47
+
45
48
  end
46
49
 
50
+
47
51
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: josephine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cyrus Ghazanfar