skunk 0.3.1 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 31e5fabed605521119f56bd2d3391bf8f206562deeea374685ed9c2fa549e0f9
4
- data.tar.gz: e5a42b34af7d2162a25b4ab91abaa33dec4930c4c58ee44c9ecd1e74f05661e2
3
+ metadata.gz: 5df324d3763ea965d25b6eb21bb3b97969d5bb51ea89e64c198d05c81c9afd09
4
+ data.tar.gz: 98e25d9fc2d2224a286a103bd74f98c97709a6004d785638b43ed08a68302da6
5
5
  SHA512:
6
- metadata.gz: 6ec99d947845d5bb77f2efa446078e0fc20658c67b1bd75e618dbbe3d453403e080798124cf7d60e5799573e636ac6847fdecd1a4b37ad8404e766937530133b
7
- data.tar.gz: 51cdff8ee198c28b6281d5176e103b9af3f716656ef411716a945f9c21dbfe36894533849ac7b1090904073a10b0dc5131f7228fc16a23e4d0e7894abd77db81
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)**
@@ -0,0 +1,89 @@
1
+ # .github/workflows/ci.yml
2
+
3
+ name: CI
4
+ on:
5
+ push:
6
+ branches:
7
+ - main
8
+ pull_request:
9
+ branches:
10
+ - main
11
+
12
+ jobs:
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:
76
+ runs-on: ubuntu-latest
77
+
78
+ steps:
79
+ - uses: actions/checkout@v1
80
+ - name: Setup Ruby
81
+ uses: ruby/setup-ruby@v1
82
+ with:
83
+ ruby-version: 3.0
84
+ bundler-cache: true
85
+ - name: Build and run tests
86
+ run: |
87
+ gem install bundler
88
+ bundle install --jobs 4 --retry 3
89
+ bundle exec rake
@@ -0,0 +1,29 @@
1
+ name: Skunk
2
+ on: [push, pull_request]
3
+
4
+ jobs:
5
+ skunk:
6
+ runs-on: ubuntu-latest
7
+
8
+ steps:
9
+ - uses: actions/checkout@v1
10
+ - name: Setup Ruby
11
+ uses: actions/setup-ruby@v1
12
+ with:
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
19
+ - name: Run Skunk on Project
20
+ run: |
21
+ gem install skunk
22
+ CURRENT_BRANCH="$(git rev-parse --abbrev-ref HEAD)"
23
+ if [[ "$CURRENT_BRANCH" != "main" ]]; then
24
+ echo "Executing within branch: $CURRENT_BRANCH"
25
+ skunk lib/ -b master
26
+ else
27
+ echo "Executing within master branch"
28
+ skunk lib/
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/.reek.yml CHANGED
@@ -1,28 +1,33 @@
1
1
  # Auto generated by Reeks --todo flag
2
2
  ---
3
3
  detectors:
4
- UtilityFunction:
4
+ Attribute:
5
5
  exclude:
6
- - capture_output_streams
7
- - Skunk::Command::Compare#analyse_modified_files
8
- - Skunk::Command::Compare#build_details_path
6
+ - Skunk::Command::StatusReporter#analysed_modules
7
+ FeatureEnvy:
8
+ exclude:
9
+ - Skunk::Command::StatusReporter#table
9
10
  InstanceVariableAssumption:
10
11
  exclude:
11
- - Skunk::Cli::Application
12
12
  - Skunk::Cli::Command::Default
13
+ - Skunk::Cli::Options::Argv
13
14
  - RubyCritic::AnalysedModulesCollection
14
- TooManyStatements:
15
- exclude:
16
- - initialize
17
- - Skunk::Cli::Application#execute
18
15
  IrresponsibleModule:
19
16
  exclude:
20
17
  - Skunk::Cli::Command::Help
18
+ - Skunk::Cli::Options::Argv
21
19
  - Skunk::Cli::Options
22
20
  - RubyCritic::AnalysedModulesCollection
23
- Attribute:
21
+ NestedIterators:
24
22
  exclude:
25
- - Skunk::Command::StatusReporter#analysed_modules
26
- FeatureEnvy:
23
+ - Skunk::Cli::Options::Argv#parse
24
+ TooManyStatements:
27
25
  exclude:
28
- - Skunk::Command::StatusReporter#table
26
+ - initialize
27
+ - Skunk::Cli::Application#execute
28
+ - Skunk::Cli::Options::Argv#parse
29
+ UtilityFunction:
30
+ exclude:
31
+ - capture_output_streams
32
+ - Skunk::Command::Compare#analyse_modified_files
33
+ - Skunk::Command::Compare#build_details_path
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,16 +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]
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
15
+
16
+ ## [0.4.2] [(commits)](https://github.com/fastruby/skunk/compare/v0.4.1...v0.4.2)
17
+ * [BUGFIX] Fixes table width issues by rounding values (by [@etagwerker]())
18
+
19
+ ## [0.4.1] [(commits)](https://github.com/fastruby/skunk/compare/v0.4.0...v0.4.1)
20
+ * [BUGFIX] Fixes table width issues (by [@etagwerker]())
21
+
22
+ ## [0.4.0] [(commits)](https://github.com/fastruby/skunk/compare/v0.3.2...v0.4.0)
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]())
27
+
28
+ ## [0.3.2] - 2019-11-23 [(commits)](https://github.com/fastruby/skunk/compare/v0.3.1...v0.3.2)
29
+ ### Changed
30
+ * [BUGFIX] Change "StinkScore" formula to skip `churn_times_cost` (by [@etagwerker]())
31
+
32
+ ## [0.3.1] - 2019-11-19 [(commits)](https://github.com/fastruby/skunk/compare/v0.3.0...v0.3.1)
33
+ ### Changed
34
+ * [BUGFIX] Change "StinkScore" formula to skip `churn_times_cost` (by [@etagwerker]())
35
+
36
+ ## [0.3.0] - 2019-11-19 [(commits)](https://github.com/fastruby/skunk/compare/v0.2.0...v0.3.0)
37
+ ### Changed
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]())
8
43
 
9
- ## [0.2.0] - 2019-10-15
44
+ ## [0.2.0] - 2019-10-16 [(commits)](https://github.com/fastruby/skunk/compare/v0.1.0...v0.2.0)
10
45
  ### Changed
11
- - Now `skunk` will not report status for files that start with `test/` or `spec/`
46
+ - [FEATURE] Now `skunk` will not report status for files that start with `test/` or `spec/` (by [@etagwerker]())
12
47
 
13
- ## [0.1.0] - 2019-10-15
48
+ ## [0.1.0] - 2019-10-16
14
49
  ### Added
15
- - Now `skunk` uses `rubycritic-simplecov` to generate a console report with a list
16
- of files and their "StinkScore"
50
+ - [FEATURE] Now `skunk` uses `rubycritic-simplecov` to generate a console report with a list
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"