shorturl 0.8.2 → 0.8.3
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +3 -0
- data/README +15 -19
- data/doc/classes/WWW/Service.html +1 -1
- data/doc/classes/WWW/ShortURL.html +25 -37
- data/doc/created.rid +1 -1
- data/doc/files/ChangeLog.html +18 -1
- data/doc/files/MIT-LICENSE.html +1 -1
- data/doc/files/README.html +21 -92
- data/doc/files/TODO.html +1 -1
- data/doc/files/lib/shorturl_rb.html +1 -1
- data/lib/shorturl.rb +21 -51
- data/test/tc_service.rb +1 -1
- data/test/tc_shorturl.rb +0 -1
- metadata +53 -51
data/ChangeLog
CHANGED
data/README
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
= ShortURL 0.8.
|
1
|
+
= ShortURL 0.8.3
|
2
2
|
|
3
3
|
== Summary
|
4
4
|
ShortURL is a very simple library to use URL shortening services such as
|
@@ -13,24 +13,20 @@ http://rubyforge.org/frs/?group_id=732 if you do not want to use the gem.
|
|
13
13
|
|
14
14
|
== Supported services
|
15
15
|
Here is the list of the services supported by ShortURL:
|
16
|
-
*
|
17
|
-
*
|
18
|
-
*
|
19
|
-
*
|
20
|
-
*
|
21
|
-
*
|
22
|
-
*
|
23
|
-
*
|
24
|
-
*
|
25
|
-
*
|
26
|
-
*
|
27
|
-
*
|
28
|
-
*
|
29
|
-
*
|
30
|
-
* http://shortify.com
|
31
|
-
* http://0rz.net
|
32
|
-
* http://skinnylink.com
|
33
|
-
* http://shurl.org
|
16
|
+
* d62
|
17
|
+
* fyad
|
18
|
+
* linktrim
|
19
|
+
* littlink
|
20
|
+
* lns
|
21
|
+
* metamark
|
22
|
+
* minilink
|
23
|
+
* orz
|
24
|
+
* rubyurl
|
25
|
+
* shiturl
|
26
|
+
* shorterlink
|
27
|
+
* shortify
|
28
|
+
* shurl
|
29
|
+
* tinyurl
|
34
30
|
|
35
31
|
== Usage:
|
36
32
|
|
@@ -172,7 +172,7 @@ long URL, and the block of what to do with the HTML code you get.
|
|
172
172
|
23: <span class="ruby-ivar">@hostname</span> = <span class="ruby-identifier">hostname</span>
|
173
173
|
24: <span class="ruby-ivar">@port</span> = <span class="ruby-value">80</span>
|
174
174
|
25: <span class="ruby-ivar">@code</span> = <span class="ruby-value">200</span>
|
175
|
-
26: <span class="ruby-ivar">@method</span> = <span class="ruby-identifier">:
|
175
|
+
26: <span class="ruby-ivar">@method</span> = <span class="ruby-identifier">:get</span>
|
176
176
|
27: <span class="ruby-ivar">@action</span> = <span class="ruby-value str">"/"</span>
|
177
177
|
28: <span class="ruby-ivar">@field</span> = <span class="ruby-value str">"url"</span>
|
178
178
|
29: <span class="ruby-ivar">@block</span> = <span class="ruby-identifier">lambda</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">body</span><span class="ruby-operator">|</span> }
|
@@ -129,58 +129,46 @@ an ArgumentError exception
|
|
129
129
|
Valid <tt>service</tt> values:
|
130
130
|
</p>
|
131
131
|
<ul>
|
132
|
-
<li><tt>:
|
133
|
-
|
134
|
-
</li>
|
135
|
-
<li><tt>:tinyurl</tt>
|
136
|
-
|
137
|
-
</li>
|
138
|
-
<li><tt>:shorl</tt>
|
139
|
-
|
140
|
-
</li>
|
141
|
-
<li><tt>:snipurl</tt>
|
142
|
-
|
143
|
-
</li>
|
144
|
-
<li><tt>:metamark</tt>
|
132
|
+
<li><tt>:d62</tt>
|
145
133
|
|
146
134
|
</li>
|
147
|
-
<li><tt>:
|
135
|
+
<li><tt>:fyad</tt>
|
148
136
|
|
149
137
|
</li>
|
150
|
-
<li><tt>:
|
138
|
+
<li><tt>:linktrim</tt>
|
151
139
|
|
152
140
|
</li>
|
153
|
-
<li><tt>:
|
141
|
+
<li><tt>:littlink</tt>
|
154
142
|
|
155
143
|
</li>
|
156
|
-
<li><tt>:
|
144
|
+
<li><tt>:lns</tt>
|
157
145
|
|
158
146
|
</li>
|
159
|
-
<li><tt>:
|
147
|
+
<li><tt>:metamark</tt>
|
160
148
|
|
161
149
|
</li>
|
162
|
-
<li><tt>:
|
150
|
+
<li><tt>:minilink</tt>
|
163
151
|
|
164
152
|
</li>
|
165
|
-
<li><tt>:
|
153
|
+
<li><tt>:orz</tt>
|
166
154
|
|
167
155
|
</li>
|
168
|
-
<li><tt>:
|
156
|
+
<li><tt>:rubyurl</tt>
|
169
157
|
|
170
158
|
</li>
|
171
159
|
<li><tt>:shiturl</tt>
|
172
160
|
|
173
161
|
</li>
|
174
|
-
<li><tt>:
|
162
|
+
<li><tt>:shorterlink</tt>
|
175
163
|
|
176
164
|
</li>
|
177
|
-
<li><tt>:
|
165
|
+
<li><tt>:shortify</tt>
|
178
166
|
|
179
167
|
</li>
|
180
|
-
<li><tt>:
|
168
|
+
<li><tt>:shurl</tt>
|
181
169
|
|
182
170
|
</li>
|
183
|
-
<li><tt>:
|
171
|
+
<li><tt>:tinyurl</tt>
|
184
172
|
|
185
173
|
</li>
|
186
174
|
</ul>
|
@@ -195,14 +183,14 @@ call-seq:
|
|
195
183
|
onclick="toggleCode('M000002-source');return false;">[Source]</a></p>
|
196
184
|
<div class="method-source-code" id="M000002-source">
|
197
185
|
<pre>
|
198
|
-
<span class="ruby-comment cmt"># File lib/shorturl.rb, line
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
186
|
+
<span class="ruby-comment cmt"># File lib/shorturl.rb, line 166</span>
|
187
|
+
166: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">shorten</span>(<span class="ruby-identifier">url</span>, <span class="ruby-identifier">service</span> = <span class="ruby-identifier">:rubyurl</span>)
|
188
|
+
167: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">valid_services</span>.<span class="ruby-identifier">include?</span> <span class="ruby-identifier">service</span>
|
189
|
+
168: <span class="ruby-ivar">@@services</span>[<span class="ruby-identifier">service</span>].<span class="ruby-identifier">call</span>(<span class="ruby-identifier">url</span>)
|
190
|
+
169: <span class="ruby-keyword kw">else</span>
|
191
|
+
170: <span class="ruby-identifier">raise</span> <span class="ruby-constant">InvalidService</span>
|
192
|
+
171: <span class="ruby-keyword kw">end</span>
|
193
|
+
172: <span class="ruby-keyword kw">end</span>
|
206
194
|
</pre>
|
207
195
|
</div>
|
208
196
|
</div>
|
@@ -225,10 +213,10 @@ Returns @@<a href="ShortURL.html#M000001">valid_services</a>
|
|
225
213
|
onclick="toggleCode('M000001-source');return false;">[Source]</a></p>
|
226
214
|
<div class="method-source-code" id="M000001-source">
|
227
215
|
<pre>
|
228
|
-
<span class="ruby-comment cmt"># File lib/shorturl.rb, line
|
229
|
-
|
230
|
-
|
231
|
-
|
216
|
+
<span class="ruby-comment cmt"># File lib/shorturl.rb, line 137</span>
|
217
|
+
137: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">valid_services</span>
|
218
|
+
138: <span class="ruby-ivar">@@valid_services</span>
|
219
|
+
139: <span class="ruby-keyword kw">end</span>
|
232
220
|
</pre>
|
233
221
|
</div>
|
234
222
|
</div>
|
data/doc/created.rid
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
Wed Mar 15 20:44:35 EST 2006
|
data/doc/files/ChangeLog.html
CHANGED
@@ -56,7 +56,7 @@
|
|
56
56
|
</tr>
|
57
57
|
<tr class="top-aligned-row">
|
58
58
|
<td><strong>Last Update:</strong></td>
|
59
|
-
<td>
|
59
|
+
<td>Wed Mar 15 20:37:02 EST 2006</td>
|
60
60
|
</tr>
|
61
61
|
</table>
|
62
62
|
</div>
|
@@ -70,6 +70,23 @@
|
|
70
70
|
|
71
71
|
<div id="description">
|
72
72
|
<p>
|
73
|
+
0.8.3:
|
74
|
+
</p>
|
75
|
+
<pre>
|
76
|
+
- Fixed and removed services. Used APIs as much as possible.
|
77
|
+
- Default method is GET, not POST anymore.
|
78
|
+
</pre>
|
79
|
+
<p>
|
80
|
+
0.8.2:
|
81
|
+
</p>
|
82
|
+
<pre>
|
83
|
+
- Fixed unit tests
|
84
|
+
- Added shurl.org
|
85
|
+
- Added "random" service to bin/shorturl to pick a random one
|
86
|
+
- Removed shorl.com and skinnylink.com because they no longer seem to
|
87
|
+
be up and running
|
88
|
+
</pre>
|
89
|
+
<p>
|
73
90
|
0.8.1:
|
74
91
|
</p>
|
75
92
|
<pre>
|
data/doc/files/MIT-LICENSE.html
CHANGED
data/doc/files/README.html
CHANGED
@@ -56,7 +56,7 @@
|
|
56
56
|
</tr>
|
57
57
|
<tr class="top-aligned-row">
|
58
58
|
<td><strong>Last Update:</strong></td>
|
59
|
-
<td>
|
59
|
+
<td>Wed Mar 15 20:41:54 EST 2006</td>
|
60
60
|
</tr>
|
61
61
|
</table>
|
62
62
|
</div>
|
@@ -69,7 +69,7 @@
|
|
69
69
|
<div id="contextContent">
|
70
70
|
|
71
71
|
<div id="description">
|
72
|
-
<h1>ShortURL 0.8.
|
72
|
+
<h1>ShortURL 0.8.3</h1>
|
73
73
|
<h2>Summary</h2>
|
74
74
|
<p>
|
75
75
|
ShortURL is a very simple library to use URL shortening services such as
|
@@ -90,61 +90,46 @@ if you do not want to use the gem.
|
|
90
90
|
Here is the list of the services supported by ShortURL:
|
91
91
|
</p>
|
92
92
|
<ul>
|
93
|
-
<li
|
93
|
+
<li>d62
|
94
94
|
|
95
95
|
</li>
|
96
|
-
<li
|
96
|
+
<li>fyad
|
97
97
|
|
98
98
|
</li>
|
99
|
-
<li
|
99
|
+
<li>linktrim
|
100
100
|
|
101
101
|
</li>
|
102
|
-
<li
|
102
|
+
<li>littlink
|
103
103
|
|
104
104
|
</li>
|
105
|
-
<li
|
105
|
+
<li>lns
|
106
106
|
|
107
107
|
</li>
|
108
|
-
<li
|
108
|
+
<li>metamark
|
109
109
|
|
110
110
|
</li>
|
111
|
-
<li
|
111
|
+
<li>minilink
|
112
112
|
|
113
113
|
</li>
|
114
|
-
<li
|
114
|
+
<li>orz
|
115
115
|
|
116
116
|
</li>
|
117
|
-
<li
|
117
|
+
<li>rubyurl
|
118
118
|
|
119
119
|
</li>
|
120
|
-
<li
|
120
|
+
<li>shiturl
|
121
121
|
|
122
122
|
</li>
|
123
|
-
<li
|
123
|
+
<li>shorterlink
|
124
124
|
|
125
125
|
</li>
|
126
|
-
<li
|
126
|
+
<li>shortify
|
127
127
|
|
128
128
|
</li>
|
129
|
-
<li
|
129
|
+
<li>shurl
|
130
130
|
|
131
131
|
</li>
|
132
|
-
<li
|
133
|
-
|
134
|
-
</li>
|
135
|
-
<li><a href="http://littlink.com">littlink.com</a>
|
136
|
-
|
137
|
-
</li>
|
138
|
-
<li><a href="http://clipurl.com">clipurl.com</a>
|
139
|
-
|
140
|
-
</li>
|
141
|
-
<li><a href="http://shortify.com">shortify.com</a>
|
142
|
-
|
143
|
-
</li>
|
144
|
-
<li><a href="http://0rz.net">0rz.net</a>
|
145
|
-
|
146
|
-
</li>
|
147
|
-
<li><a href="http://skinnylink.com">skinnylink.com</a>
|
132
|
+
<li>tinyurl
|
148
133
|
|
149
134
|
</li>
|
150
135
|
</ul>
|
@@ -158,67 +143,10 @@ call-seq:
|
|
158
143
|
puts WWW::ShortURL.shorten("http://mypage.com", :tinyurl)
|
159
144
|
</pre>
|
160
145
|
<p>
|
161
|
-
The second parameter represents the service you want to use.
|
146
|
+
The second parameter represents the service you want to use. See the
|
147
|
+
documentation for <a href="../classes/WWW/ShortURL.html">WWW::ShortURL</a>
|
148
|
+
for a complete list
|
162
149
|
</p>
|
163
|
-
<ul>
|
164
|
-
<li><tt>:rubyurl</tt>
|
165
|
-
|
166
|
-
</li>
|
167
|
-
<li><tt>:tinyurl</tt>
|
168
|
-
|
169
|
-
</li>
|
170
|
-
<li><tt>:shorl</tt>
|
171
|
-
|
172
|
-
</li>
|
173
|
-
<li><tt>:snipurl</tt>
|
174
|
-
|
175
|
-
</li>
|
176
|
-
<li><tt>:metamark</tt>
|
177
|
-
|
178
|
-
</li>
|
179
|
-
<li><tt>:makeashorterlink</tt>
|
180
|
-
|
181
|
-
</li>
|
182
|
-
<li><tt>:skinnylink</tt>
|
183
|
-
|
184
|
-
</li>
|
185
|
-
<li><tt>:linktrim</tt>
|
186
|
-
|
187
|
-
</li>
|
188
|
-
<li><tt>:shorterlink</tt>
|
189
|
-
|
190
|
-
</li>
|
191
|
-
<li><tt>:minlink</tt>
|
192
|
-
|
193
|
-
</li>
|
194
|
-
<li><tt>:lns</tt>
|
195
|
-
|
196
|
-
</li>
|
197
|
-
<li><tt>:fyad</tt>
|
198
|
-
|
199
|
-
</li>
|
200
|
-
<li><tt>:d62</tt>
|
201
|
-
|
202
|
-
</li>
|
203
|
-
<li><tt>:shiturl</tt>
|
204
|
-
|
205
|
-
</li>
|
206
|
-
<li><tt>:littlink</tt>
|
207
|
-
|
208
|
-
</li>
|
209
|
-
<li><tt>:clipurl</tt>
|
210
|
-
|
211
|
-
</li>
|
212
|
-
<li><tt>:shortify</tt>
|
213
|
-
|
214
|
-
</li>
|
215
|
-
<li><tt>:orz</tt>
|
216
|
-
|
217
|
-
</li>
|
218
|
-
<li><tt>:skinnylink</tt>
|
219
|
-
|
220
|
-
</li>
|
221
|
-
</ul>
|
222
150
|
<p>
|
223
151
|
You can use <tt>ShortURL.valid_services</tt> to obtain a list of the valid
|
224
152
|
services (in case I forget to update the documentation)
|
@@ -232,7 +160,8 @@ command line: call-seq:
|
|
232
160
|
http://rubyurl.com/fuuUw
|
233
161
|
$ shorturl -s tinyurl www.google.com
|
234
162
|
http://tinyurl.com/1c2
|
235
|
-
$
|
163
|
+
$ shorturl -s random www.google.com
|
164
|
+
http://linktrim.com/42k
|
236
165
|
</pre>
|
237
166
|
<h2>Thanks</h2>
|
238
167
|
<ul>
|
data/doc/files/TODO.html
CHANGED
data/lib/shorturl.rb
CHANGED
@@ -23,7 +23,7 @@ module WWW
|
|
23
23
|
@hostname = hostname
|
24
24
|
@port = 80
|
25
25
|
@code = 200
|
26
|
-
@method = :
|
26
|
+
@method = :get
|
27
27
|
@action = "/"
|
28
28
|
@field = "url"
|
29
29
|
@block = lambda { |body| }
|
@@ -61,72 +61,55 @@ module WWW
|
|
61
61
|
@@services = {
|
62
62
|
:rubyurl => Service.new("rubyurl.com") { |s|
|
63
63
|
s.code = 302
|
64
|
-
s.
|
65
|
-
s.
|
66
|
-
s.field = "rubyurl[website_url]"
|
64
|
+
s.action = "/rubyurl/remote"
|
65
|
+
s.field = "website_url"
|
67
66
|
s.block = lambda { |body| URI.extract(body)[0].gsub("rubyurl/show/", "") }
|
68
67
|
},
|
69
68
|
|
70
69
|
:tinyurl => Service.new("tinyurl.com") { |s|
|
71
|
-
s.action = "/create.php"
|
72
|
-
s.block = lambda { |body|
|
70
|
+
s.action = "/api-create.php"
|
71
|
+
s.block = lambda { |body| body }
|
73
72
|
},
|
74
73
|
|
75
|
-
:snipurl => Service.new("snipurl.com") { |s|
|
76
|
-
s.action = "/index.php"
|
77
|
-
s.field = "link"
|
78
|
-
s.block = lambda { |body|
|
79
|
-
line = body.split("\n").grep(/txt/)[0]
|
80
|
-
short_url = URI.extract(line)[1][0..-2] # Remove trailing '
|
81
|
-
}
|
82
|
-
},
|
83
|
-
|
84
74
|
:metamark => Service.new("metamark.net") { |s|
|
85
|
-
s.action = "/
|
75
|
+
s.action = "/api/rest/simple"
|
86
76
|
s.field = "long_url"
|
87
|
-
s.block = lambda { |body|
|
77
|
+
s.block = lambda { |body| body }
|
88
78
|
},
|
89
79
|
|
90
|
-
:
|
91
|
-
s.action = "/
|
92
|
-
s.block = lambda { |body| URI.extract(body).grep(/
|
80
|
+
:orz => Service.new("0rz.net") { |s|
|
81
|
+
s.action = "/createget.php"
|
82
|
+
s.block = lambda { |body| URI.extract(body).grep(/0rz.net/)[0] }
|
93
83
|
},
|
94
|
-
|
84
|
+
|
95
85
|
:linktrim => Service.new("linktrim.com") { |s|
|
96
|
-
s.method = :get
|
97
86
|
s.action = "/lt/generate"
|
98
87
|
s.block = lambda { |body| URI.extract(body).grep(/\/linktrim/)[1] }
|
99
88
|
},
|
100
89
|
|
101
90
|
:shorterlink => Service.new("shorterlink.com") { |s|
|
102
|
-
s.method = :get
|
103
91
|
s.action = "/add_url.html"
|
104
92
|
s.block = lambda { |body| URI.extract(body).grep(/shorterlink/)[0] }
|
105
93
|
},
|
106
94
|
|
107
95
|
:minilink => Service.new("minilink.org") { |s|
|
108
|
-
s.method = :get
|
109
96
|
s.block = lambda { |body| URI.extract(body)[-1] }
|
110
97
|
},
|
111
98
|
|
112
99
|
:lns => Service.new("ln-s.net") { |s|
|
113
|
-
s.method = :get
|
114
100
|
s.action = "/home/api.jsp"
|
115
101
|
s.block = lambda { |body| URI.extract(body)[0] }
|
116
102
|
},
|
117
103
|
|
118
104
|
:fyad => Service.new("fyad.org") { |s|
|
119
|
-
s.method = :get
|
120
105
|
s.block = lambda { |body| URI.extract(body).grep(/fyad.org/)[2] }
|
121
106
|
},
|
122
107
|
|
123
108
|
:d62 => Service.new("d62.net") { |s|
|
124
|
-
s.method = :get
|
125
109
|
s.block = lambda { |body| URI.extract(body)[0] }
|
126
110
|
},
|
127
111
|
|
128
112
|
:shiturl => Service.new("shiturl.com") { |s|
|
129
|
-
s.method = :get
|
130
113
|
s.action = "/make.php"
|
131
114
|
s.block = lambda { |body| URI.extract(body).grep(/shiturl/)[0] }
|
132
115
|
},
|
@@ -135,23 +118,13 @@ module WWW
|
|
135
118
|
s.block = lambda { |body| URI.extract(body).grep(/littlink/)[0] }
|
136
119
|
},
|
137
120
|
|
138
|
-
:clipurl => Service.new("clipurl.com") { |s|
|
139
|
-
s.action = "/create.asp"
|
140
|
-
s.block = lambda { |body| URI.extract(body).grep(/clipurl/)[0] }
|
141
|
-
},
|
142
|
-
|
143
121
|
:shortify => Service.new("shortify.com") { |s|
|
144
|
-
s.method = :get
|
145
122
|
s.action = "/shorten.php"
|
146
123
|
s.block = lambda { |body| URI.extract(body).grep(/shortify/)[0] }
|
147
124
|
},
|
148
125
|
|
149
|
-
:orz => Service.new("0rz.net") { |s|
|
150
|
-
s.action = "/create.php"
|
151
|
-
s.block = lambda { |body| URI.extract(body).grep(/0rz/)[0] }
|
152
|
-
},
|
153
|
-
|
154
126
|
:shurl => Service.new("shurl.org") { |s|
|
127
|
+
s.method = :post
|
155
128
|
s.block = lambda { |body| URI.extract(body).grep(/shurl/)[0] }
|
156
129
|
}
|
157
130
|
}
|
@@ -172,23 +145,20 @@ module WWW
|
|
172
145
|
#
|
173
146
|
# Valid +service+ values:
|
174
147
|
#
|
175
|
-
# * <tt>:
|
176
|
-
# * <tt>:
|
177
|
-
# * <tt>:snipurl</tt>
|
178
|
-
# * <tt>:metamark</tt>
|
179
|
-
# * <tt>:makeashorterlink</tt>
|
148
|
+
# * <tt>:d62</tt>
|
149
|
+
# * <tt>:fyad</tt>
|
180
150
|
# * <tt>:linktrim</tt>
|
181
|
-
# * <tt>:
|
182
|
-
# * <tt>:minlink</tt>
|
151
|
+
# * <tt>:littlink</tt>
|
183
152
|
# * <tt>:lns</tt>
|
184
|
-
# * <tt>:
|
185
|
-
# * <tt>:
|
153
|
+
# * <tt>:metamark</tt>
|
154
|
+
# * <tt>:minilink</tt>
|
155
|
+
# * <tt>:orz</tt>
|
156
|
+
# * <tt>:rubyurl</tt>
|
186
157
|
# * <tt>:shiturl</tt>
|
187
|
-
# * <tt>:
|
188
|
-
# * <tt>:clipurl</tt>
|
158
|
+
# * <tt>:shorterlink</tt>
|
189
159
|
# * <tt>:shortify</tt>
|
190
|
-
# * <tt>:orz</tt>
|
191
160
|
# * <tt>:shurl</tt>
|
161
|
+
# * <tt>:tinyurl</tt>
|
192
162
|
#
|
193
163
|
# call-seq:
|
194
164
|
# ShortURL.shorten("http://mypage.com") => Uses RubyURL
|
data/test/tc_service.rb
CHANGED
@@ -31,7 +31,7 @@ class TestService < Test::Unit::TestCase
|
|
31
31
|
service = Service.new("rubyurl.com")
|
32
32
|
assert_equal(service.port, 80)
|
33
33
|
assert_equal(service.code, 200)
|
34
|
-
assert_equal(service.method, :
|
34
|
+
assert_equal(service.method, :get)
|
35
35
|
assert_equal(service.action, "/")
|
36
36
|
assert_equal(service.field, "url")
|
37
37
|
|
data/test/tc_shorturl.rb
CHANGED
@@ -27,7 +27,6 @@ class TestShortURL < Test::Unit::TestCase
|
|
27
27
|
# All the services (I can't test exact URLs since they seem to
|
28
28
|
# change semi regularly)
|
29
29
|
ShortURL.valid_services.each do |service|
|
30
|
-
puts "Testing #{service}"
|
31
30
|
assert ShortURL.shorten(@url, service).url?
|
32
31
|
end
|
33
32
|
|
metadata
CHANGED
@@ -3,11 +3,11 @@ rubygems_version: 0.8.11
|
|
3
3
|
specification_version: 1
|
4
4
|
name: shorturl
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.8.
|
7
|
-
date:
|
6
|
+
version: 0.8.3
|
7
|
+
date: 2006-03-15 00:00:00 -05:00
|
8
8
|
summary: Shortens URLs using services such as TinyURL and RubyURL
|
9
9
|
require_paths:
|
10
|
-
|
10
|
+
- lib
|
11
11
|
email: vfoleybourgon@yahoo.ca
|
12
12
|
homepage: http://shorturl.rubyforge.org
|
13
13
|
rubyforge_project:
|
@@ -18,63 +18,65 @@ bindir: bin
|
|
18
18
|
has_rdoc: true
|
19
19
|
required_ruby_version: !ruby/object:Gem::Version::Requirement
|
20
20
|
requirements:
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
version: 0.0.0
|
21
|
+
- - ">"
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 0.0.0
|
25
24
|
version:
|
26
25
|
platform: ruby
|
27
26
|
signing_key:
|
28
27
|
cert_chain:
|
29
28
|
authors:
|
30
|
-
|
29
|
+
- Vincent Foley
|
31
30
|
files:
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
31
|
+
- bin/shorturl
|
32
|
+
- lib/shorturl.rb
|
33
|
+
- doc/created.rid
|
34
|
+
- doc/rdoc-style.css
|
35
|
+
- doc/files
|
36
|
+
- doc/classes
|
37
|
+
- doc/fr_file_index.html
|
38
|
+
- doc/fr_class_index.html
|
39
|
+
- doc/fr_method_index.html
|
40
|
+
- doc/index.html
|
41
|
+
- doc/files/README.html
|
42
|
+
- doc/files/TODO.html
|
43
|
+
- doc/files/MIT-LICENSE.html
|
44
|
+
- doc/files/ChangeLog.html
|
45
|
+
- doc/files/lib
|
46
|
+
- doc/files/lib/shorturl_rb.html
|
47
|
+
- doc/classes/WWW.html
|
48
|
+
- doc/classes/WWW
|
49
|
+
- doc/classes/WWW/ShortURL.html
|
50
|
+
- doc/classes/WWW/InvalidService.html
|
51
|
+
- doc/classes/WWW/Service.html
|
52
|
+
- test/tc_service.rb
|
53
|
+
- test/tc_shorturl.rb
|
54
|
+
- test/ts_all.rb
|
55
|
+
- examples/shorten.rb
|
56
|
+
- README
|
57
|
+
- TODO
|
58
|
+
- MIT-LICENSE
|
59
|
+
- ChangeLog
|
61
60
|
test_files:
|
62
|
-
|
61
|
+
- test/ts_all.rb
|
63
62
|
rdoc_options:
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
63
|
+
- --title
|
64
|
+
- ShortURL Documentation
|
65
|
+
- --main
|
66
|
+
- README
|
67
|
+
- -S
|
68
|
+
- -N
|
69
|
+
- --all
|
71
70
|
extra_rdoc_files:
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
71
|
+
- README
|
72
|
+
- TODO
|
73
|
+
- MIT-LICENSE
|
74
|
+
- ChangeLog
|
76
75
|
executables:
|
77
|
-
|
76
|
+
- shorturl
|
78
77
|
extensions: []
|
78
|
+
|
79
79
|
requirements: []
|
80
|
-
|
80
|
+
|
81
|
+
dependencies: []
|
82
|
+
|