doc_juan 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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
@@ -1,3 +1,3 @@
1
1
  module DocJuan
2
- VERSION = "1.2.0"
2
+ VERSION = "1.2.1"
3
3
  end
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 'b55142f9fdb148e8844e37e064e8eb2af6aabac6'
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 '539ebb1f6cd3fec40591acdc756e9b047e7093b3'
32
+ token.key.must_equal '2fb616f00c7986e1d4ee31a2046f422640f35e2a'
33
33
  end
34
34
 
35
35
  it 'has the secret key' do
@@ -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', nil, size: 'A4').
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.0
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-09-26 00:00:00.000000000 Z
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: