Skip to content

Commit

Permalink
Merge 290fd73 into d6b8251
Browse files Browse the repository at this point in the history
  • Loading branch information
nbulaj committed Apr 12, 2021
2 parents d6b8251 + 290fd73 commit 6f186e0
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 22 deletions.
3 changes: 1 addition & 2 deletions .rubocop.yml
Expand Up @@ -4,7 +4,7 @@ require:
- rubocop-rails
- rubocop-rspec
AllCops:
TargetRubyVersion: 2.4
TargetRubyVersion: 2.5
Exclude:
- "spec/generators/tmp/**/*"
- "spec/dummy/db/*"
Expand All @@ -20,7 +20,6 @@ Layout/DotPosition:
Layout/LineLength:
Exclude:
- spec/**/*
Max: 120 # Remove after we migration to 0.84
Metrics/BlockLength:
Exclude:
- spec/**/*
Expand Down
1 change: 0 additions & 1 deletion .travis.yml
Expand Up @@ -4,7 +4,6 @@ arch:
- amd64

rvm:
- 2.5
- 2.6
- 2.7
- 3.0
Expand Down
5 changes: 5 additions & 0 deletions Appraisals
Expand Up @@ -10,6 +10,11 @@ appraise "rails-6-0" do
gem "sqlite3", "~> 1.4", platform: %i[ruby mswin mingw x64_mingw]
end

appraise "rails-6-1" do
gem "rails", "~> 6.1.0"
gem "sqlite3", "~> 1.4", platform: %i[ruby mswin mingw x64_mingw]
end

appraise "rails-main" do
gem "rails", git: "https://github.com/rails/rails"
gem "sqlite3", "~> 1.4", platform: %i[ruby mswin mingw x64_mingw]
Expand Down
2 changes: 1 addition & 1 deletion doorkeeper.gemspec
Expand Up @@ -31,7 +31,7 @@ Gem::Specification.new do |gem|
}

gem.add_dependency "railties", ">= 5"
gem.required_ruby_version = ">= 2.4"
gem.required_ruby_version = ">= 2.5"

gem.post_install_message = <<~MSG.strip
Starting from 5.5.0 RC1 Doorkeeper requires client authentication for Resource Owner Password Grant
Expand Down
18 changes: 0 additions & 18 deletions lib/doorkeeper/oauth/helpers/uri_checker.rb
Expand Up @@ -3,24 +3,6 @@
require "ipaddr"

module Doorkeeper
module IPAddrLoopback
def loopback?
case @family
when Socket::AF_INET
@addr & 0xff000000 == 0x7f000000
when Socket::AF_INET6
@addr == 1
else
raise AddressFamilyError, "unsupported address family"
end
end
end

# For backward compatibility with old rubies
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.5.0")
IPAddr.include Doorkeeper::IPAddrLoopback
end

module OAuth
module Helpers
module URIChecker
Expand Down

0 comments on commit 6f186e0

Please sign in to comment.