addressable 0.1.1 → 0.1.2

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.
@@ -1,4 +1,4 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
1
+ <?xml version="1.0" encoding="utf-8"?>
2
2
  <!DOCTYPE html
3
3
  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
4
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@@ -6,7 +6,7 @@
6
6
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
7
  <head>
8
8
  <title>Module: Addressable::URI::CharacterClasses</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
9
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10
10
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
11
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
12
12
  <script type="text/javascript">
@@ -1,4 +1,4 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
1
+ <?xml version="1.0" encoding="utf-8"?>
2
2
  <!DOCTYPE html
3
3
  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
4
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@@ -6,7 +6,7 @@
6
6
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
7
  <head>
8
8
  <title>Module: Addressable::URI::IDNA</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
9
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10
10
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
11
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
12
12
  <script type="text/javascript">
@@ -89,8 +89,8 @@ returning nil if libidn can&#8216;t be used.
89
89
  <h3 class="section-bar">Methods</h3>
90
90
 
91
91
  <div class="name-list">
92
- <a href="#M000055">to_ascii</a>&nbsp;&nbsp;
93
- <a href="#M000056">to_unicode</a>&nbsp;&nbsp;
92
+ <a href="#M000057">to_ascii</a>&nbsp;&nbsp;
93
+ <a href="#M000058">to_unicode</a>&nbsp;&nbsp;
94
94
  </div>
95
95
  </div>
96
96
 
@@ -112,11 +112,11 @@ returning nil if libidn can&#8216;t be used.
112
112
  <div id="methods">
113
113
  <h3 class="section-bar">Public Class methods</h3>
114
114
 
115
- <div id="method-M000055" class="method-detail">
116
- <a name="M000055"></a>
115
+ <div id="method-M000057" class="method-detail">
116
+ <a name="M000057"></a>
117
117
 
118
118
  <div class="method-heading">
119
- <a href="#M000055" class="method-signature">
119
+ <a href="#M000057" class="method-signature">
120
120
  <span class="method-name">to_ascii</span><span class="method-args">(label)</span>
121
121
  </a>
122
122
  </div>
@@ -126,30 +126,30 @@ returning nil if libidn can&#8216;t be used.
126
126
  Returns the ascii representation of the label.
127
127
  </p>
128
128
  <p><a class="source-toggle" href="#"
129
- onclick="toggleCode('M000055-source');return false;">[Source]</a></p>
130
- <div class="method-source-code" id="M000055-source">
129
+ onclick="toggleCode('M000057-source');return false;">[Source]</a></p>
130
+ <div class="method-source-code" id="M000057-source">
131
131
  <pre>
132
- <span class="ruby-comment cmt"># File lib/addressable/uri.rb, line 1074</span>
133
- 1074: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_ascii</span>(<span class="ruby-identifier">label</span>)
134
- 1075: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">label</span>.<span class="ruby-identifier">nil?</span>
135
- 1076: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">use_libidn?</span>
136
- 1077: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">IDN</span><span class="ruby-operator">::</span><span class="ruby-constant">Idna</span>.<span class="ruby-identifier">toASCII</span>(<span class="ruby-identifier">label</span>)
137
- 1078: <span class="ruby-keyword kw">else</span>
138
- 1079: <span class="ruby-identifier">raise</span> <span class="ruby-constant">NotImplementedError</span>,
139
- 1080: <span class="ruby-value str">&quot;There is no available pure-ruby implementation. &quot;</span> <span class="ruby-operator">+</span>
140
- 1081: <span class="ruby-value str">&quot;Install libidn bindings.&quot;</span>
141
- 1082: <span class="ruby-keyword kw">end</span>
142
- 1083: <span class="ruby-keyword kw">end</span>
132
+ <span class="ruby-comment cmt"># File lib/addressable/uri.rb, line 1103</span>
133
+ 1103: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_ascii</span>(<span class="ruby-identifier">label</span>)
134
+ 1104: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">label</span>.<span class="ruby-identifier">nil?</span>
135
+ 1105: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">use_libidn?</span>
136
+ 1106: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">IDN</span><span class="ruby-operator">::</span><span class="ruby-constant">Idna</span>.<span class="ruby-identifier">toASCII</span>(<span class="ruby-identifier">label</span>)
137
+ 1107: <span class="ruby-keyword kw">else</span>
138
+ 1108: <span class="ruby-identifier">raise</span> <span class="ruby-constant">NotImplementedError</span>,
139
+ 1109: <span class="ruby-value str">&quot;There is no available pure-ruby implementation. &quot;</span> <span class="ruby-operator">+</span>
140
+ 1110: <span class="ruby-value str">&quot;Install libidn bindings.&quot;</span>
141
+ 1111: <span class="ruby-keyword kw">end</span>
142
+ 1112: <span class="ruby-keyword kw">end</span>
143
143
  </pre>
144
144
  </div>
145
145
  </div>
146
146
  </div>
147
147
 
148
- <div id="method-M000056" class="method-detail">
149
- <a name="M000056"></a>
148
+ <div id="method-M000058" class="method-detail">
149
+ <a name="M000058"></a>
150
150
 
151
151
  <div class="method-heading">
152
- <a href="#M000056" class="method-signature">
152
+ <a href="#M000058" class="method-signature">
153
153
  <span class="method-name">to_unicode</span><span class="method-args">(label)</span>
154
154
  </a>
155
155
  </div>
@@ -159,20 +159,20 @@ Returns the ascii representation of the label.
159
159
  Returns the unicode representation of the label.
160
160
  </p>
161
161
  <p><a class="source-toggle" href="#"
162
- onclick="toggleCode('M000056-source');return false;">[Source]</a></p>
163
- <div class="method-source-code" id="M000056-source">
162
+ onclick="toggleCode('M000058-source');return false;">[Source]</a></p>
163
+ <div class="method-source-code" id="M000058-source">
164
164
  <pre>
165
- <span class="ruby-comment cmt"># File lib/addressable/uri.rb, line 1086</span>
166
- 1086: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_unicode</span>(<span class="ruby-identifier">label</span>)
167
- 1087: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">label</span>.<span class="ruby-identifier">nil?</span>
168
- 1088: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">use_libidn?</span>
169
- 1089: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">IDN</span><span class="ruby-operator">::</span><span class="ruby-constant">Idna</span>.<span class="ruby-identifier">toUnicode</span>(<span class="ruby-identifier">label</span>)
170
- 1090: <span class="ruby-keyword kw">else</span>
171
- 1091: <span class="ruby-identifier">raise</span> <span class="ruby-constant">NotImplementedError</span>,
172
- 1092: <span class="ruby-value str">&quot;There is no available pure-ruby implementation. &quot;</span> <span class="ruby-operator">+</span>
173
- 1093: <span class="ruby-value str">&quot;Install libidn bindings.&quot;</span>
174
- 1094: <span class="ruby-keyword kw">end</span>
175
- 1095: <span class="ruby-keyword kw">end</span>
165
+ <span class="ruby-comment cmt"># File lib/addressable/uri.rb, line 1115</span>
166
+ 1115: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">to_unicode</span>(<span class="ruby-identifier">label</span>)
167
+ 1116: <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">label</span>.<span class="ruby-identifier">nil?</span>
168
+ 1117: <span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">use_libidn?</span>
169
+ 1118: <span class="ruby-keyword kw">return</span> <span class="ruby-constant">IDN</span><span class="ruby-operator">::</span><span class="ruby-constant">Idna</span>.<span class="ruby-identifier">toUnicode</span>(<span class="ruby-identifier">label</span>)
170
+ 1119: <span class="ruby-keyword kw">else</span>
171
+ 1120: <span class="ruby-identifier">raise</span> <span class="ruby-constant">NotImplementedError</span>,
172
+ 1121: <span class="ruby-value str">&quot;There is no available pure-ruby implementation. &quot;</span> <span class="ruby-operator">+</span>
173
+ 1122: <span class="ruby-value str">&quot;Install libidn bindings.&quot;</span>
174
+ 1123: <span class="ruby-keyword kw">end</span>
175
+ 1124: <span class="ruby-keyword kw">end</span>
176
176
  </pre>
177
177
  </div>
178
178
  </div>
@@ -1,4 +1,4 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
1
+ <?xml version="1.0" encoding="utf-8"?>
2
2
  <!DOCTYPE html
3
3
  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
4
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@@ -6,7 +6,7 @@
6
6
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
7
  <head>
8
8
  <title>Class: Addressable::URI::InvalidOptionError</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
9
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10
10
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
11
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
12
12
  <script type="text/javascript">
@@ -1,4 +1,4 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
1
+ <?xml version="1.0" encoding="utf-8"?>
2
2
  <!DOCTYPE html
3
3
  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
4
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@@ -6,7 +6,7 @@
6
6
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
7
  <head>
8
8
  <title>Class: Addressable::URI::InvalidTemplateValue</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
9
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10
10
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
11
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
12
12
  <script type="text/javascript">
@@ -1,4 +1,4 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
1
+ <?xml version="1.0" encoding="utf-8"?>
2
2
  <!DOCTYPE html
3
3
  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
4
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@@ -6,7 +6,7 @@
6
6
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
7
  <head>
8
8
  <title>Class: Addressable::URI::InvalidURIError</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
9
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10
10
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
11
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
12
12
  <script type="text/javascript">
@@ -1 +1 @@
1
- Wed Sep 05 16:05:51 -0400 2007
1
+ Sun Oct 28 17:23:21 -0400 2007
@@ -1,4 +1,4 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
1
+ <?xml version="1.0" encoding="utf-8"?>
2
2
  <!DOCTYPE html
3
3
  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
4
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@@ -6,7 +6,7 @@
6
6
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
7
  <head>
8
8
  <title>File: CHANGELOG</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
9
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10
10
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
11
  <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
12
  <script type="text/javascript">
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Wed Sep 05 13:34:16 -0400 2007</td>
59
+ <td>Sun Oct 28 15:46:06 -0400 2007</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -69,7 +69,13 @@
69
69
  <div id="contextContent">
70
70
 
71
71
  <div id="description">
72
- <h3><a href="../classes/Addressable.html">Addressable</a> 0.1.1</h3>
72
+ <h3><a href="../classes/Addressable.html">Addressable</a> 0.1.2</h3>
73
+ <pre>
74
+ * improved normalization
75
+ * fixed bug in joining algorithm
76
+ * updated specifications
77
+ </pre>
78
+ <h3><a href="../classes/Addressable.html">Addressable</a> 0.1.1</h3>
73
79
  <pre>
74
80
  * updated documentation
75
81
  * added URI Template variable extraction
@@ -1,4 +1,4 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
1
+ <?xml version="1.0" encoding="utf-8"?>
2
2
  <!DOCTYPE html
3
3
  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
4
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@@ -6,7 +6,7 @@
6
6
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
7
  <head>
8
8
  <title>File: LICENSE</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
9
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10
10
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
11
  <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
12
  <script type="text/javascript">
@@ -1,4 +1,4 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
1
+ <?xml version="1.0" encoding="utf-8"?>
2
2
  <!DOCTYPE html
3
3
  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
4
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@@ -6,7 +6,7 @@
6
6
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
7
  <head>
8
8
  <title>File: README</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
9
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10
10
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
11
  <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
12
12
  <script type="text/javascript">
@@ -1,4 +1,4 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
1
+ <?xml version="1.0" encoding="utf-8"?>
2
2
  <!DOCTYPE html
3
3
  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
4
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@@ -6,7 +6,7 @@
6
6
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
7
  <head>
8
8
  <title>File: uri.rb</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
9
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10
10
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
11
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
12
12
  <script type="text/javascript">
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Wed Sep 05 16:01:22 -0400 2007</td>
59
+ <td>Sun Oct 28 17:15:18 -0400 2007</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -1,4 +1,4 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
1
+ <?xml version="1.0" encoding="utf-8"?>
2
2
  <!DOCTYPE html
3
3
  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
4
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@@ -6,7 +6,7 @@
6
6
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
7
  <head>
8
8
  <title>File: version.rb</title>
9
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
9
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
10
10
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
11
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
12
12
  <script type="text/javascript">
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Wed Sep 05 14:18:58 -0400 2007</td>
59
+ <td>Wed Sep 05 19:02:53 -0400 2007</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -1,5 +1,5 @@
1
1
 
2
- <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <?xml version="1.0" encoding="utf-8"?>
3
3
  <!DOCTYPE html
4
4
  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
5
5
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@@ -12,7 +12,7 @@
12
12
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
13
13
  <head>
14
14
  <title>Classes</title>
15
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
15
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
16
16
  <link rel="stylesheet" href="rdoc-style.css" type="text/css" />
17
17
  <base target="docwin" />
18
18
  </head>
@@ -1,5 +1,5 @@
1
1
 
2
- <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <?xml version="1.0" encoding="utf-8"?>
3
3
  <!DOCTYPE html
4
4
  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
5
5
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@@ -12,7 +12,7 @@
12
12
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
13
13
  <head>
14
14
  <title>Files</title>
15
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
15
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
16
16
  <link rel="stylesheet" href="rdoc-style.css" type="text/css" />
17
17
  <base target="docwin" />
18
18
  </head>
@@ -1,5 +1,5 @@
1
1
 
2
- <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <?xml version="1.0" encoding="utf-8"?>
3
3
  <!DOCTYPE html
4
4
  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
5
5
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@@ -12,7 +12,7 @@
12
12
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
13
13
  <head>
14
14
  <title>Methods</title>
15
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
15
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
16
16
  <link rel="stylesheet" href="rdoc-style.css" type="text/css" />
17
17
  <base target="docwin" />
18
18
  </head>
@@ -21,18 +21,18 @@
21
21
  <h1 class="section-bar">Methods</h1>
22
22
  <div id="index-entries">
23
23
  <a href="classes/Addressable/URI.html#M000040">+ (Addressable::URI)</a><br />
24
- <a href="classes/Addressable/URI.html#M000049">== (Addressable::URI)</a><br />
25
- <a href="classes/Addressable/URI.html#M000048">=== (Addressable::URI)</a><br />
24
+ <a href="classes/Addressable/URI.html#M000051">== (Addressable::URI)</a><br />
25
+ <a href="classes/Addressable/URI.html#M000050">=== (Addressable::URI)</a><br />
26
26
  <a href="classes/Addressable/URI.html#M000039">absolute? (Addressable::URI)</a><br />
27
27
  <a href="classes/Addressable/URI.html#M000022">authority (Addressable::URI)</a><br />
28
28
  <a href="classes/Addressable/URI.html#M000023">authority= (Addressable::URI)</a><br />
29
29
  <a href="classes/Addressable/URI.html#M000031">basename (Addressable::URI)</a><br />
30
30
  <a href="classes/Addressable/URI.html#M000002">convert_path (Addressable::URI)</a><br />
31
- <a href="classes/Addressable/URI.html#M000047">display_uri (Addressable::URI)</a><br />
32
- <a href="classes/Addressable/URI.html#M000051">dup (Addressable::URI)</a><br />
31
+ <a href="classes/Addressable/URI.html#M000049">display_uri (Addressable::URI)</a><br />
32
+ <a href="classes/Addressable/URI.html#M000053">dup (Addressable::URI)</a><br />
33
33
  <a href="classes/Addressable/URI.html#M000008">encode (Addressable::URI)</a><br />
34
34
  <a href="classes/Addressable/URI.html#M000006">encode_segment (Addressable::URI)</a><br />
35
- <a href="classes/Addressable/URI.html#M000050">eql? (Addressable::URI)</a><br />
35
+ <a href="classes/Addressable/URI.html#M000052">eql? (Addressable::URI)</a><br />
36
36
  <a href="classes/Addressable/URI.html#M000003">expand_template (Addressable::URI)</a><br />
37
37
  <a href="classes/Addressable/URI.html#M000032">extname (Addressable::URI)</a><br />
38
38
  <a href="classes/Addressable/URI.html#M000010">extract (Addressable::URI)</a><br />
@@ -41,15 +41,17 @@
41
41
  <a href="classes/Addressable/URI.html#M000036">fragment= (Addressable::URI)</a><br />
42
42
  <a href="classes/Addressable/URI.html#M000020">host (Addressable::URI)</a><br />
43
43
  <a href="classes/Addressable/URI.html#M000021">host= (Addressable::URI)</a><br />
44
- <a href="classes/Addressable/URI.html#M000054">inspect (Addressable::URI)</a><br />
44
+ <a href="classes/Addressable/URI.html#M000056">inspect (Addressable::URI)</a><br />
45
45
  <a href="classes/Addressable/URI.html#M000037">ip_based? (Addressable::URI)</a><br />
46
46
  <a href="classes/Addressable/URI.html#M000024">ip_based_schemes (Addressable::URI)</a><br />
47
47
  <a href="classes/Addressable/URI.html#M000005">join (Addressable::URI)</a><br />
48
+ <a href="classes/Addressable/URI.html#M000042">join (Addressable::URI)</a><br />
49
+ <a href="classes/Addressable/URI.html#M000044">join! (Addressable::URI)</a><br />
48
50
  <a href="classes/Addressable/URI.html#M000041">merge (Addressable::URI)</a><br />
49
- <a href="classes/Addressable/URI.html#M000042">merge! (Addressable::URI)</a><br />
51
+ <a href="classes/Addressable/URI.html#M000043">merge! (Addressable::URI)</a><br />
50
52
  <a href="classes/Addressable/URI.html#M000011">new (Addressable::URI)</a><br />
51
- <a href="classes/Addressable/URI.html#M000045">normalize (Addressable::URI)</a><br />
52
- <a href="classes/Addressable/URI.html#M000046">normalize! (Addressable::URI)</a><br />
53
+ <a href="classes/Addressable/URI.html#M000047">normalize (Addressable::URI)</a><br />
54
+ <a href="classes/Addressable/URI.html#M000048">normalize! (Addressable::URI)</a><br />
53
55
  <a href="classes/Addressable/URI.html#M000009">normalized_encode (Addressable::URI)</a><br />
54
56
  <a href="classes/Addressable/URI.html#M000001">parse (Addressable::URI)</a><br />
55
57
  <a href="classes/Addressable/URI.html#M000016">password (Addressable::URI)</a><br />
@@ -61,16 +63,16 @@
61
63
  <a href="classes/Addressable/URI.html#M000033">query (Addressable::URI)</a><br />
62
64
  <a href="classes/Addressable/URI.html#M000034">query= (Addressable::URI)</a><br />
63
65
  <a href="classes/Addressable/URI.html#M000038">relative? (Addressable::URI)</a><br />
64
- <a href="classes/Addressable/URI.html#M000043">route_from (Addressable::URI)</a><br />
65
- <a href="classes/Addressable/URI.html#M000044">route_to (Addressable::URI)</a><br />
66
+ <a href="classes/Addressable/URI.html#M000045">route_from (Addressable::URI)</a><br />
67
+ <a href="classes/Addressable/URI.html#M000046">route_to (Addressable::URI)</a><br />
66
68
  <a href="classes/Addressable/URI.html#M000012">scheme (Addressable::URI)</a><br />
67
69
  <a href="classes/Addressable/URI.html#M000013">scheme= (Addressable::URI)</a><br />
68
70
  <a href="classes/Addressable/URI.html#M000025">scheme_mapping (Addressable::URI)</a><br />
69
71
  <a href="classes/Addressable/URI.html#M000028">specified_port (Addressable::URI)</a><br />
70
- <a href="classes/Addressable/URI/IDNA.html#M000055">to_ascii (Addressable::URI::IDNA)</a><br />
71
- <a href="classes/Addressable/URI.html#M000053">to_h (Addressable::URI)</a><br />
72
- <a href="classes/Addressable/URI.html#M000052">to_s (Addressable::URI)</a><br />
73
- <a href="classes/Addressable/URI/IDNA.html#M000056">to_unicode (Addressable::URI::IDNA)</a><br />
72
+ <a href="classes/Addressable/URI/IDNA.html#M000057">to_ascii (Addressable::URI::IDNA)</a><br />
73
+ <a href="classes/Addressable/URI.html#M000055">to_h (Addressable::URI)</a><br />
74
+ <a href="classes/Addressable/URI.html#M000054">to_s (Addressable::URI)</a><br />
75
+ <a href="classes/Addressable/URI/IDNA.html#M000058">to_unicode (Addressable::URI::IDNA)</a><br />
74
76
  <a href="classes/Addressable/URI.html#M000007">unencode_segment (Addressable::URI)</a><br />
75
77
  <a href="classes/Addressable/URI.html#M000014">user (Addressable::URI)</a><br />
76
78
  <a href="classes/Addressable/URI.html#M000015">user= (Addressable::URI)</a><br />
@@ -1,4 +1,4 @@
1
- <?xml version="1.0" encoding="iso-8859-1"?>
1
+ <?xml version="1.0" encoding="utf-8"?>
2
2
  <!DOCTYPE html
3
3
  PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
4
4
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
@@ -11,7 +11,7 @@
11
11
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
12
12
  <head>
13
13
  <title>Addressable -- URI Implementation</title>
14
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
14
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
15
15
  </head>
16
16
  <frameset rows="20%, 80%">
17
17
  <frameset cols="25%,35%,45%">
@@ -27,7 +27,7 @@ $:.uniq!
27
27
  require 'addressable/version'
28
28
 
29
29
  module Addressable
30
- # This is an implementation of a URI parser based on RFC 3986.
30
+ # This is an implementation of a URI parser based on RFC 3986, 3987.
31
31
  class URI
32
32
  # Raised if something other than a uri is supplied.
33
33
  class InvalidURIError < StandardError
@@ -280,6 +280,7 @@ module Addressable
280
280
  end
281
281
  return mapping
282
282
  else
283
+ # Pattern failed to match URI.
283
284
  return nil
284
285
  end
285
286
  end
@@ -790,9 +791,25 @@ module Addressable
790
791
  if uri.path[0..0] == "/"
791
792
  joined_path = self.class.normalize_path(uri.path)
792
793
  else
793
- base_path = self.path.nil? ? "" : self.path.dup
794
+ base_path = self.path.dup
795
+ base_path = "" if base_path == nil
794
796
  base_path = self.class.normalize_path(base_path)
795
- base_path.gsub!(/\/[^\/]+$/, "/")
797
+
798
+ # Section 5.2.3 of RFC 3986
799
+ #
800
+ # Removes the right-most path segment from the base path.
801
+ if base_path =~ /\//
802
+ base_path.gsub!(/\/[^\/]+$/, "/")
803
+ else
804
+ base_path = ""
805
+ end
806
+
807
+ # If the base path is empty and an authority segment has been
808
+ # defined, use a base path of "/"
809
+ if base_path == "" && self.authority != nil
810
+ base_path = "/"
811
+ end
812
+
796
813
  joined_path = self.class.normalize_path(base_path + uri.path)
797
814
  end
798
815
  joined_query = uri.query
@@ -822,11 +839,13 @@ module Addressable
822
839
  def merge(uri)
823
840
  return self + uri
824
841
  end
842
+ alias_method :join, :merge
825
843
 
826
844
  # Destructive form of merge.
827
845
  def merge!(uri)
828
846
  replace_self(self.merge(uri))
829
847
  end
848
+ alias_method :join!, :merge!
830
849
 
831
850
  # Returns the shortest normalized relative form of this URI that uses the
832
851
  # supplied URI as a base for resolution. Returns an absolute URI if
@@ -905,6 +924,13 @@ module Addressable
905
924
  normalized_user = self.user.strip if self.user != nil
906
925
  normalized_password = nil
907
926
  normalized_password = self.password.strip if self.password != nil
927
+
928
+ if normalized_scheme =~ /https?/ && normalized_user == "" &&
929
+ (normalized_password == nil || normalized_password == "")
930
+ normalized_user = nil
931
+ normalized_password = nil
932
+ end
933
+
908
934
  normalized_host = nil
909
935
  normalized_host = self.host.strip.downcase if self.host != nil
910
936
  if normalized_host != nil
@@ -913,8 +939,11 @@ module Addressable
913
939
  rescue Exception
914
940
  nil
915
941
  end
942
+ if normalized_host[-1..-1] == "."
943
+ normalized_host = normalized_host[0...-1]
944
+ end
916
945
  end
917
-
946
+
918
947
  normalized_port = self.port
919
948
  if self.class.scheme_mapping[normalized_scheme] == normalized_port
920
949
  normalized_port = nil
@@ -1117,6 +1146,8 @@ module Addressable
1117
1146
  private
1118
1147
  # Resolves paths to their simplest form.
1119
1148
  def self.normalize_path(path)
1149
+ # Section 5.2.4 of RFC 3986
1150
+
1120
1151
  return nil if path.nil?
1121
1152
  normalized_path = path.dup
1122
1153
  previous_state = normalized_path.dup