Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjustments for RubyZip 3.0 #50

Open
nodeg opened this issue Aug 23, 2022 · 0 comments
Open

Adjustments for RubyZip 3.0 #50

nodeg opened this issue Aug 23, 2022 · 0 comments
Labels
Milestone

Comments

@nodeg
Copy link
Member

nodeg commented Aug 23, 2022

RubyZip is giving the following warning:

root@head-min-centos7 ~]# gem install tetra
Fetching: clamp-1.3.2.gem (100%)
Successfully installed clamp-1.3.2
Fetching: json_pure-2.6.2.gem (100%)
Successfully installed json_pure-2.6.2
Fetching: open4-1.3.4.gem (100%)
Successfully installed open4-1.3.4
Fetching: rubyzip-2.3.2.gem (100%)
RubyZip 3.0 is coming!
**********************

The public API of some Rubyzip classes has been modernized to use named
parameters for optional arguments. Please check your usage of the
following classes:
  * `Zip::File`
  * `Zip::Entry`
  * `Zip::InputStream`
  * `Zip::OutputStream`

Please ensure that your Gemfiles and .gemspecs are suitably restrictive
to avoid an unexpected breakage when 3.0 is released (e.g. ~> 2.3.0).
See https://github.com/rubyzip/rubyzip for details. The Changelog also
lists other enhancements and bugfixes that have been implemented since
version 2.3.0.
Successfully installed rubyzip-2.3.2
Fetching: text-1.3.1.gem (100%)
Successfully installed text-1.3.1
Fetching: tetra-2.0.6.gem (100%)
Successfully installed tetra-2.0.6
6 gems installed

RubyZip is only used in pom_getter.rb:

    # returns a pom embedded in a jar file
    def get_pom_from_jar(file)
      log.debug("Attempting unpack of #{file} to find a POM")
      begin
        Zip::File.foreach(file) do |entry|
          if entry.name =~ %r{/pom.xml$}
            log.info("pom.xml found in #{file}##{entry.name}")
            return entry.get_input_stream.read, :found_in_jar
          end
        end
      rescue Zip::Error
        log.warn("#{file} does not seem to be a valid jar archive, skipping")
      rescue TypeError
        log.warn("#{file} seems to be a valid jar archive but is corrupt, skipping")
      end
      nil
    end

Links

@nodeg nodeg added the gems label Aug 23, 2022
@nodeg nodeg modified the milestones: 2.0.7, 2.0.8 Aug 23, 2022
@nodeg nodeg modified the milestones: 2.0.8, 2.0.7 Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant