Skip to content

Commit

Permalink
Merge pull request #266 from killbill/tungleduyxyz-issue_254
Browse files Browse the repository at this point in the history
Issue 254 Upgrade Ruby version
  • Loading branch information
pierre committed Apr 10, 2024
2 parents b7eda3a + a1972e0 commit 8ba1ad8
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/kpm_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
# See HOMEBREW_PORTABLE_RUBY_VERSION in kpm/tasks/package.rake
ruby-version: ['2.6.8', 'jruby-9.3.4.0']
ruby-version: ['3.1.4', 'jruby-9.4.5.0']
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/kpm_rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6.8
ruby-version: 3.1.4
bundler-cache: true
working-directory: kpm
- name: Run RuboCop
Expand Down
1 change: 0 additions & 1 deletion ansible/library/killbill_diagnostics
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
require 'json'
require 'logger'
require 'pathname'
require 'set'
require 'uri'
require 'yaml'

Expand Down
1 change: 0 additions & 1 deletion ansible/library/killbill_facts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
require 'json'
require 'logger'
require 'pathname'
require 'set'
require 'yaml'

data = {}
Expand Down
1 change: 0 additions & 1 deletion ansible/library/killbill_migrations
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
require 'json'
require 'logger'
require 'pathname'
require 'set'
require 'yaml'

data = {}
Expand Down
5 changes: 2 additions & 3 deletions kpm/lib/kpm/kaui_artifact.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# frozen_string_literal: true

require 'rexml/document'
require 'set'

module KPM
class KauiArtifact < BaseArtifact
Expand All @@ -11,9 +10,9 @@ def versions(overrides = {}, ssl_verify = true)

coordinates = KPM::Coordinates.build_coordinates(coordinate_map)
response = REXML::Document.new nexus_remote(overrides, ssl_verify).search_for_artifacts(coordinates)
versions = SortedSet.new
versions = []
response.elements.each('searchNGResponse/data/artifact/version') { |element| versions << element.text }
versions
versions.sort!.uniq
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions kpm/lib/kpm/killbill_plugin_artifact.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# frozen_string_literal: true

require 'rexml/document'
require 'set'

module KPM
class KillbillPluginArtifact < BaseArtifact
Expand All @@ -20,8 +19,9 @@ def versions(overrides = {}, ssl_verify = true)
response = REXML::Document.new nexus.search_for_artifacts(type_and_group_id[1])
response.elements.each('searchNGResponse/data/artifact') do |element|
artifact_id = element.elements['artifactId'].text
plugins[type_and_group_id[0]][artifact_id] ||= SortedSet.new
plugins[type_and_group_id[0]][artifact_id] ||= []
plugins[type_and_group_id[0]][artifact_id] << element.elements['version'].text
plugins[type_and_group_id[0]][artifact_id].sort!.uniq!
end
end

Expand Down
5 changes: 2 additions & 3 deletions kpm/lib/kpm/killbill_server_artifact.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# frozen_string_literal: true

require 'rexml/document'
require 'set'

module KPM
class KillbillServerArtifact < BaseArtifact
Expand All @@ -10,9 +9,9 @@ def versions(artifact_id, packaging = KPM::BaseArtifact::KILLBILL_PACKAGING, cla
coordinate_map = { group_id: KPM::BaseArtifact::KILLBILL_GROUP_ID, artifact_id: artifact_id, packaging: packaging, classifier: classifier }
coordinates = KPM::Coordinates.build_coordinates(coordinate_map)
response = REXML::Document.new nexus_remote(overrides, ssl_verify).search_for_artifacts(coordinates)
versions = SortedSet.new
versions = []
response.elements.each('searchNGResponse/data/artifact/version') { |element| versions << element.text }
versions
versions.sort!.uniq
end

def info(version = 'LATEST', sha1_file = nil, force_download = false, verify_sha1 = true, overrides = {}, ssl_verify = true)
Expand Down
4 changes: 2 additions & 2 deletions kpm/tasks/package.rake
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ require './lib/kpm/version'
VERSION = KPM::VERSION

# See https://www.jruby.org/download
JRUBY_VERSION = '9.3.4.0'
JRUBY_VERSION = '9.4.5.0'
# See https://github.com/Homebrew/homebrew-portable-ruby/releases
HOMEBREW_PORTABLE_RUBY_VERSION = '2.6.8_1'
HOMEBREW_PORTABLE_RUBY_VERSION = '3.1.4'

# Remove unused files to reduce package size
GEMS_PATH = 'packaging/vendor/ruby/*/gems/*/'
Expand Down

0 comments on commit 8ba1ad8

Please sign in to comment.