obf 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/obf/external.rb +6 -3
- data/lib/obf/pdf.rb +5 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e1b5472c682875d9a7105a13e5d8c082755b708
|
4
|
+
data.tar.gz: c2f86abbb91ed2b93a4a7ef249ecb20378c0a9a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc5bb78ba9ac04762f648e13d88fe6c55ab13e7ab900f56fcea0b98b96e2fe8126e81535350e9b98fa2c2d47c09e3fbbc0516b356618e3aa6c104c1b920a7b0e
|
7
|
+
data.tar.gz: 09780a4f5476a8993fa9dbd76ce298e80f84da98aa08660246718417d889dffe0cbb5d5637b63c10f256c901e149ef4b47dacdad950c4da12c5974e5ddf4ddf9
|
data/lib/obf/external.rb
CHANGED
@@ -2,15 +2,18 @@ module OBF::External
|
|
2
2
|
def self.to_obf(hash, dest_path, path_hash=nil)
|
3
3
|
res = OBF::Utils.obf_shell
|
4
4
|
res['id'] = hash['id']
|
5
|
+
res['locale'] = hash['locale'] || 'en'
|
5
6
|
res['name'] = hash['name']
|
6
7
|
res['default_layout'] = hash['default_layout'] || 'landscape'
|
7
8
|
res['url'] = hash['url']
|
8
9
|
res['data_url'] = hash['data_url']
|
9
10
|
res['description_html'] = hash['description_html']
|
10
11
|
res['license'] = OBF::Utils.parse_license(hash['license'])
|
11
|
-
|
12
|
-
|
13
|
-
|
12
|
+
hash.each do |key, val|
|
13
|
+
if key && key.match(/^ext_/)
|
14
|
+
res[key] = val
|
15
|
+
end
|
16
|
+
end
|
14
17
|
grid = []
|
15
18
|
|
16
19
|
images = []
|
data/lib/obf/pdf.rb
CHANGED
@@ -65,6 +65,10 @@ module OBF::PDF
|
|
65
65
|
|
66
66
|
# header
|
67
67
|
pdf.bounding_box([0, doc_height], :width => doc_width, :height => 100) do
|
68
|
+
if options['pages']
|
69
|
+
page_num = options['pages'][obj['id']]
|
70
|
+
pdf.add_dest("page#{page_num}", pdf.dest_fit)
|
71
|
+
end
|
68
72
|
pdf.line_width = 2
|
69
73
|
pdf.font_size 16
|
70
74
|
|
@@ -136,7 +140,7 @@ module OBF::PDF
|
|
136
140
|
pdf.stroke_color "eeeeee"
|
137
141
|
pdf.fill_and_stroke_rounded_rectangle [button_width - 25, button_height - 5], 20, text_height, 5
|
138
142
|
pdf.fill_color "000000"
|
139
|
-
pdf.
|
143
|
+
pdf.formatted_text_box [{:text => page, :anchor => "page#{page}"}], :at => [button_width - 25, button_height - 5], :width => 20, :height => text_height, :align => :center, :valign => :center
|
140
144
|
end
|
141
145
|
|
142
146
|
pdf.fill_color "000000"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: obf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Whitmer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|