homura-runtime 0.2.20 → 0.2.21

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: c353eae6d02619f499bf359610f28d12c0824415cc584e835dd0440d6807cff6
4
- data.tar.gz: 998317164a89b71d98f01275a20dd1482d7ccf464c8ebef1095555db669765be
3
+ metadata.gz: 0abbf529c5ccbf21c28d4f6106d3b0d90dcc12d5c5d05ddc9ef1dcdad78b84fb
4
+ data.tar.gz: 0f82648388b2082293eefdd500cc0513c6c81d02cc13f42f27333b52d203407c
5
5
  SHA512:
6
- metadata.gz: f6b0a9a1f4d55913deb468056980e70c3913ef7397603f1b9ee156241cf6d55cdd7eb6cb94cf54513c1d293816a9f69d455e36731f013c648a4716bec49f0972
7
- data.tar.gz: 19e6c31d9e1fee24749b91a8d3caadb6789d9d05652d76ce2addc9642b892d47ac8fa8fffad7ff9862d309c34d994af9cc5da718b20d6b96bb2e38ce7e492d74
6
+ metadata.gz: d2360a1809e4373c4133a1ee5225d3dad880b5570b492c8db5a1640790388d2cfaadeba699ad10fce8f3e350a24f0ad361bc3acb20d48c8ff6379dc170a54ad8
7
+ data.tar.gz: 268fe0b01b20ab7c7d0da2c0d930d9d31d1e9da6c1968a52ca4ae49bfc9d04f9cb70307d302978162d50c6c762a5e2565d153805cf0b9211ccadb7942956d88b
data/exe/compile-erb CHANGED
@@ -512,14 +512,18 @@ inputs =
512
512
 
513
513
  template_root = positional.find { |a| File.directory?(a) } || options[:input_dir]
514
514
 
515
- if inputs.empty?
516
- warn "bin/compile-erb: no .erb files found (under #{options[:input_dir]}/ or from args)"
517
- exit 1
518
- end
519
-
520
515
  write_file = !options[:stdout] && (positional.empty? || options[:output])
521
516
  out_path = options[:output]
522
517
 
518
+ # An app with zero ERB templates (e.g. an example that builds HTML
519
+ # inline with Ruby heredocs) is a valid case: still emit the registry
520
+ # header + Sinatra dispatcher patch so `erb :foo` raises a clear error
521
+ # at runtime instead of silently disappearing, and so the build
522
+ # pipeline doesn't fail when there is nothing to compile.
523
+ if inputs.empty?
524
+ warn "compile-erb: no .erb files under #{options[:input_dir]}/ — writing empty registry"
525
+ end
526
+
523
527
  if write_file
524
528
  FileUtils.mkdir_p(File.dirname(out_path))
525
529
  File.open(out_path, 'w') do |io|
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CloudflareWorkers
4
- VERSION = '0.2.20'
4
+ VERSION = '0.2.21'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: homura-runtime
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.20
4
+ version: 0.2.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kazuhiro Homma