DEV: Update rubocop-discourse to version 3.8.0 (#219)

This commit is contained in:
Loïc Guitaut 2024-05-28 11:46:00 +02:00 committed by GitHub
parent 2a651b0b59
commit be2ab29f21
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 21 additions and 15 deletions

View File

@ -21,19 +21,20 @@ GEM
concurrent-ruby (~> 1.0)
json (2.7.2)
language_server-protocol (3.17.0.3)
minitest (5.23.0)
minitest (5.23.1)
mutex_m (0.2.0)
parallel (1.24.0)
parser (3.3.1.0)
ast (~> 2.4.1)
racc
prettier_print (1.2.1)
racc (1.7.3)
racc (1.8.0)
rack (3.0.11)
rainbow (3.1.1)
regexp_parser (2.9.2)
rexml (3.2.8)
strscan (>= 3.0.9)
rubocop (1.63.5)
rubocop (1.64.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
@ -48,14 +49,20 @@ GEM
parser (>= 3.3.1.0)
rubocop-capybara (2.20.0)
rubocop (~> 1.41)
rubocop-discourse (3.7.1)
rubocop-discourse (3.8.0)
activesupport (>= 6.1)
rubocop (>= 1.59.0)
rubocop-capybara (>= 2.0.0)
rubocop-factory_bot (>= 2.0.0)
rubocop-rails (>= 2.25.0)
rubocop-rspec (>= 2.25.0)
rubocop-factory_bot (2.25.1)
rubocop (~> 1.41)
rubocop-rails (2.25.0)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rspec (2.29.2)
rubocop (~> 1.40)
rubocop-capybara (~> 2.17)
@ -79,4 +86,4 @@ DEPENDENCIES
syntax_tree
BUNDLED WITH
2.5.4
2.5.10

View File

@ -98,14 +98,14 @@ module DockerManager
end
repo = DockerManager::GitRepo.find(params[:path])
raise Discourse::NotFound unless repo.present?
raise Discourse::NotFound if repo.blank?
render json: { latest: proc.call(repo) }
end
def upgrade
repo = AdminController.find_repos(params[:path])
raise Discourse::NotFound unless repo.present?
raise Discourse::NotFound if repo.blank?
script_path =
File.expand_path(File.join(__dir__, "../../../scripts/docker_manager_upgrade.rb"))
@ -127,7 +127,7 @@ module DockerManager
def reset_upgrade
repo = AdminController.find_repos(params[:path], upgrading: true)
raise Discourse::NotFound unless repo.present?
raise Discourse::NotFound if repo.blank?
upgrader = Upgrader.new(current_user.id, repo, repo_version(repo))
upgrader.reset!

View File

@ -5,7 +5,7 @@
# Should be removed just before the Discourse 3.2 release.
module DockerManager::FallbackCompatibilityParser
def self.find_compatible_resource(version_list, target_version = ::Discourse::VERSION::STRING)
return unless version_list.present?
return if version_list.blank?
begin
version_list = YAML.safe_load(version_list)

View File

@ -1,10 +1,9 @@
{
"name": "docker_manager",
"private": true,
"devDependencies": {
"@discourse/lint-configs": "^1.3.5",
"ember-template-lint": "^5.13.0",
"eslint": "^8.56.0",
"prettier": "^2.8.8"
"@discourse/lint-configs": "1.3.9",
"ember-template-lint": "6.0.0",
"eslint": "8.57.0",
"prettier": "2.8.8"
}
}

View File

@ -14,7 +14,7 @@ fork do
raise "path is required" if path.blank?
repo = DockerManager::AdminController.find_repos(path)
raise "No such repo" unless repo.present?
raise "No such repo" if repo.blank?
DockerManager::Upgrader.new(user_id, repo, repo_version).upgrade
end