image_monger_client 0.0.11 → 0.0.12

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module ImageMongerClient
2
- VERSION = "0.0.11"
2
+ VERSION = "0.0.12"
3
3
  end
@@ -0,0 +1,28 @@
1
+ require 'spec_helper'
2
+
3
+ describe ImageMongerClient::PdfService do
4
+
5
+ let(:pdf_service) { ImageMongerClient::PdfService.new('url') }
6
+
7
+ describe "#split" do
8
+
9
+ let(:url_1) {
10
+ "http://imagemonger.lokalebasen.dk/pdf/http%3A%2F%2Fwww.page.pdf/1"
11
+ }
12
+ let(:url_2) {
13
+ "http://imagemonger.lokalebasen.dk/pdf/http%3A%2F%2Fwww.page.pdf/2"
14
+ }
15
+ let(:url_list_string) { "[\"#{url_1}\", \"#{url_2}\"]" }
16
+ let(:url_list) { [url_1, url_2] }
17
+ let(:converter_response) { double('converter_response', body: url_list_string) }
18
+
19
+ before(:each) do
20
+ Net::HTTP.stub(:get_response) {converter_response}
21
+ CGI.stub(:escape) {'encoded_url'}
22
+ end
23
+
24
+ it "returns list of urls" do
25
+ pdf_service.pages_as_image_urls.should eq(url_list)
26
+ end
27
+ end
28
+ end
@@ -0,0 +1 @@
1
+ require 'image_monger_client'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: image_monger_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
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: 2013-10-20 00:00:00.000000000 Z
12
+ date: 2013-10-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -75,6 +75,8 @@ files:
75
75
  - lib/image_monger_client.rb
76
76
  - lib/image_monger_client/pdf_service.rb
77
77
  - lib/image_monger_client/version.rb
78
+ - spec/lib/pdf_service_spec.rb
79
+ - spec/spec_helper.rb
78
80
  homepage: ''
79
81
  licenses:
80
82
  - MIT