prawn-print 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7e9d7fd07b1b70ddca86fc765ab429992b915803
4
- data.tar.gz: 4f16658175b41fa3defae17ce0d3a70cb3e55ed9
3
+ metadata.gz: d7cb41742ce17c84ee133ae177fcd33a2f54a026
4
+ data.tar.gz: 2fc20d5356396b904aa1a44d85f2208b968741b6
5
5
  SHA512:
6
- metadata.gz: 816b27ff13d0d9c9068ac8d85ee5510736a690ac9761db519d30ee39bdac0f2b062e08e50e1a6c0efe6af3d7273ef6a8cb1ebf674d38ca1e2ce4cee058a80d92
7
- data.tar.gz: f6ff4b31811422876494db2196ca7f43cb581ffddae49fa7bc9078d8506fc53e62ee6241e2a14259aba82e3a1a06d972ab2cb86eb22de4c6e4b1ba7e8cd40208
6
+ metadata.gz: 580e73c2a36573b6552f307b9d8187b94691d74810ce72729dc951b0581fae5de294e5a1a0e7077dc75dd051995f77ba16bc94fd8f773f49aac6e0ac06d4d066
7
+ data.tar.gz: 11b7f9f0133306c0afbda128e2c09c6696f951cf0d80c009f5dc0fba4559c92894557ac5fe7d9b12dcf6a6365a274f38c7e80eb272cc4c9882feabb2b86ae98b
@@ -1,5 +1,5 @@
1
- # From https://github.com/threadhead/prawn-js/
2
- # by James Healy and Karl Smith under the MIT license.
1
+ # From https://github.com/jlee42/prawn-js/blob/master/lib/prawn/js.rb
2
+ # by James Healy, Karl Smith and Jeffrey Lee under the MIT license.
3
3
 
4
4
  module Prawn
5
5
  module Print
@@ -24,7 +24,15 @@ module Prawn
24
24
  # See section 3.6.3 and table 3.28 in the PDF spec.
25
25
  #
26
26
  def javascript
27
- names.data[:JavaScript] ||= ref!(Prawn::Core::NameTree::Node.new(self, NAME_TREE_CHILDREN_LIMIT))
27
+ if defined? Prawn::NameTree
28
+ names.data[:JavaScript] ||= ref!(Prawn::NameTree::Node.new(self, NAME_TREE_CHILDREN_LIMIT))
29
+ elsif defined? Prawn::Core
30
+ names.data[:JavaScript] ||= ref!(Prawn::Core::NameTree::Node.new(self, NAME_TREE_CHILDREN_LIMIT))
31
+ elsif defined? PDF::Core::NameTree
32
+ names.data[:JavaScript] ||= ref!(PDF::Core::NameTree::Node.new(self, NAME_TREE_CHILDREN_LIMIT))
33
+ else
34
+ raise "Can't find Prawn's NameTree!"
35
+ end
28
36
  end
29
37
 
30
38
  end
@@ -1,5 +1,5 @@
1
1
  module Prawn
2
2
  module Print
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prawn-print
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henrik Nyh