pixelpress 0.3.2 → 0.3.4
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1909db2ba4fba6b1fe1f7359a295f2f507df6e23fdc1566bab759cdb19e37fb5
|
4
|
+
data.tar.gz: 2729d6d698cb9f0673518e406234a3a5fa89e90b9f0226fd8cad6f7dbad428d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e39af4bc954110cedd403a805d2e23e21df42933254d661c724341e47e2bb9ca1d8e56a9644cfb7692a9d8b06a510885ec04919f000f6238b4f12d159848a08
|
7
|
+
data.tar.gz: 302fbf7f92eb51ee9d43fa113a98066bda4c8afe7b2b8740f1d70d9d95173e42913f33c9d5f41e1280bd0854b3964474779c44f4f65d0733afa0cb30fdb7598b
|
@@ -1,2 +1,2 @@
|
|
1
|
-
Rails.application.config.autoload_paths << Rails.root.join('app
|
2
|
-
Rails.application.config.autoload_paths << Rails.root.join('spec
|
1
|
+
Rails.application.config.autoload_paths << Rails.root.join('app/printers')
|
2
|
+
Rails.application.config.autoload_paths << Rails.root.join('spec/printers/previews') if Rails.env.development?
|
data/lib/pixelpress/preview.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Pixelpress
|
2
2
|
class Preview
|
3
3
|
def self.all
|
4
|
-
Dir[Rails.root.join('spec
|
4
|
+
Dir[Rails.root.join('spec/printers/previews/**/*_preview.rb')].map do |file|
|
5
5
|
require_dependency file
|
6
6
|
file.split('printers/previews/').last.sub('.rb', '').classify.constantize.new
|
7
7
|
end
|
@@ -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
|
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
|
|
data/lib/pixelpress/version.rb
CHANGED
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.
|
4
|
+
version: 0.3.4
|
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:
|
12
|
+
date: 2025-04-08 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
|
@@ -87,7 +87,7 @@ homepage: https://github.com/nerdgeschoss/pixelpress
|
|
87
87
|
licenses:
|
88
88
|
- MIT
|
89
89
|
metadata: {}
|
90
|
-
post_install_message:
|
90
|
+
post_install_message:
|
91
91
|
rdoc_options: []
|
92
92
|
require_paths:
|
93
93
|
- lib
|
@@ -103,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
103
103
|
version: '0'
|
104
104
|
requirements: []
|
105
105
|
rubygems_version: 3.3.26
|
106
|
-
signing_key:
|
106
|
+
signing_key:
|
107
107
|
specification_version: 4
|
108
108
|
summary: PDF printer
|
109
109
|
test_files: []
|