Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use require_relative where possible #1598

Merged
merged 1 commit into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mail.gemspec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require './lib/mail/version'
require_relative 'lib/mail/version'

Gem::Specification.new do |s|
s.name = "mail"
Expand Down
2 changes: 1 addition & 1 deletion rakelib/corpus.rake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ require 'benchmark'
namespace :corpus do

task :load_mail do
require File.expand_path('../spec/environment', __dir__)
require_relative '../spec/environment'
require 'mail'
end

Expand Down
2 changes: 1 addition & 1 deletion rakelib/generate_tables
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Usage:
# ruby tasks/generate_tables
# The Unicode version downloaded is determined by the UNICODE_VERSION lib/mail/multibye/unicode.rb
require './lib/mail/multibyte/unicode'
require_relative '../lib/mail/multibyte/unicode'

require 'open-uri'
require 'tmpdir'
Expand Down
5 changes: 3 additions & 2 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# encoding: utf-8
# frozen_string_literal: true
require File.expand_path('environment', __dir__)

require_relative 'environment'

unless defined?(MAIL_ROOT)
$stderr.puts("Running Specs under Ruby Version #{RUBY_VERSION}")
Expand All @@ -17,7 +18,7 @@
end

require 'rspec'
require File.join(__dir__, 'matchers', 'break_down_to')
require_relative 'matchers/break_down_to'

require 'mail'

Expand Down
Loading