doc_juan 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/doc_juan/url_helper.rb +1 -1
- data/lib/doc_juan/version.rb +1 -1
- data/spec/token_spec.rb +2 -2
- data/spec/url_helper_spec.rb +1 -1
- metadata +2 -2
data/lib/doc_juan/url_helper.rb
CHANGED
@@ -2,6 +2,6 @@ require_relative 'url_generator'
|
|
2
2
|
|
3
3
|
module DocJuan
|
4
4
|
def self.url url, filename, options = {}
|
5
|
-
UrlGenerator.new(url, filename, options.delete(:format), options).generate
|
5
|
+
UrlGenerator.new(url, filename, options.delete(:format) { 'pdf' }, options).generate
|
6
6
|
end
|
7
7
|
end
|
data/lib/doc_juan/version.rb
CHANGED
data/spec/token_spec.rb
CHANGED
@@ -22,14 +22,14 @@ describe DocJuan::Token do
|
|
22
22
|
end
|
23
23
|
|
24
24
|
it 'calculates the public key' do
|
25
|
-
subject.key.must_equal '
|
25
|
+
subject.key.must_equal '85906324d44df6d6309ad2a268841b8e127baf0c'
|
26
26
|
end
|
27
27
|
|
28
28
|
it 'calculates the public key with no options given' do
|
29
29
|
url_generator = stub url: 'http://example.com', filename: 'file', format: 'pdf', options: {}
|
30
30
|
token = DocJuan::Token.new(url_generator)
|
31
31
|
|
32
|
-
token.key.must_equal '
|
32
|
+
token.key.must_equal '2fb616f00c7986e1d4ee31a2046f422640f35e2a'
|
33
33
|
end
|
34
34
|
|
35
35
|
it 'has the secret key' do
|
data/spec/url_helper_spec.rb
CHANGED
@@ -13,7 +13,7 @@ describe 'DocJuan#url' do
|
|
13
13
|
generator = stub
|
14
14
|
generator.expects(:generate).returns 'generated-url'
|
15
15
|
DocJuan::UrlGenerator.expects(:new).
|
16
|
-
with('http://example.com', 'the_file',
|
16
|
+
with('http://example.com', 'the_file', 'pdf', size: 'A4').
|
17
17
|
returns(generator)
|
18
18
|
|
19
19
|
url = DocJuan.url 'http://example.com', 'the_file', size: 'A4'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: doc_juan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-10-05 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: A small helper class to generate urls to a Doc-Juan instance
|
15
15
|
email:
|