-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ported back remaining changes from http-2-next
- Loading branch information
1 parent
dc5ce2c
commit b3b2bc1
Showing
44 changed files
with
1,479 additions
and
1,649 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,107 @@ | ||
inherit_from: .rubocop_todo.yml | ||
|
||
require: | ||
- rubocop-performance | ||
|
||
AllCops: | ||
NewCops: enable | ||
SuggestExtensions: false | ||
TargetRubyVersion: 3.0 | ||
TargetRubyVersion: 2.7 | ||
DisplayCopNames: true | ||
Exclude: | ||
- 'vendor/bundle/**/*' # see https://github.com/rubocop/rubocop/issues/9832 | ||
- "bin/**" | ||
- "vendor/**/*" | ||
- "**/huffman_statemachine.rb" | ||
- "lib/tasks/**" | ||
|
||
Gemspec/RequireMFA: | ||
Enabled: false | ||
|
||
Metrics/BlockLength: | ||
Enabled: false | ||
|
||
Lint/EmptyWhen: | ||
Enabled: false | ||
|
||
Style/StringLiterals: | ||
EnforcedStyle: double_quotes | ||
|
||
Style/NumericPredicate: | ||
Enabled: false | ||
|
||
Gemspec/RequiredRubyVersion: | ||
Enabled: false | ||
|
||
Bundler/DuplicatedGem: | ||
Enabled: false | ||
|
||
Style/OptionalBooleanParameter: | ||
Enabled: false | ||
|
||
Style/ArgumentsForwarding: | ||
Enabled: false | ||
|
||
Lint/MissingSuper: | ||
Exclude: | ||
- 'lib/httpx/io/unix.rb' | ||
|
||
Style/HashTransformValues: | ||
Exclude: | ||
- 'lib/httpx/plugins/digest_authentication.rb' | ||
|
||
Lint/ConstantDefinitionInBlock: | ||
Exclude: | ||
- 'spec/**/*' | ||
|
||
# TODO: remove this if min supported version of ruby is 2.3 | ||
Style/HashSyntax: | ||
Enabled: false | ||
|
||
Style/AndOr: | ||
Enabled: false | ||
|
||
Style/SafeNavigation: | ||
Enabled: false | ||
|
||
Layout/HeredocIndentation: | ||
Exclude: | ||
- "lib/tasks/generate_huffman_table.rb" | ||
- "example/*" | ||
|
||
Naming/MethodParameterName: | ||
Enabled: false | ||
|
||
Naming/VariableNumber: | ||
Exclude: | ||
- example/server.rb | ||
|
||
Layout/LineLength: | ||
Max: 128 | ||
|
||
Style/HashEachMethods: | ||
Enabled: true | ||
|
||
Style/HashTransformKeys: | ||
Enabled: true | ||
|
||
Style/CommentAnnotation: | ||
Enabled: false | ||
|
||
Style/SlicingWithRange: | ||
Enabled: false | ||
|
||
Lint/SuppressedException: | ||
Exclude: | ||
- Rakefile | ||
|
||
Lint/EmptyBlock: | ||
Exclude: | ||
- spec/* | ||
|
||
Performance/CollectionLiteralInLoop: | ||
Exclude: | ||
- spec/* | ||
|
||
Performance/MethodObjectAsBlock: | ||
Enabled: false | ||
|
||
Metrics/CollectionLiteralLength: | ||
Exclude: | ||
- 'spec/**/*.rb' | ||
- lib/http/2/header/huffman.rb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,121 +1,47 @@ | ||
# This configuration was generated by | ||
# `rubocop --auto-gen-config` | ||
# on 2024-06-13 02:27:14 UTC using RuboCop version 1.64.1. | ||
# on 2016-06-09 10:57:54 -0400 using RuboCop version 0.40.0. | ||
# The point is for the user to remove these configuration records | ||
# one by one as the offenses are removed from the code base. | ||
# Note that changes in the inspected code, or installation of new | ||
# versions of RuboCop, may require this file to be generated again. | ||
|
||
# Offense count: 1 | ||
# Configuration parameters: AllowedMethods. | ||
# AllowedMethods: enums | ||
Lint/ConstantDefinitionInBlock: | ||
Exclude: | ||
- 'spec/emitter_spec.rb' | ||
|
||
# Offense count: 3 | ||
# Configuration parameters: AllowComments, AllowEmptyLambdas. | ||
Lint/EmptyBlock: | ||
Exclude: | ||
- 'spec/client_spec.rb' | ||
- 'spec/emitter_spec.rb' | ||
- 'spec/server_spec.rb' | ||
|
||
# Offense count: 3 | ||
# Configuration parameters: AllowComments, AllowNil. | ||
Lint/SuppressedException: | ||
Exclude: | ||
- 'Rakefile' | ||
|
||
# Offense count: 27 | ||
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes. | ||
# Offense count: 24 | ||
Metrics/AbcSize: | ||
Max: 172 | ||
Max: 200 | ||
|
||
# Offense count: 8 | ||
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns. | ||
# AllowedMethods: refine | ||
Metrics/BlockLength: | ||
Max: 82 | ||
|
||
# Offense count: 19 | ||
# Configuration parameters: CountBlocks. | ||
# Offense count: 16 | ||
Metrics/BlockNesting: | ||
Max: 6 | ||
Max: 5 | ||
Exclude: | ||
- "lib/http/2/connection.rb" | ||
|
||
# Offense count: 7 | ||
# Configuration parameters: CountComments, CountAsOne. | ||
# Offense count: 5 | ||
# Configuration parameters: CountComments. | ||
Metrics/ClassLength: | ||
Max: 516 | ||
Max: 371 | ||
|
||
# Offense count: 2 | ||
# Configuration parameters: LengthThreshold. | ||
Metrics/CollectionLiteralLength: | ||
Exclude: | ||
- 'lib/http/2/header/huffman.rb' | ||
- 'lib/http/2/header/huffman_statemachine.rb' | ||
Metrics/ModuleLength: | ||
Max: 120 | ||
|
||
# Offense count: 14 | ||
# Configuration parameters: AllowedMethods, AllowedPatterns. | ||
# Offense count: 12 | ||
Metrics/CyclomaticComplexity: | ||
Max: 60 | ||
|
||
# Offense count: 33 | ||
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns. | ||
# Offense count: 29 | ||
# Configuration parameters: CountComments. | ||
Metrics/MethodLength: | ||
Max: 132 | ||
Max: 134 | ||
|
||
# Offense count: 1 | ||
# Configuration parameters: CountComments, CountAsOne. | ||
Metrics/ModuleLength: | ||
Max: 113 | ||
|
||
# Offense count: 1 | ||
# Configuration parameters: CountKeywordArgs, MaxOptionalParameters. | ||
# Configuration parameters: CountKeywordArgs. | ||
Metrics/ParameterLists: | ||
Max: 7 | ||
|
||
# Offense count: 12 | ||
# Configuration parameters: AllowedMethods, AllowedPatterns. | ||
# Offense count: 10 | ||
Metrics/PerceivedComplexity: | ||
Max: 48 | ||
Max: 50 | ||
|
||
# Offense count: 6 | ||
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames. | ||
# AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to | ||
Naming/MethodParameterName: | ||
Exclude: | ||
- 'lib/http/2/connection.rb' | ||
- 'lib/http/2/extensions.rb' | ||
- 'lib/http/2/header/compressor.rb' | ||
- 'lib/http/2/header/decompressor.rb' | ||
|
||
# Offense count: 1 | ||
# Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns. | ||
# SupportedStyles: snake_case, normalcase, non_integer | ||
# AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339, x86_64 | ||
Naming/VariableNumber: | ||
Exclude: | ||
- 'example/server.rb' | ||
|
||
# Offense count: 10 | ||
# Configuration parameters: AllowedConstants. | ||
# Offense count: 4 | ||
Style/Documentation: | ||
Exclude: | ||
- 'spec/**/*' | ||
- 'test/**/*' | ||
- 'example/helper.rb' | ||
- 'example/upgrade_server.rb' | ||
- 'lib/http/2/error.rb' | ||
- 'lib/http/2/extensions.rb' | ||
- 'lib/http/2/flow_buffer.rb' | ||
- 'lib/http/2/header/decompressor.rb' | ||
- 'lib/http/2/header/encoding_context.rb' | ||
- 'tasks/generate_huffman_table.rb' | ||
|
||
# Offense count: 1 | ||
# Configuration parameters: AllowedMethods. | ||
# AllowedMethods: respond_to_missing? | ||
Style/OptionalBooleanParameter: | ||
Exclude: | ||
- 'lib/http/2/flow_buffer.rb' | ||
Enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# frozen_string_literal: true | ||
|
||
SimpleCov.start do | ||
command_name "Spec" | ||
add_filter "/.bundle/" | ||
add_filter "/vendor/" | ||
add_filter "/spec/" | ||
add_filter "/lib/http/2/base64" | ||
coverage_dir "coverage" | ||
minimum_coverage(RUBY_ENGINE == "truffleruby" ? 85 : 90) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,35 @@ | ||
# frozen_string_literal: true | ||
|
||
source 'https://rubygems.org' | ||
source "https://rubygems.org" | ||
|
||
gemspec | ||
|
||
gem 'rake', require: false | ||
gem "rake", require: false | ||
|
||
group :development do | ||
gem 'pry' | ||
gem 'pry-byebug', platform: :mri | ||
gem 'rubocop' | ||
gem 'rubocop-performance' | ||
gem "pry" | ||
gem "pry-byebug", platform: :mri | ||
if RUBY_VERSION >= "3.0.0" | ||
gem "rubocop" | ||
gem "rubocop-performance" | ||
end | ||
end | ||
|
||
group :docs do | ||
gem 'yard' | ||
gem "yard" | ||
end | ||
|
||
group :test do | ||
gem 'rspec' | ||
gem 'simplecov', require: false | ||
gem "rspec" | ||
gem "simplecov", require: false | ||
end | ||
|
||
group :types do | ||
platform :mri do | ||
gem 'rbs' | ||
gem 'steep' | ||
gem 'typeprof' | ||
if RUBY_VERSION >= "3.0.0" | ||
gem "rbs" | ||
gem "steep" | ||
gem "typeprof" | ||
end | ||
end | ||
end |
Oops, something went wrong.