image_monger_client 0.0.8 → 0.0.9

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,29 +2,31 @@ require 'net/http'
2
2
  require 'json'
3
3
  require 'cgi'
4
4
 
5
- class ImageMongerClient::Client
5
+ module ImageMongerClient
6
+ class ImageMongerClient::Client
6
7
 
7
- attr_reader :pdf_url
8
+ attr_reader :pdf_url
8
9
 
9
- def initialize(pdf_url)
10
- @pdf_url = pdf_url
11
- end
10
+ def initialize(pdf_url)
11
+ @pdf_url = pdf_url
12
+ end
12
13
 
13
- def pages_as_image_urls
14
- JSON.parse(converter_response.body)
15
- end
14
+ def pages_as_image_urls
15
+ JSON.parse(converter_response.body)
16
+ end
16
17
 
17
- private
18
+ private
18
19
 
19
- def converter_response
20
- Net::HTTP.get_response(URI(converter_url))
21
- end
20
+ def converter_response
21
+ Net::HTTP.get_response(URI(converter_url))
22
+ end
22
23
 
23
- def converter_url
24
- "#{"http://imagemonger.lokalebasen.dk/pdf"}/#{encoded_pdf_url}/menu"
25
- end
24
+ def converter_url
25
+ "#{"http://imagemonger.lokalebasen.dk/pdf"}/#{encoded_pdf_url}/menu"
26
+ end
26
27
 
27
- def encoded_pdf_url
28
- CGI.escape(pdf_url)
28
+ def encoded_pdf_url
29
+ CGI.escape(pdf_url)
30
+ end
29
31
  end
30
32
  end
@@ -1,3 +1,3 @@
1
1
  module ImageMongerClient
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
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.8
4
+ version: 0.0.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: