himg 0.0.4 → 0.0.6
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 +4 -4
- data/CHANGELOG.md +23 -0
- data/Cargo.lock +548 -1047
- data/LICENSE-APACHE.txt +203 -0
- data/README.md +93 -39
- data/ext/himg/Cargo.toml +10 -7
- data/ext/himg/examples/assets/github_profile_offline.html +86 -0
- data/ext/himg/examples/file.rs +9 -8
- data/ext/himg/src/html_to_image.rs +34 -36
- data/ext/himg/src/image_size.rs +1 -1
- data/ext/himg/src/lib.rs +19 -15
- data/ext/himg/src/net_fetcher.rs +139 -0
- data/ext/himg/src/options.rs +22 -3
- data/ext/himg/src/renderer.rs +7 -5
- data/gemfiles/plain_ruby.gemfile.lock +1 -1
- data/gemfiles/rails_6.gemfile.lock +1 -1
- data/gemfiles/rails_7_0.gemfile.lock +1 -1
- data/gemfiles/rails_7_1.gemfile.lock +1 -1
- data/gemfiles/rails_7_2.gemfile.lock +1 -1
- data/gemfiles/rails_8.gemfile.lock +1 -1
- data/lib/himg/base_url.rb +21 -0
- data/lib/himg/cli.rb +64 -0
- data/lib/himg/railtie/controller_config.rb +31 -0
- data/lib/himg/railtie/template_handler.rb +2 -2
- data/lib/himg/railtie.rb +13 -2
- data/lib/himg/version.rb +1 -1
- data/lib/himg.rb +4 -2
- data/readme_hero.svg +54 -0
- data/sig/himg.rbs +11 -3
- metadata +9 -2
- /data/{LICENSE.txt → LICENSE-MIT.txt} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b2129ecb9c51fef4cb5937b84cb79ffb17880b514f787870272e152f27c75f3
|
4
|
+
data.tar.gz: 72f3bf4d34326c362093a94ef77dbb460ef766930465cf04c7db6a3cff1a5dd4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d37eedb7061da5062c3115256f53d9011ba7498b45ca4c2d83e61838c81f87261561c7e3b8bdfc7eac0c8241a66d1b5c8413fc36fe0cda67bbc639ae254a366
|
7
|
+
data.tar.gz: 539f6f154e7414412e4c5b86505bededd930398a9f909d489787b395493a774bc1786011a1056689b75f61c38a4aa24de3b0e727cf88e66a8f85c9a16d55f55d
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,28 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
+
## [0.0.6] - 2025-07-23
|
4
|
+
|
5
|
+
- Added bin/himg CLI screenshot tool
|
6
|
+
- Added `base_url` option for configuring relative paths
|
7
|
+
- Added `disable_fetch` option for security hardening
|
8
|
+
- Fixed race conditions when failing to fetch resources
|
9
|
+
|
10
|
+
## [0.0.5] - 2025-04-22
|
11
|
+
|
12
|
+
- Can configure `render himg: ""` with options including `width:`, `height:`,
|
13
|
+
`truncate:` and `verbose:`.
|
14
|
+
- Can use `himg_config` helper methods at controller level and action level
|
15
|
+
to set `@_himg_config`, which can then be passed to the renderer with
|
16
|
+
`render himg: "<!DOCTYPE html>", config: himg_config` as an alternative to
|
17
|
+
specifying config options individually to `ActionController::Rendering#render`.
|
18
|
+
- `himg_config` helpers can also be used to control the configuration of
|
19
|
+
template based default render, when not calling render manually within the
|
20
|
+
controller. This works because the template handler can access `@_himg_config`.
|
21
|
+
- Can use string width / height with Himg.render
|
22
|
+
- Disable detailed log timings by default. Can re-enable with verbose: true.
|
23
|
+
There is still some logging from blitz-net#fetch for http requests and for
|
24
|
+
blitz-html::DocumentHtmlParser#finish on unexpected tokens.
|
25
|
+
|
3
26
|
## [0.0.4] - 2025-04-22
|
4
27
|
|
5
28
|
- Allow `width`, `height` and `truncate` to be passed to the render function.
|