lib/generators/dockerfile_generator.rb in dockerfile-rails-1.6.16 vs lib/generators/dockerfile_generator.rb in dockerfile-rails-1.6.17

- old
+ new

@@ -400,10 +400,19 @@ if ruby_version && ruby_version != RUBY_VERSION message = "The Ruby version in the Dockerfile (#{ruby_version}) does not match the Ruby version of the Rails app (#{RUBY_VERSION})" STDERR.puts "\n" + shell.set_color(message, Thor::Shell::Color::RED, Thor::Shell::Color::BOLD) end + if @netpopbug && !dockerfile.include?("net-pop") + message = "Ruby 3.3.3 net-pop bug detected." + STDERR.puts "\n" + shell.set_color(message, Thor::Shell::Color::RED, Thor::Shell::Color::BOLD) + STDERR.puts "Please see https://github.com/ruby/ruby/pull/11006" + STDERR.puts "Change your Ruby version, or run `bin/rails generate dockerfile`," + STDERR.puts "or add the following to your Dockerfile:" + STDERR.puts 'RUN sed -i "/net-pop (0.1.2)/a\ net-protocol" Gemfile.lock' + end + if (options.sqlite3? || @sqlite3) && !dockerfile.include?("DATABASE_URL") && File.exist?("fly.toml") toml = IO.read("fly.toml") if !toml.include?("[[env]]") toml += "\n[[env]]\n DATABASE_URL = \"sqlite3:///data/production.sqlite3\"\n" File.write "fly.toml", toml @@ -1392,13 +1401,13 @@ "kib" => 1024, "k" => 1024, "kb" => 1000, "mib" => 1048576, "m" => 1048576, - "mb" => 100000, + "mb" => 1000000, "gib" => 1073741824, "g" => 1073741824, - "gb" => 100000000, + "gb" => 1000000000, } pattern = Regexp.new("^(\\d+)(#{suffixes.keys.join('|')})?$", "i") match = pattern.match(options.swap.downcase)