pdfkit 0.4.4 → 0.4.5

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.

data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.4
1
+ 0.4.5
@@ -42,7 +42,7 @@ class PDFKit
42
42
  # Host with protocol
43
43
  root = env['rack.url_scheme'] + "://" + env['HTTP_HOST'] + "/"
44
44
 
45
- body.gsub!(/(href|src)=['"]\/([^\"']*|[^"']*)['"]/,'\1="'+root+'\2"')
45
+ body.gsub!(/(href|src)=(['"])\/([^\"']*|[^"']*)['"]/,'\1=\2'+root+'\3\2')
46
46
 
47
47
  return body
48
48
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{pdfkit}
8
- s.version = "0.4.4"
8
+ s.version = "0.4.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["jdpace"]
12
- s.date = %q{2010-08-20}
12
+ s.date = %q{2010-08-24}
13
13
  s.default_executable = %q{pdfkit}
14
14
  s.description = %q{Uses wkhtmltopdf to create PDFs using HTML}
15
15
  s.email = %q{jared@codewordstudios.com}
@@ -9,9 +9,9 @@ describe PDFKit::Middleware do
9
9
  end
10
10
 
11
11
  it "should correctly parse relative url with single quotes" do
12
- @body = %{<html><head><link href='/stylesheets/application.css' media='screen' rel='stylesheet' type='text/css' /></head><body><img alt='test' src='/test.png' /></body></html>}
12
+ @body = %{<html><head><link href='/stylesheets/application.css' media='screen' rel='stylesheet' type='text/css' /></head><body><img alt='test' src="/test.png" /></body></html>}
13
13
  body = @pdf.send :translate_paths, @body, @env
14
- body.should == "<html><head><link href=\"http://example.com/stylesheets/application.css\" media='screen' rel='stylesheet' type='text/css' /></head><body><img alt='test' src=\"http://example.com/test.png\" /></body></html>"
14
+ body.should == "<html><head><link href='http://example.com/stylesheets/application.css' media='screen' rel='stylesheet' type='text/css' /></head><body><img alt='test' src=\"http://example.com/test.png\" /></body></html>"
15
15
  end
16
16
 
17
17
  it "should correctly parse relative url with double quotes" do
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pdfkit
3
3
  version: !ruby/object:Gem::Version
4
- hash: 7
4
+ hash: 5
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 4
10
- version: 0.4.4
9
+ - 5
10
+ version: 0.4.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - jdpace
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-08-20 00:00:00 -04:00
18
+ date: 2010-08-24 00:00:00 -04:00
19
19
  default_executable: pdfkit
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency