Skip to content

Commit b529d06

Browse files
committed
🔖 Prepare for release v2.0.2
1 parent f7bc482 commit b529d06

14 files changed

+426
-415
lines changed

.envrc

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export MAX_ROWS=1 # Setting for simplecov-console gem for tty output, limits to
2727

2828
# Internal Debugging Controls
2929
export DEBUG=false # do not allow byebug statements (override in .env.local)
30+
export REQUIRE_BENCH=false # set to true in .env.local to turn on require_bench
3031

3132
# .env would override anything in this file, if `dotenv` is uncommented below.
3233
# .env is a DOCKER standard, and if we use it, it would be in deployed, or DOCKER, environments,

.simplecov

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
require "kettle/soup/cover/config"
22

3-
SimpleCov.start
3+
SimpleCov.start do
4+
add_filter "test/**/*"
5+
end

CHANGELOG.md

+10-1
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
### Fixed
1111
### Removed
1212

13-
## 2.0.2 - 2024-09-20
13+
## 2.0.2 - 2024-09-25
14+
- COVERAGE: 97.72% -- 214/219 lines in 4 files
15+
- BRANCH COVERAGE: 86.00% -- 43/50 branches in 4 files
16+
- 39.13% documented
1417
### Added
1518
- Improved integration with direnv for development
19+
- Better test coverage
20+
- More tests
21+
- rots v1.0.0 for tests
22+
### Changed
23+
- Upgraded to ruby-openid2 v3.1.0
24+
- Moved to oauth-xx organization
1625

1726
## 2.0.1 - 2024-09-05
1827
### Added

Gemfile

-2
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,3 @@ platform :mri do
1414
# Debugging
1515
gem "byebug", ">= 11"
1616
end
17-
18-
gem "rots", github: "oauth-xx/rots"

Gemfile.lock

+39-24
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,9 @@
1-
GIT
2-
remote: https://github.com/oauth-xx/rots
3-
revision: caeacbf72b3b5966c3a299391911557d5771ceee
4-
specs:
5-
rots (0.2.2)
6-
net-http
7-
rack (>= 2.0)
8-
ruby-openid2 (~> 3.0)
9-
yaml
10-
111
PATH
122
remote: .
133
specs:
14-
rack-openid2 (2.0.1)
4+
rack-openid2 (2.0.2)
155
rack (>= 2.2)
16-
ruby-openid2 (~> 3.0, >= 3.0.1)
6+
ruby-openid2 (~> 3.1, >= 3.1.0)
177
version_gem (~> 1.1, >= 1.1.4)
188

199
GEM
@@ -23,6 +13,7 @@ GEM
2313
ast (2.4.2)
2414
backports (3.25.0)
2515
byebug (11.1.3)
16+
date (3.3.4)
2617
diff-lcs (1.5.1)
2718
diffy (3.4.2)
2819
docile (1.4.1)
@@ -38,32 +29,54 @@ GEM
3829
version_gem (~> 1.1, >= 1.1.4)
3930
language_server-protocol (3.17.0.3)
4031
lint_roller (1.1.0)
32+
logger (1.6.1)
4133
minitest (5.25.1)
34+
minitest-focus (1.4.0)
35+
minitest (>= 4, < 6)
4236
minitest-rg (5.3.0)
4337
minitest (~> 5.0)
44-
net-http (0.4.1)
45-
uri
38+
openssl (3.2.0)
39+
optparse (0.5.0)
4640
ostruct (0.6.0)
4741
parallel (1.26.3)
4842
parser (3.3.5.0)
4943
ast (~> 2.4.1)
5044
racc
45+
psych (5.1.2)
46+
stringio
5147
racc (1.8.1)
5248
rack (3.1.7)
5349
rack-session (2.0.0)
5450
rack (>= 3.0.0)
51+
rackup (2.1.0)
52+
rack (>= 3)
53+
webrick (~> 1.8)
5554
rainbow (3.1.1)
5655
rake (13.2.1)
5756
regexp_parser (2.9.2)
57+
require_bench (1.0.4)
58+
version_gem (>= 1.1.3, < 4)
5859
rexml (3.3.7)
60+
rots (1.0.0)
61+
date
62+
openssl
63+
optparse
64+
psych (~> 5.1)
65+
rack (>= 2)
66+
rackup (>= 2)
67+
ruby-openid2 (~> 3.1, >= 3.1.0)
68+
stringio
69+
version_gem (~> 1.1, >= 1.1.4)
70+
webrick
71+
yaml (~> 0.3)
5972
rspec-block_is_expected (1.0.6)
60-
rubocop (1.64.1)
73+
rubocop (1.65.1)
6174
json (~> 2.3)
6275
language_server-protocol (>= 3.17.0)
6376
parallel (~> 1.10)
6477
parser (>= 3.3.0.2)
6578
rainbow (>= 2.2.2, < 4.0)
66-
regexp_parser (>= 1.8, < 3.0)
79+
regexp_parser (>= 2.4, < 3.0)
6780
rexml (>= 3.2.5, < 4.0)
6881
rubocop-ast (>= 1.31.1, < 2.0)
6982
ruby-progressbar (~> 1.7)
@@ -104,9 +117,7 @@ GEM
104117
rubocop (~> 1.51)
105118
rubocop-thread_safety (0.5.1)
106119
rubocop (>= 0.90.0)
107-
ruby-openid2 (3.0.1)
108-
net-http (~> 0.4, >= 0.4.1)
109-
rexml (~> 3.3, >= 3.3.7)
120+
ruby-openid2 (3.1.0)
110121
version_gem (~> 1.1, >= 1.1.4)
111122
ruby-progressbar (1.13.0)
112123
simplecov (0.22.0)
@@ -125,10 +136,10 @@ GEM
125136
simplecov-rcov (0.3.7)
126137
simplecov (>= 0.4.1)
127138
simplecov_json_formatter (0.1.4)
128-
standard (1.37.0)
139+
standard (1.40.0)
129140
language_server-protocol (~> 3.17.0.2)
130141
lint_roller (~> 1.0)
131-
rubocop (~> 1.64.0)
142+
rubocop (~> 1.65.0)
132143
standard-custom (~> 1.0.0)
133144
standard-performance (~> 1.4)
134145
standard-custom (1.0.2)
@@ -143,11 +154,12 @@ GEM
143154
standard-custom (>= 1.0.2, < 2)
144155
standard-performance (>= 1.3.1, < 2)
145156
version_gem (>= 1.1.4, < 3)
157+
stringio (3.1.1)
146158
terminal-table (3.0.2)
147159
unicode-display_width (>= 1.1.1, < 3)
148160
unicode-display_width (2.6.0)
149-
uri (0.13.1)
150161
version_gem (1.1.4)
162+
webrick (1.8.2)
151163
yaml (0.3.0)
152164
yard (0.9.37)
153165
yard-junk (0.0.10)
@@ -162,12 +174,15 @@ PLATFORMS
162174
DEPENDENCIES
163175
byebug (>= 11)
164176
kettle-soup-cover (~> 1.0, >= 1.0.2)
165-
minitest (>= 5)
177+
logger (~> 1.6, >= 1.6.1)
178+
minitest (>= 5, < 6)
179+
minitest-focus (~> 1.4)
166180
minitest-rg (>= 5)
167181
rack-openid2!
168182
rack-session (>= 2)
169183
rake (>= 13)
170-
rots!
184+
require_bench (~> 1.0, >= 1.0.4)
185+
rots (~> 1.0)
171186
rubocop-lts (~> 18.2, >= 18.2.1)
172187
rubocop-minitest (~> 0.36)
173188
rubocop-packaging (~> 0.5, >= 0.5.2)

README.md

+68
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
<div id="badges">
44

5+
[![Version](https://img.shields.io/gem/v/rack-openid2.svg)](https://rubygems.org/gems/rack-openid2)
6+
[![Downloads Today](https://img.shields.io/gem/rd/rack-openid2.svg)](https://github.com/oauth-xx/rack-openid2)
57
[![CI Supported Build][🚎s-wfi]][🚎s-wf]
68
[![CI Unsupported Build][🚎us-wfi]][🚎us-wf]
79
[![CI Style Build][🚎st-wfi]][🚎st-wf]
@@ -19,10 +21,46 @@
1921
[🚎hd-wf]: https://github.com/oauth-xx/rack-openid2/actions/workflows/heads.yml
2022
[🚎hd-wfi]: https://github.com/oauth-xx/rack-openid2/actions/workflows/heads.yml/badge.svg
2123

24+
-----
25+
26+
<div align="center">
27+
28+
[![Liberapay Patrons][⛳liberapay-img]][⛳liberapay]
29+
[![Sponsor Me on Github][🖇sponsor-img]][🖇sponsor]
30+
[![Polar Shield][🖇polar-img]][🖇polar]
31+
[![Donate to my FLOSS or refugee efforts at ko-fi.com][🖇kofi-img]][🖇kofi]
32+
[![Donate to my FLOSS or refugee efforts using Patreon][🖇patreon-img]][🖇patreon]
33+
34+
[⛳liberapay-img]: https://img.shields.io/liberapay/patrons/pboling.svg?logo=liberapay
35+
[⛳liberapay]: https://liberapay.com/pboling/donate
36+
[🖇sponsor-img]: https://img.shields.io/badge/Sponsor_Me!-pboling.svg?style=social&logo=github
37+
[🖇sponsor]: https://github.com/sponsors/pboling
38+
[🖇polar-img]: https://polar.sh/embed/seeks-funding-shield.svg?org=pboling
39+
[🖇polar]: https://polar.sh/pboling
40+
[🖇kofi-img]: https://img.shields.io/badge/buy%20me%20coffee-donate-yellow.svg
41+
[🖇kofi]: https://ko-fi.com/O5O86SNP4
42+
[🖇patreon-img]: https://img.shields.io/badge/patreon-donate-yellow.svg
43+
[🖇patreon]: https://patreon.com/galtzo
44+
45+
<span class="badge-buymealatte">
46+
<a href="https://www.buymeacoffee.com/pboling"><img src="https://img.buymeacoffee.com/button-api/?text=Buy me a latte&emoji=&slug=pboling&button_colour=FFDD00&font_colour=000000&font_family=Cookie&outline_colour=000000&coffee_colour=ffffff" /></a>
47+
</span>
48+
49+
</div>
2250
</div>
2351

2452
Provides a more HTTPish API around the ruby-openid library.
2553

54+
## Installation
55+
56+
Install the gem and add to the application's Gemfile by executing:
57+
58+
$ bundle add rack-openid2
59+
60+
If bundler is not being used to manage dependencies, install the gem by executing:
61+
62+
$ gem install rack-openid2
63+
2664
## Usage
2765

2866
You trigger an OpenID request similar to HTTP authentication. From your app, return a "401 Unauthorized" and a "WWW-Authenticate" header with the identifier you would like to validate.
@@ -94,6 +132,36 @@ __END__
94132
</form>
95133
```
96134

135+
## General Info
136+
137+
| Primary Namespace | `Rack::OpenID` |
138+
|-------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
139+
| gem name | [ruby-openid2](https://rubygems.org/gems/rack-openid2) |
140+
| code triage | [![Open Source Helpers](https://www.codetriage.com/oauth-xx/rack-openid2/badges/users.svg)](https://www.codetriage.com/oauth-xx/rack-openid2) |
141+
| documentation | [on Github.com][homepage], [on Rdoc.info][documentation] |
142+
| expert support | [![Get help on Codementor](https://cdn.codementor.io/badges/get_help_github.svg)](https://www.codementor.io/peterboling?utm_source=github&utm_medium=button&utm_term=peterboling&utm_campaign=github) |
143+
| `...` 💖 | [![Liberapay Patrons][⛳liberapay-img]][⛳liberapay] [![Sponsor Me][🖇sponsor-img]][🖇sponsor] [![Follow Me on LinkedIn][🖇linkedin-img]][🖇linkedin] [![Find Me on WellFound:][✌️wellfound-img]][✌️wellfound] [![Find Me on CrunchBase][💲crunchbase-img]][💲crunchbase] [![My LinkTree][🌳linktree-img]][🌳linktree] [![Follow Me on Ruby.Social][🐘ruby-mast-img]][🐘ruby-mast] [![Tweet @ Peter][🐦tweet-img]][🐦tweet] [💻][coderme] [🌏][aboutme] |
144+
145+
<!-- 7️⃣ spread 💖 -->
146+
[🐦tweet-img]: https://img.shields.io/twitter/follow/galtzo.svg?style=social&label=Follow%20%40galtzo
147+
[🐦tweet]: http://twitter.com/galtzo
148+
[🚎blog]: http://www.railsbling.com/tags/rack-openid2/
149+
[🚎blog-img]: https://img.shields.io/badge/blog-railsbling-brightgreen.svg?style=flat
150+
[🖇linkedin]: http://www.linkedin.com/in/peterboling
151+
[🖇linkedin-img]: https://img.shields.io/badge/PeterBoling-blue?style=plastic&logo=linkedin
152+
[✌️wellfound]: https://angel.co/u/peter-boling
153+
[✌️wellfound-img]: https://img.shields.io/badge/peter--boling-orange?style=plastic&logo=wellfound
154+
[💲crunchbase]: https://www.crunchbase.com/person/peter-boling
155+
[💲crunchbase-img]: https://img.shields.io/badge/peter--boling-purple?style=plastic&logo=crunchbase
156+
[🐘ruby-mast]: https://ruby.social/@galtzo
157+
[🐘ruby-mast-img]: https://img.shields.io/mastodon/follow/109447111526622197?domain=https%3A%2F%2Fruby.social&style=plastic&logo=mastodon&label=Ruby%20%40galtzo
158+
[🌳linktree]: https://linktr.ee/galtzo
159+
[🌳linktree-img]: https://img.shields.io/badge/galtzo-purple?style=plastic&logo=linktree
160+
161+
<!-- Maintainer Contact Links -->
162+
[aboutme]: https://about.me/peter.boling
163+
[coderme]: https://coderwall.com/Peter%20Boling
164+
97165
## TODO
98166

99167
- 1 failing test (skipped)

Rakefile

+3-4
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@ require "bundler/gem_tasks"
22

33
require "rake/testtask"
44

5+
require "require_bench" if ENV.fetch("REQUIRE_BENCH").casecmp?("true")
6+
57
desc "Run tests"
68
Rake::TestTask.new("test") do |t|
7-
t.libs << "lib"
8-
t.libs << "test"
9-
t.test_files = FileList["test/**/test_*.rb"]
109
t.verbose = false
1110
end
1211

@@ -40,4 +39,4 @@ rescue LoadError
4039
end
4140
end
4241

43-
task default: %i[test rubocop_gradual yard yard:junk]
42+
task default: %i[test rubocop_gradual:autocorrect yard yard:junk]

lib/rack/openid/version.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module Rack
22
class OpenID
33
module Version
4-
VERSION = "2.0.1"
4+
VERSION = "2.0.2"
55
end
66
end
77
end

rack-openid2.gemspec

+10-2
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,26 @@ Gem::Specification.new do |spec|
4242
spec.metadata["rubygems_mfa_required"] = "true"
4343

4444
spec.add_dependency("rack", ">= 2.2")
45-
spec.add_dependency("ruby-openid2", "~> 3.0", ">= 3.0.1")
45+
spec.add_dependency("ruby-openid2", "~> 3.1", ">= 3.1.0")
4646
spec.add_dependency("version_gem", "~> 1.1", ">= 1.1.4")
4747

4848
# Testing
49-
spec.add_development_dependency("minitest", ">= 5")
49+
spec.add_development_dependency("minitest", ">= 5", "< 6") # Use assert_nil if expecting nil
50+
spec.add_development_dependency("minitest-focus", "~> 1.4")
5051
spec.add_development_dependency("minitest-rg", ">= 5")
5152
spec.add_development_dependency("rack-session", ">= 2")
5253
spec.add_development_dependency("rake", ">= 13")
54+
spec.add_development_dependency("rots", "~> 1.0")
55+
56+
# Test Logging
57+
spec.add_development_dependency("logger", "~> 1.6", ">= 1.6.1")
5358

5459
# Coverage
5560
spec.add_development_dependency("kettle-soup-cover", "~> 1.0", ">= 1.0.2")
5661

62+
# Debugging
63+
spec.add_development_dependency("require_bench", "~> 1.0", ">= 1.0.4")
64+
5765
# Linting
5866
spec.add_development_dependency("rubocop-lts", "~> 18.2", ">= 18.2.1")
5967
spec.add_development_dependency("rubocop-minitest", "~> 0.36")

test/test_helper.rb test/support/config.rb

+15-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
# External dependencies
2+
require "require_bench" if ENV.fetch("REQUIRE_BENCH").casecmp?("true")
23
require "byebug" if ENV.fetch("DEBUG", "false").casecmp?("true")
34
require "net/http"
45
require "rack"
56
require "rack/session"
67

7-
# testing libraries
8+
# External testing libraries
89
require "minitest/rg"
910

1011
# Test support
11-
require "support/logging"
12+
require_relative "logging"
1213

1314
## Last thing before loading this gem is to setup code coverage
1415
begin
@@ -22,9 +23,18 @@
2223

2324
# Testing libraries that need to load after simplecov
2425
require "minitest/autorun"
26+
require "minitest/focus"
2527

26-
# Internal dependencies & mixins
27-
require "rack/openid"
28-
require "rack/openid/simple_auth"
28+
# rots depends on this library, but the tests here also depend on it,
29+
# so it needs to load after simplecov, in order to get accurate coverage of this gem,
30+
# since this gem is loaded by rots.
31+
require "rots"
32+
require "rots/mocks"
33+
require "rots/test"
2934

3035
OpenID::Util.logger = TestLogging::LOGGER
36+
OpenID.fetcher = Rots::Mocks::Fetcher.new(Rots::Mocks::RotsServer.new)
37+
38+
# This library
39+
require "rack-openid2"
40+
require "rack/openid/simple_auth"

0 commit comments

Comments
 (0)