mack-distributed 0.8.2 → 0.8.3
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.
File without changes
|
@@ -990,7 +990,8 @@ module Addressable
|
|
990
990
|
end
|
991
991
|
if ![String, ::Addressable::URI].include?(returning)
|
992
992
|
raise TypeError,
|
993
|
-
"Expected String or Addressable::URI,
|
993
|
+
"Expected Class (String or Addressable::URI), " +
|
994
|
+
"got #{returning.inspect}"
|
994
995
|
end
|
995
996
|
result = uri.to_str.gsub(/%[0-9a-f]{2}/i) do |sequence|
|
996
997
|
sequence[1..3].to_i(16).chr
|
@@ -1030,7 +1031,8 @@ module Addressable
|
|
1030
1031
|
end
|
1031
1032
|
if ![String, ::Addressable::URI].include?(returning)
|
1032
1033
|
raise TypeError,
|
1033
|
-
"Expected String or Addressable::URI,
|
1034
|
+
"Expected Class (String or Addressable::URI), " +
|
1035
|
+
"got #{returning.inspect}"
|
1034
1036
|
end
|
1035
1037
|
uri_object = uri.kind_of?(self) ? uri : self.parse(uri.to_str)
|
1036
1038
|
encoded_uri = Addressable::URI.new(
|
@@ -1077,7 +1079,8 @@ module Addressable
|
|
1077
1079
|
end
|
1078
1080
|
if ![String, ::Addressable::URI].include?(returning)
|
1079
1081
|
raise TypeError,
|
1080
|
-
"Expected String or Addressable::URI,
|
1082
|
+
"Expected Class (String or Addressable::URI), " +
|
1083
|
+
"got #{returning.inspect}"
|
1081
1084
|
end
|
1082
1085
|
uri_object = uri.kind_of?(self) ? uri : self.parse(uri.to_str)
|
1083
1086
|
components = {
|
@@ -1099,9 +1102,9 @@ module Addressable
|
|
1099
1102
|
:scheme => self.encode_component(components[:scheme],
|
1100
1103
|
Addressable::URI::CharacterClasses::SCHEME),
|
1101
1104
|
:user => self.encode_component(components[:user],
|
1102
|
-
Addressable::URI::CharacterClasses::
|
1105
|
+
Addressable::URI::CharacterClasses::UNRESERVED),
|
1103
1106
|
:password => self.encode_component(components[:password],
|
1104
|
-
Addressable::URI::CharacterClasses::
|
1107
|
+
Addressable::URI::CharacterClasses::UNRESERVED),
|
1105
1108
|
:host => components[:host],
|
1106
1109
|
:port => components[:port],
|
1107
1110
|
:path => self.encode_component(components[:path],
|
@@ -1245,7 +1248,12 @@ module Addressable
|
|
1245
1248
|
if self.scheme =~ /^\s*ssh\+svn\s*$/i
|
1246
1249
|
"svn+ssh"
|
1247
1250
|
else
|
1248
|
-
|
1251
|
+
Addressable::URI.encode_component(
|
1252
|
+
Addressable::IDNA.unicode_normalize_kc(
|
1253
|
+
Addressable::URI.unencode_component(
|
1254
|
+
self.scheme.strip.downcase)),
|
1255
|
+
Addressable::URI::CharacterClasses::SCHEME
|
1256
|
+
)
|
1249
1257
|
end
|
1250
1258
|
else
|
1251
1259
|
nil
|
@@ -1284,7 +1292,11 @@ module Addressable
|
|
1284
1292
|
(!self.password || self.password.strip == "")
|
1285
1293
|
nil
|
1286
1294
|
else
|
1287
|
-
|
1295
|
+
Addressable::URI.encode_component(
|
1296
|
+
Addressable::IDNA.unicode_normalize_kc(
|
1297
|
+
Addressable::URI.unencode_component(self.user.strip)),
|
1298
|
+
Addressable::URI::CharacterClasses::UNRESERVED
|
1299
|
+
)
|
1288
1300
|
end
|
1289
1301
|
else
|
1290
1302
|
nil
|
@@ -1333,7 +1345,11 @@ module Addressable
|
|
1333
1345
|
(!self.user || self.user.strip == "")
|
1334
1346
|
nil
|
1335
1347
|
else
|
1336
|
-
|
1348
|
+
Addressable::URI.encode_component(
|
1349
|
+
Addressable::IDNA.unicode_normalize_kc(
|
1350
|
+
Addressable::URI.unencode_component(self.password.strip)),
|
1351
|
+
Addressable::URI::CharacterClasses::UNRESERVED
|
1352
|
+
)
|
1337
1353
|
end
|
1338
1354
|
else
|
1339
1355
|
nil
|
@@ -1608,6 +1624,9 @@ module Addressable
|
|
1608
1624
|
#
|
1609
1625
|
# @param [String, Integer, #to_s] new_port The new port component.
|
1610
1626
|
def port=(new_port)
|
1627
|
+
if new_port != nil && new_port.respond_to?(:to_str)
|
1628
|
+
new_port = Addressable::URI.unencode_component(new_port.to_str)
|
1629
|
+
end
|
1611
1630
|
if new_port != nil && !(new_port.to_s =~ /^\d+$/)
|
1612
1631
|
raise InvalidURIError,
|
1613
1632
|
"Invalid port number: #{new_port.inspect}"
|
@@ -1659,7 +1678,12 @@ module Addressable
|
|
1659
1678
|
# @return [String] The path component, normalized.
|
1660
1679
|
def normalized_path
|
1661
1680
|
@normalized_path ||= (begin
|
1662
|
-
result =
|
1681
|
+
result = Addressable::URI.encode_component(
|
1682
|
+
Addressable::IDNA.unicode_normalize_kc(
|
1683
|
+
Addressable::URI.unencode_component(self.path.strip)),
|
1684
|
+
Addressable::URI::CharacterClasses::PATH
|
1685
|
+
)
|
1686
|
+
result = self.class.normalize_path(result)
|
1663
1687
|
if result == "" &&
|
1664
1688
|
["http", "https", "ftp", "tftp"].include?(self.normalized_scheme)
|
1665
1689
|
result = "/"
|
@@ -1714,7 +1738,17 @@ module Addressable
|
|
1714
1738
|
#
|
1715
1739
|
# @return [String] The query component, normalized.
|
1716
1740
|
def normalized_query
|
1717
|
-
@normalized_query ||= (
|
1741
|
+
@normalized_query ||= (begin
|
1742
|
+
if self.query
|
1743
|
+
Addressable::URI.encode_component(
|
1744
|
+
Addressable::IDNA.unicode_normalize_kc(
|
1745
|
+
Addressable::URI.unencode_component(self.query.strip)),
|
1746
|
+
Addressable::URI::CharacterClasses::QUERY
|
1747
|
+
)
|
1748
|
+
else
|
1749
|
+
nil
|
1750
|
+
end
|
1751
|
+
end)
|
1718
1752
|
end
|
1719
1753
|
|
1720
1754
|
##
|
@@ -1722,7 +1756,7 @@ module Addressable
|
|
1722
1756
|
#
|
1723
1757
|
# @param [String, #to_str] new_query The new query component.
|
1724
1758
|
def query=(new_query)
|
1725
|
-
@query = new_query.to_str
|
1759
|
+
@query = new_query ? new_query.to_str : nil
|
1726
1760
|
|
1727
1761
|
# Reset dependant values
|
1728
1762
|
@normalized_query = nil
|
@@ -1840,7 +1874,17 @@ module Addressable
|
|
1840
1874
|
#
|
1841
1875
|
# @return [String] The fragment component, normalized.
|
1842
1876
|
def normalized_fragment
|
1843
|
-
@normalized_fragment ||= (
|
1877
|
+
@normalized_fragment ||= (begin
|
1878
|
+
if self.fragment
|
1879
|
+
Addressable::URI.encode_component(
|
1880
|
+
Addressable::IDNA.unicode_normalize_kc(
|
1881
|
+
Addressable::URI.unencode_component(self.fragment.strip)),
|
1882
|
+
Addressable::URI::CharacterClasses::FRAGMENT
|
1883
|
+
)
|
1884
|
+
else
|
1885
|
+
nil
|
1886
|
+
end
|
1887
|
+
end)
|
1844
1888
|
end
|
1845
1889
|
|
1846
1890
|
##
|
@@ -2171,15 +2215,12 @@ module Addressable
|
|
2171
2215
|
end
|
2172
2216
|
end
|
2173
2217
|
|
2174
|
-
return Addressable::URI.
|
2175
|
-
|
2176
|
-
|
2177
|
-
|
2178
|
-
|
2179
|
-
|
2180
|
-
:fragment => normalized_fragment
|
2181
|
-
),
|
2182
|
-
::Addressable::URI
|
2218
|
+
return Addressable::URI.new(
|
2219
|
+
:scheme => normalized_scheme,
|
2220
|
+
:authority => normalized_authority,
|
2221
|
+
:path => normalized_path,
|
2222
|
+
:query => normalized_query,
|
2223
|
+
:fragment => normalized_fragment
|
2183
2224
|
)
|
2184
2225
|
end
|
2185
2226
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mack-distributed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- markbates
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date:
|
12
|
+
date: 2009-01-18 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -20,7 +20,7 @@ dependencies:
|
|
20
20
|
requirements:
|
21
21
|
- - "="
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 0.8.
|
23
|
+
version: 0.8.3
|
24
24
|
version:
|
25
25
|
description: Distributed Application Support for Mack Framework
|
26
26
|
email: mark@mackframework.com
|
@@ -32,12 +32,12 @@ extra_rdoc_files: []
|
|
32
32
|
|
33
33
|
files:
|
34
34
|
- lib/gems
|
35
|
-
- lib/gems/addressable-2.0.
|
36
|
-
- lib/gems/addressable-2.0.
|
37
|
-
- lib/gems/addressable-2.0.
|
38
|
-
- lib/gems/addressable-2.0.
|
39
|
-
- lib/gems/addressable-2.0.
|
40
|
-
- lib/gems/addressable-2.0.
|
35
|
+
- lib/gems/addressable-2.0.1
|
36
|
+
- lib/gems/addressable-2.0.1/lib
|
37
|
+
- lib/gems/addressable-2.0.1/lib/addressable
|
38
|
+
- lib/gems/addressable-2.0.1/lib/addressable/idna.rb
|
39
|
+
- lib/gems/addressable-2.0.1/lib/addressable/uri.rb
|
40
|
+
- lib/gems/addressable-2.0.1/lib/addressable/version.rb
|
41
41
|
- lib/gems/cache
|
42
42
|
- lib/gems/doc
|
43
43
|
- lib/gems/gems
|