pdf-forms 1.5.0 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/pdf_forms/version.rb +1 -3
- data/lib/pdf_forms/xfdf.rb +6 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 822913ae5ddafd1351543d61153398662cbe52506d5b766f2bd385075c105aba
|
4
|
+
data.tar.gz: 9795775687461877705fd8168381bf02b02bb89324cd54e8f4b5735a4cb0b5ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 305bc7b8ef657981e25b34dc67ff7565b7d3536b1b9e5fc5a2c7e2d0ec27371648370ef8bfe79d586a311aa0cdd9d438180b2a4336a4fc7274be4a339cbd9f19
|
7
|
+
data.tar.gz: c2d08fae7eb158ed9229cdae6443cae0c0ff37f491424e901f89108ddce49473881770fb55c507a464b8436bed1615cc7ee69a0fca9321bfb000c9fbcbd8cd1f
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# pdf-forms
|
1
|
+
# pdf-forms ![Build Status](https://github.com/jkraemer/pdf-forms/actions/workflows/run_tests.yml/badge.svg)
|
2
2
|
|
3
3
|
http://github.com/jkraemer/pdf-forms/
|
4
4
|
|
data/lib/pdf_forms/version.rb
CHANGED
data/lib/pdf_forms/xfdf.rb
CHANGED
@@ -19,15 +19,19 @@ module PdfForms
|
|
19
19
|
REXML::Text.new(value.to_s).to_s
|
20
20
|
end
|
21
21
|
|
22
|
+
def escape(value)
|
23
|
+
Array(value).map{ |v| quote(v) }.join(" ")
|
24
|
+
end
|
25
|
+
|
22
26
|
def header
|
23
27
|
'<?xml version="1.0" encoding="UTF-8"?>
|
24
28
|
<xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve">
|
25
29
|
<fields>
|
26
30
|
'
|
27
31
|
end
|
28
|
-
|
32
|
+
|
29
33
|
def field(key, value)
|
30
|
-
"<field name=\"#{key}\"><value>#{
|
34
|
+
"<field name=\"#{escape(key)}\"><value>#{escape(value)}</value></field>"
|
31
35
|
end
|
32
36
|
|
33
37
|
def footer
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pdf-forms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jens Krämer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-06-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cliver
|