Skip to content

Commit 301cd5b

Browse files
authored
Merge pull request #9 from VitalConnectInc/feat/8-kettle-soup-cover
Feat/8 kettle soup cover
2 parents 2e749d5 + 30c5bc8 commit 301cd5b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+5887
-11484
lines changed

.envrc

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
### External Testing Controls
2+
export K_SOUP_COV_DO=true # Means you want code coverage
3+
export K_SOUP_COV_MIN_BRANCH=71 # Means you want to enforce X% branch coverage
4+
export K_SOUP_COV_MIN_LINE=89 # Means you want to enforce X% line coverage
5+
export K_SOUP_COV_MIN_HARD=true # Means you want the build to fail if the coverage thresholds are not met
6+
# Available formats are html, xml, rcov, lcov, json, tty
7+
export K_SOUP_COV_MULTI_FORMATTERS="html,tty" # What coverage output formats do you want?
8+
export MAX_ROWS=5 # Setting for simplecov-console gem for tty output, limits to the worst N rows of bad coverage
9+
export K_SOUP_COV_COMMAND_NAME="MiniTest Coverage"
10+
export DEBUG=true # allow byebug statements

.github/workflows/coverage.yml

+2-28
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ env:
44
K_SOUP_COV_MIN_BRANCH: 71
55
K_SOUP_COV_MIN_LINE: 89
66
K_SOUP_COV_MIN_HARD: true
7+
K_SOUP_COV_DO: true
8+
K_SOUP_COV_COMMAND_NAME: "MiniTest Coverage"
79

810
on:
911
push:
@@ -45,12 +47,6 @@ jobs:
4547
- '3.1'
4648

4749
steps:
48-
- name: CodeClimate Install
49-
uses: amancevice/setup-code-climate@v2
50-
if: ${{ github.event_name != 'pull_request' }}
51-
with:
52-
cc_test_reporter_id: "${{ secrets.CC_TEST_REPORTER_ID }}"
53-
5450
- name: Checkout
5551
uses: actions/checkout@v4
5652

@@ -62,19 +58,9 @@ jobs:
6258
bundler: "${{ matrix.bundler }}"
6359
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
6460

65-
- name: CodeClimate Pre-build Notification
66-
run: cc-test-reporter before-build
67-
if: ${{ github.event_name != 'pull_request' }}
68-
continue-on-error: ${{ matrix.experimental != 'false' }}
69-
7061
- name: Run tests
7162
run: bundle exec rake test
7263

73-
- name: CodeClimate Post-build Notification
74-
run: cc-test-reporter after-build
75-
if: ${{ github.event_name != 'pull_request' }}
76-
continue-on-error: ${{ matrix.experimental != 'false' }}
77-
7864
- name: Code Coverage Summary Report
7965
uses: irongut/[email protected]
8066
if: ${{ github.event_name == 'pull_request' }}
@@ -97,15 +83,3 @@ jobs:
9783
recreate: true
9884
path: code-coverage-results.md
9985
continue-on-error: ${{ matrix.experimental != 'false' }}
100-
101-
- name: Coveralls
102-
uses: coverallsapp/github-action@master
103-
with:
104-
github-token: "${{ secrets.GITHUB_TOKEN }}"
105-
continue-on-error: ${{ matrix.experimental != 'false' }}
106-
107-
- name: Upload coverage reports to Codecov
108-
uses: codecov/[email protected]
109-
with:
110-
token: ${{ secrets.CODECOV_TOKEN }}
111-
slug: pboling/sanitize_email

.github/workflows/heads.yml

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
3232
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
3333
runs-on: ubuntu-latest
34+
continue-on-error: ${{ matrix.experimental || endsWith(matrix.ruby, 'head') }}
3435
strategy:
3536
fail-fast: true
3637
matrix:

.github/workflows/unsupported.yml

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Unsupported (EOL) Ruby Matrix
22

3+
env:
4+
K_SOUP_COV_DO: false
5+
36
on:
47
push:
58
branches:

.rubocop_gradual.lock

+364-7,633
Large diffs are not rendered by default.

.simplecov

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
require "kettle/soup/cover/config"
2+
3+
SimpleCov.start

.tool-versions

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ruby 3.2.5
1+
ruby 2.7.8

Gemfile

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
1+
# frozen_string_literal: true
2+
3+
#### IMPORTANT #######################################################
4+
# Gemfile is for local development ONLY; Gemfile is NOT loaded in CI #
5+
####################################################### IMPORTANT ####
6+
17
source "https://rubygems.org"
28

9+
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
10+
311
# Specify your gem's dependencies in ruby-openid.gemspec
412
gemspec
513

6-
gem "byebug"
14+
platform :mri do
15+
# Debugging
16+
gem "byebug", ">= 11"
17+
end

Gemfile.lock

+45-8
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,23 @@ PATH
66
GEM
77
remote: https://rubygems.org/
88
specs:
9+
ansi (1.5.0)
910
ast (2.4.2)
11+
backports (3.25.0)
1012
byebug (11.1.3)
1113
diff-lcs (1.5.1)
1214
diffy (3.4.2)
15+
docile (1.4.1)
1316
json (2.7.2)
17+
kettle-soup-cover (1.0.4)
18+
simplecov (~> 0.22)
19+
simplecov-cobertura (~> 2.1)
20+
simplecov-console (~> 0.9, >= 0.9.1)
21+
simplecov-html (~> 0.12)
22+
simplecov-lcov (~> 0.8)
23+
simplecov-rcov (~> 0.3, >= 0.3.3)
24+
simplecov_json_formatter (~> 0.1, >= 0.1.4)
25+
version_gem (~> 1.1, >= 1.1.4)
1426
language_server-protocol (3.17.0.3)
1527
lint_roller (1.1.0)
1628
minitest (5.25.1)
@@ -25,13 +37,13 @@ GEM
2537
rexml (3.3.6)
2638
strscan
2739
rspec-block_is_expected (1.0.6)
28-
rubocop (1.65.1)
40+
rubocop (1.64.1)
2941
json (~> 2.3)
3042
language_server-protocol (>= 3.17.0)
3143
parallel (~> 1.10)
3244
parser (>= 3.3.0.2)
3345
rainbow (>= 2.2.2, < 4.0)
34-
regexp_parser (>= 2.4, < 3.0)
46+
regexp_parser (>= 1.8, < 3.0)
3547
rexml (>= 3.2.5, < 4.0)
3648
rubocop-ast (>= 1.31.1, < 2.0)
3749
ruby-progressbar (~> 1.7)
@@ -73,10 +85,26 @@ GEM
7385
rubocop-thread_safety (0.5.1)
7486
rubocop (>= 0.90.0)
7587
ruby-progressbar (1.13.0)
76-
standard (1.40.0)
88+
simplecov (0.22.0)
89+
docile (~> 1.1)
90+
simplecov-html (~> 0.11)
91+
simplecov_json_formatter (~> 0.1)
92+
simplecov-cobertura (2.1.0)
93+
rexml
94+
simplecov (~> 0.19)
95+
simplecov-console (0.9.1)
96+
ansi
97+
simplecov
98+
terminal-table
99+
simplecov-html (0.12.3)
100+
simplecov-lcov (0.8.0)
101+
simplecov-rcov (0.3.7)
102+
simplecov (>= 0.4.1)
103+
simplecov_json_formatter (0.1.4)
104+
standard (1.37.0)
77105
language_server-protocol (~> 3.17.0.2)
78106
lint_roller (~> 1.0)
79-
rubocop (~> 1.65.0)
107+
rubocop (~> 1.64.0)
80108
standard-custom (~> 1.0.0)
81109
standard-performance (~> 1.4)
82110
standard-custom (1.0.2)
@@ -92,16 +120,23 @@ GEM
92120
standard-performance (>= 1.3.1, < 2)
93121
version_gem (>= 1.1.4, < 3)
94122
strscan (3.1.0)
123+
terminal-table (3.0.2)
124+
unicode-display_width (>= 1.1.1, < 3)
95125
unicode-display_width (2.5.0)
96126
version_gem (1.1.4)
97127
webrick (1.8.1)
128+
yard (0.9.36)
129+
yard-junk (0.0.9)
130+
backports (>= 3.18)
131+
rainbow
132+
yard
98133

99134
PLATFORMS
100-
arm64-darwin-23
101-
ruby
135+
arm64-darwin-22
102136

103137
DEPENDENCIES
104-
byebug
138+
byebug (>= 11)
139+
kettle-soup-cover (~> 1.0, >= 1.0.2)
105140
minitest (>= 5)
106141
rake (>= 13)
107142
rexml (~> 3.2)
@@ -111,6 +146,8 @@ DEPENDENCIES
111146
ruby-openid!
112147
standard (>= 1.35.1)
113148
webrick (~> 1.8)
149+
yard (~> 0.9, >= 0.9.34)
150+
yard-junk (~> 0.0)
114151

115152
BUNDLED WITH
116-
2.5.18
153+
2.4.22

bin/bundle

+6-6
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ m = Module.new do
2727
bundler_version = nil
2828
update_index = nil
2929
ARGV.each_with_index do |a, i|
30-
if update_index && update_index.succ == i && a.match?(Gem::Version::ANCHORED_VERSION_PATTERN)
30+
if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN
3131
bundler_version = a
3232
end
33-
next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/
33+
next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/o
3434
bundler_version = $1
3535
update_index = i
3636
end
@@ -56,7 +56,7 @@ m = Module.new do
5656
def lockfile_version
5757
return unless File.file?(lockfile)
5858
lockfile_contents = File.read(lockfile)
59-
return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/
59+
return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/o
6060
Regexp.last_match(1)
6161
end
6262

@@ -83,15 +83,15 @@ m = Module.new do
8383

8484
def activate_bundler
8585
gem_error = activation_error_handling do
86-
gem "bundler", bundler_requirement
86+
gem("bundler", bundler_requirement)
8787
end
8888
return if gem_error.nil?
8989
require_error = activation_error_handling do
9090
require "bundler/version"
9191
end
9292
return if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION))
93-
warn "Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`"
94-
exit 42
93+
warn("Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`")
94+
exit(42)
9595
end
9696

9797
def activation_error_handling

bin/code_climate_reek

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env ruby
2+
# frozen_string_literal: true
3+
4+
#
5+
# This file was generated by Bundler.
6+
#
7+
# The application 'code_climate_reek' is installed as part of a gem, and
8+
# this file is here to facilitate running it.
9+
#
10+
11+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
12+
13+
bundle_binstub = File.expand_path("bundle", __dir__)
14+
15+
if File.file?(bundle_binstub)
16+
if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
17+
load(bundle_binstub)
18+
else
19+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
20+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
21+
end
22+
end
23+
24+
require "rubygems"
25+
require "bundler/setup"
26+
27+
load Gem.bin_path("reek", "code_climate_reek")

bin/reek

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env ruby
2+
# frozen_string_literal: true
3+
4+
#
5+
# This file was generated by Bundler.
6+
#
7+
# The application 'reek' is installed as part of a gem, and
8+
# this file is here to facilitate running it.
9+
#
10+
11+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
12+
13+
bundle_binstub = File.expand_path("bundle", __dir__)
14+
15+
if File.file?(bundle_binstub)
16+
if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
17+
load(bundle_binstub)
18+
else
19+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
20+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
21+
end
22+
end
23+
24+
require "rubygems"
25+
require "bundler/setup"
26+
27+
load Gem.bin_path("reek", "reek")

bin/yard

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env ruby
2+
# frozen_string_literal: true
3+
4+
#
5+
# This file was generated by Bundler.
6+
#
7+
# The application 'yard' is installed as part of a gem, and
8+
# this file is here to facilitate running it.
9+
#
10+
11+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
12+
13+
bundle_binstub = File.expand_path("bundle", __dir__)
14+
15+
if File.file?(bundle_binstub)
16+
if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
17+
load(bundle_binstub)
18+
else
19+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
20+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
21+
end
22+
end
23+
24+
require "rubygems"
25+
require "bundler/setup"
26+
27+
load Gem.bin_path("yard", "yard")

bin/yard-junk

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env ruby
2+
# frozen_string_literal: true
3+
4+
#
5+
# This file was generated by Bundler.
6+
#
7+
# The application 'yard-junk' is installed as part of a gem, and
8+
# this file is here to facilitate running it.
9+
#
10+
11+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
12+
13+
bundle_binstub = File.expand_path("bundle", __dir__)
14+
15+
if File.file?(bundle_binstub)
16+
if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
17+
load(bundle_binstub)
18+
else
19+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
20+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
21+
end
22+
end
23+
24+
require "rubygems"
25+
require "bundler/setup"
26+
27+
load Gem.bin_path("yard-junk", "yard-junk")

bin/yardoc

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env ruby
2+
# frozen_string_literal: true
3+
4+
#
5+
# This file was generated by Bundler.
6+
#
7+
# The application 'yardoc' is installed as part of a gem, and
8+
# this file is here to facilitate running it.
9+
#
10+
11+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
12+
13+
bundle_binstub = File.expand_path("bundle", __dir__)
14+
15+
if File.file?(bundle_binstub)
16+
if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
17+
load(bundle_binstub)
18+
else
19+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
20+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
21+
end
22+
end
23+
24+
require "rubygems"
25+
require "bundler/setup"
26+
27+
load Gem.bin_path("yard", "yardoc")

0 commit comments

Comments
 (0)