dockerfile-rails 1.7.6 → 1.7.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/dockerfile-rails/scanner.rb +15 -8
- data/lib/generators/dockerfile_generator.rb +11 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 323ac3d7ebfcee1a4334665dab9fb789759ef29f06b96a92b794d6469e305437
|
4
|
+
data.tar.gz: c23c21898c2423422c30d88c5ec4f83d5de0817b57ba6a4429a8b40b1f5a1926
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 409645b414b857ba7af576f8cef3af8123b2e32d85cd532bfc10e94783ab0b4a67671d449c021d1d45385d351c17973c30ced78787f3e8dce72b6b6663de6936
|
7
|
+
data.tar.gz: b6ddaee116dc09517f42e271d9ce80d5d79468083f1ab3f8cd602e5bf36426eddeb8dcdf8a6bb40c3de6b62ed4c1bcb8eda608f44c4f25aadf97d86c60e86846
|
@@ -43,23 +43,30 @@ module DockerfileRails
|
|
43
43
|
|
44
44
|
### database ###
|
45
45
|
|
46
|
+
# start by checkout config/database.yml. It defaults to sqlite3,
|
47
|
+
# but we can't rely on that because DATABASE_URL can override it.
|
48
|
+
# if we see anything else, assume the change was intentional.
|
46
49
|
database = YAML.load_file("config/database.yml", aliases: true).
|
47
50
|
dig("production", "adapter") rescue nil
|
48
51
|
|
49
|
-
if database == "
|
50
|
-
@sqlite3 = true
|
51
|
-
elsif database == "postgresql"
|
52
|
+
if database == "postgresql"
|
52
53
|
@postgresql = true
|
53
54
|
elsif (database == "mysql") || (database == "mysql2") || (database == "trilogy")
|
54
55
|
@mysql = true
|
55
56
|
elsif database == "sqlserver"
|
56
57
|
@sqlserver = true
|
57
|
-
end
|
58
58
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
59
|
+
## if not found (or sqlite3), check the Gemfile
|
60
|
+
elsif @gemfile.include? "pg"
|
61
|
+
@postgresql = true
|
62
|
+
elsif @gemfile.include?("mysql2") || using_trilogy?
|
63
|
+
@mysql = true
|
64
|
+
elsif @gemfile.include?("activerecord-sqlserver-adapter")
|
65
|
+
@sqlserver = true
|
66
|
+
elsif @gemfile.include?("sqlite3") || database == "sqlite3"
|
67
|
+
# check this one last as sqlite3 may be used in development
|
68
|
+
@sqlite3 = true
|
69
|
+
end
|
63
70
|
|
64
71
|
### node modules ###
|
65
72
|
|
@@ -410,10 +410,19 @@ class DockerfileGenerator < Rails::Generators::Base
|
|
410
410
|
missing = Set.new(base_packages + build_packages) -
|
411
411
|
Set.new(dockerfile.scan(/[-\w]+/))
|
412
412
|
|
413
|
+
# libyaml-dev was removed from the lightweight Ruby images
|
413
414
|
# https://github.com/docker-library/ruby/pull/497
|
414
415
|
# https://github.com/rails/rails/pull/54237
|
415
|
-
|
416
|
-
|
416
|
+
# Ruby versions 3.4.2, 3.3.7, and 3.2.7 have been released removing libyaml-dev
|
417
|
+
# Ruby version 3.1.7 will be the release version to remove libyaml-dev
|
418
|
+
# Older versions no longer release new images
|
419
|
+
matching_ruby = [">= 3.4.2", "~> 3.3.7", "~> 3.2.7", "~> 3.1.7"].any? { |v| Gem::Requirement.new(v).satisfied_by?(Gem.ruby_version) }
|
420
|
+
# Only slim and alpine are missing libyaml-dev/yaml-dev
|
421
|
+
matching_image = /FROM ruby:.+-(alpine|slim)/i.match?(dockerfile)
|
422
|
+
if !matching_ruby || !matching_image
|
423
|
+
missing.delete("libyaml-dev")
|
424
|
+
missing.delete("yaml-dev")
|
425
|
+
end
|
417
426
|
|
418
427
|
unless missing.empty?
|
419
428
|
message = "The following packages are missing from the Dockerfile: #{missing.to_a.join(", ")}"
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dockerfile-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Ruby
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-02-
|
10
|
+
date: 2025-02-24 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: rails
|
@@ -73,7 +73,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
73
73
|
- !ruby/object:Gem::Version
|
74
74
|
version: '0'
|
75
75
|
requirements: []
|
76
|
-
rubygems_version: 3.6.
|
76
|
+
rubygems_version: 3.6.3
|
77
77
|
specification_version: 4
|
78
78
|
summary: Dockerfile generator for Rails
|
79
79
|
test_files: []
|