rakuten_web_service 1.4.0 → 1.4.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/CHANGELOG.md +12 -0
- data/lib/rakuten_web_service/client.rb +2 -1
- data/lib/rakuten_web_service/version.rb +1 -1
- data/spec/rakuten_web_service/client_spec.rb +29 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1eb72352ce1d5a3438ff53f83c36beed80fe1c2e
|
4
|
+
data.tar.gz: 6b367c56add033e81ddebafa35ed0c3d6212c2b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59a3290303696eccf35353c7e957e1391bdae96686cfd2b6dde48dae0fd67663587c3b41368fc42b32bf1cc02ea240a442e0bf4cc5565783472938a9f8857303
|
7
|
+
data.tar.gz: caccbdebffb9fcad8ba7fc6f8585a60287ab85af7729cd763e72bae8ccccd5d6d69bcc0e688e42e765cd803c6090f78560dd0f604f6471d95c96419d2204a0d3
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
# v1.4.1 (2016/11/22)
|
2
|
+
|
3
|
+
## Bug Fix
|
4
|
+
|
5
|
+
* Fixed: `WrongParameter` raises when giving any `sort` option to `RakutenWebService::Resource.serch`. [#54](https://github.com/rakuten-ws/rws-ruby-sdk/pull/54)
|
6
|
+
|
7
|
+
## Thanks
|
8
|
+
|
9
|
+
I'm pleased to say thanks to @sho-yamane since he reporeted the bug #53. If he didn't do it, I would find the bug much later.
|
10
|
+
Thanks, @sho-yamane.
|
11
|
+
|
12
|
+
|
1
13
|
# v1.4.0 (2016/11/11)
|
2
14
|
|
3
15
|
## Enhancements
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'uri'
|
2
|
+
require 'cgi'
|
2
3
|
require 'json'
|
3
4
|
require 'rakuten_web_service/response'
|
4
5
|
require 'rakuten_web_service/error'
|
@@ -28,7 +29,7 @@ module RakutenWebService
|
|
28
29
|
def request(path, params)
|
29
30
|
http = Net::HTTP.new(@url.host, @url.port)
|
30
31
|
http.use_ssl = true
|
31
|
-
path = "#{path}?#{params.map { |k, v| "#{k}=#{
|
32
|
+
path = "#{path}?#{params.map { |k, v| "#{k}=#{CGI.escape(v.to_s)}" }.join('&')}"
|
32
33
|
header = {
|
33
34
|
'User-Agent' => "RakutenWebService SDK for Ruby v#{RWS::VERSION}(ruby-#{RUBY_VERSION} [#{RUBY_PLATFORM}])"
|
34
35
|
}
|
@@ -51,6 +51,35 @@ describe RakutenWebService::Client do
|
|
51
51
|
expect(@expected_request).to have_been_made.once
|
52
52
|
end
|
53
53
|
end
|
54
|
+
|
55
|
+
context "giving 'sort' option" do
|
56
|
+
let(:expected_query) do
|
57
|
+
{
|
58
|
+
applicationId: application_id,
|
59
|
+
affiliateId: affiliate_id,
|
60
|
+
sort: sort_option
|
61
|
+
}
|
62
|
+
end
|
63
|
+
|
64
|
+
before do
|
65
|
+
client.get(sort: sort_option)
|
66
|
+
end
|
67
|
+
|
68
|
+
context "Specifying asceding order" do
|
69
|
+
let(:sort_option) { '+itemPrice' }
|
70
|
+
|
71
|
+
specify "encodes '+' in sort option" do
|
72
|
+
expect(@expected_request).to have_been_made.once
|
73
|
+
end
|
74
|
+
end
|
75
|
+
context "Specifying descending order" do
|
76
|
+
let(:sort_option) { '-itemPrice' }
|
77
|
+
|
78
|
+
specify "encodes '+' in sort option" do
|
79
|
+
expect(@expected_request).to have_been_made.once
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
54
83
|
end
|
55
84
|
|
56
85
|
describe 'about exceptions' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rakuten_web_service
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tatsuya Sato
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -206,7 +206,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
206
206
|
version: '0'
|
207
207
|
requirements: []
|
208
208
|
rubyforge_project:
|
209
|
-
rubygems_version: 2.5.
|
209
|
+
rubygems_version: 2.5.2
|
210
210
|
signing_key:
|
211
211
|
specification_version: 4
|
212
212
|
summary: Ruby Client for Rakuten Web Service
|