pixelpress 0.3.3 → 0.3.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: 0cc5425ba75f2b3d99b63622b074e34922e734bd6fba94306a94cd84088e882e
4
- data.tar.gz: 1907176157c4a6fa50f77c9479cc39c36f37fe74ed73d81633d812703fe483bd
3
+ metadata.gz: 99bb61d7bce9577fd4bf5b5122d86ddb8fd1a977033b51beb008f31d6fa59a40
4
+ data.tar.gz: 65e9d61f2b125ce5ea020ee1bf888a535ec0093ab70b68b6d0d3dd053f62b5e9
5
5
  SHA512:
6
- metadata.gz: 1ce2a0d492ab4376ddc0d50f132d0e91515fc927f8d67487fcb34935e6ee93b8fb9f0f98df40e571bfb43a9663b020a1d62bd9e69930b5950a7ff2d5f046a59b
7
- data.tar.gz: 7303ace72f3b012e4162ce976494b199dc5c0fdae59d0825ed01f5d0de21b943ddf72073b390fe3ac3dd911d73ff3217bfa9328d97648d6ce9c4c247e4384229
6
+ metadata.gz: 7edcce751b122557279774ad83fc4f2667ae0be6b705150744bdc1bdf12f85f4d4c1e507e16083c8a7221ced3149a710e5bd7ac0aaccfa839e599f487739be5a
7
+ data.tar.gz: 4a84cafeb22847205bb5ba319bfe611589453f21fbe9480a772ad3b4358fc552dd6e32570875906c889f833d7e99a9b1d61cc5612ddf8385cf03803d977174e4
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "Pixelpress",
3
+ "dockerComposeFile": "docker-compose.yml",
4
+ "service": "app",
5
+ "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
6
+ "postCreateCommand": "bin/setup",
7
+ "remoteUser": "root",
8
+ "customizations": {
9
+ "vscode": {
10
+ "extensions": [
11
+ "dbaeumer.vscode-eslint",
12
+ "GitHub.copilot",
13
+ "esbenp.prettier-vscode",
14
+ "sianglim.slim",
15
+ "Shopify.ruby-lsp",
16
+ "EditorConfig.EditorConfig",
17
+ "eamodio.gitlens"
18
+ ],
19
+ "settings": {
20
+ "rubyLsp.rubyVersionManager": {
21
+ "identifier": "rvm"
22
+ },
23
+ "[ruby]": {
24
+ "editor.formatOnSave": true,
25
+ "editor.defaultFormatter": "Shopify.ruby-lsp"
26
+ }
27
+ }
28
+ }
29
+ },
30
+ "features": {},
31
+ "forwardPorts": []
32
+ }
@@ -0,0 +1,19 @@
1
+ version: '3'
2
+
3
+ services:
4
+ app:
5
+ image: ghcr.io/nerdgeschoss/nerdgeschoss/development-environment:3.4-22
6
+ volumes:
7
+ - ../..:/workspaces:cached
8
+ - ~/.netrc:/root/.netrc
9
+ - ~/.ssh:/root/.ssh
10
+ - ~/.config/gh:/root/.config/gh
11
+ - ~/.cache/devcontainer/playwright:/root/.cache/devcontainer/playwright
12
+ - ~/.aws:/root/.aws
13
+
14
+ # Overrides default command so things don't shut down after the process ends.
15
+ command: sleep infinity
16
+
17
+ environment:
18
+ TZ: Europe/Berlin
19
+ EDITOR: code --wait
data/bin/setup CHANGED
@@ -3,6 +3,4 @@ set -euo pipefail
3
3
  IFS=$'\n\t'
4
4
  set -vx
5
5
 
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
6
+ bundle install
@@ -9,7 +9,7 @@ module Pixelpress
9
9
  end
10
10
 
11
11
  def html
12
- file.read
12
+ file.read.html_safe
13
13
  end
14
14
 
15
15
  def pdf
@@ -1,10 +1,16 @@
1
1
  class Pixelpress::WeasyPrintRenderer
2
2
  class WeasyPrintInstallationError < StandardError; end
3
+ class WeasyPrintExecutionError < StandardError; end
3
4
 
4
5
  def render(input)
5
6
  output = Tempfile.new
6
7
 
7
- system executable_path, "--encoding", "utf-8", input.path, output.path, exception: true
8
+ success = system(executable_path, "--encoding", "utf-8", input.path, output.path)
9
+
10
+ unless success
11
+ raise WeasyPrintExecutionError.new("WeasyPrint execution failed with exit code #{$?.exitstatus}")
12
+ end
13
+
8
14
  return output
9
15
  end
10
16
 
@@ -1,3 +1,3 @@
1
1
  module Pixelpress
2
- VERSION = '0.3.3'.freeze
2
+ VERSION = '0.3.5'.freeze
3
3
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pixelpress
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex
8
8
  - Jens Ravens
9
- autorequire:
9
+ autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2025-01-08 00:00:00.000000000 Z
12
+ date: 2025-06-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: actionpack
@@ -39,7 +39,7 @@ dependencies:
39
39
  - - ">="
40
40
  - !ruby/object:Gem::Version
41
41
  version: '0'
42
- description:
42
+ description:
43
43
  email:
44
44
  - aleksandra@nerdgeschoss.de
45
45
  - jens@nerdgeschoss.de
@@ -47,6 +47,8 @@ executables: []
47
47
  extensions: []
48
48
  extra_rdoc_files: []
49
49
  files:
50
+ - ".devcontainer/devcontainer.json"
51
+ - ".devcontainer/docker-compose.yml"
50
52
  - ".github/workflows/publish.yml"
51
53
  - ".github/workflows/test.yml"
52
54
  - ".gitignore"
@@ -87,7 +89,7 @@ homepage: https://github.com/nerdgeschoss/pixelpress
87
89
  licenses:
88
90
  - MIT
89
91
  metadata: {}
90
- post_install_message:
92
+ post_install_message:
91
93
  rdoc_options: []
92
94
  require_paths:
93
95
  - lib
@@ -103,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
103
105
  version: '0'
104
106
  requirements: []
105
107
  rubygems_version: 3.3.26
106
- signing_key:
108
+ signing_key:
107
109
  specification_version: 4
108
110
  summary: PDF printer
109
111
  test_files: []