Skip to content

Commit

Permalink
Fix rubocops
Browse files Browse the repository at this point in the history
  • Loading branch information
greysteil committed Jan 15, 2019
1 parent 2fea827 commit 927659f
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -383,9 +383,7 @@ def replace_ssh_sources(content)
end

def git_ssh_requirements_to_swap
if @git_ssh_requirements_to_swap
return @git_ssh_requirements_to_swap
end
return @git_ssh_requirements_to_swap if @git_ssh_requirements_to_swap

@git_ssh_requirements_to_swap = []

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@ def swapped_ssh_requirements
attr_reader :package_json_content

def git_ssh_requirements_to_swap
if @git_ssh_requirements_to_swap
return @git_ssh_requirements_to_swap
end
return @git_ssh_requirements_to_swap if @git_ssh_requirements_to_swap

@git_ssh_requirements_to_swap = []

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,9 +319,7 @@ def remove_workspace_path_prefixes(content)
end

def git_ssh_requirements_to_swap
if @git_ssh_requirements_to_swap
return @git_ssh_requirements_to_swap
end
return @git_ssh_requirements_to_swap if @git_ssh_requirements_to_swap

git_dependencies =
dependencies.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@ def initialize(requirements:, updated_source:, update_strategy:,

check_update_strategy

if latest_version
@latest_version = version_class.new(latest_version)
end

@latest_version = version_class.new(latest_version) if latest_version
return unless latest_resolvable_version

@latest_resolvable_version =
Expand Down
3 changes: 2 additions & 1 deletion npm_and_yarn/lib/dependabot/npm_and_yarn/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ def to_s
end
end

Dependabot::Utils.register_version_class("npm_and_yarn", Dependabot::NpmAndYarn::Version)
Dependabot::Utils.
register_version_class("npm_and_yarn", Dependabot::NpmAndYarn::Version)

0 comments on commit 927659f

Please sign in to comment.