Upgrade to Rubocop 0.70
This commit is contained in:
parent
2803479f5a
commit
d3ea96c432
|
@ -63,11 +63,6 @@ Metrics/ParameterLists:
|
|||
Metrics/PerceivedComplexity:
|
||||
Enabled: false
|
||||
|
||||
# [codesmell]
|
||||
# I don't really get the point of this cop.
|
||||
Performance/RedundantMerge:
|
||||
Enabled: false
|
||||
|
||||
# Do not use "and" or "or" in conditionals, but for readability we can use it
|
||||
# to chain executions. Just beware of operator order.
|
||||
Style/AndOr:
|
||||
|
@ -123,12 +118,12 @@ Style/RescueStandardError:
|
|||
|
||||
# Array indentation should be considered like MultilineMethodCallIndentation indentation
|
||||
# and use 4 spaces instead of 2.
|
||||
Layout/IndentArray:
|
||||
Layout/IndentFirstArrayElement:
|
||||
IndentationWidth: 4
|
||||
|
||||
# Hash indentation should be considered like MultilineMethodCallIndentation indentation
|
||||
# and use 4 spaces instead of 2.
|
||||
Layout/IndentHash:
|
||||
Layout/IndentFirstHashElement:
|
||||
IndentationWidth: 4
|
||||
|
||||
# Multi-line differs from standard indentation, they are indented twice.
|
||||
|
|
2
Gemfile
2
Gemfile
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
source "https://rubygems.org"
|
||||
|
||||
gemspec
|
||||
|
|
4
Rakefile
4
Rakefile
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "bundler/gem_tasks"
|
||||
|
||||
# By default, run tests and linter.
|
||||
|
@ -39,7 +41,7 @@ desc "Downloads the Public Suffix List file from the repository and stores it lo
|
|||
task :"update-list" do
|
||||
require "net/http"
|
||||
|
||||
DEFINITION_URL = "https://raw.githubusercontent.com/publicsuffix/list/master/public_suffix_list.dat".freeze
|
||||
DEFINITION_URL = "https://raw.githubusercontent.com/publicsuffix/list/master/public_suffix_list.dat"
|
||||
|
||||
File.open("data/list.txt", "w+") do |f|
|
||||
response = Net::HTTP.get_response(URI.parse(DEFINITION_URL))
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#!/usr/bin/env ruby
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "bundler/setup"
|
||||
require "public_suffix"
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# = Public Suffix
|
||||
#
|
||||
# Domain name parser based on the Public Suffix List.
|
||||
|
@ -20,9 +22,9 @@ require_relative "public_suffix/list"
|
|||
# but was originally created to meet the needs of browser manufacturers.
|
||||
module PublicSuffix
|
||||
|
||||
DOT = ".".freeze
|
||||
BANG = "!".freeze
|
||||
STAR = "*".freeze
|
||||
DOT = "."
|
||||
BANG = "!"
|
||||
STAR = "*"
|
||||
|
||||
# Parses +name+ and returns the {PublicSuffix::Domain} instance.
|
||||
#
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# = Public Suffix
|
||||
#
|
||||
# Domain name parser based on the Public Suffix List.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# = Public Suffix
|
||||
#
|
||||
# Domain name parser based on the Public Suffix List.
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# = Public Suffix
|
||||
#
|
||||
# Domain name parser based on the Public Suffix List.
|
||||
|
@ -65,8 +67,8 @@ module PublicSuffix
|
|||
# @param private_domains [Boolean] whether to ignore the private domains section
|
||||
# @return [PublicSuffix::List]
|
||||
def self.parse(input, private_domains: true)
|
||||
comment_token = "//".freeze
|
||||
private_token = "===BEGIN PRIVATE DOMAINS===".freeze
|
||||
comment_token = "//"
|
||||
private_token = "===BEGIN PRIVATE DOMAINS==="
|
||||
section = nil # 1 == ICANN, 2 == PRIVATE
|
||||
|
||||
new do |list|
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# = Public Suffix
|
||||
#
|
||||
# Domain name parser based on the Public Suffix List.
|
||||
|
|
|
@ -9,5 +9,5 @@
|
|||
|
||||
module PublicSuffix
|
||||
# The current library version.
|
||||
VERSION = "3.0.3".freeze
|
||||
VERSION = "3.0.3"
|
||||
end
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "test_helper"
|
||||
|
||||
class AcceptanceTest < Minitest::Test
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "test_helper"
|
||||
require "public_suffix"
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
if ENV["COVERAGE"]
|
||||
require "simplecov"
|
||||
SimpleCov.start
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "test_helper"
|
||||
|
||||
class PublicSuffix::DomainTest < Minitest::Test
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "test_helper"
|
||||
|
||||
class ErrorsTest < Minitest::Test
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "test_helper"
|
||||
|
||||
class PublicSuffix::ListTest < Minitest::Test
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "test_helper"
|
||||
|
||||
class PublicSuffixTest < Minitest::Test
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "test_helper"
|
||||
|
||||
class PublicSuffix::RuleTest < Minitest::Test
|
||||
|
|
Loading…
Reference in New Issue