itext-jruby 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +1 -0
- data/VERSION +1 -1
- data/itext-jruby.gemspec +3 -2
- data/lib/itext/attachments.rb +0 -8
- data/lib/itext/signing.rb +2 -1
- data/test/assets/sample.html +1 -0
- metadata +3 -2
data/README.rdoc
CHANGED
@@ -28,6 +28,7 @@ Find more examples in test directory.
|
|
28
28
|
== Changelog
|
29
29
|
* 0.0.6 - First stable version allowing adding attachments to PdfFile
|
30
30
|
* 0.0.7 - Add option to sign documents usign pkcs12 certificates
|
31
|
+
* 0.0.8 - Minor fixes
|
31
32
|
|
32
33
|
== Read more
|
33
34
|
* Creating pkcs12 certs: http://www.flatmtn.com/article/creating-pkcs12-certificates
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.8
|
data/itext-jruby.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "itext-jruby"
|
8
|
-
s.version = "0.0.
|
8
|
+
s.version = "0.0.8"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Ernest Bursa"]
|
12
|
-
s.date = "2013-10-
|
12
|
+
s.date = "2013-10-10"
|
13
13
|
s.description = "IText"
|
14
14
|
s.email = "ernest@bzdury.pl"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -54,6 +54,7 @@ Gem::Specification.new do |s|
|
|
54
54
|
"test/assets/cert/ia.key",
|
55
55
|
"test/assets/cert/ia.p12",
|
56
56
|
"test/assets/pug.jpg",
|
57
|
+
"test/assets/sample.html",
|
57
58
|
"test/assets/sample.pdf",
|
58
59
|
"test/helper.rb",
|
59
60
|
"test/test_itext-jruby.rb"
|
data/lib/itext/attachments.rb
CHANGED
@@ -11,14 +11,6 @@ module Itext::Attachments
|
|
11
11
|
def self.included(base)
|
12
12
|
base.extend(ClassMethods)
|
13
13
|
attr_reader :attachments
|
14
|
-
|
15
|
-
# base.class_eval do
|
16
|
-
# original_method = instance_method(:initialize)
|
17
|
-
# define_method(:initialize) do |*args, &block|
|
18
|
-
# original_method.bind(self).call(*args, &block)
|
19
|
-
# @hooks.push ->{ process_attachments }
|
20
|
-
# end
|
21
|
-
# end
|
22
14
|
end
|
23
15
|
|
24
16
|
def add_attachments(attachments)
|
data/lib/itext/signing.rb
CHANGED
@@ -32,7 +32,8 @@ module Itext::Signing
|
|
32
32
|
# Required options: { private_key_path: '/path/key' }
|
33
33
|
# Optional options: { password: '' }
|
34
34
|
def enable_signing!(opts = {})
|
35
|
-
raise ArgumentError, "Please provide :private_key_path"
|
35
|
+
raise ArgumentError, "Please provide :private_key_path" unless opts[:private_key_path]
|
36
|
+
raise ArgumentError, "Specified :private_key_path does not exists" unless File.exists?(opts[:private_key_path])
|
36
37
|
|
37
38
|
@private_key_path = opts[:private_key_path]
|
38
39
|
@password = opts[:password].to_s.to_java.toCharArray
|
@@ -0,0 +1 @@
|
|
1
|
+
<html><head><title>sample</title><meta content="text/html; charset=UTF-8" http-equiv="content-type"><style type="text/css">ol{margin:0;padding:0}.c6{vertical-align:top;width:451.3pt;border-style:solid;border-color:#000000;border-width:1pt;padding:5pt 5pt 5pt 5pt}.c7{line-height:1.15;padding-top:0pt;text-align:left;padding-bottom:0pt}.c1{line-height:1.420454502105713;padding-top:11pt;direction:ltr;padding-bottom:11pt}.c2{max-width:451.3pt;background-color:#ffffff;padding:72pt 72pt 72pt 72pt}.c8{margin-right:auto;border-collapse:collapse}.c10{color:inherit;text-decoration:inherit}.c3{color:#1155cc;text-decoration:underline}.c9{color:#333333;font-size:12pt}.c5{height:11pt}.c0{height:21pt}.c4{direction:ltr}.title{padding-top:0pt;line-height:1.15;text-align:left;color:#000000;font-size:21pt;font-family:"Trebuchet MS";padding-bottom:0pt}.subtitle{padding-top:0pt;line-height:1.15;text-align:left;color:#666666;font-style:italic;font-size:13pt;font-family:"Trebuchet MS";padding-bottom:10pt}li{color:#000000;font-size:11pt;font-family:"Arial"}p{color:#000000;font-size:11pt;margin:0;font-family:"Arial"}h1{padding-top:10pt;line-height:1.15;text-align:left;color:#000000;font-size:16pt;font-family:"Trebuchet MS";padding-bottom:0pt}h2{padding-top:10pt;line-height:1.15;text-align:left;color:#000000;font-size:13pt;font-family:"Trebuchet MS";font-weight:bold;padding-bottom:0pt}h3{padding-top:8pt;line-height:1.15;text-align:left;color:#666666;font-size:12pt;font-family:"Trebuchet MS";font-weight:bold;padding-bottom:0pt}h4{padding-top:8pt;line-height:1.15;text-align:left;color:#666666;font-size:11pt;text-decoration:underline;font-family:"Trebuchet MS";padding-bottom:0pt}h5{padding-top:8pt;line-height:1.15;text-align:left;color:#666666;font-size:11pt;font-family:"Trebuchet MS";padding-bottom:0pt}h6{padding-top:8pt;line-height:1.15;text-align:left;color:#666666;font-style:italic;font-size:11pt;font-family:"Trebuchet MS";padding-bottom:0pt}</style></head><body class="c2"><p class="c4 title"><a name="h.awbd35vneejq"></a><span>This is sample PDF document</span></p><p class="c4 subtitle"><a name="h.c3nsbhwiq9in"></a><span>For testing itext-jruby lib</span></p><p class="c5 c4"><span></span></p><p class="c1"><span class="c9">IText Pdf generation static java build packed to gem with some additional Ruby methods.</span></p><p class="c5 c4"><span></span></p><a href="#" name="3a901f8b1e95cfef46fc428c91cdc4123e889dce"></a><a href="#" name="0"></a><table cellpadding="0" cellspacing="0" class="c8"><tbody><tr><td class="c6"><h1 class="c4"><a name="h.ikgy2fov1yuo"></a><span>Author: Ernest Bursa</span></h1></td></tr><tr class="c0"><td class="c6"><p class="c4"><span>Mail: ernest@bzdury.pl</span></p></td></tr><tr class="c0"><td class="c6"><p class="c4 c7"><span>Github: </span><span class="c3"><a class="c10" href="https://github.com/swistaczek/itext-jruby">https://github.com/swistaczek/itext-jruby</a></span></p></td></tr></tbody></table><p class="c5 c4"><span></span></p><p class="c4 c5"><span></span></p></body></html>
|
metadata
CHANGED
@@ -2,14 +2,14 @@
|
|
2
2
|
name: itext-jruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.8
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Ernest Bursa
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-10-
|
12
|
+
date: 2013-10-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: shoulda
|
@@ -136,6 +136,7 @@ files:
|
|
136
136
|
- test/assets/cert/ia.key
|
137
137
|
- test/assets/cert/ia.p12
|
138
138
|
- test/assets/pug.jpg
|
139
|
+
- test/assets/sample.html
|
139
140
|
- test/assets/sample.pdf
|
140
141
|
- test/helper.rb
|
141
142
|
- test/test_itext-jruby.rb
|