dockerfile-rails 1.7.4 → 1.7.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: be3d1ce9566496c167fba7241e1f1e07ed7efbad7945c6a86d3ff282bb1b8229
4
- data.tar.gz: 27f6342c3e4cc7bc92195139347938d75bc0cf0b77bfc53627cbfd7611b149b4
3
+ metadata.gz: d70002b918b2110952ebace8ba264db76189fe7f5a27b1985313871e9318af8f
4
+ data.tar.gz: 9cd5e7a99158113277978a9787cb099ba002d35d2dfaef2fba58d9abf1a67225
5
5
  SHA512:
6
- metadata.gz: 6bb0a8358622932c93120e5779b6eb3b43b5e7b2b10fb292ede16303800189322b2c56ea86a539fc79803c6fd2ea07c328266e00a3ab6ecfaeab8a00cfdf9550
7
- data.tar.gz: a66522cf4672acbbb377ee85feb42cab5443300df5fc2327a1c8034cc4f3bf49665f7d16612ebf02c719c27213f2652c372352c002ed0e4ee030f2b74361aab6
6
+ metadata.gz: 93bc70acc19970a2813bfcd9e56138dd3216ea6998e8a883cff27a305e8cd2a6694a750333249e1367eea05b37edccc2183f2a1d09b2fc1f8f65428d66f38af4
7
+ data.tar.gz: 13f8868fbc6e5e09be03e3f323c9093e136b5b93d760d883d94057138f8e8c92ffd04841a5963a4c08175a011f03a44998ed7a396c2861da890ac4d3a6d8f001
@@ -515,7 +515,12 @@ private
515
515
  end
516
516
 
517
517
  def references_ruby_version_file?
518
- @references_ruby_version_file ||= IO.read("Gemfile").include?(".ruby-version")
518
+ @references_ruby_version_file ||= ruby_version_file.present?
519
+ end
520
+
521
+ def ruby_version_file
522
+ match = IO.read("Gemfile").match(/ruby file: ["'](.*)["']/)
523
+ match ? match[1] : nil
519
524
  end
520
525
 
521
526
  def using_redis?
@@ -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,7 +1,7 @@
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.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Ruby