skunk 0.3.0 → 0.3.1

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: df70466af9db8ae3849245db231b15bcee039470542d750b54dc27d6cc27f11f
4
- data.tar.gz: eed948e603c3f94226ed2eb4ede37397f731675401d34d70731069113af233c2
3
+ metadata.gz: 31e5fabed605521119f56bd2d3391bf8f206562deeea374685ed9c2fa549e0f9
4
+ data.tar.gz: e5a42b34af7d2162a25b4ab91abaa33dec4930c4c58ee44c9ecd1e74f05661e2
5
5
  SHA512:
6
- metadata.gz: 93b44bae842a25cca17a1708bbe2b7ba1a1b4fea072130d9609967fad908f16c0d54b16df3eb8c21e4cf222414a925bb671c9b06782b9aa3576c2893d96db1ee
7
- data.tar.gz: f7ef68ea2c9b5513183aec2757380e6b62b53def85be94d9e144562d47d9352e30703f81e99f18db7b8b2d8ceb526a5cffb896054f60f049171388d9333dbaa6
6
+ metadata.gz: 6ec99d947845d5bb77f2efa446078e0fc20658c67b1bd75e618dbbe3d453403e080798124cf7d60e5799573e636ac6847fdecd1a4b37ad8404e766937530133b
7
+ data.tar.gz: 51cdff8ee198c28b6281d5176e103b9af3f716656ef411716a945f9c21dbfe36894533849ac7b1090904073a10b0dc5131f7228fc16a23e4d0e7894abd77db81
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- skunk (0.3.0)
4
+ skunk (0.3.1)
5
5
  rubycritic (~> 4.2.1)
6
6
  terminal-table (~> 1.8.0)
7
7
 
data/README.md CHANGED
@@ -9,9 +9,8 @@ A RubyCritic extension to calculate StinkScore for a file or project.
9
9
  The StinkScore is a value that assesses the quality of a module. It takes into
10
10
  account:
11
11
 
12
- - Code Quality
12
+ - Code Complexity
13
13
  - Code Smells
14
- - Churn
15
14
  - Code Coverage
16
15
 
17
16
  The main goal of the StinkScore is to serve as a compass in your next
@@ -31,9 +31,9 @@ module RubyCritic
31
31
  #
32
32
  # @return [Float]
33
33
  def stink_score
34
- return churn_times_cost.round(2) if coverage == PERFECT_COVERAGE
34
+ return cost.round(2) if coverage == PERFECT_COVERAGE
35
35
 
36
- (churn_times_cost * (PERFECT_COVERAGE - coverage.to_i)).round(2)
36
+ (cost * (PERFECT_COVERAGE - coverage.to_i)).round(2)
37
37
  end
38
38
 
39
39
  # Returns the value of churn times cost.
data/lib/skunk/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Skunk
4
- VERSION = "0.3.0"
4
+ VERSION = "0.3.1"
5
5
  end
@@ -31,17 +31,9 @@ module RubyCritic
31
31
  #
32
32
  # @return [Float]
33
33
  def stink_score
34
- return churn_times_cost.round(2) if coverage == PERFECT_COVERAGE
34
+ return cost.round(2) if coverage == PERFECT_COVERAGE
35
35
 
36
- (churn_times_cost * (PERFECT_COVERAGE - coverage.to_i)).round(2)
37
- end
38
-
39
- # Returns the value of churn times cost.
40
- #
41
- # @return [Integer]
42
- def churn_times_cost
43
- safe_churn = churn.positive? ? churn : 1
44
- @churn_times_cost ||= safe_churn * cost
36
+ (cost * (PERFECT_COVERAGE - coverage.to_i)).round(2)
45
37
  end
46
38
  end
47
39
  end
data/skunk.gemspec CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.version = Skunk::VERSION
10
10
  spec.authors = ["Ernesto Tagwerker"]
11
11
  spec.email = ["ernesto+github@ombulabs.com"]
12
- spec.licenses = ['MIT']
12
+ spec.licenses = ["MIT"]
13
13
  spec.summary = "A library to assess code quality vs. code coverage"
14
14
  spec.description = "Knows how to calculate the StinkScore for a Ruby file"
15
15
  spec.homepage = "https://github.com/fastruby/skunk"
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.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ernesto Tagwerker