Skip to content

Commit a451e75

Browse files
committed
Prefer require_relative to require
`require_relative` is preferred over `require` for files within the same project because it uses paths relative to the current file, making code more portable and less dependent on the load path. This change updates internal requires to use `require_relative` for consistency, performance, and improved portability. Additionally, remove a redundant requirement of `net/https` Ref: - rubocop/rubocop#8748 - ruby/ruby@594633f
1 parent 7d7ffbc commit a451e75

File tree

6 files changed

+10
-6
lines changed

6 files changed

+10
-6
lines changed

.rubocop_todo.yml

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/) and this
66
project adheres to [Semantic Versioning](https://semver.org/)
77

8+
## 3.0.1 - 2025-02-28
9+
10+
* Prefer `require_relative` over `require`
11+
* Remove redundant require of `net/https`
12+
813
## 3.0.0 - 2024-02-24
914

1015
### Changed

lib/omniauth-cas.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# frozen_string_literal: true
22

3-
require 'omniauth/cas'
3+
require_relative 'omniauth/cas'

lib/omniauth/cas.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# frozen_string_literal: true
22

3-
require 'omniauth/cas/version'
4-
require 'omniauth/strategies/cas'
3+
require_relative 'cas/version'
4+
require_relative 'strategies/cas'

lib/omniauth/cas/version.rb

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

33
module OmniAuth
44
module Cas
5-
VERSION = '3.0.0'
5+
VERSION = '3.0.1'
66
end
77
end

lib/omniauth/strategies/cas/service_ticket_validator.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# frozen_string_literal: true
22

33
require 'net/http'
4-
require 'net/https'
54
require 'nokogiri'
65

76
module OmniAuth

0 commit comments

Comments
 (0)