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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 17d6a7825b4bba71ad05144caad47d98a432b28e
4
- data.tar.gz: 803129864feb2fc131d29462b75cc98e70daa067
3
+ metadata.gz: 145eebad2d16e9ad8f18f536e320bfb939b999ea
4
+ data.tar.gz: 0a5c6e15949e9c08edf66636d6f03b8c016d4c0a
5
5
  SHA512:
6
- metadata.gz: ed389b1a6505496ec54b85c73b1df3edb0f1945d8f1ed6e5f6497b55d474bba0d9b083e17c67910ece54204c8e5e7c38a1f6121d6c66fd2b46beb411567900de
7
- data.tar.gz: a76c55ece6640210d6e117f9ba9ca39100719219dc09bad88ac5da774ca9982abde69f0bf5294dbbcbe817e406c5bc8dc93fb8a8b2eccbaa6c007d34e0e92f6b
6
+ metadata.gz: 12672abed97069ade812ece12f3470361d3b88bc69ad3cde3703a4d7db2a95a8663aab19275061f3cded1b92c68cea68320567d3afaab64ce8c72a1a91b72042
7
+ data.tar.gz: 4f3f4b700570f66eb8b71637a7c52687b605338fd60e572323542aacc4abb66657bfa609d6947a7940cdb2f1378ed0a79e43499ffbb2cb4309b1c4dca524c9c6
@@ -1,3 +1,3 @@
1
1
  module RecombeeApiClient
2
- VERSION = '1.2.4'
2
+ VERSION = '1.2.5'
3
3
  end
@@ -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
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-03 00:00:00.000000000 Z
11
+ date: 2016-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json