cloudprint 0.3.1 → 0.3.2
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.
- checksums.yaml +4 -4
- data/lib/cloudprint/connection.rb +4 -6
- data/lib/cloudprint/version.rb +1 -1
- data/test/connection_test.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 30d1e64ab2141fea3831325ef8bbd97a1eef1981
|
4
|
+
data.tar.gz: deec16fec77660a2745f10c24cf12930c893a02d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c7e55df00f612b8f8954755310f7eb101ba0019a735d3dd284a6911d4a526e6fe2f25aef2e7bb02da8c5d8feffa7b2c8de6f9e16320507ddf30ef2f9073016b
|
7
|
+
data.tar.gz: 2c845328675320f26d317c2246e5d5b759d8de702ceb3481dad245fb559c4a4ea21bb0a4d2ddbbd34ee080d96c1cb54ceea375dee07e164de9d5bf409737d383
|
@@ -64,7 +64,7 @@ module CloudPrint
|
|
64
64
|
req.set_form_data(options[:params])
|
65
65
|
req
|
66
66
|
else
|
67
|
-
req = Net::HTTP::Get.new(build_get_uri(uri
|
67
|
+
req = Net::HTTP::Get.new(build_get_uri(uri, options[:params]))
|
68
68
|
end
|
69
69
|
|
70
70
|
set_request_headers(request)
|
@@ -77,11 +77,9 @@ module CloudPrint
|
|
77
77
|
end
|
78
78
|
|
79
79
|
def build_get_uri(uri, params = {})
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
escaped_params = "?#{escaped_params}" unless escaped_params.empty?
|
84
|
-
uri + escaped_params
|
80
|
+
uri = uri.dup
|
81
|
+
uri.query = params.any? ? URI.encode_www_form(params) : nil
|
82
|
+
uri.request_uri
|
85
83
|
end
|
86
84
|
|
87
85
|
def build_http_connection(uri)
|
data/lib/cloudprint/version.rb
CHANGED
data/test/connection_test.rb
CHANGED
@@ -59,7 +59,7 @@ class ConnectionTest < Minitest::Test
|
|
59
59
|
stub
|
60
60
|
|
61
61
|
params = { :text => 'ohai world' }
|
62
|
-
Net::HTTP::Get.expects(:new).with("/cloudprint/submit?text=ohai
|
62
|
+
Net::HTTP::Get.expects(:new).with("/cloudprint/submit?text=ohai+world").returns(mock_http)
|
63
63
|
@connection.get('/submit', params)
|
64
64
|
end
|
65
65
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cloudprint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eugen Minciu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oauth2
|
@@ -147,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
147
147
|
version: '0'
|
148
148
|
requirements: []
|
149
149
|
rubyforge_project: cloudprint
|
150
|
-
rubygems_version: 2.
|
150
|
+
rubygems_version: 2.4.6
|
151
151
|
signing_key:
|
152
152
|
specification_version: 4
|
153
153
|
summary: This library provides a Ruby interface to Google Cloud Print.
|
@@ -158,4 +158,3 @@ test_files:
|
|
158
158
|
- test/helper.rb
|
159
159
|
- test/print_job_test.rb
|
160
160
|
- test/printer_test.rb
|
161
|
-
has_rdoc:
|