rdelicious 1.0.0 → 1.0.1

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/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ == 1.0.1 2008-01-09
2
+
3
+ * Corrected: cgi library call, conflict detected when using ramaze
4
+
1
5
  == 1.0.0 2007-10-29
2
6
 
3
7
  * 1 major enhancement:
@@ -2,7 +2,7 @@ class Rdelicious
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 1
4
4
  MINOR = 0
5
- TINY = 0
5
+ TINY = 1
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
data/lib/rdelicious.rb CHANGED
@@ -2,7 +2,7 @@ $:.unshift File.dirname(__FILE__)
2
2
  require 'rubygems'
3
3
  require 'net/https'
4
4
  require 'rexml/document'
5
- require 'CGI'
5
+ require 'cgi'
6
6
 
7
7
  class Rdelicious
8
8
 
@@ -25,7 +25,7 @@ class Rdelicious
25
25
 
26
26
  # Return true if user already got this url in his delicious list
27
27
  def url_exists?(url)
28
- resp = request("/v1/posts/get?&url=#{CGI::escape(url)}")
28
+ resp = request("/v1/posts/get?&url=#{CGI.escape(url)}")
29
29
  begin
30
30
  print "resp: #{resp}"
31
31
  # XML Document
@@ -39,15 +39,15 @@ class Rdelicious
39
39
 
40
40
  # Add an url and descritpion to user delicious
41
41
  def add(url, description, extended = nil, tags = nil)
42
- request = "/v1/posts/add?&url=#{CGI::escape(url)}&description=#{CGI::escape(description)}"
43
- request << "&extended=#{CGI::escape(extended)}" unless extended.nil?
44
- request << "&tags=#{CGI::escape(tags)}" unless tags.nil?
42
+ request = "/v1/posts/add?&url=#{CGI.escape(url)}&description=#{CGI.escape(description)}"
43
+ request << "&extended=#{CGI.escape(extended)}" unless extended.nil?
44
+ request << "&tags=#{CGI.escape(tags)}" unless tags.nil?
45
45
  request(request)
46
46
  end
47
47
 
48
48
  # Delete an url and descritpion to user delicious
49
49
  def delete(url)
50
- request = "/v1/posts/delete?&url=#{CGI::escape(url)}"
50
+ request = "/v1/posts/delete?&url=#{CGI.escape(url)}"
51
51
  request(request)
52
52
  end
53
53
 
data/website/index.html CHANGED
@@ -33,7 +33,7 @@
33
33
  <h1>rdelicious</h1>
34
34
  <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/rdelicious"; return false'>
35
35
  <p>Get Version</p>
36
- <a href="http://rubyforge.org/projects/rdelicious" class="numbers">1.0.0</a>
36
+ <a href="http://rubyforge.org/projects/rdelicious" class="numbers">1.0.1</a>
37
37
  </div>
38
38
  <h1>&#x2192; &#8216;rdelicious&#8217;</h1>
39
39
 
@@ -61,13 +61,17 @@
61
61
 
62
62
  <span class="ident">print</span> <span class="punct">&quot;</span><span class="string">Correct login</span><span class="punct">&quot;</span> <span class="keyword">if</span> <span class="attribute">@delicious</span><span class="punct">.</span><span class="ident">is_connected?</span>
63
63
 
64
- <span class="attribute">@delicious</span><span class="punct">.</span><span class="ident">add</span><span class="punct">(&quot;</span><span class="string">http://rdelicious.rubyforge.net/</span><span class="punct">&quot;,</span> <span class="punct">&quot;</span><span class="string">Rdelicious Gem</span><span class="punct">&quot;,</span> <span class="ident">extended</span><span class="punct">=&quot;</span><span class="string">Delicious Ruby Wrapper</span><span class="punct">&quot;,</span> <span class="ident">tags</span><span class="punct">=&quot;</span><span class="string">ruby+delicious+gem</span><span class="punct">&quot;)</span>
64
+ <span class="attribute">@delicious</span><span class="punct">.</span><span class="ident">add</span><span class="punct">(&quot;</span><span class="string">http://rdelicious.rubyforge.net/</span><span class="punct">&quot;,</span> <span class="punct">&quot;</span><span class="string">Rdelicious Gem</span><span class="punct">&quot;)</span>
65
65
 
66
- <span class="ident">print</span> <span class="punct">&quot;</span><span class="string">Url inserted into delicious</span><span class="punct">&quot;</span> <span class="keyword">if</span> <span class="attribute">@delicious</span><span class="punct">.</span><span class="ident">url_exists?</span><span class="punct">(&quot;</span><span class="string">http://rdelicious.rubyforge.net/</span><span class="punct">&quot;)</span>
66
+ <span class="keyword">if</span> <span class="attribute">@delicious</span><span class="punct">.</span><span class="ident">url_exists?</span><span class="punct">(&quot;</span><span class="string">http://rdelicious.rubyforge.net/</span><span class="punct">&quot;)</span>
67
+ <span class="ident">print</span> <span class="punct">&quot;</span><span class="string">Url inserted into delicious</span><span class="punct">&quot;</span>
68
+ <span class="keyword">end</span>
67
69
 
68
70
  <span class="attribute">@delicious</span><span class="punct">.</span><span class="ident">delete</span><span class="punct">(&quot;</span><span class="string">http://rdelicious.rubyforge.net</span><span class="punct">&quot;)</span>
69
71
 
70
- <span class="ident">print</span> <span class="punct">&quot;</span><span class="string">Url deleted from delicious</span><span class="punct">&quot;</span> <span class="keyword">if</span> <span class="punct">!</span><span class="attribute">@delicious</span><span class="punct">.</span><span class="ident">url_exists?</span><span class="punct">(&quot;</span><span class="string">http://rdelicious.rubyforge.net/</span><span class="punct">&quot;)</span>
72
+ <span class="keyword">unless</span> <span class="attribute">@delicious</span><span class="punct">.</span><span class="ident">url_exists?</span><span class="punct">(&quot;</span><span class="string">http://rdelicious.rubyforge.net/</span><span class="punct">&quot;)</span>
73
+ <span class="ident">print</span> <span class="punct">&quot;</span><span class="string">Url deleted from delicious</span><span class="punct">&quot;</span>
74
+ <span class="keyword">end</span>
71
75
  </pre></p>
72
76
 
73
77
 
@@ -95,9 +99,9 @@
95
99
  <h2>Contact</h2>
96
100
 
97
101
 
98
- <p>Comments are welcome. Send an email to <a href="mailto:FIXME"><span class="caps">FIXME</span> full name</a> email via the <a href="http://groups.google.com/group/rdelicious">forum</a></p>
102
+ <p>Comments are welcome. Send an email to <a href="mailto:alx.girard@gmail.com">Alexandre Girard</a> via the <a href="http://groups.google.com/group/rdelicious">forum</a></p>
99
103
  <p class="coda">
100
- <a href="FIXME email">FIXME full name</a>, 31st October 2007<br>
104
+ <a href="mailto:alx.girard@gmail.com">Alexandre Girard</a>, 31st October 2007<br>
101
105
  Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
102
106
  </p>
103
107
  </div>
data/website/index.txt CHANGED
@@ -21,13 +21,17 @@ require 'rdelicious'
21
21
 
22
22
  print "Correct login" if @delicious.is_connected?
23
23
 
24
- @delicious.add("http://rdelicious.rubyforge.net/", "Rdelicious Gem", extended="Delicious Ruby Wrapper", tags="ruby+delicious+gem")
24
+ @delicious.add("http://rdelicious.rubyforge.net/", "Rdelicious Gem")
25
25
 
26
- print "Url inserted into delicious" if @delicious.url_exists?("http://rdelicious.rubyforge.net/")
26
+ if @delicious.url_exists?("http://rdelicious.rubyforge.net/")
27
+ print "Url inserted into delicious"
28
+ end
27
29
 
28
30
  @delicious.delete("http://rdelicious.rubyforge.net")
29
31
 
30
- print "Url deleted from delicious" if !@delicious.url_exists?("http://rdelicious.rubyforge.net/")
32
+ unless @delicious.url_exists?("http://rdelicious.rubyforge.net/")
33
+ print "Url deleted from delicious"
34
+ end
31
35
  </pre>
32
36
 
33
37
  h2. Forum
@@ -46,5 +50,5 @@ This code is free to use under the terms of the "Creative Commons GNU GPL":http:
46
50
 
47
51
  h2. Contact
48
52
 
49
- Comments are welcome. Send an email to "FIXME full name":mailto:FIXME email via the "forum":http://groups.google.com/group/rdelicious
53
+ Comments are welcome. Send an email to "Alexandre Girard":mailto:alx.girard@gmail.com via the "forum":http://groups.google.com/group/rdelicious
50
54
 
@@ -37,7 +37,7 @@
37
37
  </div>
38
38
  <%= body %>
39
39
  <p class="coda">
40
- <a href="FIXME email">FIXME full name</a>, <%= modified.pretty %><br>
40
+ <a href="mailto:alx.girard@gmail.com">Alexandre Girard</a>, <%= modified.pretty %><br>
41
41
  Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
42
42
  </p>
43
43
  </div>
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: rdelicious
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.0.0
7
- date: 2007-10-31 00:00:00 +01:00
6
+ version: 1.0.1
7
+ date: 2008-01-09 00:00:00 +01:00
8
8
  summary: Delicious API wrapper for ruby
9
9
  require_paths:
10
10
  - lib