dockerfile-rails 0.4.4 → 0.4.5

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: b68e838d9adbcc0404f7f38780918b72d21677922ac627c87bc6d949388e8940
4
- data.tar.gz: 98a5cf029b0bd032491c47397ddd3439504629a013ecf371e936817b4ada72ec
3
+ metadata.gz: a64e87599931293e6cc232a0808acf1c30e93274db4fd3b7ce69b1adf505fae4
4
+ data.tar.gz: ac7188e27e291fdeb814d5fe87b7331f092db6fd8d9ddd742a4b325334c3f516
5
5
  SHA512:
6
- metadata.gz: 1cc411c1fd37d189592dcacdbad37c572619afb46906d72377dfacc24ef2cf28628d62b898d482cc2845fe1e743304e1abbab44c504da6ccfe6c47b31a7ff16a
7
- data.tar.gz: f8e4812222ced1477b7707e668bee69834858a66c2dc931822fc822891dc6fdef0608144a9cfd0757e95d7fedffbed6175365337e693bbbae8198ea6e78b4d11
6
+ metadata.gz: 0e2a65afdb4224b38b76fbabd6260e0ad81e6d2f375207ae25123bfc9610d1703e13ea15637ba591f078fbaf0200aca95b20e19c510c637c05bc07d096b921d2
7
+ data.tar.gz: b4de5328f761669136d22a0f1763c177663a4f683b83069be87f61794da61462cfdf480aadd6125affd54bfdebebafc95907e9e36241f9e3beda2873c314f3c6
@@ -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.4
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