recombee_api_client 1.2.4 → 1.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/recombee_api_client/version.rb +1 -1
- data/lib/recombee_api_client.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 145eebad2d16e9ad8f18f536e320bfb939b999ea
|
4
|
+
data.tar.gz: 0a5c6e15949e9c08edf66636d6f03b8c016d4c0a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12672abed97069ade812ece12f3470361d3b88bc69ad3cde3703a4d7db2a95a8663aab19275061f3cded1b92c68cea68320567d3afaab64ce8c72a1a91b72042
|
7
|
+
data.tar.gz: 4f3f4b700570f66eb8b71637a7c52687b605338fd60e572323542aacc4abb66657bfa609d6947a7940cdb2f1378ed0a79e43499ffbb2cb4309b1c4dca524c9c6
|
data/lib/recombee_api_client.rb
CHANGED
@@ -6,6 +6,7 @@ require 'json'
|
|
6
6
|
require 'open-uri'
|
7
7
|
require 'net/https'
|
8
8
|
require 'timeout'
|
9
|
+
require 'cgi'
|
9
10
|
|
10
11
|
require 'recombee_api_client/errors'
|
11
12
|
Gem.find_files('recombee_api_client/api/*.rb').each { |path| require path }
|
@@ -97,7 +98,6 @@ module RecombeeApiClient
|
|
97
98
|
uri = request.path
|
98
99
|
uri.slice! ('/{databaseId}/')
|
99
100
|
uri += query_parameters_to_url(request)
|
100
|
-
uri = URI.escape uri
|
101
101
|
uri
|
102
102
|
end
|
103
103
|
|
@@ -111,8 +111,8 @@ module RecombeeApiClient
|
|
111
111
|
end
|
112
112
|
|
113
113
|
def format_query_parameter_value(value)
|
114
|
-
return value unless value.kind_of?(Array)
|
115
|
-
value.join(',')
|
114
|
+
return CGI::escape("#{value}") unless value.kind_of?(Array)
|
115
|
+
value.map{|v| CGI::escape("#{v}")}.join(',')
|
116
116
|
end
|
117
117
|
|
118
118
|
# Sign request with HMAC, request URI must be exacly the same
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: recombee_api_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ondřej Fiedler
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|