dockerfile-rails 0.4.3 → 0.4.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: 68a853a1d2a0a40c1912a99dd77fe1664abe12bf1678eb4dc07a17873259bc39
4
- data.tar.gz: 90bcd80ae9f8a6c8c27cc806235bdec6b9bf308ca3a3ebf10712304f7a52a10e
3
+ metadata.gz: a64e87599931293e6cc232a0808acf1c30e93274db4fd3b7ce69b1adf505fae4
4
+ data.tar.gz: ac7188e27e291fdeb814d5fe87b7331f092db6fd8d9ddd742a4b325334c3f516
5
5
  SHA512:
6
- metadata.gz: 693b078d6d664fdd7366c036dbbb9f95732c79b0f058a2bfe7300c886c479885b33ba075d9d598a1266b2a030bf6bfc588aee6c9074a570e6bd9720749765d28
7
- data.tar.gz: a74d6fe97db12495762f5b6dfcd5ff3cf9c32f2807f9402f9e159f485a5e5c8562347811d12fbdf7601ce6755592c7413ebb6402b2c8c606a90c7c0d5e43148e
6
+ metadata.gz: 0e2a65afdb4224b38b76fbabd6260e0ad81e6d2f375207ae25123bfc9610d1703e13ea15637ba591f078fbaf0200aca95b20e19c510c637c05bc07d096b921d2
7
+ data.tar.gz: b4de5328f761669136d22a0f1763c177663a4f683b83069be87f61794da61462cfdf480aadd6125affd54bfdebebafc95907e9e36241f9e3beda2873c314f3c6
@@ -26,9 +26,13 @@ module DockerfileRails
26
26
  end
27
27
 
28
28
  if File.exist? 'Gemfile'
29
- gemfile_definition = Bundler::Definition.build('Gemfile', nil, [])
30
- @gemfile += gemfile_definition.dependencies.map(&:name)
31
- @git = !gemfile_definition.spec_git_paths.empty?
29
+ begin
30
+ gemfile_definition = Bundler::Definition.build('Gemfile', nil, [])
31
+ @gemfile += gemfile_definition.dependencies.map(&:name)
32
+ @git = !gemfile_definition.spec_git_paths.empty?
33
+ rescue => error
34
+ STDERR.puts error.message
35
+ end
32
36
  end
33
37
 
34
38
  @sidekiq = @gemfile.include? 'sidekiq'
@@ -67,4 +71,4 @@ module DockerfileRails
67
71
  @redis = @redis_cable || @redis_cache || @sidekiq
68
72
  end
69
73
  end
70
- end
74
+ end
@@ -242,10 +242,16 @@ private
242
242
  Rails.application.config.api_only
243
243
  end
244
244
 
245
+ # scan for node clients. Do a wide scan if api_only?, otherwise look
246
+ # for specific directories.
245
247
  def api_client_dir
246
- return unless api_only?
248
+ if api_only?
249
+ scan = '*/package.json'
250
+ else
251
+ scan = '{client,frontend}/package.json'
252
+ end
247
253
 
248
- file = Dir['*/package.json'].find do |file|
254
+ file = Dir[scan].find do |file|
249
255
  JSON.load_file(file).dig('scripts', 'build')
250
256
  end
251
257
 
@@ -63,7 +63,7 @@ RUN --mount=type=cache,id=bld-gem-cache,sharing=locked,target=/srv/vendor \
63
63
  bundle config set app_config .bundle && \
64
64
  bundle config set path /srv/vendor && \
65
65
  bundle _${BUNDLER_VERSION}_ install && \
66
- <% if depend_on_bootsnap? -%> && \
66
+ <% if depend_on_bootsnap? -%>
67
67
  bundle exec bootsnap precompile --gemfile && \
68
68
  <% end -%>
69
69
  bundle clean && \
@@ -95,7 +95,7 @@ RUN bundle exec bootsnap precompile app/ lib/
95
95
  <%= "RUN " + binfile_fixups.join(" && \\\n ") %>
96
96
 
97
97
  <% end -%>
98
- <% unless api_only? -%>
98
+ <% if Dir.exist?('assets') and !api_only? -%>
99
99
  # Precompiling assets for production without requiring secret RAILS_MASTER_KEY
100
100
  RUN SECRET_KEY_BASE<%= Rails::VERSION::MAJOR<7 || Rails::VERSION::STRING.start_with?('7.0') ? '=DUMMY' : '_DUMMY=1' %> ./bin/rails assets:precompile
101
101
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dockerfile-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Ruby
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-17 00:00:00.000000000 Z
11
+ date: 2023-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails