inlay 0.2.1 → 0.2.2

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: 6273a1bf011d3c9cd941d30b87f50d5724eb203c00a06697c4a9247c992274ff
4
- data.tar.gz: bdc9b71941f4742ba3b7ef41f2a9c597d4c60d1be5ebe84dbc918ea6561894d3
3
+ metadata.gz: cab4e714afc8beda67372ce317697c4ad34403b6b7167214c2f1c4fce01744d8
4
+ data.tar.gz: f470250b258cd6c252e8b464a91c188ad9e47459881aca7d2ee34c727219069a
5
5
  SHA512:
6
- metadata.gz: 1eceb81681746d2fcb025f69c78280be9eefbf8213aed812b398e37466dc9150afb603ef53c74d52e5885519603fb21d39103cd2e3722b5e67e7fa7d3e16cccf
7
- data.tar.gz: 3765bcfe8b45a28d015f7339a5106ff52bc950667332d3bfd9e0c86b5d46eb076c4fd745d49d045008c33c37ba81aae39b54bcb156d61eb1cd589711e730beb8
6
+ metadata.gz: 44e23be25c427842f76c8c8801291fe4934dac2908099736b0a3cbe80889be62916c7bf2b5299b1becc9ecc4af330b77f554d34232fcccdb10d08b2ded9fe89d
7
+ data.tar.gz: a1b0f3cdd948f6fabcf47635e8bbd85991696bd9b13968d76cd4014f0360f1f6d3b190659127462f3b0f3963a3ab685c837a2f8c22126523434cae11cb9f2bcf
data/.codespellignore ADDED
File without changes
data/.yamllint ADDED
@@ -0,0 +1,16 @@
1
+ extends: default
2
+ ignore: |
3
+ build/
4
+ node_modules/
5
+ runtime/build/
6
+ tmp/
7
+ **/*.dSYM/**
8
+
9
+ rules:
10
+ comments:
11
+ min-spaces-from-content: 1
12
+ document-start: disable
13
+ line-length:
14
+ max: 200
15
+ truthy:
16
+ check-keys: false
data/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  # Changelog
2
2
 
3
- ## [0.2.1] - Unreleased
3
+ ## [0.2.2] - 2026-09-26
4
+
5
+ - Skip empty images in terminal output.
6
+ - Reject non-finite animation frame rates.
7
+
8
+ ## [0.2.1] - 2026-09-25
4
9
 
5
10
  - Fit terminal images to protocol-specific cell dimensions.
6
11
  - Preserve SVG chart output when optional PNG dependencies are unavailable.
@@ -45,7 +45,7 @@ module Inlay
45
45
  frames = Array(data[:frames])
46
46
  raise ArgumentError, "frames must not be empty" if frames.empty?
47
47
  raise TypeError, "frames must contain Tessel::Image values" unless frames.all? { |frame| frame.is_a?(Tessel::Image) }
48
- raise TypeError, "fps must be a positive number" unless data[:fps].is_a?(Numeric) && data[:fps].positive?
48
+ raise TypeError, "fps must be a finite positive number" unless data[:fps].is_a?(Numeric) && data[:fps].respond_to?(:positive?) && data[:fps].positive? && data[:fps].to_f.finite?
49
49
 
50
50
  return Normalized.new(frames: frames, fps: data[:fps])
51
51
  end
@@ -18,6 +18,7 @@ module Inlay
18
18
  return false unless enabled?(output: output, env: env) && selected != :none
19
19
  return false if selected == :blocks && env.key?("NO_COLOR")
20
20
  return false if image.width * image.height > Inlay.config.max_pixels
21
+ return false if image.width.zero? || image.height.zero?
21
22
 
22
23
  image = Sizer.fit(image, width: width, height: height, scale: scale, protocol: selected, env: env)
23
24
  bytes = image.bytes
data/lib/inlay/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Inlay
4
- VERSION = "0.2.1"
4
+ VERSION = "0.2.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inlay
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yudai Takada
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-09-25 00:00:00.000000000 Z
11
+ date: 2026-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tessel
@@ -152,6 +152,8 @@ executables: []
152
152
  extensions: []
153
153
  extra_rdoc_files: []
154
154
  files:
155
+ - ".codespellignore"
156
+ - ".yamllint"
155
157
  - CHANGELOG.md
156
158
  - LICENSE.txt
157
159
  - README.md