lib/dockerfile-rails/scanner.rb in dockerfile-rails-1.6.16 vs lib/dockerfile-rails/scanner.rb in dockerfile-rails-1.6.17

- old
+ new

@@ -12,10 +12,16 @@ parser = Bundler::LockfileParser.new(Bundler.read_file("Gemfile.lock")) @gemfile += parser.specs.map { |spec, version| spec.name } @git ||= ENV["RAILS_ENV"] != "test" && parser.specs.any? do |spec| spec.source.instance_of? Bundler::Source::Git end + + # determine if the application is affected by the net-pop bug + # https://github.com/ruby/ruby/pull/11006#issuecomment-2176562332 + if RUBY_VERSION == "3.3.3" && @gemfile.include?("net-pop") + @netpopbug = parser.specs.find { |spec| spec.name == "net-pop" }.dependencies.empty? + end end if File.exist? "Gemfile" begin gemfile_definition = Bundler::Definition.build("Gemfile", nil, []) @@ -83,8 +89,14 @@ @redis = @redis_cable || @redis_cache end def using_trilogy? @gemfile.include?("trilogy") || @gemfile.include?("activerecord-trilogy-adapter") + end + + ### patches ### + if RUBY_VERSION == "3.3.3" + Bundler::LockfileParser.new(Bundler.read_file("Gemfile.lock")) + end end end