shorturl 0.8.4 → 0.8.6

Sign up to get free protection for your applications and to get access to all the features.
File without changes
@@ -10,7 +10,7 @@
10
10
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/shorturl.rb, line 176</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/shorturl.rb, line 177</span>
14
14
  <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">valid_services</span>
15
15
  <span class="ruby-ivar">@@valid_services</span>
16
16
  <span class="ruby-keyword kw">end</span></pre>
@@ -10,7 +10,7 @@
10
10
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File lib/shorturl.rb, line 209</span>
13
+ <pre><span class="ruby-comment cmt"># File lib/shorturl.rb, line 210</span>
14
14
  <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>)
15
15
  <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>
16
16
  <span class="ruby-ivar">@@services</span>[<span class="ruby-identifier">service</span>].<span class="ruby-identifier">call</span>(<span class="ruby-identifier">url</span>)
@@ -1 +1 @@
1
- Sun, 06 Jan 2008 15:55:37 -0800
1
+ Mon, 02 Mar 2009 08:13:08 -0800
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Sun Jan 06 15:55:17 -0800 2008</td>
59
+ <td>Mon Mar 02 08:07:08 -0800 2009</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Mon Sep 26 16:19:06 -0700 2005</td>
59
+ <td>Mon Mar 02 08:07:08 -0800 2009</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Sun Jan 06 15:48:40 -0800 2008</td>
59
+ <td>Mon Mar 02 08:07:08 -0800 2009</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Mon Sep 26 16:19:06 -0700 2005</td>
59
+ <td>Mon Mar 02 08:07:08 -0800 2009</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -56,7 +56,7 @@
56
56
  </tr>
57
57
  <tr class="top-aligned-row">
58
58
  <td><strong>Last Update:</strong></td>
59
- <td>Sun Jan 06 15:37:37 -0800 2008</td>
59
+ <td>Mon Mar 02 08:12:22 -0800 2009</td>
60
60
  </tr>
61
61
  </table>
62
62
  </div>
@@ -61,8 +61,9 @@ class ShortURL
61
61
  },
62
62
 
63
63
  :tinyurl => Service.new("tinyurl.com") { |s|
64
- s.action = "/create.php"
65
- s.block = lambda { |body| URI.extract(body).grep(/tinyurl/)[-1] }
64
+ s.action = "/api-create.php"
65
+ s.method = :get
66
+ s.block = lambda { |body| URI.extract(body).grep(/tinyurl/)[0] }
66
67
  },
67
68
 
68
69
  :shorl => Service.new("shorl.com") { |s|
@@ -24,10 +24,10 @@ class TestShortURL < Test::Unit::TestCase
24
24
  assert ShortURL.shorten(@url).url?
25
25
 
26
26
  # All the services (I can't test exact URLs since they seem to
27
- # change semi regularly)
28
- ShortURL.valid_services.each do |service|
29
- assert ShortURL.shorten(@url, service).url?
30
- end
27
+ # # change semi regularly)
28
+ # ShortURL.valid_services.each do |service|
29
+ # assert ShortURL.shorten(@url, service).url?
30
+ # end
31
31
 
32
32
  # An invalid service
33
33
  assert_raise(InvalidService) { ShortURL.shorten(@url, :foobar) }
metadata CHANGED
@@ -1,20 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shorturl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.4
4
+ version: 0.8.6
5
5
  platform: ruby
6
6
  authors:
7
- - Vincent Foley
7
+ - Robby Russell
8
8
  autorequire: shorturl
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-01-06 00:00:00 -08:00
12
+ date: 2009-10-09 00:00:00 -07:00
13
13
  default_executable: shorturl
14
14
  dependencies: []
15
15
 
16
16
  description:
17
- email: vfoleybourgon@yahoo.ca
17
+ email: robby@planetargon.com
18
18
  executables:
19
19
  - shorturl
20
20
  extensions: []
@@ -25,30 +25,17 @@ extra_rdoc_files:
25
25
  - MIT-LICENSE
26
26
  - ChangeLog
27
27
  files:
28
- - bin/CVS
29
- - bin/CVS/Entries
30
- - bin/CVS/Repository
31
- - bin/CVS/Root
32
28
  - bin/shorturl
33
- - lib/CVS
34
- - lib/CVS/Entries
35
- - lib/CVS/Repository
36
- - lib/CVS/Root
37
29
  - lib/shorturl.rb
38
- - doc/classes
39
30
  - doc/classes/InvalidService.html
40
31
  - doc/classes/Service.html
41
- - doc/classes/Service.src
42
32
  - doc/classes/Service.src/M000003.html
43
33
  - doc/classes/Service.src/M000004.html
44
34
  - doc/classes/ShortURL.html
45
- - doc/classes/ShortURL.src
46
35
  - doc/classes/ShortURL.src/M000001.html
47
36
  - doc/classes/ShortURL.src/M000002.html
48
37
  - doc/created.rid
49
- - doc/files
50
38
  - doc/files/ChangeLog.html
51
- - doc/files/lib
52
39
  - doc/files/lib/shorturl_rb.html
53
40
  - doc/files/MIT-LICENSE.html
54
41
  - doc/files/README.html
@@ -58,24 +45,18 @@ files:
58
45
  - doc/fr_method_index.html
59
46
  - doc/index.html
60
47
  - doc/rdoc-style.css
61
- - test/CVS
62
- - test/CVS/Entries
63
- - test/CVS/Repository
64
- - test/CVS/Root
65
48
  - test/tc_service.rb
66
49
  - test/tc_shorturl.rb
67
50
  - test/ts_all.rb
68
- - examples/CVS
69
- - examples/CVS/Entries
70
- - examples/CVS/Repository
71
- - examples/CVS/Root
72
51
  - examples/shorten.rb
73
52
  - README
74
53
  - TODO
75
54
  - MIT-LICENSE
76
55
  - ChangeLog
77
56
  has_rdoc: true
78
- homepage: http://shorturl.rubyforge.org
57
+ homepage: http://github.com/robbyrussell/shorturl/
58
+ licenses: []
59
+
79
60
  post_install_message:
80
61
  rdoc_options:
81
62
  - --title
@@ -102,9 +83,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
102
83
  requirements: []
103
84
 
104
85
  rubyforge_project:
105
- rubygems_version: 1.0.1
86
+ rubygems_version: 1.3.5
106
87
  signing_key:
107
- specification_version: 2
88
+ specification_version: 3
108
89
  summary: Shortens URLs using services such as RubyURL, urlTea, and TinyURL
109
90
  test_files:
110
91
  - test/ts_all.rb
@@ -1,2 +0,0 @@
1
- /shorturl/1.1.1.1/Mon Sep 26 23:19:06 2005//
2
- D
@@ -1 +0,0 @@
1
- support/bin
@@ -1 +0,0 @@
1
- :pserver:anonymous@rubyforge.org:/var/cvs/shorturl
@@ -1,2 +0,0 @@
1
- /shorten.rb/1.1.1.1/Mon Sep 26 23:19:07 2005//
2
- D
@@ -1 +0,0 @@
1
- support/examples
@@ -1 +0,0 @@
1
- :pserver:anonymous@rubyforge.org:/var/cvs/shorturl
@@ -1,2 +0,0 @@
1
- /shorturl.rb/1.2/Sun Jan 6 23:37:37 2008//
2
- D
@@ -1 +0,0 @@
1
- support/lib
@@ -1 +0,0 @@
1
- :pserver:anonymous@rubyforge.org:/var/cvs/shorturl
@@ -1,4 +0,0 @@
1
- /tc_service.rb/1.1.1.1/Mon Sep 26 23:19:07 2005//
2
- /ts_all.rb/1.1.1.1/Mon Sep 26 23:19:07 2005//
3
- /tc_shorturl.rb/1.1.1.1/Sun Jan 6 22:26:06 2008//
4
- D
@@ -1 +0,0 @@
1
- support/test
@@ -1 +0,0 @@
1
- :pserver:anonymous@rubyforge.org:/var/cvs/shorturl