qiita 1.0.2 → 1.0.3

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: 556fe90882b3d40ba3e228890d997062e4626e66
4
- data.tar.gz: d2b89caabd5c8f15270af0265fde8783e6ce9e6d
3
+ metadata.gz: c4211a3b9680b3b19ebdfdff075232a5c593daf4
4
+ data.tar.gz: a17deb8975e4705cac7a7e11733d0123dd242d6f
5
5
  SHA512:
6
- metadata.gz: 59f4f2eaa60d43ec1e00223cc748032b164f96cd7be16ed895adb98d9deab426268429305aee45781d5db35fb839722c763e5a0226e49f5eecdf959c37477090
7
- data.tar.gz: f2358ca4572f1d88371f08ed798ba4e50448b9011a77889e9795efc7c330675c15a01f5b4b11082cd04232ce44df0393041803db9c088381f570707b614bb5fa
6
+ metadata.gz: 24408f2e390576142dcf777bf9fae6db4d70607ad6449be92f3d6d22ba4b630fd1b925e2b23742390bdefd06adff96311da357ffe487bab0dd1d710044ce3786
7
+ data.tar.gz: c1775d021c901c07c54c89941e536cdffb1442b6a8c053a1bd69eccd779cf8ec56a40d5cd6799c208ab1f0cb0a7b86a6a0d178526dfa4b5cd74a714026728874
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 1.0.3
2
+ * Escape request URL path
3
+
1
4
  ## 1.0.2
2
5
  * Add a new API: list_item_stockers(item_id)
3
6
 
data/lib/qiita/client.rb CHANGED
@@ -1,3 +1,4 @@
1
+ require "uri"
1
2
  require "qiita/resource_based_methods"
2
3
  require "qiita/version"
3
4
 
@@ -138,7 +139,7 @@ module Qiita
138
139
  Qiita::Response.new(
139
140
  connection.send(
140
141
  request_method,
141
- path,
142
+ URI.escape(path),
142
143
  params,
143
144
  headers,
144
145
  )
data/lib/qiita/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Qiita
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
@@ -251,6 +251,20 @@ describe Qiita::Client do
251
251
  should be_a Qiita::Response
252
252
  end
253
253
  end
254
+
255
+ context "with multibyte path" do
256
+ let(:path) do
257
+ ""
258
+ end
259
+
260
+ let(:requested_url) do
261
+ "https://#{requested_host}#{URI.escape(path)}"
262
+ end
263
+
264
+ it "sends request with escaped path" do
265
+ should be_a Qiita::Response
266
+ end
267
+ end
254
268
  end
255
269
 
256
270
  describe "#post" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qiita
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-10 00:00:00.000000000 Z
11
+ date: 2014-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport