Skip to content

Commit

Permalink
Fix plugins downloader
Browse files Browse the repository at this point in the history
  • Loading branch information
eiskrenkov committed Oct 5, 2024
1 parent c498634 commit 005be6c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ruby/configuration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ minecraft:
spiget:
api_host: https://api.spiget.org/v2
plugins:
skinsrestorer: '15.4.2'
skinsrestorer: '15.4.3'
6 changes: 2 additions & 4 deletions ruby/lib/minecraft/plugins/downloader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,11 @@ def call
resource = find_resource(name)
raise Error, "Couldn't find #{name} plugin" unless resource

binding.irb

version = find_version(resource.id, version)
raise Error, "Couldn't find #{name} v#{version}" unless version

unless resource.version.fetch(:uuid) == version.uuid
raise Error, "Version #{version} doesn't have external URL"
end

download(name, resource.id)
end
end
Expand Down
1 change: 1 addition & 0 deletions ruby/lib/minecraft/plugins/finders/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def call

def find_exact_match
perform_search.find do |search_result|
binding.irb
values = search_result.values_at(*search_conditions.keys).map do |value|
value.is_a?(String) ? value.downcase : value
end
Expand Down

0 comments on commit 005be6c

Please sign in to comment.