Skip to content
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 cargo/lib/dependabot/cargo/requirement.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Requirement < Gem::Requirement
quoted = OPS.keys.map { |k| Regexp.quote(k) }.join("|")
version_pattern = Cargo::Version::VERSION_PATTERN

PATTERN_RAW = "\\s*(#{quoted})?\\s*(#{version_pattern})\\s*"
PATTERN_RAW = "\\s*(#{quoted})?\\s*(#{version_pattern})\\s*".freeze
PATTERN = /\A#{PATTERN_RAW}\z/

# Use Cargo::Version rather than Gem::Version to ensure that
Expand Down
2 changes: 1 addition & 1 deletion common/lib/dependabot/shared_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module SharedHelpers
USER_AGENT = "dependabot-core/#{Dependabot::VERSION} " \
"#{Excon::USER_AGENT} ruby/#{RUBY_VERSION} " \
"(#{RUBY_PLATFORM}) " \
"(+https://github.com/dependabot/dependabot-core)"
"(+https://github.com/dependabot/dependabot-core)".freeze
SIGKILL = 9

def self.in_a_temporary_repo_directory(directory = "/", repo_contents_path = nil, &block)
Expand Down
2 changes: 1 addition & 1 deletion common/lib/dependabot/workspace/git.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Dependabot
module Workspace
class Git < Base
USER = "dependabot[bot]"
EMAIL = "#{USER}@users.noreply.github.com"
EMAIL = "#{USER}@users.noreply.github.com".freeze

attr_reader :initial_head_sha

Expand Down
2 changes: 1 addition & 1 deletion elm/lib/dependabot/elm/requirement.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module Elm
class Requirement < Gem::Requirement
ELM_PATTERN_RAW =
"(#{Elm::Version::VERSION_PATTERN}) (<=?) v (<=?) " \
"(#{Elm::Version::VERSION_PATTERN})"
"(#{Elm::Version::VERSION_PATTERN})".freeze
ELM_PATTERN = /\A#{ELM_PATTERN_RAW}\z/
ELM_EXACT_PATTERN = /\A#{Elm::Version::VERSION_PATTERN}\z/

Expand Down
2 changes: 1 addition & 1 deletion go_modules/lib/dependabot/go_modules/requirement.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Requirement < Gem::Requirement
quoted = OPS.keys.map { |k| Regexp.quote(k) }.join("|")
version_pattern = "v?#{Version::VERSION_PATTERN}"

PATTERN_RAW = "\\s*(#{quoted})?\\s*(#{version_pattern})\\s*"
PATTERN_RAW = "\\s*(#{quoted})?\\s*(#{version_pattern})\\s*".freeze
PATTERN = /\A#{PATTERN_RAW}\z/

# Use GoModules::Version rather than Gem::Version to ensure that
Expand Down
2 changes: 1 addition & 1 deletion gradle/lib/dependabot/gradle/requirement.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module Dependabot
module Gradle
class Requirement < Gem::Requirement
quoted = OPS.keys.map { |k| Regexp.quote k }.join("|")
PATTERN_RAW = "\\s*(#{quoted})?\\s*(#{Gradle::Version::VERSION_PATTERN})\\s*"
PATTERN_RAW = "\\s*(#{quoted})?\\s*(#{Gradle::Version::VERSION_PATTERN})\\s*".freeze
PATTERN = /\A#{PATTERN_RAW}\z/

def self.parse(obj)
Expand Down
2 changes: 1 addition & 1 deletion hex/lib/dependabot/hex/requirement.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Requirement < Gem::Requirement

# Override the version pattern to allow local versions
quoted = OPS.keys.map { |k| Regexp.quote k }.join "|"
PATTERN_RAW = "\\s*(#{quoted})?\\s*(#{Hex::Version::VERSION_PATTERN})\\s*"
PATTERN_RAW = "\\s*(#{quoted})?\\s*(#{Hex::Version::VERSION_PATTERN})\\s*".freeze
PATTERN = /\A#{PATTERN_RAW}\z/

# Returns an array of requirements. At least one requirement from the
Expand Down
2 changes: 1 addition & 1 deletion maven/lib/dependabot/maven/requirement.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module Maven
class Requirement < Gem::Requirement
quoted = OPS.keys.map { |k| Regexp.quote k }.join("|")
OR_SYNTAX = /(?<=\]|\)),/
PATTERN_RAW = "\\s*(#{quoted})?\\s*(#{Maven::Version::VERSION_PATTERN})\\s*"
PATTERN_RAW = "\\s*(#{quoted})?\\s*(#{Maven::Version::VERSION_PATTERN})\\s*".freeze
PATTERN = /\A#{PATTERN_RAW}\z/

def self.parse(obj)
Expand Down
2 changes: 1 addition & 1 deletion npm_and_yarn/lib/dependabot/npm_and_yarn/requirement.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Requirement < Gem::Requirement
quoted = OPS.keys.map { |k| Regexp.quote(k) }.join("|")
version_pattern = "v?#{NpmAndYarn::Version::VERSION_PATTERN}"

PATTERN_RAW = "\\s*(#{quoted})?\\s*(#{version_pattern})\\s*"
PATTERN_RAW = "\\s*(#{quoted})?\\s*(#{version_pattern})\\s*".freeze
PATTERN = /\A#{PATTERN_RAW}\z/

def self.parse(obj)
Expand Down
2 changes: 0 additions & 2 deletions omnibus/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -335,5 +335,3 @@ Style/SelectByRegexp:
# a follow-on PR.
Naming/BlockForwarding:
Enabled: false
Style/MutableConstant:
Enabled: false
2 changes: 1 addition & 1 deletion pub/lib/dependabot/pub/requirement.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Requirement < Gem::Requirement
quoted = OPS.keys.map { |k| Regexp.quote(k) }.join("|")
version_pattern = Pub::Version::VERSION_PATTERN

PATTERN_RAW = "\\s*(#{quoted})?\\s*(#{version_pattern})\\s*"
PATTERN_RAW = "\\s*(#{quoted})?\\s*(#{version_pattern})\\s*".freeze
PATTERN = /\A#{PATTERN_RAW}\z/

# Use Pub::Version rather than Gem::Version to ensure that
Expand Down
2 changes: 1 addition & 1 deletion python/lib/dependabot/python/file_fetcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module Python
class FileFetcher < Dependabot::FileFetchers::Base
CHILD_REQUIREMENT_REGEX = /^-r\s?(?<path>.*\.(?:txt|in))/
CONSTRAINT_REGEX = /^-c\s?(?<path>.*\.(?:txt|in))/
DEPENDENCY_TYPES = %w(packages dev-packages)
DEPENDENCY_TYPES = %w(packages dev-packages).freeze

def self.required_files_in?(filenames)
return true if filenames.any? { |name| name.end_with?(".txt", ".in") }
Expand Down
2 changes: 1 addition & 1 deletion python/lib/dependabot/python/requirement.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Requirement < Gem::Requirement
map { |k| Regexp.quote(k) }.join("|")
version_pattern = Python::Version::VERSION_PATTERN

PATTERN_RAW = "\\s*(#{quoted})?\\s*(#{version_pattern})\\s*"
PATTERN_RAW = "\\s*(#{quoted})?\\s*(#{version_pattern})\\s*".freeze
PATTERN = /\A#{PATTERN_RAW}\z/
PARENS_PATTERN = /\A\(([^)]+)\)\z/

Expand Down
2 changes: 1 addition & 1 deletion terraform/lib/dependabot/terraform/requirement.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Requirement < Gem::Requirement
# optional 'v' prefix to release tag names, which Terraform supports.
# https://www.terraform.io/docs/registry/modules/publish.html#requirements
OPERATORS = OPS.keys.map { |key| Regexp.quote(key) }.join("|").freeze
PATTERN_RAW = "\\s*(#{OPERATORS})?\\s*v?(#{Gem::Version::VERSION_PATTERN})\\s*"
PATTERN_RAW = "\\s*(#{OPERATORS})?\\s*v?(#{Gem::Version::VERSION_PATTERN})\\s*".freeze
PATTERN = /\A#{PATTERN_RAW}\z/

def self.parse(obj)
Expand Down
2 changes: 1 addition & 1 deletion updater/lib/dependabot/job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class Job
dependency_groups
dependency_group_to_refresh
repo_private
)
).freeze

attr_reader :allowed_updates,
:credentials,
Expand Down
2 changes: 1 addition & 1 deletion updater/lib/dependabot/updater/operations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ module Operations
RefreshVersionUpdatePullRequest,
GroupUpdateAllVersions,
UpdateAllVersions
]
].freeze

def self.class_for(job:)
# Let's not bother generating the string if debug is disabled
Expand Down