DEV: Update rubocop-discourse to version 3.8.0 (#219)
This commit is contained in:
parent
2a651b0b59
commit
be2ab29f21
17
Gemfile.lock
17
Gemfile.lock
|
@ -21,19 +21,20 @@ GEM
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
json (2.7.2)
|
json (2.7.2)
|
||||||
language_server-protocol (3.17.0.3)
|
language_server-protocol (3.17.0.3)
|
||||||
minitest (5.23.0)
|
minitest (5.23.1)
|
||||||
mutex_m (0.2.0)
|
mutex_m (0.2.0)
|
||||||
parallel (1.24.0)
|
parallel (1.24.0)
|
||||||
parser (3.3.1.0)
|
parser (3.3.1.0)
|
||||||
ast (~> 2.4.1)
|
ast (~> 2.4.1)
|
||||||
racc
|
racc
|
||||||
prettier_print (1.2.1)
|
prettier_print (1.2.1)
|
||||||
racc (1.7.3)
|
racc (1.8.0)
|
||||||
|
rack (3.0.11)
|
||||||
rainbow (3.1.1)
|
rainbow (3.1.1)
|
||||||
regexp_parser (2.9.2)
|
regexp_parser (2.9.2)
|
||||||
rexml (3.2.8)
|
rexml (3.2.8)
|
||||||
strscan (>= 3.0.9)
|
strscan (>= 3.0.9)
|
||||||
rubocop (1.63.5)
|
rubocop (1.64.0)
|
||||||
json (~> 2.3)
|
json (~> 2.3)
|
||||||
language_server-protocol (>= 3.17.0)
|
language_server-protocol (>= 3.17.0)
|
||||||
parallel (~> 1.10)
|
parallel (~> 1.10)
|
||||||
|
@ -48,14 +49,20 @@ GEM
|
||||||
parser (>= 3.3.1.0)
|
parser (>= 3.3.1.0)
|
||||||
rubocop-capybara (2.20.0)
|
rubocop-capybara (2.20.0)
|
||||||
rubocop (~> 1.41)
|
rubocop (~> 1.41)
|
||||||
rubocop-discourse (3.7.1)
|
rubocop-discourse (3.8.0)
|
||||||
activesupport (>= 6.1)
|
activesupport (>= 6.1)
|
||||||
rubocop (>= 1.59.0)
|
rubocop (>= 1.59.0)
|
||||||
rubocop-capybara (>= 2.0.0)
|
rubocop-capybara (>= 2.0.0)
|
||||||
rubocop-factory_bot (>= 2.0.0)
|
rubocop-factory_bot (>= 2.0.0)
|
||||||
|
rubocop-rails (>= 2.25.0)
|
||||||
rubocop-rspec (>= 2.25.0)
|
rubocop-rspec (>= 2.25.0)
|
||||||
rubocop-factory_bot (2.25.1)
|
rubocop-factory_bot (2.25.1)
|
||||||
rubocop (~> 1.41)
|
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-rspec (2.29.2)
|
||||||
rubocop (~> 1.40)
|
rubocop (~> 1.40)
|
||||||
rubocop-capybara (~> 2.17)
|
rubocop-capybara (~> 2.17)
|
||||||
|
@ -79,4 +86,4 @@ DEPENDENCIES
|
||||||
syntax_tree
|
syntax_tree
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
2.5.4
|
2.5.10
|
||||||
|
|
|
@ -98,14 +98,14 @@ module DockerManager
|
||||||
end
|
end
|
||||||
|
|
||||||
repo = DockerManager::GitRepo.find(params[:path])
|
repo = DockerManager::GitRepo.find(params[:path])
|
||||||
raise Discourse::NotFound unless repo.present?
|
raise Discourse::NotFound if repo.blank?
|
||||||
|
|
||||||
render json: { latest: proc.call(repo) }
|
render json: { latest: proc.call(repo) }
|
||||||
end
|
end
|
||||||
|
|
||||||
def upgrade
|
def upgrade
|
||||||
repo = AdminController.find_repos(params[:path])
|
repo = AdminController.find_repos(params[:path])
|
||||||
raise Discourse::NotFound unless repo.present?
|
raise Discourse::NotFound if repo.blank?
|
||||||
|
|
||||||
script_path =
|
script_path =
|
||||||
File.expand_path(File.join(__dir__, "../../../scripts/docker_manager_upgrade.rb"))
|
File.expand_path(File.join(__dir__, "../../../scripts/docker_manager_upgrade.rb"))
|
||||||
|
@ -127,7 +127,7 @@ module DockerManager
|
||||||
|
|
||||||
def reset_upgrade
|
def reset_upgrade
|
||||||
repo = AdminController.find_repos(params[:path], upgrading: true)
|
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 = Upgrader.new(current_user.id, repo, repo_version(repo))
|
||||||
upgrader.reset!
|
upgrader.reset!
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
# Should be removed just before the Discourse 3.2 release.
|
# Should be removed just before the Discourse 3.2 release.
|
||||||
module DockerManager::FallbackCompatibilityParser
|
module DockerManager::FallbackCompatibilityParser
|
||||||
def self.find_compatible_resource(version_list, target_version = ::Discourse::VERSION::STRING)
|
def self.find_compatible_resource(version_list, target_version = ::Discourse::VERSION::STRING)
|
||||||
return unless version_list.present?
|
return if version_list.blank?
|
||||||
|
|
||||||
begin
|
begin
|
||||||
version_list = YAML.safe_load(version_list)
|
version_list = YAML.safe_load(version_list)
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
{
|
{
|
||||||
"name": "docker_manager",
|
|
||||||
"private": true,
|
"private": true,
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@discourse/lint-configs": "^1.3.5",
|
"@discourse/lint-configs": "1.3.9",
|
||||||
"ember-template-lint": "^5.13.0",
|
"ember-template-lint": "6.0.0",
|
||||||
"eslint": "^8.56.0",
|
"eslint": "8.57.0",
|
||||||
"prettier": "^2.8.8"
|
"prettier": "2.8.8"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ fork do
|
||||||
raise "path is required" if path.blank?
|
raise "path is required" if path.blank?
|
||||||
|
|
||||||
repo = DockerManager::AdminController.find_repos(path)
|
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
|
DockerManager::Upgrader.new(user_id, repo, repo_version).upgrade
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue