groupdocs 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -43,28 +43,31 @@ module GroupDocs
|
|
43
43
|
|
44
44
|
#
|
45
45
|
# Prepares, signs and returns absolute URL.
|
46
|
+
#
|
47
|
+
# It performs the following actions step by step:
|
48
|
+
# * Parses path (i.e. replaces client ID)
|
49
|
+
# * URL encodes path
|
50
|
+
# * Signs URL
|
51
|
+
#
|
46
52
|
# @return [String]
|
47
53
|
#
|
48
54
|
def prepare_and_sign_url
|
49
55
|
unless @signed
|
50
56
|
parse_path
|
51
|
-
prepend_version
|
52
57
|
url_encode_path
|
53
58
|
sign_url
|
54
59
|
@signed = true
|
55
60
|
end
|
56
61
|
|
57
|
-
|
62
|
+
options[:path]
|
58
63
|
end
|
59
64
|
|
60
65
|
#
|
61
66
|
# Executes API request to server.
|
62
67
|
#
|
63
68
|
# It performs the following actions step by step:
|
64
|
-
# * Parses path (i.e. replaces client ID)
|
65
69
|
# * Prepends path with version if it's set
|
66
|
-
# *
|
67
|
-
# * Signs URL
|
70
|
+
# * Prepares and signs URL
|
68
71
|
# * Prepare request (add headers, converts payload to JSON, etc.)
|
69
72
|
# * Sends request to server
|
70
73
|
# * Parses response
|
@@ -72,6 +75,7 @@ module GroupDocs
|
|
72
75
|
# @return [Hash, String] Parsed response
|
73
76
|
#
|
74
77
|
def execute!
|
78
|
+
prepend_version
|
75
79
|
prepare_and_sign_url
|
76
80
|
prepare_request
|
77
81
|
send_request
|
data/lib/groupdocs/version.rb
CHANGED
@@ -41,11 +41,6 @@ describe GroupDocs::Api::Request do
|
|
41
41
|
subject.prepare_and_sign_url
|
42
42
|
end
|
43
43
|
|
44
|
-
it 'prepends path with version' do
|
45
|
-
subject.should_receive(:prepend_version)
|
46
|
-
subject.prepare_and_sign_url
|
47
|
-
end
|
48
|
-
|
49
44
|
it 'URL encodes path' do
|
50
45
|
subject.should_receive(:url_encode_path)
|
51
46
|
subject.prepare_and_sign_url
|
@@ -74,6 +69,11 @@ describe GroupDocs::Api::Request do
|
|
74
69
|
mock_api_server('{"status":"Ok"}')
|
75
70
|
end
|
76
71
|
|
72
|
+
it 'prepends path with version' do
|
73
|
+
subject.should_receive(:prepend_version)
|
74
|
+
subject.execute!
|
75
|
+
end
|
76
|
+
|
77
77
|
it 'prepares and signs url' do
|
78
78
|
subject.should_receive(:prepare_and_sign_url)
|
79
79
|
subject.execute!
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: groupdocs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -422,7 +422,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
422
422
|
version: '0'
|
423
423
|
segments:
|
424
424
|
- 0
|
425
|
-
hash: -
|
425
|
+
hash: -621879364264010468
|
426
426
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
427
427
|
none: false
|
428
428
|
requirements:
|
@@ -431,7 +431,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
431
431
|
version: '0'
|
432
432
|
segments:
|
433
433
|
- 0
|
434
|
-
hash: -
|
434
|
+
hash: -621879364264010468
|
435
435
|
requirements: []
|
436
436
|
rubyforge_project:
|
437
437
|
rubygems_version: 1.8.24
|