draghunt 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 056c1fa1153be131aab365fee2fd5ed8d75235c0
4
- data.tar.gz: 5b66457845b63b55d409946b9826ef64296271f6
3
+ metadata.gz: 05c58567a9c258b0e6aedfc5b49914af57843e5b
4
+ data.tar.gz: 60d3d2196284103f1172dd4aff026b70f2adcfe7
5
5
  SHA512:
6
- metadata.gz: caf78008ddb4f78876a7a18c983dc251a2a900077e9357ae395e8a742c15f01625aaf21a3bb454d8331ae120e1e89fa9f2c36a02f65e0fb73b9f299cda8574e9
7
- data.tar.gz: 87bd66efbb801183b0e5aa41162246c2b178d78144fbfacc04f9f898db6b8c38db7ae82c2aa1f9792ca6d65717380fff2068f87622df1e8b37f74914017bea18
6
+ metadata.gz: cc27076c9c9118bfc36f701cc30999f6640cb3e00d913e7c9b5239fcc87b76e01e4d99fafae6dbbd2e8ce9900a00b9a37f1aedfdd9f6b8f3516ad07d0eff1e51
7
+ data.tar.gz: 4bebe3c602578d7ac8101bd3f218442b381bdd2db9379d3cefb29235ddad2164b657f4e527bff5d2a57f8171f719d2f87bcfda65ded7d73eb7dfb583b5ef2e75
data/README.md CHANGED
@@ -1,9 +1,27 @@
1
1
  # Draghunt
2
2
 
3
- TODO: Write a gem description
3
+ See also https://github.com/adamtornhill/code-maat
4
+
5
+ This gem is inspired by the book "Your code as a Crime Scene"
6
+ (https://pragprog.com/book/atcrime/your-code-as-a-crime-scene) by
7
+ Adam Tornhill.
8
+
9
+ It is a work in progress, and so far only prints some stats;
10
+ [filename, commits, loc]
11
+
12
+ ```
13
+ $ bin/draghunt
14
+ ["lib/draghunt.rb", 2, 2]
15
+ ["lib/draghunt/version.rb", 2, 3]
16
+ ["lib/draghunt/stats.rb", 1, 26]
17
+ ["bin/draghunt", 1, 4]
18
+ ["Rakefile", 1, 1]
19
+ ```
4
20
 
5
21
  ## Installation
6
22
 
23
+ This Gem depends on cloc, http://cloc.sourceforge.net/
24
+
7
25
  Add this line to your application's Gemfile:
8
26
 
9
27
  gem 'draghunt'
@@ -16,10 +34,6 @@ Or install it yourself as:
16
34
 
17
35
  $ gem install draghunt
18
36
 
19
- ## Usage
20
-
21
- TODO: Write usage instructions here
22
-
23
37
  ## Contributing
24
38
 
25
39
  1. Fork it ( https://github.com/[my-github-username]/draghunt/fork )
@@ -12,7 +12,7 @@ module Draghunt
12
12
  end
13
13
 
14
14
  def cloc_stats
15
- @cloc ||= `#{CLOC_CMD}`.lines[1..-1].inject({}) do |m, line|
15
+ @cloc ||= `#{CLOC_CMD}`.lines.to_a[1..-1].inject({}) do |m, line|
16
16
  m[line.split(',')[1][2..-1]] = line.split(',').last.to_i; m
17
17
  end
18
18
  end
@@ -1,3 +1,3 @@
1
1
  module Draghunt
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: draghunt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - jarra