skunk 0.1.0 → 0.2.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/lib/skunk/cli/commands/status_reporter.rb +9 -5
- data/lib/skunk/rubycritic/analysed_module.rb +0 -4
- data/lib/skunk/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ef09af7a1b681dd7ed6c4d647722be36f1f31fb1475127bf7179f74a8387b2b1
|
|
4
|
+
data.tar.gz: 02d009e31e053fc944efcff71d87688e9132509fc9911948245a83cc559b4107
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 116a79026c8c16e72012063e5d59b5191f21ca57115fbbe810d44ce03608284ec1090e71e14e0e828411ea779e7593d8408967e80d34851cfc1630f3d7c191d9
|
|
7
|
+
data.tar.gz: 546637856b882b66d974110e7dc7756166fdcd194d4ab351888f75664460e25bd4356e3002e3756f0ea6c3614fec992a693b52681f4fe0374339397892cc5ee4
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
All notable changes to this project will be documented in this file.
|
|
3
|
+
|
|
4
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
5
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
|
+
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
## [0.2.0] - 2019-10-15
|
|
10
|
+
### Changed
|
|
11
|
+
- Now `skunk` will not report status for files that start with `test/` or `spec/`
|
|
12
|
+
|
|
13
|
+
## [0.1.0] - 2019-10-15
|
|
14
|
+
### Added
|
|
15
|
+
- Now `skunk` uses `rubycritic-simplecov` to generate a console report with a list
|
|
16
|
+
of files and their "StinkScore"
|
|
@@ -16,7 +16,7 @@ module Skunk
|
|
|
16
16
|
def update_status_message
|
|
17
17
|
opts = table_options.merge(headings: HEADINGS, rows: table)
|
|
18
18
|
|
|
19
|
-
ttable = Terminal::Table.new(opts)
|
|
19
|
+
ttable = Terminal::Table.new(opts)
|
|
20
20
|
|
|
21
21
|
@status_message = "#{ttable}\n\n"
|
|
22
22
|
|
|
@@ -29,7 +29,11 @@ module Skunk
|
|
|
29
29
|
private
|
|
30
30
|
|
|
31
31
|
def analysed_modules_count
|
|
32
|
-
@analysed_modules_count ||=
|
|
32
|
+
@analysed_modules_count ||= non_test_modules.count
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def non_test_modules
|
|
36
|
+
@non_test_modules ||= analysed_modules.reject { |x| x.pathname.to_s.start_with?("test", "spec")}
|
|
33
37
|
end
|
|
34
38
|
|
|
35
39
|
def worst
|
|
@@ -37,15 +41,15 @@ module Skunk
|
|
|
37
41
|
end
|
|
38
42
|
|
|
39
43
|
def sorted_modules
|
|
40
|
-
@sorted_modules ||=
|
|
44
|
+
@sorted_modules ||= non_test_modules.sort_by(&:stink_score).reverse!
|
|
41
45
|
end
|
|
42
46
|
|
|
43
47
|
def total_stink_score
|
|
44
|
-
@total_stink_score ||=
|
|
48
|
+
@total_stink_score ||= non_test_modules.map(&:stink_score).inject(0.0, :+)
|
|
45
49
|
end
|
|
46
50
|
|
|
47
51
|
def total_churn_times_cost
|
|
48
|
-
|
|
52
|
+
non_test_modules.map(&:churn_times_cost).sum
|
|
49
53
|
end
|
|
50
54
|
|
|
51
55
|
def stink_score
|
data/lib/skunk/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: skunk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ernesto Tagwerker
|
|
@@ -176,6 +176,7 @@ files:
|
|
|
176
176
|
- ".reek.yml"
|
|
177
177
|
- ".rubocop.yml"
|
|
178
178
|
- ".rubocop_todo.yml"
|
|
179
|
+
- CHANGELOG.md
|
|
179
180
|
- Gemfile
|
|
180
181
|
- Gemfile.lock
|
|
181
182
|
- README.md
|