Class: ObsDeploy::CLI::Commands::GetPackageVersion

Inherits:
Dry::CLI::Command
  • Object
show all
Defined in:
lib/obs_deploy/cli/commands/get_package_version.rb

Instance Method Summary collapse

Instance Method Details

#call(url:, ignore_certificate:, product:) ⇒ Object



14
15
16
17
18
19
20
21
# File 'lib/obs_deploy/cli/commands/get_package_version.rb', line 14

def call(url:, ignore_certificate:, product:, **)
  if ignore_certificate
    OpenSSL::SSL.send(:remove_const, :VERIFY_PEER)
    OpenSSL::SSL.const_set(:VERIFY_PEER, OpenSSL::SSL::VERIFY_NONE)
  end

  puts "Available package: #{ObsDeploy::CheckDiff.new(server: url, product: product).package_version}"
end