dockerfile-rails 1.7.4 → 1.7.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: be3d1ce9566496c167fba7241e1f1e07ed7efbad7945c6a86d3ff282bb1b8229
4
- data.tar.gz: 27f6342c3e4cc7bc92195139347938d75bc0cf0b77bfc53627cbfd7611b149b4
3
+ metadata.gz: 4ff1ee0c49a9ebbbb98ee4dd006a2e48d0c3c711e9f95057ab5b7048d2ee6916
4
+ data.tar.gz: eb82fe4009d35400dfab47747f2d3e115847a10e27f8ae17f405ac2db58dfba1
5
5
  SHA512:
6
- metadata.gz: 6bb0a8358622932c93120e5779b6eb3b43b5e7b2b10fb292ede16303800189322b2c56ea86a539fc79803c6fd2ea07c328266e00a3ab6ecfaeab8a00cfdf9550
7
- data.tar.gz: a66522cf4672acbbb377ee85feb42cab5443300df5fc2327a1c8034cc4f3bf49665f7d16612ebf02c719c27213f2652c372352c002ed0e4ee030f2b74361aab6
6
+ metadata.gz: 9be4612b0a2d7cb9e8781e06f167a23732bff0f46cd3fc5233f26b41d7856859595e610b1a8ee169e65897e61fac03f928c1ada613576552650978a675a80c9f
7
+ data.tar.gz: '09c53a4ce9d8840ee27bd78a9acf0beea803d2200013484cb6c7a7db0dbcf55d5a68604938c24fd41aa036c3b154c79529a6119e8a440f27753dd5e530ec5010'
data/README.md CHANGED
@@ -67,7 +67,7 @@ are actually using. But should you be using DATABASE_URL, for example, at runti
67
67
  additional support may be needed:
68
68
 
69
69
  * `--litefs` - use [LiteFS](https://fly.io/docs/litefs/)
70
- * `--litestream` - use [LiteFS](https://litestream.io/)
70
+ * `--litestream` - use [Litestream](https://litestream.io/)
71
71
  * `--mysql` - add mysql libraries
72
72
  * `--postgresql` - add postgresql libraries
73
73
  * `--redis` - add redis libraries
@@ -120,6 +120,16 @@ Options are saved between runs into `config/dockerfile.yml`. To invert a boolea
120
120
 
121
121
  ## Testing
122
122
 
123
+ Run:
124
+
125
+ Installation:
126
+
127
+ ```
128
+ brew install postgresql mysql zstd
129
+ bundle config --local build.mysql2 "--with-opt-dir="$(brew --prefix zstd)""
130
+ bundle install
131
+ ```
132
+
123
133
  A single invocation of `rake test:all` will run all of the tests defined. dockerfile-rails has are three types of tests:
124
134
 
125
135
  * `rake test:rubocop` runs [rubocop](https://github.com/rubocop/rubocop) using the same options as the Rails codebase.
@@ -410,6 +410,11 @@ class DockerfileGenerator < Rails::Generators::Base
410
410
  missing = Set.new(base_packages + build_packages) -
411
411
  Set.new(dockerfile.scan(/[-\w]+/))
412
412
 
413
+ # https://github.com/docker-library/ruby/pull/497
414
+ # https://github.com/rails/rails/pull/54237
415
+ missing.delete("libyaml-dev")
416
+ missing.delete("yaml-dev")
417
+
413
418
  unless missing.empty?
414
419
  message = "The following packages are missing from the Dockerfile: #{missing.to_a.join(", ")}"
415
420
  STDERR.puts "\n" + shell.set_color(message, Thor::Shell::Color::RED, Thor::Shell::Color::BOLD)
@@ -515,7 +520,12 @@ private
515
520
  end
516
521
 
517
522
  def references_ruby_version_file?
518
- @references_ruby_version_file ||= IO.read("Gemfile").include?(".ruby-version")
523
+ @references_ruby_version_file ||= ruby_version_file.present?
524
+ end
525
+
526
+ def ruby_version_file
527
+ match = IO.read("Gemfile").match(/ruby file: ["'](.*)["']/)
528
+ match ? match[1] : nil
519
529
  end
520
530
 
521
531
  def using_redis?
@@ -1159,11 +1169,11 @@ private
1159
1169
  else
1160
1170
  command = Shellwords.split(procfile.values.first)
1161
1171
 
1162
- if command.first == "./bin/thrust"
1163
- command[1..]
1164
- else
1165
- command
1166
- end
1172
+ thrust = command.index("./bin/thrust")
1173
+ thrust = command.index("litestream:run") if thrust.nil?
1174
+ command = command[thrust + 1...] unless thrust.nil?
1175
+
1176
+ command
1167
1177
  end
1168
1178
  end
1169
1179
 
@@ -9,7 +9,7 @@
9
9
  # For a containerized dev environment, see Dev Containers: https://guides.rubyonrails.org/getting_started_with_devcontainer.html
10
10
  <% end -%>
11
11
 
12
- # Make sure RUBY_VERSION matches the Ruby version in .ruby-version
12
+ # Make sure RUBY_VERSION matches the Ruby version in <%= ruby_version_file || '.ruby-version' %>
13
13
  ARG RUBY_VERSION=<%= RUBY_VERSION %>
14
14
  <% if api_client_dir -%>
15
15
  <%= render partial: 'node_client' %>
@@ -95,7 +95,7 @@ ENV <%= build_env.join(" \\\n ") %>
95
95
 
96
96
  <% end -%>
97
97
  # Install application gems
98
- COPY<% if options.link? %> --link<% end %> Gemfile Gemfile.lock <% if references_ruby_version_file? %>.ruby-version <% end %>./
98
+ COPY<% if options.link? %> --link<% end %> Gemfile Gemfile.lock <% if references_ruby_version_file? %><%= ruby_version_file %> <% end %>./
99
99
  <% if @netpopbug && Rails.env != "test" -%>
100
100
  RUN sed -i "/net-pop (0.1.2)/a\ net-protocol" Gemfile.lock
101
101
  <% end -%>
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
4
+ version: 1.7.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Ruby
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-01-31 00:00:00.000000000 Z
10
+ date: 2025-02-06 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: rails