yohoushi-client 0.0.1 → 0.0.2

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: 54873f9cbb996e8f68580ca1cd876a325397b466
4
- data.tar.gz: 1e19703153e7b8f2b79f96b9b2c9bae76a48f187
3
+ metadata.gz: c0c047bef08b8a6fa97efbd17467d4771a0b2aba
4
+ data.tar.gz: faa3d7f09cc7519c581a342900c13ebf826cb5e7
5
5
  SHA512:
6
- metadata.gz: 3b45495fabcb9db59a96580614f0eb84093459f8b1392c850799863b8c1cc6ea7445ab94ef056f39577d5e39f309d6fcd5674e9586be7fb255157cd99709175c
7
- data.tar.gz: 6b72cfd2cc77fa1574ae452eca3cc39b6f01345405c45338c4e359bd3f5bab6d369a00ca7222a3a6c5374c8825179cf937bfa229f10fb89c047ee4daefa2b7a6
6
+ metadata.gz: 3b5bc6aad7c0a125e47f0901d55945ea3968de6b23dea603db734cc9f3fe7138d895a8dbbf5bbefa305adbe5776caeb4c665f8259becb14835af8bf79445696d
7
+ data.tar.gz: bc45269c1e2143ebeca864b49ea0a387825959f03546f0cd4051bde8d57d3b90249ad25e14a2b281ce29f1edc492ba694a44a5ed1b241c11de2b7d085127392a
@@ -1,3 +1,10 @@
1
+ # 0.0.2 (2013/08/29)
2
+
3
+ Enhancement:
4
+
5
+ * lstrip / from the given path
6
+
1
7
  # 0.0.1 (2013/08/29)
2
8
 
3
9
  Initial Release
10
+
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.1
1
+ 0.0.2
@@ -123,7 +123,11 @@ module Yohoushi
123
123
  private
124
124
 
125
125
  def escape(str)
126
- URI.escape(str) if str
126
+ URI.escape(lstrip(str, "/")) if str
127
+ end
128
+
129
+ def lstrip(string, substring)
130
+ string.index(substring) == 0 ? string[substring.size..-1] : string
127
131
  end
128
132
 
129
133
  def handle_error(res)
@@ -1,6 +1,10 @@
1
1
  module Yohoushi::SpecHelper
2
2
  def escape(str)
3
- URI.escape(str) if str
3
+ URI.escape(lstrip(str, "/")) if str
4
+ end
5
+
6
+ def lstrip(string, substring)
7
+ string.index(substring) == 0 ? string[substring.size..-1] : string
4
8
  end
5
9
 
6
10
  def base_uri
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yohoushi-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Naotoshi Seo