kamu-wang 0.02 → 0.03
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.
- data/lib/wang.rb +2 -2
- data/wang.gemspec +1 -1
- metadata +3 -3
data/lib/wang.rb
CHANGED
@@ -422,14 +422,14 @@ module WANG
|
|
422
422
|
module Utils
|
423
423
|
# URL-encode a string.
|
424
424
|
def self.escape string
|
425
|
-
string.gsub(/([^ a-zA-Z0-9_.-]+)/n) do
|
425
|
+
string.to_s.gsub(/([^ a-zA-Z0-9_.-]+)/n) do
|
426
426
|
'%' + $1.unpack('H2' * $1.size).join('%').upcase
|
427
427
|
end.tr(' ', '+')
|
428
428
|
end
|
429
429
|
|
430
430
|
# URL-decode a string.
|
431
431
|
def self.unescape string
|
432
|
-
string.tr('+', ' ').gsub(/((?:%[0-9a-fA-F]{2})+)/n) do
|
432
|
+
string.to_s.tr('+', ' ').gsub(/((?:%[0-9a-fA-F]{2})+)/n) do
|
433
433
|
[$1.delete('%')].pack('H*')
|
434
434
|
end
|
435
435
|
end
|
data/wang.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kamu-wang
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: "0.
|
4
|
+
version: "0.03"
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kamu
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2008-
|
13
|
+
date: 2008-07-08 00:00:00 -07:00
|
14
14
|
default_executable:
|
15
15
|
dependencies: []
|
16
16
|
|
@@ -51,7 +51,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
52
52
|
- none
|
53
53
|
rubyforge_project:
|
54
|
-
rubygems_version: 1.0
|
54
|
+
rubygems_version: 1.2.0
|
55
55
|
signing_key:
|
56
56
|
specification_version: 2
|
57
57
|
summary: Web Access with No Grief.
|