yaccl 0.1.0 → 0.1.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.
- checksums.yaml +4 -4
- data/lib/yaccl/services/internal/browser_binding_service.rb +12 -4
- data/lib/yaccl/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b8c940fed9d928a9ecfc7f4ac3bd34cbd82e7362
|
|
4
|
+
data.tar.gz: 6d46b47b74d4f7cf5a9818206dfc4361cb56c902
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b14a3c2b5814cbc43a4f0f3c3bb48c094843cdd74c0751c3e303cd280d3a50098e3205be700e36812233e17b9986cd16993c03e62d6e83ecff13e9c3d8be50d4
|
|
7
|
+
data.tar.gz: 74b49b4b8b84924b2f95eb174182203731b14b1cf72d31b9578ec54df1ade267ec01a45d450bf01c745080a0d4c9e813a6106acbd59e58f184c74c0a0b75560f
|
|
@@ -42,9 +42,15 @@ module YACCL
|
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
result = response.body
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
|
|
46
|
+
content_type = if response.respond_to?(:content_type)
|
|
47
|
+
response.content_type
|
|
48
|
+
else
|
|
49
|
+
response.headers['Content-Type']
|
|
47
50
|
end
|
|
51
|
+
|
|
52
|
+
result = MultiJson.load(result, symbolize_keys: true) if content_type =~ /application\/json/
|
|
53
|
+
|
|
48
54
|
unless (200...300).include?(response.code.to_i)
|
|
49
55
|
if result.is_a?(Hash) && result.has_key?(:exception)
|
|
50
56
|
raise CMISRequestError, "#{response.code} -- #{result[:exception]} -- #{result[:message]}"
|
|
@@ -128,7 +134,6 @@ module YACCL
|
|
|
128
134
|
end
|
|
129
135
|
|
|
130
136
|
def get(params)
|
|
131
|
-
|
|
132
137
|
if @@get_cache[params.to_s].nil?
|
|
133
138
|
request = Typhoeus::Request.new(
|
|
134
139
|
params[:url],
|
|
@@ -137,6 +142,7 @@ module YACCL
|
|
|
137
142
|
body: params[:body],
|
|
138
143
|
params: params[:query],
|
|
139
144
|
headers: params[:headers],
|
|
145
|
+
followlocation: true
|
|
140
146
|
)
|
|
141
147
|
request.run
|
|
142
148
|
@@get_cache[params.to_s] = request.run
|
|
@@ -155,12 +161,14 @@ module YACCL
|
|
|
155
161
|
method: :post,
|
|
156
162
|
body: params[:body],
|
|
157
163
|
params: params[:query],
|
|
158
|
-
headers: params[:headers]
|
|
164
|
+
headers: params[:headers]
|
|
159
165
|
)
|
|
160
166
|
request.run
|
|
161
167
|
end
|
|
162
168
|
|
|
163
169
|
def multipart_post(url, options, headers)
|
|
170
|
+
@@get_cache.clear
|
|
171
|
+
|
|
164
172
|
url = URI.parse(url)
|
|
165
173
|
req = Net::HTTP::Post::Multipart.new(url.path, options)
|
|
166
174
|
headers.each {|key, value| req[key] = value }
|
data/lib/yaccl/version.rb
CHANGED