pdfkit 0.6.1 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of pdfkit might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 764756275a1f0ec235f57ed6a3cb5f5e5e6055b6
4
- data.tar.gz: 2047827224d1f92c618e98cd84b851e336eec86f
3
+ metadata.gz: 048ce8fc28094271f811791bb5df9a3e3a43d554
4
+ data.tar.gz: 6875a66817930100a7e34ddc20797415d9882af7
5
5
  SHA512:
6
- metadata.gz: aa15b3d4424bba3c20424d3fb4427237d6373d162fce9ebc7b634bfdd24a012472de8f65b7e0ac09416117baba4269a4627e489dbafc436610514282c9e49f82
7
- data.tar.gz: e83aaee209a65b4826c25daceae3023464e41b7a1361c130c213c4dd86e3c66730ea8878b49a87efc93d0c9d0166913a310db57c4d095bca0bb3fd238afaf247
6
+ metadata.gz: bbfda59e38109cbb5191c602e788a6179121bd2fbd65b6ac4cff153afc219ee1ea99a74ac2612ec251834cfa1c34af8078a11ab61822dd9eb0b5f9df8bfbeffc
7
+ data.tar.gz: fdd6f50e21b9abbacaa93f93eaf7cd705bc2c7db1be207d57b2683f02c8c2a8afc08576e39de8a934100ca9504dfefc7c6cecff2e97b6f23016ec3a4b9eb2b73
@@ -1,3 +1,10 @@
1
+ 2014-04-20
2
+ ==================
3
+ * Bump to 0.6.2
4
+ * There was a bug where parsing meta tags would include the option name
5
+ causing an invalid command to be generated. This was fixed in #229 after
6
+ being reported by Frank Oxener.
7
+
1
8
  2014-02-18
2
9
  ==================
3
10
  * Bump to 0.6.0
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pdfkit (0.6.1)
4
+ pdfkit (0.6.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -93,7 +93,7 @@ class PDFKit
93
93
  content.scan(/<meta [^>]*>/) do |meta|
94
94
  if meta.match(/name=["']#{PDFKit.configuration.meta_tag_prefix}/)
95
95
  name = meta.scan(/name=["']#{PDFKit.configuration.meta_tag_prefix}([^"']*)/)[0][0].split
96
- found[name] = meta.scan(/content=["'](.*[^\\])["']/)[0][0]
96
+ found[name] = meta.scan(/content=["']([^"'\\]+)["']/)[0][0]
97
97
  end
98
98
  end
99
99
 
@@ -1,3 +1,3 @@
1
1
  class PDFKit
2
- VERSION = "0.6.1"
2
+ VERSION = "0.6.2"
3
3
  end
@@ -167,6 +167,20 @@ describe PDFKit do
167
167
  command.should_not include "--disable-smart-shrinking true"
168
168
  end
169
169
 
170
+ it "should detect names with hyphens instead of underscores" do
171
+ body = %{
172
+ <html>
173
+ <head>
174
+ <meta content='Portrait' name='pdfkit-orientation'/>
175
+ <meta content="10mm" name="pdfkit-margin-bottom"/>
176
+ </head>
177
+ <br>
178
+ </html>
179
+ }
180
+ pdfkit = PDFKit.new(body)
181
+ pdfkit.command.should_not include 'name\='
182
+ end
183
+
170
184
  it "should detect special pdfkit meta tags despite bad markup" do
171
185
  body = %{
172
186
  <html>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pdfkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jared Pace
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-02-19 00:00:00.000000000 Z
12
+ date: 2014-03-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport