skunk 0.4.2 → 0.5.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: adc2e03bb20bde5ac6b5aed4eca58c01cf3d4788d55415c4b27a1f58e46dc85b
4
- data.tar.gz: cf99bb3749b677148eaca998711b8f6ac28fec40f681621c8c55f093a7294c2d
3
+ metadata.gz: 5df324d3763ea965d25b6eb21bb3b97969d5bb51ea89e64c198d05c81c9afd09
4
+ data.tar.gz: 98e25d9fc2d2224a286a103bd74f98c97709a6004d785638b43ed08a68302da6
5
5
  SHA512:
6
- metadata.gz: e972cde74cbf4fa49ce432b1abef05bed3c7c3a4df2a2b9c2d9ec33e294a1ff5c23b2e27954d0bb8d7471cafb1078e2076ba52b53c33359cc6b243356446d852
7
- data.tar.gz: 03a64e04c03658f866d5e5b6b5baf90f0c421efec60ffd697a3507a5ab35502857679659ba12c11d7165dec5902ffff991a200039f76e95f9fe3d6a2fecded58
6
+ metadata.gz: 7ba5745cb720777d96ece4a927132cfea50eac70eee257a6f24bca3da94e91643a2ee5aaef5bd5bc7b50da00b2da20b024c2789ae26f5ef6297af1cb8d1bd352
7
+ data.tar.gz: ae78c2425cc2d0ffa2b43ed0774fe3a4ae408d42784e7d1fcb7bc7ae76341cded3266f82c55bb6d814eabc0318378278c2a51b469cd8e097757516650588f0bb
@@ -0,0 +1,53 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+ title: "[BUG] "
5
+ labels: 'bug'
6
+ assignees: 'black-bunny-brigade'
7
+
8
+ ---
9
+
10
+ **IMPORTANT: please make sure you ask yourself all intro questions and fill all sections of the template.**
11
+
12
+ **Before we start...:**
13
+
14
+ - [ ] I checked the documentation and found no answer
15
+ - [ ] I checked to make sure that this issue has not already been filed
16
+ - [ ] I'm reporting the issue to the correct repository (for multi-repository projects)
17
+
18
+
19
+ **Version, Branch, or Commit:**
20
+
21
+ Inform what version, branch, commit of Skunk you are using.
22
+
23
+ **Expected behavior:**
24
+
25
+ Please include a detailed description of the behavior you were expecting when you encountered this issue.
26
+
27
+ **Actual behavior:**
28
+
29
+ Please include a detailed description of the actual behavior of the application.
30
+
31
+ **Steps to reproduce:**
32
+
33
+ How do I achieve this behavior? Use the following format to provide a step-by-step guide:
34
+
35
+ 1. Step 1: ...
36
+ 2. Step 2: ...
37
+
38
+ **Context and environment:**
39
+
40
+ Provide any relevant information about your setup (Customize the list accordingly based on what info is relevant to this project)
41
+
42
+ 1. Version of the software the issue is being opened for.
43
+ 2. Operating System
44
+ 3. Operating System version
45
+ 4. Ruby version
46
+
47
+ _Delete any information that is not relevant._
48
+
49
+ **Logs**
50
+
51
+ Include relevant log snippets or files here.
52
+
53
+ **I will abide by the [code of conduct] (https://github.com/fastruby/skunk/blob/master/CODE_OF_CONDUCT.md)**
@@ -0,0 +1,47 @@
1
+ ---
2
+ name: Feature request
3
+ about: Request a new feature
4
+ title: "[REQUEST]"
5
+ labels: 'enhancement'
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **IMPORTANT: please make sure you ask yourself all intro questions and fill all sections of the template.**
11
+
12
+ **Before we start...:**
13
+
14
+ - [ ] I checked the documentation and didn't find this feature
15
+ - [ ] I checked to make sure that this feature has not already been requested
16
+
17
+
18
+ **Branch/Commit:**
19
+
20
+ Inform what branch/commit/version of "Skunk" you are using.
21
+
22
+ **Describe the feature:**
23
+
24
+ Please include a detailed description of the feature you are requesting and any detail on it’s expected behavior.
25
+
26
+ > **As a \<role name\>**
27
+ > **I do \<something\>**
28
+ > **And then I do \<another action\>**
29
+ > **And I see \<some result\>**
30
+
31
+ **Problem:**
32
+
33
+ Please include a detailed description of the problem this feature would solve.
34
+
35
+ > **As a \<role name\>**
36
+ > **I want to \<do something\>**
37
+ > **So that I can achieve a \<goal\>**
38
+
39
+ **Mockups:**
40
+
41
+ Include any mockup idea related to the requested feature if it applies.
42
+
43
+ **Resources:**
44
+
45
+ If you have resources related to the implementation or research for this feature, add them here.
46
+
47
+ **I will abide by the [code of conduct](https://github.com/fastruby/skunk/blob/main/CODE_OF_CONDUCT.md)**
@@ -1,17 +1,87 @@
1
1
  # .github/workflows/ci.yml
2
2
 
3
3
  name: CI
4
- on: [push, pull_request]
4
+ on:
5
+ push:
6
+ branches:
7
+ - main
8
+ pull_request:
9
+ branches:
10
+ - main
11
+
5
12
  jobs:
6
- test:
13
+ test-ruby-2-4-x:
14
+ runs-on: ubuntu-latest
15
+
16
+ steps:
17
+ - uses: actions/checkout@v1
18
+ - name: Setup Ruby
19
+ uses: ruby/setup-ruby@v1
20
+ with:
21
+ ruby-version: 2.4
22
+ bundler-cache: true
23
+ - name: Build and run tests
24
+ env:
25
+ BUNDLE_GEMFILE: "Gemfile-Ruby-2-4"
26
+ run: |
27
+ gem install bundler
28
+ bundle install --jobs 4 --retry 3
29
+ bundle exec rake
30
+ test-ruby-2-5-x:
31
+ runs-on: ubuntu-latest
32
+
33
+ steps:
34
+ - uses: actions/checkout@v1
35
+ - name: Setup Ruby
36
+ uses: ruby/setup-ruby@v1
37
+ with:
38
+ ruby-version: 2.5
39
+ bundler-cache: true
40
+ - name: Build and run tests
41
+ run: |
42
+ gem install bundler
43
+ bundle install --jobs 4 --retry 3
44
+ bundle exec rake
45
+ test-ruby-2-6-x:
46
+ runs-on: ubuntu-latest
47
+
48
+ steps:
49
+ - uses: actions/checkout@v1
50
+ - name: Setup Ruby
51
+ uses: ruby/setup-ruby@v1
52
+ with:
53
+ ruby-version: 2.6
54
+ bundler-cache: true
55
+ - name: Build and run tests
56
+ run: |
57
+ gem install bundler
58
+ bundle install --jobs 4 --retry 3
59
+ bundle exec rake
60
+ test-ruby-2-7-x:
61
+ runs-on: ubuntu-latest
62
+
63
+ steps:
64
+ - uses: actions/checkout@v1
65
+ - name: Setup Ruby
66
+ uses: ruby/setup-ruby@v1
67
+ with:
68
+ ruby-version: 2.7
69
+ bundler-cache: true
70
+ - name: Build and run tests
71
+ run: |
72
+ gem install bundler
73
+ bundle install --jobs 4 --retry 3
74
+ bundle exec rake
75
+ test-ruby-3-0-x:
7
76
  runs-on: ubuntu-latest
8
77
 
9
78
  steps:
10
79
  - uses: actions/checkout@v1
11
80
  - name: Setup Ruby
12
- uses: actions/setup-ruby@v1
81
+ uses: ruby/setup-ruby@v1
13
82
  with:
14
- ruby-version: 2.6.x
83
+ ruby-version: 3.0
84
+ bundler-cache: true
15
85
  - name: Build and run tests
16
86
  run: |
17
87
  gem install bundler
@@ -11,14 +11,19 @@ jobs:
11
11
  uses: actions/setup-ruby@v1
12
12
  with:
13
13
  ruby-version: 2.6.x
14
+ - name: Run test suite with COVERAGE=true
15
+ run: |
16
+ gem install bundler
17
+ bundle install --jobs 4 --retry 3
18
+ COVERAGE=true bundle exec rake test
14
19
  - name: Run Skunk on Project
15
20
  run: |
16
21
  gem install skunk
17
22
  CURRENT_BRANCH="$(git rev-parse --abbrev-ref HEAD)"
18
- if [[ "$CURRENT_BRANCH" -ne "master" ]]; then
23
+ if [[ "$CURRENT_BRANCH" != "main" ]]; then
19
24
  echo "Executing within branch: $CURRENT_BRANCH"
20
- skunk lib/
25
+ skunk lib/ -b master
21
26
  else
22
27
  echo "Executing within master branch"
23
- skunk lib/ -b master
28
+ skunk lib/
24
29
  fi
data/.gitignore CHANGED
@@ -6,6 +6,7 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
+ /test/support/
9
10
 
10
11
  .byebug_history
11
12
 
data/.rubocop_todo.yml CHANGED
@@ -1,11 +1,19 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2019-11-09 15:45:44 -0500 using RuboCop version 0.75.1.
3
+ # on 2020-11-18 21:57:13 UTC using RuboCop version 1.3.1.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
+ # Offense count: 2
10
+ # Configuration parameters: Include.
11
+ # Include: **/*.gemspec
12
+ Gemspec/RequiredRubyVersion:
13
+ Exclude:
14
+ - 'gemfiles/skunk.gemspec'
15
+ - 'skunk.gemspec'
16
+
9
17
  # Offense count: 1
10
18
  # Cop supports --auto-correct.
11
19
  Layout/ClosingHeredocIndentation:
@@ -14,28 +22,42 @@ Layout/ClosingHeredocIndentation:
14
22
 
15
23
  # Offense count: 1
16
24
  # Cop supports --auto-correct.
17
- # Configuration parameters: EnforcedStyle.
18
- # SupportedStyles: squiggly, active_support, powerpack, unindent
19
- Layout/IndentHeredoc:
25
+ Layout/HeredocIndentation:
20
26
  Exclude:
21
27
  - 'lib/skunk/cli/commands/status_reporter.rb'
22
28
 
29
+ # Offense count: 1
30
+ # Configuration parameters: AllowedMethods.
31
+ # AllowedMethods: enums
32
+ Lint/ConstantDefinitionInBlock:
33
+ Exclude:
34
+ - 'test/lib/skunk/cli/commands/help_test.rb'
35
+
23
36
  # Offense count: 2
24
- # Configuration parameters: CountComments, ExcludedMethods.
37
+ Lint/MissingSuper:
38
+ Exclude:
39
+ - 'lib/skunk/cli/application.rb'
40
+ - 'lib/skunk/cli/commands/base.rb'
41
+
42
+ # Offense count: 1
43
+ # Configuration parameters: IgnoredMethods.
44
+ Metrics/AbcSize:
45
+ Max: 18
46
+
47
+ # Offense count: 5
48
+ # Configuration parameters: CountComments, CountAsOne, ExcludedMethods.
25
49
  # ExcludedMethods: refine
26
50
  Metrics/BlockLength:
27
- Max: 40
51
+ Max: 64
52
+
53
+ # Offense count: 2
54
+ # Configuration parameters: CountComments, CountAsOne, ExcludedMethods.
55
+ Metrics/MethodLength:
56
+ Max: 13
28
57
 
29
58
  # Offense count: 1
30
- # Cop supports --auto-correct.
31
- # Configuration parameters: PreferredName.
32
- Naming/RescuedExceptionsVariableName:
59
+ # Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers.
60
+ # SupportedStyles: snake_case, normalcase, non_integer
61
+ Naming/VariableNumber:
33
62
  Exclude:
34
- - 'lib/skunk/cli/application.rb'
35
-
36
- # Offense count: 7
37
- # Cop supports --auto-correct.
38
- # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
39
- # URISchemes: http, https
40
- Metrics/LineLength:
41
- Max: 96
63
+ - 'lib/skunk/cli/commands/status_sharer.rb'
data/CHANGELOG.md CHANGED
@@ -1,44 +1,51 @@
1
1
  # Changelog
2
+
2
3
  All notable changes to this project will be documented in this file.
3
4
 
4
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
7
 
7
- ## [Unreleased] [(commits)](https://github.com/fastruby/skunk/compare/v0.4.0...HEAD)
8
+ ## [Unreleased] [(commits)](https://github.com/fastruby/skunk/compare/v0.5.0...HEAD)
9
+ ## [0.5.0] [(commits)](https://github.com/fastruby/skunk/compare/v0.4.2...v0.5.0)
10
+
11
+ * [FEATURE] Share your results using an environment variable (by [@rahulpuroht]() and [@etagwerker]())
12
+ * [FEATURE] Rename the tech debt metric: StinkScore => SkunkScore. It's a little friendlier.
13
+ * [FEATURE] Add `--out=file.txt` support to the command line (by [@manuca]())
14
+ * [BUGFIX] Skip both nested and top level spec and test folders
8
15
 
9
16
  ## [0.4.2] [(commits)](https://github.com/fastruby/skunk/compare/v0.4.1...v0.4.2)
10
- * [BUGFIX] Fixes table width issues by rounding values (by [@etagwerker][])
17
+ * [BUGFIX] Fixes table width issues by rounding values (by [@etagwerker]())
11
18
 
12
19
  ## [0.4.1] [(commits)](https://github.com/fastruby/skunk/compare/v0.4.0...v0.4.1)
13
- * [BUGFIX] Fixes table width issues (by [@etagwerker][])
20
+ * [BUGFIX] Fixes table width issues (by [@etagwerker]())
14
21
 
15
22
  ## [0.4.0] [(commits)](https://github.com/fastruby/skunk/compare/v0.3.2...v0.4.0)
16
- * [FEATURE] Add `--version` support to the command line. (by [@bronzdoc][])
17
- * [FEATURE] Stop accepting `-p <path>` in the command line. It's redundant and it's not working anyway. (by [@etagwerker][])
18
- * [BUGFIX] Change "StinkScore" formula to skip `churn_times_cost` (by [@etagwerker][])
19
- * [BUGFIX] Fixes #12 (by [@sebastian-palma][])
23
+ * [FEATURE] Add `--version` support to the command line. (by [@bronzdoc]())
24
+ * [FEATURE] Stop accepting `-p <path>` in the command line. It's redundant and it's not working anyway. (by [@etagwerker]())
25
+ * [BUGFIX] Change "StinkScore" formula to skip `churn_times_cost` (by [@etagwerker]())
26
+ * [BUGFIX] Fixes #12 (by [@sebastian-palma]())
20
27
 
21
28
  ## [0.3.2] - 2019-11-23 [(commits)](https://github.com/fastruby/skunk/compare/v0.3.1...v0.3.2)
22
29
  ### Changed
23
- * [BUGFIX] Change "StinkScore" formula to skip `churn_times_cost` (by [@etagwerker][])
30
+ * [BUGFIX] Change "StinkScore" formula to skip `churn_times_cost` (by [@etagwerker]())
24
31
 
25
32
  ## [0.3.1] - 2019-11-19 [(commits)](https://github.com/fastruby/skunk/compare/v0.3.0...v0.3.1)
26
33
  ### Changed
27
- * [BUGFIX] Change "StinkScore" formula to skip `churn_times_cost` (by [@etagwerker][])
34
+ * [BUGFIX] Change "StinkScore" formula to skip `churn_times_cost` (by [@etagwerker]())
28
35
 
29
36
  ## [0.3.0] - 2019-11-19 [(commits)](https://github.com/fastruby/skunk/compare/v0.2.0...v0.3.0)
30
37
  ### Changed
31
- * [FEATURE] Added Travis CI badge to README (by [@themayurkumbhar][])
32
- * [FEATURE] Now you can compare "StinkScore" between branches (by [@etagwerker][])
33
- * [BUGFIX] Add contributor covenant doc (by [@etagwerker][])
34
- * [BUGFIX] Make sure tests work even you don't have a `coverage/.resultset.json` file (by [@etagwerker][])
35
- * [BUGFIX] Make tests easier to maintain (by [@etagwerker][])
38
+ * [FEATURE] Added Travis CI badge to README (by [@themayurkumbhar]())
39
+ * [FEATURE] Now you can compare "StinkScore" between branches (by [@etagwerker]())
40
+ * [BUGFIX] Add contributor covenant doc (by [@etagwerker]())
41
+ * [BUGFIX] Make sure tests work even you don't have a `coverage/.resultset.json` file (by [@etagwerker]())
42
+ * [BUGFIX] Make tests easier to maintain (by [@etagwerker]())
36
43
 
37
44
  ## [0.2.0] - 2019-10-16 [(commits)](https://github.com/fastruby/skunk/compare/v0.1.0...v0.2.0)
38
45
  ### Changed
39
- - [FEATURE] Now `skunk` will not report status for files that start with `test/` or `spec/` (by [@etagwerker][])
46
+ - [FEATURE] Now `skunk` will not report status for files that start with `test/` or `spec/` (by [@etagwerker]())
40
47
 
41
48
  ## [0.1.0] - 2019-10-16
42
49
  ### Added
43
50
  - [FEATURE] Now `skunk` uses `rubycritic-simplecov` to generate a console report with a list
44
- of files and their "StinkScore" (by [@etagwerker][])
51
+ of files and their "StinkScore" (by [@etagwerker]())
data/CODEOWNERS ADDED
@@ -0,0 +1,5 @@
1
+
2
+ # These code owners will be the default owners to everything in the repository.
3
+ # Unless a posterior rule has precedence, they will be automatically requested
4
+ # for review when a pull request is opened.
5
+ * @fastruby/black-bunny-brigade
data/Gemfile-Ruby-2-4 ADDED
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
6
+
7
+ # Specify your gem's dependencies in skunk.gemspec
8
+ gemspec
9
+
10
+ gem "simplecov", "< 0.19.0"
data/README.md CHANGED
@@ -1,19 +1,21 @@
1
1
  # Skunk
2
2
 
3
- [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v1.4%20adopted-ff69b4.svg)](code-of-conduct.md) [![Build Status](https://travis-ci.org/fastruby/skunk.svg?branch=master)](https://travis-ci.org/fastruby/skunk) [![Maintainability](https://api.codeclimate.com/v1/badges/3e33d701ced16eee2420/maintainability)](https://codeclimate.com/github/fastruby/skunk/maintainability) [![Docs](http://img.shields.io/badge/yard-docs-blue.svg)](http://rubydoc.info/gems/skunk)
3
+ ![skunk](https://github.com/fastruby/skunk/raw/master/logo.png)
4
4
 
5
- A RubyCritic extension to calculate StinkScore for a file or project.
5
+ [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v1.4%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md) [![Build Status](https://travis-ci.org/fastruby/skunk.svg?branch=master)](https://travis-ci.org/fastruby/skunk) [![Maintainability](https://api.codeclimate.com/v1/badges/3e33d701ced16eee2420/maintainability)](https://codeclimate.com/github/fastruby/skunk/maintainability) [![Docs](http://img.shields.io/badge/yard-docs-blue.svg)](http://rubydoc.info/gems/skunk) [![codecov](https://codecov.io/gh/fastruby/skunk/branch/master/graph/badge.svg)](https://codecov.io/gh/fastruby/skunk)
6
6
 
7
- ## What is the StinkScore?
7
+ A RubyCritic extension to calculate SkunkScore for a file or project.
8
8
 
9
- The StinkScore is a value that assesses the technical debt of a module. It takes
9
+ ## What is the SkunkScore?
10
+
11
+ The SkunkScore is a value that assesses the technical debt of a module. It takes
10
12
  into account:
11
13
 
12
14
  - Code Complexity
13
15
  - Code Smells
14
16
  - Code Coverage
15
17
 
16
- The main goal of the StinkScore is to serve as a compass in your next
18
+ The main goal of the SkunkScore is to serve as a compass in your next
17
19
  refactoring adventure. It will help you answer these questions:
18
20
 
19
21
  - What can I do to pay off technical debt?
@@ -50,11 +52,12 @@ There are not that many options but here they are:
50
52
  skunk -h
51
53
  Usage: skunk [options] [paths]
52
54
  -b, --branch BRANCH Set branch to compare
55
+ -o, --out FILE Output report to file
53
56
  -v, --version Show gem's version
54
57
  -h, --help Show this message
55
58
  ```
56
59
 
57
- ### Getting a sorted list of stinkiest files
60
+ ### Getting a sorted list of smelly files
58
61
 
59
62
  To get the best results, make sure that you have `coverage/.resultset.json` in
60
63
  your application directory. That way `skunk` knows what's the status of your
@@ -66,7 +69,7 @@ Then simply run:
66
69
  skunk
67
70
  ```
68
71
 
69
- Then get a list of stinky files:
72
+ Then get a list of smelly files:
70
73
 
71
74
  ```
72
75
  $ skunk
@@ -86,7 +89,7 @@ running simple_cov
86
89
  .............
87
90
  New critique at file:////Users/etagwerker/Projects/fastruby/skunk/tmp/rubycritic/overview.html
88
91
  +-----------------------------------------------------+----------------------------+----------------------------+----------------------------+----------------------------+----------------------------+
89
- | file | stink_score | churn_times_cost | churn | cost | coverage |
92
+ | file | skunk_score | churn_times_cost | churn | cost | coverage |
90
93
  +-----------------------------------------------------+----------------------------+----------------------------+----------------------------+----------------------------+----------------------------+
91
94
  | lib/skunk/cli/commands/default.rb | 166.44 | 1.6643999999999999 | 3 | 0.5548 | 0 |
92
95
  | lib/skunk/cli/application.rb | 139.2 | 1.392 | 3 | 0.46399999999999997 | 0 |
@@ -103,14 +106,14 @@ New critique at file:////Users/etagwerker/Projects/fastruby/skunk/tmp/rubycritic
103
106
  | lib/skunk/cli/commands/help.rb | 0.0 | 0.0 | 2 | 0.0 | 0 |
104
107
  +-----------------------------------------------------+----------------------------+----------------------------+----------------------------+----------------------------+----------------------------+
105
108
 
106
- StinkScore Total: 612.31
109
+ SkunkScore Total: 612.31
107
110
  Modules Analysed: 13
108
- StinkScore Average: 0.47100769230769230769230769231e2
109
- Worst StinkScore: 166.44 (lib/skunk/cli/commands/default.rb)
111
+ SkunkScore Average: 0.47100769230769230769230769231e2
112
+ Worst SkunkScore: 166.44 (lib/skunk/cli/commands/default.rb)
110
113
  ```
111
114
 
112
115
  The command will run `rubycritic` and it will try to load code coverage data
113
- from your `.resultset.json` file.
116
+ from your `coverage/.resultset.json` file.
114
117
 
115
118
  Skunk's report will be in the console. Use it wisely. :)
116
119
 
@@ -122,7 +125,7 @@ Simply run:
122
125
  skunk -b <target-branch-name>
123
126
  ```
124
127
 
125
- Then get a StinkScore average comparison:
128
+ Then get a SkunkScore average comparison:
126
129
 
127
130
  ```
128
131
  $ skunk -b master
@@ -156,28 +159,63 @@ running churn
156
159
  .................
157
160
  running simple_cov
158
161
  .................
159
- Base branch (master) average stink score: 290.53999999999996
160
- Feature branch (feature/compare) average stink score: 340.3005882352941
162
+ Base branch (master) average skunk score: 290.53999999999996
163
+ Feature branch (feature/compare) average skunk score: 340.3005882352941
161
164
  Score: 340.3
162
165
  ```
163
166
 
164
167
  This should give you an idea if you're moving in the right direction or not.
165
168
 
169
+ ### Sharing results
170
+
171
+ If you want to quickly share the results of your report, you can use an
172
+ environment variable:
173
+
174
+ ```
175
+ SHARE=true skunk app/
176
+ ...
177
+ SkunkScore Total: 126.99
178
+ Modules Analysed: 17
179
+ SkunkScore Average: 7.47
180
+ Worst SkunkScore: 41.92 (lib/skunk/cli/commands/status_sharer.rb)
181
+
182
+ Generated with Skunk v0.5.0
183
+ Shared at: https://skunk.fastruby.io/k
184
+ ```
185
+
186
+ Results will be posted by default to https://skunk.fastruby.io which is a free
187
+ and open source Ruby on Rails application sponsored by
188
+ [OmbuLabs](https://www.ombulabs.com) ([source code](https://github.com/fastruby/skunk.fyi)).
189
+
190
+ If you prefer to post results to your own server, you can do so:
191
+
192
+ ```
193
+ SHARE_URL=https://path.to.your.skunk-fyi-server.example.com skunk app/
194
+ ...
195
+ SkunkScore Total: 126.99
196
+ Modules Analysed: 17
197
+ SkunkScore Average: 7.47
198
+ Worst SkunkScore: 41.92 (lib/skunk/cli/commands/status_sharer.rb)
199
+
200
+ Generated with Skunk v0.5.0
201
+ Shared at: https://path.to.your.skunk-fyi-server.example.com/k
202
+ ```
203
+
166
204
  ## Known Issues
167
205
 
168
- The StinkScore should be calculated per method. This would provide a more accurate
169
- representation of the average StinkScore in a module.
206
+ The SkunkScore should be calculated per method. This would provide a more accurate
207
+ representation of the average SkunkScore in a module.
170
208
 
171
- I think that the StinkScore of a module should be the average of the StinkScores of
209
+ I think that the SkunkScore of a module should be the average of the SkunkScores of
172
210
  all of its methods.
173
211
 
174
- Right now the StinkScore is calculated using the totals for a module:
212
+ Right now the SkunkScore is calculated using the totals for a module:
175
213
 
176
214
  - Total Code Coverage Percentage per Module
177
215
  - Total Churn per Module
178
216
  - Total Cost per Module
179
217
 
180
- For more details, feel free to review and improve this method: [RubyCritic::AnalysedModule#stink_score]
218
+ For more details, feel free to review and improve this method: [RubyCritic::AnalysedModule#skunk_score]
181
219
 
182
220
  ## Development
183
221
 
@@ -188,3 +226,9 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
188
226
  ## Contributing
189
227
 
190
228
  Bug reports and pull requests are welcome on GitHub at https://github.com/fastruby/skunk/issues.
229
+
230
+ ## Sponsorship
231
+
232
+ ![FastRuby.io | Rails Upgrade Services](https://github.com/fastruby/skunk/raw/master/fastruby-logo.png)
233
+
234
+ `skunk` is maintained and funded by [FastRuby.io](https://fastruby.io). The names and logos for FastRuby.io are trademarks of The Lean Software Boutique LLC.